51 Commits
v2.0 ... v2.2

Author SHA1 Message Date
snail007
dd809e82d6 Update README.md 2017-09-16 08:46:52 +08:00
snail007
23a4db9bde Update README.md 2017-09-16 08:42:43 +08:00
snail007
22bdaf02ca Update faststart.md 2017-09-13 18:30:27 +08:00
snail007
43fa26a8cd Update faststart.md 2017-09-13 16:47:18 +08:00
snail007
6bd624cd57 Update faststart.md 2017-09-13 16:46:23 +08:00
snail007
b074bdfc9a Update faststart.md 2017-09-13 16:42:13 +08:00
arraykeys@gmail.com
b6e28c9011 Merge branch 'master' of git@github.com:snail007/goproxy.git 2017-09-13 16:40:08 +08:00
arraykeys@gmail.com
eb62b3d4d7 Signed-off-by: arraykeys@gmail.com <arraykeys@gmail.com> 2017-09-13 16:39:48 +08:00
snail007
f2c0673f2b Update faststart.md 2017-09-13 16:39:24 +08:00
snail007
d8f49b7681 Update faststart.md 2017-09-13 16:36:14 +08:00
snail007
44e1360625 Update faststart.md 2017-09-13 16:35:03 +08:00
snail007
7f4fcb12db Update faststart.md 2017-09-13 16:34:00 +08:00
snail007
d0888c7ec6 Update faststart.md 2017-09-13 16:33:02 +08:00
snail007
2919db17e4 Update faststart.md 2017-09-13 16:22:05 +08:00
snail007
0a007bbfcd Update faststart.md 2017-09-13 16:20:53 +08:00
snail007
e753542738 Update README.md 2017-09-13 16:19:25 +08:00
snail007
98cc96901c Update README.md 2017-09-13 16:19:04 +08:00
snail007
1196e62bbb Merge pull request #1 from snail007/add-license-1
Create LICENSE
2017-09-13 16:11:13 +08:00
snail007
5b08d9a5b2 Create LICENSE 2017-09-13 16:10:58 +08:00
snail007
191c11b02c Update README.md 2017-09-13 16:08:28 +08:00
snail007
fb29c2a590 Update README.md 2017-09-13 16:01:28 +08:00
snail007
7cb5ee79d7 Update README.md 2017-09-13 15:58:26 +08:00
snail007
81d5dd5cb0 Update README.md 2017-09-13 15:55:06 +08:00
snail007
d98e75714f Update README.md 2017-09-13 15:53:45 +08:00
snail007
8b513d19a0 Update README.md 2017-09-13 15:52:43 +08:00
snail007
499997bd9d Update README.md 2017-09-13 15:49:09 +08:00
snail007
2165d32ac2 Update README.md 2017-09-13 15:48:01 +08:00
snail007
34c89bc2e4 Update README.md 2017-09-13 15:46:13 +08:00
snail007
7bdcde5e82 Update README.md 2017-09-13 15:20:35 +08:00
snail007
4070c2b094 Update README.md 2017-09-13 15:19:45 +08:00
arraykeys@gmail.com
dfda43f507 Merge branch 'master' of git@github.com:snail007/goproxy.git 2017-09-13 15:18:20 +08:00
arraykeys@gmail.com
8073cea188 Signed-off-by: arraykeys@gmail.com <arraykeys@gmail.com> 2017-09-13 15:18:09 +08:00
snail007
1cd3ab7be4 Update install_auto.sh 2017-09-13 14:53:53 +08:00
snail007
e71d2203d8 Update install.sh
a
2017-09-12 11:22:11 +08:00
snail007
14987b5a74 Update install_auto.sh 2017-09-12 11:18:32 +08:00
snail007
84a5a08753 Update README.md 2017-09-12 11:17:37 +08:00
snail007
e601526980 Update install.sh 2017-09-12 11:17:09 +08:00
snail007
5c0c51d23d Update install_auto.sh 2017-09-12 11:16:38 +08:00
snail007
54c7f88918 Update install_auto.sh 2017-09-12 11:13:43 +08:00
snail007
79dcce67c0 Update install.sh 2017-09-12 11:13:02 +08:00
snail007
8570d74009 Update install_auto.sh 2017-09-12 11:11:06 +08:00
snail007
6bce1c79d8 Update README.md 2017-09-12 11:00:44 +08:00
snail007
4c1b40c994 Update install_auto.sh 2017-09-12 10:57:35 +08:00
snail007
f7ef3048e7 Update install.sh 2017-09-12 10:56:52 +08:00
snail007
37734ec6bd Update install_auto.sh 2017-09-12 10:56:15 +08:00
snail007
5a0944b54d Update install_auto.sh 2017-09-12 10:55:56 +08:00
snail007
2de0596e69 Update install.sh 2017-09-12 10:37:47 +08:00
snail007
f179ee746d Update README.md 2017-09-12 09:29:45 +08:00
snail007
4427f77a7d Update README.md 2017-09-12 09:28:09 +08:00
arraykeys@gmail.com
a5d82dfdd8 Signed-off-by: arraykeys@gmail.com <arraykeys@gmail.com> 2017-09-11 20:05:42 +08:00
arraykeys@gmail.com
38220e5a99 Signed-off-by: arraykeys@gmail.com <arraykeys@gmail.com> 2017-09-11 20:00:20 +08:00
12 changed files with 106 additions and 39 deletions

