{"id":44878447,"url":"https://github.com/39ff/docker-rotating-proxy","last_synced_at":"2026-02-17T15:09:44.347Z","repository":{"id":40693497,"uuid":"155305552","full_name":"39ff/docker-rotating-proxy","owner":"39ff","description":"create your rotating proxy server with docker. self hosted rotating proxy service.","archived":false,"fork":false,"pushed_at":"2023-03-23T20:15:50.000Z","size":74,"stargazers_count":158,"open_issues_count":4,"forks_count":47,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-02T03:11:20.094Z","etag":null,"topics":["anonymous","docker","http-proxy","https-proxy","proxy","rotating-proxy","socks-proxy","tor"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/39ff.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}},"created_at":"2018-10-30T01:29:00.000Z","updated_at":"2024-04-30T18:29:49.000Z","dependencies_parsed_at":"2022-07-18T03:30:41.608Z","dependency_job_id":null,"html_url":"https://github.com/39ff/docker-rotating-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/39ff/docker-rotating-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/39ff%2Fdocker-rotating-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/39ff%2Fdocker-rotating-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/39ff%2Fdocker-rotating-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/39ff%2Fdocker-rotating-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/39ff","download_url":"https://codeload.github.com/39ff/docker-rotating-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/39ff%2Fdocker-rotating-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29548206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["anonymous","docker","http-proxy","https-proxy","proxy","rotating-proxy","socks-proxy","tor"],"created_at":"2026-02-17T15:09:43.553Z","updated_at":"2026-02-17T15:09:44.341Z","avatar_url":"https://github.com/39ff.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Rotating Proxy Config Generator\n\n- Fully Optimized for Web Scraping Usage.\n- HTTP/HTTPS Support (see wiki)\n- socks5 with Authorization Proxy to HTTP(S) proxy convert compatible by [Gost](https://github.com/ginuerzh/gost)\n- You can use a VPN as an HTTP proxy.(powered by [gluetun](https://github.com/qdm12/gluetun) )\n- Making it IP address based authentication makes it easier to use in your program.(selenium,puppeteer etc)\n\n\n```\n               Docker Container\n               ----------------------------------\nClient \u003c----\u003e  Squid  \u003c-\u003e HTTP/HTTPS Rotate Proxies---\\ \n                       |\n        ---------------|-\u003e Gost \u003c-\u003e Socks5 Proxy    --- Internet\n                       |\n        --------------\u003c-\u003e VPN to HTTP Proxy \u003c--------/\n                     \n        \n\nIt can be used in two ways.\n1.Automatically control the proxy and rotate each request -\u003e use Squid\n2.Control the proxy programmatically　-\u003e use Gost Port\n\n```\n\n\n## Usage Example\n\n### Configuring IPs to allow the use of the Rotating Proxy\nIf you want to use it from outside, please specify the **your** IP address to allowed_ip.txt\n\nhttp://httpbin.org/ip\n\nExample:\n```\n93.184.216.34\n108.62.57.53\n```\n\n### 1. Create your proxyList.txt(If HTTP/Socks is provided)\nSearch FreeProxy List or Paid/Subscribe ProxyService Provider.\n\nexample : https://github.com/clarketm/proxy-list\n\n#### Format\n```\nIPAddress:Port:Type(socks5 or http or https or httpsquid):Username:Password\nIPAddress:Port:Type(socks5 or http or https or httpsquid)\nIPAddress:Port\n```\n\n### 1.1 Create Your OpenVPN Config(If HTTP/Socks is NOT provided)\nsee [example](openvpn/)\n\n### Format\n```\nopenvpn/{name}\nopenvpn/{name}/{name2}.ovpn\nopenvpn/{name}/secret\n```\n\n### 2. Generate docker-compose.yml\n```\ngit clone https://github.com/39ff/docker-rotating-proxy\ncd docker-rotating-proxy \u0026\u0026 cd setup\ndocker run --rm -it -v \"$(pwd):/app\" composer install\ncd ..\n# If you don't want to set up OpenVPN, please remove it.\nrm -rf ./openvpn/*\ndocker run --rm -it -v \"$(pwd):/app/\" php:7.4-cli php /app/setup/generate.php\ncat docker-compose.yml\ndocker-compose up -d\ncurl https://httpbin.org/ip --proxy http://127.0.0.1:3128\n```\n\n### How to it works?\n![pattern1](https://user-images.githubusercontent.com/7544687/97991581-fdc2f380-1e24-11eb-99f3-df9885d627a2.png)\n\n- Sometimes you may need the same IP address for a series of steps.\nTo deal with this problem, we have built a new relay server via gost.\n\n- Most open proxies will be unavailable in a few days.\nTherefore, it is useless to build a server for every open proxy, so we use squid's cache_peer to rotate a large number of open proxies.\n\n### proxyList.txt Example1\n\n```\n127.0.0.1:1080:socks5:yourUsername:yourPassword\n127.0.0.1:44129:httpsquid:mysquidproxy:mysquidpassword\n127.0.0.1:29128:httpsquid:rotatingserviceUsername:password\n169.254.0.1:1080:socks5:paidsocksUsername:paidsocksPassword\n127.0.0.1:80\n172.31.22.222:8080\n```\n\n## proxyList.txt Example2\nHere are some practical examples.\n\nusing NordVPN,TorGuard,Luminati\n\n```\n89.187.161.86:80:httpsquid:yourNordVPNEmail@example.com:NordVPNPassword\n173.254.222.146:1080:socks5:yourTorGuardUsername:Password\nzproxy.lum-superproxy.io:22225:httpsquid:yourLuminatiUsername:Password\n```\n\n\n\n## Generated docker-compose.yml example\n```\nversion: '3.4'\nservices:\n    squid:\n        ports:\n            - '3128:3128'\n        image: 'b4tman/squid:5.8'\n        volumes:\n            - './config:/etc/squid/conf.d:ro'\n        container_name: dockersquid_rotate\n        environment:\n            - SQUID_CONFIG_FILE=/etc/squid/conf.d/squid.conf\n        extra_hosts:\n            - 'host.docker.internal:host-gateway'\n        healthcheck:\n            test: [CMD-SHELL, 'export https_proxy=127.0.0.1:3128 \u0026\u0026 export http_proxy=127.0.0.1:3128 \u0026\u0026 wget -q -Y on  -O - https://checkip.amazonaws.com || exit 1']\n            retries: 5\n            timeout: 10s\n            start_period: 10s\n            interval: 300s\n    proxy1:\n        ports:\n            - '30000:30000'\n        image: 'ginuerzh/gost:latest'\n        container_name: dockergost_1\n        command: '-L=:30000 -F=socks5://vpn:unlimited@82.196.7.200:2434'\n    vpn2:\n        ports:\n            - '30001:8888/tcp'\n            - '50000:8388'\n        image: qmcgaw/gluetun\n        container_name: dockervpn_2\n        devices:\n            - '/dev/net/tun:/dev/net/tun'\n        cap_add:\n            - NET_ADMIN\n        volumes:\n            - './openvpn/hk-hkg.prod.surfshark.comsurfshark_openvpn_tcp.ovpn:/gluetun'\n        environment:\n            - VPN_SERVICE_PROVIDER=custom\n            - VPN_TYPE=openvpn\n            - OPENVPN_CUSTOM_CONFIG=/gluetun/vpn.ovpn\n            - HTTPPROXY=on\n            - HTTPPROXY_USER=\n            - HTTPPROXY_PASSWORD=\n            - HTTPPROXY_STEALTH=on\n            - OPENVPN_USER=xxxxx\n            - OPENVPN_PASSWORD=yyyyy\n    vpn3:\n        ports:\n            - '30002:8888/tcp'\n            - '50001:8388'\n        image: qmcgaw/gluetun\n        container_name: dockervpn_3\n        devices:\n            - '/dev/net/tun:/dev/net/tun'\n        cap_add:\n            - NET_ADMIN\n        volumes:\n            - './openvpn/jp454.nordvpn.com.tcp443.ovpn:/gluetun'\n        environment:\n            - VPN_SERVICE_PROVIDER=custom\n            - VPN_TYPE=openvpn\n            - OPENVPN_CUSTOM_CONFIG=/gluetun/vpn.ovpn\n            - HTTPPROXY=on\n            - HTTPPROXY_USER=\n            - HTTPPROXY_PASSWORD=\n            - HTTPPROXY_STEALTH=on\n            - OPENVPN_USER=xxxxx\n            - OPENVPN_PASSWORD=yyyyy\n```\n\n## Now try it out\n```\nport 3128 is rotation port.\nRecommended for one-time requests that do not require browser rendering, such as curl\n\nsh-4.2# curl https://httpbin.org/ip --proxy https://127.0.0.1:3128\n{\n  \"origin\": \"82.196.7.200\"\n}\nsh-4.2# curl https://httpbin.org/ip --proxy https://127.0.0.1:3128\n{\n  \"origin\": \"89.187.161.56\"\n}\nsh-4.2# curl https://httpbin.org/ip --proxy https://127.0.0.1:3128\n{\n  \"origin\": \"84.17.37.159\"\n}\nsh-4.2# curl https://httpbin.org/ip --proxy https://127.0.0.1:3128\n{\n  \"origin\": \"81.171.85.49\"\n}\nsh-4.2# \n\nand.. try static ip gateway\nRecommended in selenium, puppeteer and playwright\n\n# curl httpbin.org/ip --proxy http://127.0.0.1:30000\n{\n  \"origin\": \"82.196.7.200\"\n}\n# curl httpbin.org/ip --proxy http://127.0.0.1:30000\n{\n  \"origin\": \"82.196.7.200\"\n}\n\n# curl httpbin.org/ip --proxy http://127.0.0.1:30001\n{\n  \"origin\": \"84.17.37.159\"\n}\n# curl httpbin.org/ip --proxy http://127.0.0.1:30001\n{\n  \"origin\": \"84.17.37.159\"\n}\n```\n\n\n## Warning\nBy default, ports can be used without authentication.\nSome VPSs that are directly exposed globally may require appropriate modifications to the docker-compose.\n\n\n## Example of using a large number of public proxies with real-time updates\nsee [public_proxy_cron.sh](public_proxy_cron.sh)\n```\n0 * * * * /your_sh_path_here/public_proxy_cron.sh\n```\n\n## TODO\n- [ ] Username/Password Auth for Enterprise","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F39ff%2Fdocker-rotating-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F39ff%2Fdocker-rotating-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F39ff%2Fdocker-rotating-proxy/lists"}