Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd809e82d6 | ||
|
|
23a4db9bde | ||
|
|
22bdaf02ca | ||
|
|
43fa26a8cd | ||
|
|
6bd624cd57 | ||
|
|
b074bdfc9a | ||
|
|
b6e28c9011 | ||
|
|
eb62b3d4d7 | ||
|
|
f2c0673f2b | ||
|
|
d8f49b7681 | ||
|
|
44e1360625 | ||
|
|
7f4fcb12db | ||
|
|
d0888c7ec6 | ||
|
|
2919db17e4 | ||
|
|
0a007bbfcd | ||
|
|
e753542738 | ||
|
|
98cc96901c | ||
|
|
1196e62bbb | ||
|
|
5b08d9a5b2 | ||
|
|
191c11b02c | ||
|
|
fb29c2a590 | ||
|
|
7cb5ee79d7 | ||
|
|
81d5dd5cb0 | ||
|
|
d98e75714f | ||
|
|
8b513d19a0 | ||
|
|
499997bd9d | ||
|
|
2165d32ac2 | ||
|
|
34c89bc2e4 | ||
|
|
7bdcde5e82 | ||
|
|
4070c2b094 | ||
|
|
dfda43f507 | ||
|
|
8073cea188 | ||
|
|
1cd3ab7be4 | ||
|
|
e71d2203d8 | ||
|
|
14987b5a74 | ||
|
|
84a5a08753 | ||
|
|
e601526980 | ||
|
|
5c0c51d23d | ||
|
|
54c7f88918 | ||
|
|
79dcce67c0 | ||
|
|
8570d74009 | ||
|
|
6bce1c79d8 | ||
|
|
4c1b40c994 | ||
|
|
f7ef3048e7 | ||
|
|
37734ec6bd | ||
|
|
5a0944b54d | ||
|
|
2de0596e69 | ||
|
|
f179ee746d | ||
|
|
4427f77a7d | ||
|
|
a5d82dfdd8 | ||
|
|
38220e5a99 |
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2017 snail007
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
17
README.md
@ -1,9 +1,18 @@
|
|||||||
# goproxy
|
# goproxy
|
||||||
|
[](https://github.com/snail007/goproxy/)
|
||||||
|
[]()
|
||||||
|
[](https://github.com/snail007/goproxy/releases)
|
||||||
|
[](https://github.com/snail007/goproxy/releases)
|
||||||
|
|
||||||
|
# 30秒简介
|
||||||
|
proxy是golang实现的高性能http,https,websocket,tcp代理服务器.程序本身可以作为一级代理,如果设置了上级代理那么可以作为二级代理,乃至N级代理.如果程序不是一级代理,而且上级代理也是本程序,那么可以加密和上级代理之间的通讯,采用底层tls高强度加密,安全无特征.代理时会自动判断访问的网站是否屏蔽,如果被屏蔽那么就会使用上级代理(前提是配置了上级代理)访问网站;如果访问的网站没有被屏蔽,为了加速访问,代理会直接访问网站,不使用上级代理.
|
||||||
|
[图文教程](docs/faststart.md)
|
||||||
# 快速使用:
|
# 快速使用:
|
||||||
提示:所有操作需要root权限.
|
提示:所有操作需要root权限.
|
||||||
|
|
||||||
0.如果你的VPS是linux64位的系统,那么只需要执行下面一句,就可以完成自动安装和配置.
|
0.如果你的VPS是linux64位的系统,那么只需要执行下面一句,就可以完成自动安装和配置.
|
||||||
#wget https://github.com/snail007/goproxy/blob/master/install_auto.sh -O - | sh
|
#curl -L https://raw.githubusercontent.com/snail007/goproxy/master/install_auto.sh | bash
|
||||||
|
安装完成,配置目录是/etc/proxy,更详细的使用方法参考下面的进一步了解.
|
||||||
|
|
||||||
如果你的vps不是linux64位系统,请按照下面的半自动步骤安装:
|
如果你的vps不是linux64位系统,请按照下面的半自动步骤安装:
|
||||||
1.登录你的VPS,下载守护进程monexec,选择合适你的版本,vps一般选择"linux_amd64.tar.gz"的即可.
|
1.登录你的VPS,下载守护进程monexec,选择合适你的版本,vps一般选择"linux_amd64.tar.gz"的即可.
|
||||||
@ -19,7 +28,7 @@
|
|||||||
#wget https://github.com/snail007/goproxy/releases/download/v2.0/proxy-linux-amd64.tar.gz
|
#wget https://github.com/snail007/goproxy/releases/download/v2.0/proxy-linux-amd64.tar.gz
|
||||||
3.下载自动安装脚本
|
3.下载自动安装脚本
|
||||||
#cd /root/proxy/
|
#cd /root/proxy/
|
||||||
#wget https://github.com/snail007/goproxy/blob/master/install.sh
|
#wget https://raw.githubusercontent.com/snail007/goproxy/master/install.sh
|
||||||
#chmod +x install.sh
|
#chmod +x install.sh
|
||||||
#./install.sh
|
#./install.sh
|
||||||
|
|
||||||
@ -48,9 +57,9 @@
|
|||||||
4、作为加密二级代理。
|
4、作为加密二级代理。
|
||||||
加密模式的二级代理需要和加密的一级代理配合。加密模式的二级代理和加密模式的一级代理要使用相同的证书和key文件。
|
加密模式的二级代理需要和加密的一级代理配合。加密模式的二级代理和加密模式的一级代理要使用相同的证书和key文件。
|
||||||
默认会使用程序相同目录下面的证书文件proxy.crt和key文件proxy.key。
|
默认会使用程序相同目录下面的证书文件proxy.crt和key文件proxy.key。
|
||||||
比如在你的windows电脑上允许二级加密代理,需要-P指定上级代理,同时设置-Ps代表是加密的上级代理。
|
比如在你的windows电脑上允许二级加密代理,需要-P指定上级代理,同时设置-X代表是加密的上级代理。
|
||||||
假设一级代理vps外网IP是:115.34.9.63。
|
假设一级代理vps外网IP是:115.34.9.63。
|
||||||
./proxy.exe -Ps -P "115.34.9.63:58080" -c "proxy.crt" -k "proxy.key" -p 18080
|
./proxy.exe -X -P "115.34.9.63:58080" -c "proxy.crt" -k "proxy.key" -p 18080
|
||||||
然后设置你的windos系统中,需要通过代理上网的程序的代理为http模式,地址为:127.0.0.1,端口为:18080,
|
然后设置你的windos系统中,需要通过代理上网的程序的代理为http模式,地址为:127.0.0.1,端口为:18080,
|
||||||
然后程序即可通过加密通道通过vps上网。
|
然后程序即可通过加密通道通过vps上网。
|
||||||
|
|
||||||
|
|||||||
40
docs/faststart.md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
这里以vps centos 64位为例子
|
||||||
|
Linux 部分
|
||||||
|
1.Putty工具(或其他工具)
|
||||||
|
root登入
|
||||||
|
2.下载批量命令文件install_auto.sh(64位的话直接执行这个命令即可)
|
||||||
|
#curl -L https://raw.githubusercontent.com/snail007/goproxy/master/install_auto.sh | bash
|
||||||
|
注意
|
||||||
|
这里的install_auto.sh 源码可以下载修改proxy版本,保存后执行.
|
||||||
|
<img src="https://github.com/snail007/goproxy/blob/master/docs/images/image001.png?raw=true"/>
|
||||||
|
3.修改/etc/proxy/proxy.toml配置文件
|
||||||
|
<img src="https://github.com/snail007/goproxy/blob/master/docs/images/image002.png?raw=true"/>
|
||||||
|
<img src="https://github.com/snail007/goproxy/blob/master/docs/images/image003.png?raw=true"/>
|
||||||
|
<img src="https://github.com/snail007/goproxy/blob/master/docs/images/image004.png?raw=true"/>
|
||||||
|
#/usr/bin/proxyd status
|
||||||
|
如果未运行那么执行调试命令:/usr/bin/proxy
|
||||||
|
如果一切正常,可以使用proxyd命令管理proxy,执行 proxyd 可以查看用法.
|
||||||
|
后台启动proxy: proxyd start
|
||||||
|
4.下载证书加密文件/etc/proxy/proxy.crt和/etc/proxy/proxy.key到windows
|
||||||
|
Windows部分
|
||||||
|
5.https://github.com/snail007/goproxy/releases 下载对应windows版本
|
||||||
|
<img src="https://github.com/snail007/goproxy/blob/master/docs/images/image005.jpg?raw=true"/>
|
||||||
|
<img src="https://github.com/snail007/goproxy/blob/master/docs/images/image006.png?raw=true"/>
|
||||||
|
我的是d:盘
|
||||||
|
6.修改windows下的proxy.toml vps服务ip和上面设置的端口哦
|
||||||
|
<img src="https://github.com/snail007/goproxy/blob/master/docs/images/image007.png?raw=true"/>
|
||||||
|
然后运行proxy.exe即可.
|
||||||
|
这时候浏览器代理服务器就是127.0.0.1:9501啦,完毕!
|
||||||
|
|
||||||
|
要隐藏windows命令用工具下载RunHiddenConsole.exe 写个bat文件都放proxy目录下就行
|
||||||
|
Start.bat
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
echo Starting
|
||||||
|
RunHiddenConsole D:/proxy/proxy.exe
|
||||||
|
|
||||||
|
Stop.bat
|
||||||
|
@echo off
|
||||||
|
echo Stopping
|
||||||
|
taskkill /F /IM proxy.exe > nul
|
||||||
|
exit
|
||||||
BIN
docs/images/image001.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docs/images/image002.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
docs/images/image003.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docs/images/image004.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
docs/images/image005.jpg
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
docs/images/image006.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
docs/images/image007.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
27
install.sh
@ -1,13 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
if [ -e /tmp/proxy ]; then
|
||||||
|
rm -rf /tmp/proxy
|
||||||
|
fi
|
||||||
|
mkdir /tmp/proxy
|
||||||
|
cd /tmp/proxy
|
||||||
# install monexec
|
# install monexec
|
||||||
tar zxvf monexec_*.tar.gz
|
tar zxvf monexec_0.1.1_linux_amd64.tar.gz
|
||||||
cd monexec_*
|
cd monexec_0.1.1_linux_amd64
|
||||||
cp monexec /usr/bin/
|
cp monexec /usr/bin/
|
||||||
chmod +x /usr/bin/monexec
|
chmod +x /usr/bin/monexec
|
||||||
|
cd ..
|
||||||
# #install proxy
|
# #install proxy
|
||||||
tar zxvf proxy-*.tar.gz
|
tar zxvf proxy-linux-amd64.tar.gz
|
||||||
cd proxy-*
|
|
||||||
cp proxy /usr/bin/
|
cp proxy /usr/bin/
|
||||||
cp proxyd /usr/bin/
|
cp proxyd /usr/bin/
|
||||||
chmod +x /usr/bin/proxy
|
chmod +x /usr/bin/proxy
|
||||||
@ -21,16 +26,6 @@ if [ ! -e /etc/proxy/proxy.crt ]; then
|
|||||||
cd /etc/proxy/
|
cd /etc/proxy/
|
||||||
proxy keygen >/dev/null 2>&1
|
proxy keygen >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
rm -rf /tmp/proxy
|
||||||
if [ ! -e /etc/proxy/blocked ]; then
|
|
||||||
cd /etc/proxy/
|
|
||||||
cp blocked /etc/proxy/
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e /etc/proxy/direct ]; then
|
|
||||||
cd /etc/proxy/
|
|
||||||
cp direct /etc/proxy/
|
|
||||||
fii
|
|
||||||
|
|
||||||
echo "install done"
|
echo "install done"
|
||||||
proxyd
|
proxyd
|
||||||
@ -1,20 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
rm -rf /tmp/proxy
|
if [ -e /tmp/proxy ]; then
|
||||||
|
rm -rf /tmp/proxy
|
||||||
|
fi
|
||||||
mkdir /tmp/proxy
|
mkdir /tmp/proxy
|
||||||
cd /tmp/proxy
|
cd /tmp/proxy
|
||||||
wget https://github.com/reddec/monexec/releases/download/v0.1.1/monexec_0.1.1_linux_amd64.tar.gz
|
wget https://github.com/reddec/monexec/releases/download/v0.1.1/monexec_0.1.1_linux_amd64.tar.gz
|
||||||
wget https://github.com/snail007/goproxy/blob/master/release-2.0/proxy-linux-amd64.tar.gz
|
wget https://github.com/snail007/goproxy/releases/download/v2.1/proxy-linux-amd64.tar.gz
|
||||||
|
|
||||||
# install monexec
|
# install monexec
|
||||||
tar zxvf monexec_*.tar.gz
|
tar zxvf monexec_0.1.1_linux_amd64.tar.gz
|
||||||
cd monexec_*
|
cd monexec_0.1.1_linux_amd64
|
||||||
cp monexec /usr/bin/
|
cp monexec /usr/bin/
|
||||||
chmod +x /usr/bin/monexec
|
chmod +x /usr/bin/monexec
|
||||||
|
cd ..
|
||||||
# #install proxy
|
# #install proxy
|
||||||
tar zxvf proxy-*.tar.gz
|
tar zxvf proxy-linux-amd64.tar.gz
|
||||||
cd proxy-*
|
|
||||||
cp proxy /usr/bin/
|
cp proxy /usr/bin/
|
||||||
cp proxyd /usr/bin/
|
cp proxyd /usr/bin/
|
||||||
chmod +x /usr/bin/proxy
|
chmod +x /usr/bin/proxy
|
||||||
@ -28,5 +29,6 @@ if [ ! -e /etc/proxy/proxy.crt ]; then
|
|||||||
cd /etc/proxy/
|
cd /etc/proxy/
|
||||||
proxy keygen >/dev/null 2>&1
|
proxy keygen >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
rm -rf /tmp/proxy
|
||||||
echo "install done"
|
echo "install done"
|
||||||
proxyd
|
proxyd
|
||||||