{"id":36485474,"url":"https://github.com/loicalbertin/sweetcher","last_synced_at":"2026-01-12T01:49:00.254Z","repository":{"id":30251915,"uuid":"118380112","full_name":"loicalbertin/sweetcher","owner":"loicalbertin","description":"Sweetcher: For those who know the hell of enterprise proxies","archived":false,"fork":false,"pushed_at":"2024-06-17T05:04:15.000Z","size":1507,"stargazers_count":15,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-19T06:49:07.570Z","etag":null,"topics":["golang","http-proxy","proxy","switcher"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loicalbertin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-21T22:38:03.000Z","updated_at":"2024-06-05T05:49:04.000Z","dependencies_parsed_at":"2024-03-12T11:55:10.906Z","dependency_job_id":"efc38c5c-9963-4b3e-9565-0ee128edf4e3","html_url":"https://github.com/loicalbertin/sweetcher","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/loicalbertin/sweetcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loicalbertin%2Fsweetcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loicalbertin%2Fsweetcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loicalbertin%2Fsweetcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loicalbertin%2Fsweetcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loicalbertin","download_url":"https://codeload.github.com/loicalbertin/sweetcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loicalbertin%2Fsweetcher/sbom","scorecard":{"id":597559,"data":{"date":"2025-08-11","repo":{"name":"github.com/loicalbertin/sweetcher","commit":"61b1c7922b42adcfb5541f3c36f07a20c932b806"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/draft-release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/draft-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-labeler.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/pr-labeler.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/loicalbertin/sweetcher/tests.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/release.yml:27","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/draft-release.yml:1","Warn: no topLevel permission defined: .github/workflows/pr-labeler.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":2,"reason":"badge detected: InProgress","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.0.4 not signed: https://api.github.com/repos/loicalbertin/sweetcher/releases/34297073","Warn: release artifact v0.0.3 not signed: https://api.github.com/repos/loicalbertin/sweetcher/releases/34287860","Warn: release artifact v0.0.2 not signed: https://api.github.com/repos/loicalbertin/sweetcher/releases/19985169","Warn: release artifact v0.0.1 not signed: https://api.github.com/repos/loicalbertin/sweetcher/releases/11269591","Warn: release artifact v0.0.4 does not have provenance: https://api.github.com/repos/loicalbertin/sweetcher/releases/34297073","Warn: release artifact v0.0.3 does not have provenance: https://api.github.com/repos/loicalbertin/sweetcher/releases/34287860","Warn: release artifact v0.0.2 does not have provenance: https://api.github.com/repos/loicalbertin/sweetcher/releases/19985169","Warn: release artifact v0.0.1 does not have provenance: https://api.github.com/repos/loicalbertin/sweetcher/releases/11269591"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T23:31:52.684Z","repository_id":30251915,"created_at":"2025-08-20T23:31:52.684Z","updated_at":"2025-08-20T23:31:52.684Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","http-proxy","proxy","switcher"],"created_at":"2026-01-12T01:48:58.830Z","updated_at":"2026-01-12T01:49:00.243Z","avatar_url":"https://github.com/loicalbertin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sweetcher: For those who know the hell of enterprise proxies\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/loicalbertin/sweetcher)](https://pkg.go.dev/github.com/loicalbertin/sweetcher) [![Tests](https://github.com/loicalbertin/sweetcher/workflows/Tests/badge.svg)](https://github.com/loicalbertin/sweetcher/actions?query=workflow%3ATests) [![Go Report Card](https://goreportcard.com/badge/github.com/loicalbertin/sweetcher)](https://goreportcard.com/report/github.com/loicalbertin/sweetcher) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=loicalbertin_sweetcher\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=loicalbertin_sweetcher) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Floicalbertin%2Fsweetcher.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Floicalbertin%2Fsweetcher?ref=badge_shield)\n\nSweetcher is a tool inspired from web browsers' proxy switchers plugins like SwitchyOmega or FoxyProxy but witch operate at OS level rather than only for your browser.\n\nIt allows a set of URL patterns to proxies defined in different profiles. And allows to easily switch from one profile to another.\n\n## Here is a little use-case (true story!)\n\nLets say that you are working in a big IT company. This company does not allow its employees to access directly to the net, they have to go through a proxy system called masterproxy.yourcompany.it. This proxy has the one that all employees should use, when it is not out of order it has almost pretty good performances, but unfortunately it blocks some web sites like all file sharing files (google drive, dropbox, github gist (!?!?), ...) or some news sites like reddit (?!?!).\nFortunately you know another proxy (hiddenproxy.yourcompany.it) without blacklists but with poorest performances.\n\nSometimes you also do homeworking, in this case you use a VPN to access your company system and do not use proxies at all for accessing the internet. Some of your company servers are not accessible directly from the VPN and you should use the hidden proxy to reach them.\n\nSo lets put it tougher and write a Sweetcher config:\n\n```yaml\n# First lets define our proxies\nproxies:\n  main: \"https://masterproxy.yourcompany.it:8080\"\n  hidden: \"http://hiddenproxy.yourcompany.it\"\n  ssh_socks: \"socks5://127.0.0.1:1080\"\n\n# Then lets define some profiles\nprofiles:\n  atCompany:\n    # A profile should have a default proxy if none of its rules match\n    default: main\n    # Rules are ordered\n    rules:\n      - host_wildcard: \"gist.github.com\"\n        proxy: hidden\n      - host_wildcard: \"*.yourcompany.it\"\n        # direct is a reserved word that means: \"forward the request directly to the targeted site without using a proxy\"\n        proxy: direct\n      - host_wildcard: \"*.google.*\"\n        proxy: hidden\n      - host_wildcard: \"*.reddit.*\"\n        proxy: hidden\n  homeworking:\n    default: direct\n    rules:\n      - host_wildcard: \"someplace.yourcompany.it\"\n        proxy: hidden\n\n# Finally lets set the current profile\nserver:\n  profile: atCompany\n  # setup the listening address\n  address: \"127.0.0.1:8080\"\n```\n\nThen all you need to do is to setup 127.0.0.1:8080 as your default proxy for your whole system (ie for gnome, apt, docker and so on).\n\nWhen you are at home simply change the current profile to `homeworking` and reload sweetcher. All your apps will use the new set of rules.\n\n## Disclaimer\n\nAn important part of the proxy package is copied from the excellent https://github.com/elazarl/goproxy/ project\nall the credit goes to @elazrd. I only made some adaptations to dynamically set (or not) an http proxy for CONNECT operations (used for HTTPS connections). I was not able to do it with the\noriginal goproxy library. I also plan to add the ability to match on URL patterns not only on host wildcards which is currently not possible for CONNECT operations on goproxy.\n\n## Roadmap\n\n- [ ] Improve documentation starting by a setup guide\n- [x] Use a logger with log levels\n- [ ] Automatically switch profiles based on networks specificities\n- [x] Support https proxies in case of HTTPS CONNECT connections (maybe done by go1.10 \u003chttps://medium.com/@mlowicki/https-proxies-support-in-go-1-10-b956fb501d6b\u003e to be checked)\n- [x] SOCKS 5 support\n- [x] Dynamic configuration reload\n- [ ] URL patterns\n- [ ] metering (errors, rate, ...)\n- [ ] proxies load balancing\n- [ ] Management API (?)\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Floicalbertin%2Fsweetcher.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Floicalbertin%2Fsweetcher?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floicalbertin%2Fsweetcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floicalbertin%2Fsweetcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floicalbertin%2Fsweetcher/lists"}