{"id":16162099,"url":"https://github.com/peterdavehello/curl-with-random-proxy","last_synced_at":"2026-04-28T11:06:08.841Z","repository":{"id":70808031,"uuid":"408527450","full_name":"PeterDaveHello/curl-with-random-proxy","owner":"PeterDaveHello","description":"Automatically select a working SOCKS5 proxy and use it with curl as a wrapper script","archived":false,"fork":false,"pushed_at":"2023-03-26T13:50:31.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T08:22:28.467Z","etag":null,"topics":["curl","hacktoberfest","proxy","shell","shell-script","socks5","socks5-proxy"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PeterDaveHello.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":"2021-09-20T16:56:11.000Z","updated_at":"2023-03-25T17:28:06.000Z","dependencies_parsed_at":"2024-10-21T14:37:18.227Z","dependency_job_id":null,"html_url":"https://github.com/PeterDaveHello/curl-with-random-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fcurl-with-random-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fcurl-with-random-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fcurl-with-random-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fcurl-with-random-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeterDaveHello","download_url":"https://codeload.github.com/PeterDaveHello/curl-with-random-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247589830,"owners_count":20963022,"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":["curl","hacktoberfest","proxy","shell","shell-script","socks5","socks5-proxy"],"created_at":"2024-10-10T02:29:03.852Z","updated_at":"2026-04-28T11:06:08.789Z","avatar_url":"https://github.com/PeterDaveHello.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# curl-with-random-proxy\n\n`curl-with-random-proxy` is a wrapper script for `curl`, designed to automatically select a working SOCKS5 proxy for each HTTP/HTTPS request. The script fetches a list of SOCKS5 proxies, tests their connectivity, and chooses a random working proxy to send the request. If a proxy is non-working, it will try the next one and remove the non-working proxy from the list, continuing the process until a working proxy is found or no more proxies are available in the list.\n\n## Features\n\n- Fetch SOCKS5 proxy list from a configurable source\n- Test proxy connectivity before use\n- Automatically try the next proxy and remove non-working proxies from the list\n- Randomly select a working proxy for each request\n- Customizable proxy timeout and list update interval\n- Passes all command-line arguments to the underlying `curl` command\n\n## Prerequisites\n\nThe script relies on the following command line tools, which are commonly available on most Linux systems:\n\n- curl\n- dos2unix\n- date\n- head\n- mkdir\n- mktemp\n- mv\n- stat\n- tail\n- wc\n\nIf any of these tools are missing, you can usually install them using your system's package manager (e.g., `apt`, `yum`, or `pacman`).\n\n## Installation\n\n1. Download the `curl-with-random-proxy` script.\n2. Make the script executable with `chmod +x curl-with-random-proxy`.\n3. Move the script to a directory in your `$PATH`, e.g., `sudo mv curl-with-random-proxy /usr/local/bin/`.\n\n## Usage\n\nUse the `curl-with-random-proxy` command instead of `curl`:\n\n```sh\ncurl-with-random-proxy https://ipinfo.tw\n```\n\nThe script accepts all command-line arguments that curl does, and passes them through to the underlying curl command.\n\n## Customization\n\nYou can customize the following variables through environment variables to suit your needs:\n\n- `SOCKS5_PROXY_LIST`: Path to the file containing the list of SOCKS5 proxies. By default, the script uses a file in the `~/.curl-with-random-proxy` directory.\n- `SOCKS5_PROXY_SOURCE`: URL of the SOCKS5 proxy list source. Defaults to a GitHub project: [TheSpeedX/SOCKS-List](https://github.com/TheSpeedX/PROXY-List).\n- `PROXY_TIMEOUT`: Timeout in seconds for testing proxy connectivity (default: `3`).\n- `PROXY_LIST_TTL`: Time in seconds between updates of the proxy list (default: `10800`, i.e., 3 hours).\n- `CURL_USER_AGENT`: User agent string for `curl` requests (default: a recent Firefox user agent).\n\n## License\n\nGPL-2.0 (GNU GENERAL PUBLIC LICENSE Version 2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdavehello%2Fcurl-with-random-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterdavehello%2Fcurl-with-random-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdavehello%2Fcurl-with-random-proxy/lists"}