21
LICENSE Normal file
View 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.

View File

@ -1,9 +1,18 @@
# goproxy # goproxy
[![stable](https://img.shields.io/badge/stable-stable-green.svg)](https://github.com/snail007/goproxy/)
[![license](https://img.shields.io/github/license/snail007/goproxy.svg?style=plastic)]()
[![download_count](https://img.shields.io/github/downloads/snail007/goproxy/total.svg?style=plastic)](https://github.com/snail007/goproxy/releases)
[![download](https://img.shields.io/github/release/snail007/goproxy.svg?style=plastic)](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"的即可.
@ -14,17 +23,17 @@
#cd /root/proxy/ #cd /root/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
2.下载proxy 2.下载proxy
下载地址:https://github.com/snail007/goproxy/releases 下载地址:https://github.com/snail007/goproxy/releases
#cd /root/proxy/ #cd /root/proxy/
#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
# 进一步了解: # 进一步了解:
1、作为普通一级代理。 1、作为普通一级代理。
默认监听0.0.0.0:33080端口可以使用-p修改端口-i修改绑定ip。 默认监听0.0.0.0:33080端口可以使用-p修改端口-i修改绑定ip。
默认情况 默认情况
./proxy ./proxy
@ -33,7 +42,7 @@
2、作为普通二级代理。 2、作为普通二级代理。
可以通过-P指定上级代理格式是IP:端口 可以通过-P指定上级代理格式是IP:端口
./proxy -P "192.168.1.100:60080" -p 33080 ./proxy -P "192.168.1.100:60080" -p 33080
3、作为加密一级代理。 3、作为加密一级代理。
加密模式的一级代理需要和加密的二级代理配合。 加密模式的一级代理需要和加密的二级代理配合。
@ -43,14 +52,14 @@
比如在你的vps上运行加密一级代理使用参数-x即可默认会使用程序相同目录下面的证书文件proxy.crt和key文件proxy.key。 比如在你的vps上运行加密一级代理使用参数-x即可默认会使用程序相同目录下面的证书文件proxy.crt和key文件proxy.key。
./proxy -x ./proxy -x
或者使用-c和-k指定证书和key文件,ip和端口。 或者使用-c和-k指定证书和key文件,ip和端口。
./proxy -x -c "proxy.crt" -k "proxy.key" -p 58080 ./proxy -x -c "proxy.crt" -k "proxy.key" -p 58080
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
View File

@ -0,0 +1,40 @@
这里以vps centos 64位为例子
Linux 部分
1.Putty工具或其他工具
root登入
2.下载批量命令文件install_auto.sh64位的话直接执行这个命令即可  
#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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
docs/images/image002.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
docs/images/image003.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
docs/images/image004.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
docs/images/image005.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
docs/images/image006.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/images/image007.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -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

View File

@ -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