Proxy is a high performance HTTP(S), websocket, TCP, UDP,Secure DNS, Socks5 proxy server.
10K+
Proxy is a high performance HTTP, HTTPS, HTTPS, websocket, TCP, UDP, Socks5, ss proxy server implemented by golang. It supports parent proxy,nat forward,TCP/UDP port forwarding, SSH transfer, TLS encrypted transmission, protocol conversion. you can expose a local server behind a NAT or firewall to the internet, secure DNS proxy.
Full-platform graphical interface version
GoProxy special authorization
Pull Request is welcomed.
First, you need to clone the project to your account, and then modify the code on the dev branch.
Finally, Pull Request to dev branch of goproxy project, and contribute code for efficiency.
PR needs to explain what changes have been made and why you change them.
Because for some reason, we cannot access our services elsewhere. We can build a secure tunnel to access our services through multiple connected proxy nodes.
WeChat interface is developed locally, which is convenient to debug.
Remote access to intranet machines.
Play with partners in a LAN game.
something used to be played only in the LAN, now it can be played anywhere.
Instead of 剑内网通,显IP内网通,花生壳,frp and so on.
...
This page is the v6.0 manual, and the other version of the manual can be checked by the following link.
Click to join the proxy group of gitter Click to join the proxy group of telegram
tips:all operations require root permissions.
curl -L https://raw.githubusercontent.com/snail007/goproxy/master/install_auto.sh | bash
The installation is completed, the configuration directory is /etc/proxy, For more detailed usage, please refer to the manual above to further understand the functions you want to use.
If the installation fails or your VPS is not a linux64 system, please follow the semi-automatic step below:
Download address: https://github.com/snail007/goproxy/releases
cd /root/proxy/
wget https://github.com/snail007/goproxy/releases/download/v6.0/proxy-linux-amd64.tar.gz
cd /root/proxy/
wget https://raw.githubusercontent.com/snail007/goproxy/master/install.sh
chmod +x install.sh
./install.sh
Dockerfile root of project uses multistage build and alpine project to comply with best practices. Uses golang 1.10.3 for building as noted in the project README.md and will be pretty small image. total extracted size will be 17.3MB for goproxy latest version.
The default build process builds the master branch (latest commits/ cutting edge), and it can be configured to build specific version, just edit Dockerfile before build, following builds release version 6.0:
ARG GOPROXY_VERSION=v6.0
To Run:
sudo docker build .
sudo docker tag <id from previous step> snail007/goproxy:latest
sudo docker run -d --restart=always --name goproxy -e OPTS="http -p :33080" -p 33080:33080 snail007/goproxy:latest
sudo docker logs -f goproxy
The following tutorial defaults system is Linux, the program is proxy and all operations require root permissions.
If the system are windows, please use proxy.exe.
The following tutorial is to introduce the useage by the command line parameters, or by reading the configuration file to get the parameters.
The specific format is to specify a configuration file by the @ symbol, for example, ./proxy @configfile.txt.
configfile.txt's format: The first line is the subcommand name, and the second line begins a new line: the long format of the parameter = the parameter value, there is no space and double quotes before and after.
The long format of the parameter's beginning is --, the short format of the parameter's beginning is -. If you don't know which short form corresponds to the long format, please look at the help command.
For example, the contents of configfile.txt are as follows:
http
--local-type=tcp
--local=:33080
By default, the log output information does not contain the number of file lines. In some cases, in order to eliminate and positione the program problem, You can use the --debug parameter to output the number of lines of code and the wrong time.
By default, the log is displayed directly on the console, and if you want to save it to the file, you can use the --log parameter.
for example, --log proxy.log, The log will be exported to proxy.log file which is easy to troubleshoot.
HTTP, TCP, UDP proxy process will communicate with parent proxy. In order to secure, we use encrypted communication. Of course, we can choose not to encrypted communication. All communication with parent proxy in this tutorial is encrypted, requiring certificate files.
1.Generate signed certificates and key files through the following commands.
./proxy keygen -C proxy
The certificate file proxy.crt and key file proxy.key will be generated under the current directory.
2.Through the following commands, use the signed certificate proxy.crt and key file proxy.key to issue new certificates: goproxy.crt and goproxy.key.
./proxy keygen -s -C proxy -c goproxy
The certificate file goproxy.crt and key file goproxy.key will be generated under the current program directory.
3.By default, the domain name in the certificate is a random domain and can be specified using the -n test.com parameter.
4.More usage:proxy keygen --help。
After the default execution of proxy, if you want to keep proxy running, you can't close the command line.
If you want to run proxy in the daemon mode, the command line can be shut down, just add the --daemon parameter at the end of the command.
for example: ./proxy http -t tcp -p "0.0.0.0:38080" --daemon
Monitor mode parameter --forever, for example: proxy http --forever,
Proxy will fork subprocess, then monitor the child process, if the subprocess exits, restarts the subprocess after 5 seconds.
This parameter, with the parameter --daemon and the log parameter --log, can guarantee that the proxy has been ran in the background and not exited accidentally.
And you can see the output log of proxy through the log file.
for example: proxy http -p ":9090" --forever --log proxy.log --daemon
When vps is behind the NAT, the network card IP on VPS is an internal network IP, and then you can add the VPS's external network IP to prevent the dead cycle by -g parameter.
Assuming that your VPS outer external network IP is 23.23.23.23, the following command sets the 23.23.23.23 through the -g parameter.
./proxy http -g "23.23.23.23"
HTTP(S)\SOCKS5\SPS proxy support Superior load balance and high availability. Multiple superiors repeat -P parameters.
Load balancing have 5 kinds of policy, It can be specified by the --lb-method parameter.:
roundrobin take turns
leastconn Using minimum connection number
leasttime Use minimum connection time
hash Use the client address to calculate a fixed superior
weight According to the weight and connection number of each superior, choose a superior
Tips:
The load balance check interval can be set by --lb-retrytime, unit milliseconds.
Load balancing connection timeout can be set by --lb-timeout, unit milliseconds.
If the load balance policy is weighted (weight), the -P format is: 2.2.2.2:3880@1,1 is the weight which is greater than 0.
If the load balance strategy is hash, the default is to select the parent based on the client address, and the parent can be selected by switching `- lb-hashtarget', using the access destination address.

./proxy http -t tcp -p "0.0.0.0:38080"

Using local port 8090, assume the parent HTTP proxy is: 22.22.22.22:8080
./proxy http -t tcp -p "0.0.0.0:8090" -T tcp -P "22.22.22.22:8080"
The connection pool is closed by default. If you want to speed up access speed, -L can open the connection pool, the 10 is the size of the connection pool, and the 0 is closed.
It is not good to stability of connection pool when the network is not good.
./proxy http -t tcp -p "0.0.0.0:8090" -T tcp -P "22.22.22.22:8080" -L 10
We can also specify the black and white list files of the domain name, one line for one domain name. The matching rule is the most right-hand matching, for example, baidu.com, which matches ..baidu.com. The domain name of the blacklist is directly headed by the parent proxy, and the domain name of the white list does not go to the parent proxy.
./proxy http -p "0.0.0.0:8090" -T tcp -P "22.22.22.22:8080" -b blocked.txt -d direct.txt

HTTP first level proxy(VPS,IP:22.22.22.22)
./proxy http -t tls -p ":38080" -C proxy.crt -K proxy.key
HTTP second level proxy(local Linux)
./proxy http -t tcp -p ":8080" -T tls -P "22.22.22.22:38080" -C proxy.crt -K proxy.key
accessing the local 8080 port is accessing the proxy port 38080 above VPS.
HTTP second level proxy(local windows)
./proxy.exe http -t tcp -p ":8080" -T tls -P "22.22.22.22:38080" -C proxy.crt -K proxy.key
In your windows system, the mode of the program that needs to surf the Internet by proxy is setted up as HTTP mode, the address is 127.0.0.1, the port is: 8080, the program can go through the encrypted channel through VPS to surf on the internet.

HTTP first level proxy VPS_01,IP:22.22.22.22
./proxy http -t tls -p ":38080" -C proxy.crt -K proxy.key
HTTP second level proxy VPS_02,IP:33.33.33.33
./proxy http -t tls -p ":28080" -T tls -P "22.22.22.22:38080" -C proxy.crt -K proxy.key
HTTP third level proxy(local)
./proxy http -t tcp -p ":8080" -T tls -P "33.33.33.33:28080" -C proxy.crt -K proxy.key
Then access to the local 8080 port is access to the HTTP first level proxy which port is 38080.
We can do Basic authentication for the HTTP proxy, The authenticated username and password can be specified at the command line.
./proxy http -t tcp -p ":33080" -a "user1:pass1" -a "user2:pass2"
If you need multiple users, repeat the -a parameters.
You can also be placed in a file, which is a line, a ‘username: password’, and then specified in -F.
./proxy http -t tcp -p ":33080" -F auth-file.txt
In addition, the HTTP (s) proxy also integrates external HTTP API authentication, and we can specify a HTTP URL interface address by the --auth-url parameter.
When somebody connect the proxy, which will request this URL by GET way, with the following four parameters, and if the HTTP state code 204 is returned, the authentication is successful.
In other cases, authentication failed.
for example:
./proxy http -t tcp -p ":33080" --auth-url "http://test.com/auth.php"
When the user connecte the proxy, which will request this URL by GET way("http://test.com/auth.php"),
with user, pass, IP, and target four parameters:
http://test.com/auth.php?user={USER}&pass={PASS}&ip={IP}&target={TARGET}
user:username
pass:password
ip:user's IP,for example: 192.168.1.200
target:URL user connect to, for example: http://demo.com:80/1.html or https://www.baidu.com:80
If there is no -a or -F or --auth-url parameters, Basic authentication is closed.
By default, proxy will intelligently judge whether a domain name can be accessed. If it cannot be accessed, it will access to parent HTTP proxy.
Through --always, all HTTP proxy traffic can be coercion to the parent HTTP proxy.
./proxy http --always -t tls -p ":28080" -T tls -P "22.22.22.22:38080" -C proxy.crt -K proxy.key

Explanation: the principle of SSH transfer is to take advantage of SSH's forwarding function, which is, after you connect to SSH, you can access to the target address through the SSH proxy.
Suppose there is a vps
Local HTTP (S) proxy use 28080 port,excute:
./proxy http -T ssh -P "2.2.2.2:22" -u user -A demo -t tcp -p ":28080"
Local HTTP (S) proxy use 28080 port,excute:
./proxy http -T ssh -P "2.2.2.2:22" -u user -S user.key -t tcp -p ":28080"

The KCP protocol requires a --kcp-key parameter to set a password which can encrypt and decrypt data.
Http first level proxy(VP
Content type
Image
Digest
Size
25.6 MB
Last updated
almost 8 years ago
docker pull pkptzx/goproxy