A high-performance SOCKS5 proxy server written in Go that rotates through multiple upstream proxies. Perfect for distributed scraping, API access, and general proxy needs.
- SOCKS5 proxy server with username/password authentication
- Multiple proxy protocol support (HTTP, HTTPS, SOCKS5, SOCKS5H)
- Round-robin proxy rotation
- Edge mode for fallback to direct connections
- Multi-user support
- Docker support
- Zero runtime dependencies
- IPv6 support
- Clone the repository:
git clone https://github.com/yourusername/go-proxy-rotator.git
cd go-proxy-rotator
- Set up configuration files:
cp .env.example .env
cp users.conf.example users.conf
cp proxies.conf.example proxies.conf
- Edit the configuration files:
users.conf
: Add your username:password pairsproxies.conf
: Add your proxy servers.env
: Adjust settings if needed
- Run with Docker:
docker compose up -d
COMPOSE_PROJECT_NAME=go-proxy-rotator
DC_SOCKS_PROXY_PORT=60255
ENABLE_EDGE_MODE=true
username1:password1
username2:password2
# HTTP/HTTPS proxies
http://proxy1.example.com:8080
https://user:[email protected]:8443
# SOCKS5 proxies
socks5://proxy3.example.com:1080
socks5h://user:[email protected]:1080
Test your connection:
curl --proxy socks5h://username1:password1@localhost:60255 https://api.ipify.org?format=json
make build
Build image:
docker build -t go-proxy-rotator .
Run container:
docker run -d \
-p 60255:1080 \
-v $(pwd)/proxies.conf:/app/proxies.conf:ro \
-v $(pwd)/users.conf:/app/users.conf:ro \
-e ENABLE_EDGE_MODE=true \
go-proxy-rotator
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.