Skip to content

🌐 基于 Tor 的自动 IP 轮换代理池服务 | Tor-based proxy pool service with automatic IP rotation

License

Notifications You must be signed in to change notification settings

fxaxg/Tor-proxy-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tor Proxy Pool Service 🌐

License Docker

A proxy pool service based on the Tor network that rotates IP addresses from multiple Tor instances to provide a stable proxy service.

✨ Features

  • 🔄 Automatic rotation of multiple Tor instances (10 by default)
  • 🔒 SOCKS5 proxy protocol support
  • 🚀 Simple Docker deployment
  • ⚡ Automatic IP address switching

🚀 Quick Start

Run with Docker

  1. Build the image
docker build -t tor-proxy-pool .
  1. Run the container
docker run -d \
  --name tor-proxy-pool \
  --restart unless-stopped \
  -p 10086:10086 \
  tor-proxy-pool

Test the Proxy

# Check current IP
curl --socks5 127.0.0.1:10086 https://api.ipify.org/?format=json

# Format output with jq
curl --socks5 127.0.0.1:10086 https://api.ipify.org/?format=json | jq '.'

⚙️ Configuration

Tor Configuration (config/torrc)

# Tor SOCKS port range: 38801-38810
SOCKSPort 38801
...
SOCKSPort 38810

# Access Control
SOCKSPolicy accept 127.0.0.1
SOCKSPolicy reject *

# Circuit Update Settings
NewCircuitPeriod 30        # Create new circuit every 30 seconds
CircuitBuildTimeout 10     # Circuit build timeout is 10 seconds

Proxy Service Configuration

  • Default listening port: 10086
  • Proxy protocol: SOCKS5
  • Number of Tor instances: 10 (can be modified in src/proxy.js by updating TOR_PORTS array)

🔧 Advanced Configuration

Customize Number of Tor Instances

  1. Modify SOCKSPort configuration in config/torrc
  2. Update TOR_PORTS array in src/proxy.js
  3. Rebuild and run the container

Adjust Circuit Update Frequency

Modify the following parameters in config/torrc:

  • NewCircuitPeriod: Adjust the interval for automatic circuit switching
  • CircuitBuildTimeout: Adjust the timeout for circuit establishment

📝 Notes

  • This project is for learning and research purposes only
  • Using the Tor network may result in slower network access
  • Additional security measures are recommended for production environments

🔮 Future Plans

  • Support for more protocols
    • HTTP proxy
    • HTTPS proxy
  • Support for more configurations
    • Custom number of Tor instances
    • Custom circuit update frequency
    • Custom listening port

📄 License

MIT License

About

🌐 基于 Tor 的自动 IP 轮换代理池服务 | Tor-based proxy pool service with automatic IP rotation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published