{"id":20445863,"url":"https://github.com/rapid7/go-get-proxied","last_synced_at":"2025-04-05T03:12:17.561Z","repository":{"id":33812283,"uuid":"154325340","full_name":"rapid7/go-get-proxied","owner":"rapid7","description":"Cross platform retrieval of system proxy configurations","archived":false,"fork":false,"pushed_at":"2025-03-18T14:13:52.000Z","size":405,"stargazers_count":55,"open_issues_count":6,"forks_count":26,"subscribers_count":74,"default_branch":"master","last_synced_at":"2025-03-29T02:09:04.580Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rapid7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-23T12:36:46.000Z","updated_at":"2025-02-07T20:53:35.000Z","dependencies_parsed_at":"2024-06-18T15:34:55.225Z","dependency_job_id":"cd3c77eb-d3bd-4ce6-84da-37185c66056c","html_url":"https://github.com/rapid7/go-get-proxied","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fgo-get-proxied","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fgo-get-proxied/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fgo-get-proxied/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fgo-get-proxied/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapid7","download_url":"https://codeload.github.com/rapid7/go-get-proxied/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-15T10:15:07.398Z","updated_at":"2025-04-05T03:12:17.543Z","avatar_url":"https://github.com/rapid7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-get-proxied - Cross platform proxy configurations\n================================\n\n[![Build Status](https://travis-ci.org/rapid7/go-get-proxied.svg)](https://travis-ci.org/rapid7/go-get-proxied) [![Go Report Card](https://goreportcard.com/badge/github.com/rapid7/go-get-proxied)](https://goreportcard.com/report/github.com/rapid7/go-get-proxied)\n\nGo code (golang) package which facilitates the retrieval of system proxy configurations.\n\n#### Installation\n\n* Install this package using `go get github.com/rapid7/go-get-proxied`\n* Or, simply import `go get github.com/rapid7/go-get-proxied`, and use `dep ensure` to include it in your package\n\n#### Usage: \n\n```go\npackage main\nimport (\n    \"fmt\"\n    \"github.com/rapid7/go-get-proxied/proxy\"\n)\nfunc main() {\n    p := proxy.NewProvider(\"\").GetProxy(\"https\", \"https://rapid7.com\")\n    if p != nil {\n        fmt.Printf(\"Found proxy: %s\\n\", p)\n    }\n}\n```\n\n#### Command Line Usage:\n```bash\n\u003e ./go-get-proxied -h\nUsage of ./go-get-proxied:\n  -c string\n    \tOptional. Path to configuration file.\n  -j\tOptional. If a proxy is found, write it as JSON instead of a URL.\n  -l\tOptional. If set, a list of proxy will be returned.\n  -p string\n    \tOptional. The proxy protocol you wish to lookup. Default: https (default \"https\")\n  -t string\n    \tOptional. Target URL which the proxy will be used for. Default: *\n  -v\tOptional. If set, log content will be sent to stderr.\n```\n```bash\n\u003e netsh winhttp set proxy testProxy:8999\n\nCurrent WinHTTP proxy settings:\n\n    Proxy Server(s) :  testProxy:8999\n    Bypass List     :  (none)\n\u003e ./go-get-proxied\n//testProxy:8999\n\u003e ./go-get-proxied -j\n{\n   \"host\": \"testProxy\",\n   \"password\": null,\n   \"port\": 8999,\n   \"protocol\": \"\",\n   \"src\": \"WinHTTP:WinHttpDefault\",\n   \"username\": null\n}\n```\n```bash\n\u003e echo '{\"https\":\"http://testProxy:8999\"}' \u003e proxy.config\n\u003e ./go-get-proxied -c proxy.config\nhttp://testProxy:8999\n\u003e ./go-get-proxied -c proxy.config -j\n{\n   \"host\": \"testProxy\",\n   \"password\": null,\n   \"port\": 8999,\n   \"protocol\": \"http\",\n   \"src\": \"ConfigurationFile\",\n   \"username\": null\n}\n```\n\n#### Configuration:\n\nThe priority of retrieval is the following.\n-  **Windows**:\n   - Configuration File\n   - Environment Variable: `HTTPS_PROXY`, `HTTP_PROXY`, `FTP_PROXY`, or `ALL_PROXY`. `NO_PROXY` is respected.\n   - Internet Options: Automatically detect settings (`WPAD`)\n   - Internet Options: Use automatic configuration script (`PAC`)\n   - Internet Options: Manual proxy server\n   - WINHTTP: (`netsh winhttp`)\n- **Linux**:\n   - Configuration File\n   - Environment Variable: `HTTPS_PROXY`, `HTTP_PROXY`, `FTP_PROXY`, or `ALL_PROXY`. `NO_PROXY` is respected.\n- **MacOS**:\n   - Configuration File\n   - Environment Variable: `HTTPS_PROXY`, `HTTP_PROXY`, `FTP_PROXY`, or `ALL_PROXY`. `NO_PROXY` is respected.\n   - Network Settings: `scutil`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Fgo-get-proxied","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapid7%2Fgo-get-proxied","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Fgo-get-proxied/lists"}