This is a Socks5 proxy written in python and forked from balan-proxy project.
- Use gevent instead of Threading Server.
- Support multiple servers, you can easily add them in config file.
- support simple encrypt, to avoid being blocked by GFW.
- merge both local and server in only one file.
The way to start a server:
python proxy.py -s PORT KEY
For example, the below will setup a socks5 server, that listen to port 6789, and use encrypt key "foobar!".
python proxy.py -s 6789 foobar!
The local proxy service depends on a config file to determine:
- which port to listen
- how many servers can connect to
The config file typically looks like below.
local
section is required, and need to specifylisten_port
- More than one proxy sever is allowed.
[local]
# requred
listen_port=8888
[proxy1]
host=your-proxy1.com
port=1234
key=foobar!
[proxy2]
host=your-proxy2.com
port=2345
Syntax:
python proxy.py [-c config]
Defalt the script will take "config.ini" as the default config file.
But you can use another file with -c
option.
- make sure the proxy type is
socks5
- point proxy server to
127.0.0.1
and port asLISTEN_PORT
(the value oflisten_port
)