Coder Social home page Coder Social logo

snail007 / goproxy Goto Github PK

View Code? Open in Web Editor NEW
15.2K 443.0 2.9K 3.73 MB

🔥 Proxy is a high performance HTTP(S) proxies, SOCKS5 proxies,WEBSOCKET, TCP, UDP proxy server implemented by golang. Now, it supports chain-style proxies,nat forwarding in different lan,TCP/UDP port forwarding, SSH forwarding.Proxy是golang实现的高性能http,https,websocket,tcp,socks5代理服务器,支持内网穿透,链式代理,通讯加密,智能HTTP,SOCKS5代理,黑白名单,限速,限流量,限连接数,跨平台,KCP支持,认证API。

Home Page: https://snail007.host900.com/goproxy/manual/zh/

License: GNU General Public License v3.0

Shell 5.88% Go 93.92% Dockerfile 0.20%
http-proxy https-proxy reverse-proxy transparent-proxy socks5-proxy ss-proxy upstream-proxies tcp-proxy udp-proxy dns-proxy

goproxy's People

Contributors

jumping avatar snail007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goproxy's Issues

无效代码

serverName, err0 := sni.ServerNameFromBytes(req.HeadBuf)
hi,上面的代码用于判断servername,但是这里拿到的数据已经是被tls解密过了,所以这个代码应该是多余的了。是这样吗?

http over socks

goproxy启动http代理,但是上级为socks,可以支持吗?

potential use question

Hello,

I am working on a small proxy-type project which I have been coding up in C++, but it is taking a long time and does not support the features that I need so I started to investigate Golang multiplexers/routers, and Proxy servers.

What I am looking for is to develop a type of "middleware" that receives a REST API call from a frontend server and then re-writes the request so that it can be sent out like a proxy server to a backend REST API data server that will return a JSON result.

That JSON result will be re-written into a different JSON format & structure which will be sent back to the original caller.

I am wondering if your "GoProxy" (Proxy Networks) could be made to work along these lines, so I wanted to ask and investigate the potential.

Any ideas, or suggestion would be greatly appreciated.
Thanks in advance.

使用后浏览器报错,客户端日志输出乱码,服务端日志输出证书有问题

一切按教程操作后,浏览器扩展设置HTTPS代理 127.0.0.1 33080
然后Chrome浏览器报错 [代理服务器有误,请检查...] ,如果改成HTTP代理则变成 [xxx.xx 未发送任何数据]

客户端HTTPS代理时提示:

2017/09/24 12:26:19 conn 127.0.0.1:52513 - x.x.x.x:33080 [:80] connected
2017/09/24 12:26:19 conn 127.0.0.1:52513 - x.x.x.x:33080 [:80] released
2017/09/24 12:26:23 pool deamon err dial tcp x.x.x.x:33080: i/o timeout , release pool
2017/09/24 12:26:34 conn 127.0.0.1:52528 - x.x.x.x:33080 [:80] connected
2017/09/24 12:26:34 conn 127.0.0.1:52528 - x.x.x.x:33080 [:80] released
2017/09/24 12:27:26 data err:���
# 我发现这些乱码复制不出来...

客户端HTTP代理时提示:

2017/09/24 12:32:16 conn 127.0.0.1:52772 - x.x.x.x:33080 [www.google.com:443] connected
2017/09/24 12:32:16 conn 127.0.0.1:52772 - x.x.x.x:33080 [www.google.com:443] released
2017/09/24 12:32:17 conn 127.0.0.1:52773 - x.x.x.x:33080 [www.google.com:443] connected
2017/09/24 12:32:17 conn 127.0.0.1:52773 - x.x.x.x:33080 [www.google.com:443] released

服务端无论什么都是提示:

2017/09/24 20:26:18 read err:remote error: tls: bad certificate

证书是通过 ./proxy keygen 生成的。

# 服务器上面的openssl版本
# openssl version
OpenSSL 1.0.1e 11 Feb 2013

客户端设备上也尝试安装这个证书,不过没什么用。
服务器系统 Debian7 x64、本地设备系统 Windows7 32位

普通二级HTTP代理仍然需要 cert file 和 key file?

proxy http -t tcp -p "0.0.0.0:8090" -T tcp -P "127.0.0.1:1080"
2017/10/04 15:10:50 err : open proxy.crt: The system cannot find the file specified.

我以为按照教程中的示例来看,是不需要cert filekey file

1.2.普通二级HTTP代理
使用本地端口8090,假设上级HTTP代理是22.22.22.22:8080
./proxy http -t tcp -p "0.0.0.0:8090" -T tcp -P "22.22.22.22:8080"
1.3.HTTP二级代理(加密)
二级HTTP代理(本地windows)
./proxy.exe http -t tcp -p ":8080" -T tls -P "22.22.22.22:38080" -C proxy.crt -K proxy.key
然后设置你的windos系统中,需要通过代理上网的程序的代理为http模式,地址为:127.0.0.1,端口为:8080,程序即可通过加密通道通过vps上网。

多vps情况,如何随意选择使用哪个?

@snail007 请教个问题

场景:
有5个vps, 想同时代理同一台机器的电脑(比如自己的笔记本),需要随意指定使用哪个代理,5个代理必须同时启动

看了个文档 , 没找到说明, 不知这个场景是否支持,应如何操作

github.com/snail007/goproxy/sdk/android-ios 无法编译

src/github.com/snail007/goproxy/sdk/android-ios/sdk.go:241:9: spsArgs.SSMethod undefined (type services.SPSArgs has no field or method SSMethod)
src/github.com/snail007/goproxy/sdk/android-ios/sdk.go:242:9: spsArgs.SSKey undefined (type services.SPSArgs has no field or method SSKey)
src/github.com/snail007/goproxy/sdk/android-ios/sdk.go:243:9: spsArgs.ParentSSMethod undefined (type services.SPSArgs has no field or method ParentSSMethod)
src/github.com/snail007/goproxy/sdk/android-ios/sdk.go:244:9: spsArgs.ParentSSKey undefined (type services.SPSArgs has no field or method ParentSSKey)
src/github.com/snail007/goproxy/sdk/android-ios/sdk.go:247:9: spsArgs.DisableSS undefined (type services.SPSArgs has no field or method DisableSS)

smallrepo.com 发现

编译日志: https://smallrepo.com/builds/20180522-033328-b7081f6c

client的-T不起作用么?

./proxy bridge -p ":7000" -C proxy.crt -K proxy.key -t kcp --kcp-key key --daemon --forever --log proxy.log
./proxy server -r ":4081@:8090" -P "127.0.0.1:7000" -C proxy.crt -K proxy.key -T kcp --kcp-key key
都没问题,显示
use kcp parent 127.0.0.1:7000

./proxy client -P "192.168.4.8:7000" -C proxy.crt -K proxy.key -T kcp --kcp-key key
显示use tls parent 192.168.4.8:7000
访问accept stream err: broken pipe, retrying...

像是kcp没连上,一直在用tls的感觉?

能否支持GRE协议 转发

能否支持GRE协议 转发?
场景是这样的,公司内网一台服务器作为pptp 的vpn服务器,有一个公网vps,希望在家里通过vps的ip连接公司的vpn服务器,目前尝试都是失败的,貌似原因应该是goproxy目前没有代理GRE协议支持,不知道我说的对不对

二级TCP代理的上级代理有什么要求么?

VPS上的设置

tcp
--tls
--local=0.0.0.0:8080
--parent-type=tcp
--parent=127.0.0.1:8090
--pool-size=0
--cert=proxy.crt
--key=proxy.key

本地的设置

tcp
--local=0.0.0.0:8000
--parent-type=tls
--parent=host:8080
--cert=proxy.crt
--key=proxy.key

但是打不开网页
VPS 的 log

2017/10/31 13:49:46 use tcp parent 127.0.0.1:8090
2017/10/31 13:49:46 conn pool closed
2017/10/31 13:49:46 tls proxy on [::]:8080
2017/10/31 13:50:36 connect to 127.0.0.1:8090 , err:dial tcp 127.0.0.1:8090: i/o timeout
2017/10/31 13:50:36 connect to tcp parent 127.0.0.1:8090 fail, ERR:dial tcp 127.0.0.1:8090: i/o timeout

还是说必须有一个可用的上级代理服务器

能否增加指定DNS?

在非root权限下执行时,无法设置DNS的情况,某些网站无法打开,能否增加指定DNS的参数,来做域名解析?

支持公司的代理吗?

公司上网需要加代理a才能访问互联网,公司把我的需要访问的资源屏蔽了,在公司通过代理a可以访问外网vps,vps可以访问我的资源,相当于我想搭建一个自己的正向代理服务器通过vps访问互联网,但是在访问vps时需要加上公司代理a,看文档好像没有啊。

内网穿透支持范围端口

感谢大神

因为一些特殊的需要,本地开启了5001~5200的端口,不知道是否支持范围端口转发,默认支持
-r ":5001@:5001" ~-r ":5200@:5200"
这样的规则

谢谢了!

error on build

I can not build from source, give this error:

snail007/goproxy$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o proxy 
# github.com/snail007/goproxy/utils
utils/functions.go:153: unknown tls.Config field 'VerifyPeerCertificate' in struct literal
utils/structs.go:159: u.Hostname undefined (type *url.URL has no field or method Hostname)

Windows版运行一天proxy.exe占用大约2g内存

开了一个http代理和一个sock5代理
http -t tcp -p :3128 --log ..\logs\http.log --daemon --forever
socks -t tcp -p :1080 --log ..\logs\sock5.log --daemon --forever

sock5代理的内存一直在涨

希望支持被block或者direct的url自动学习并保存到文件

现在所有的信息都在util.Checker的内存中, 定时会一个个去请求.

导致的问题

  1. 每次重新启动, 所有被墙的网站都需要等待一个timeout才会走parent
  2. 要么用户需要手动维护一份block和direct的列表. 将来可能随着封锁情况的改变, 某些direct的被block了, 某些block的解锁了
  3. 耗费性能. 一大堆url, 都定时一个个去check.

可以参考https://github.com/cyfdecyf/cow, 访问的时候检查一次, 保存成功次数和失败次数. 自动调整和学习.

请问两个问题,多谢

1 这个能在debian软路由上透明代理吗?
2 中转ssh是不是不支持udp啊?如果是那就相当于ssh -D啊,没有意义了啊。

内网穿透失败?

在VPS上面执行bridge 和 server 之后,bridge端不停的刷新

2017/10/10 16:01:40 client default control conn not exists
2017/10/10 16:01:40 client default control conn not exists
2017/10/10 16:01:41 client default control conn not exists
2017/10/10 16:01:42 client default control conn not exists
2017/10/10 16:01:42 client default control conn not exists
2017/10/10 16:01:43 client default control conn not exists

随后,在公司电脑上执行client以后,server端提示:
2017/10/10 16:00:16 default conn 489116836347244 created
bridge端出现了一行
2017/10/10 16:00:16 connection from server , key: default , id: 489116836347244

然后,在另一台电脑上,访问vps的28080端口后,并没有成功跳转到公司电脑的80端口,网页显示不出来,这是什么原因呢?

公司电脑执行client端以后,提示:

2017/10/10 15:58:58 use tls parent 139.xxx.xxx.xxx:28080
2017/10/10 15:58:58 proxy on tunnel client mode

然后就没有任何的提示了

透明代理并设置上游代理无法使用

目的

在路由器上使用透明代理并让所有http及https请求都走上游代理。

操作步骤

1.使用命令proxy http --always -t tcp -p :33080 -T tcp -P "10.249.5.7:8001"开启代理
2.按照4.5手册中配置iptables

结果

设备连上路由器,访问https://www.baidu.com页面无法打开,控制台日志如下

2018/03/14 11:23:54 SNI:https://m.baidu.com:443
2018/03/14 11:23:54 use proxy : true, m.baidu.com:443
2018/03/14 11:23:54 conn 192.168.42.216:53850 - 10.249.5.7:8001 connected [m.baidu.com:443]
2018/03/14 11:23:54 conn 192.168.42.216:53850 - 10.249.5.7:8001 released [m.baidu.com:443]
2018/03/14 11:23:54 SNI:https://p41-keyvalueservice.icloud.com:443
2018/03/14 11:23:54 use proxy : true, p41-keyvalueservice.icloud.com:443
2018/03/14 11:23:54 conn 192.168.42.216:53851 - 10.249.5.7:8001 connected [p41-keyvalueservice.icloud.com:443]
2018/03/14 11:23:54 conn 192.168.42.216:53851 - 10.249.5.7:8001 released [p41-keyvalueservice.icloud.com:443]
2018/03/14 11:23:54 SNI:https://p41-keyvalueservice.icloud.com:443
2018/03/14 11:23:54 use proxy : true, p41-keyvalueservice.icloud.com:443
2018/03/14 11:23:54 conn 192.168.42.216:53852 - 10.249.5.7:8001 connected [p41-keyvalueservice.icloud.com:443]
2018/03/14 11:23:54 conn 192.168.42.216:53852 - 10.249.5.7:8001 released [p41-keyvalueservice.icloud.com:443]
2018/03/14 11:23:54 SNI:https://p41-keyvalueservice.icloud.com:443
2018/03/14 11:23:54 use proxy : true, p41-keyvalueservice.icloud.com:443
2018/03/14 11:23:54 conn 192.168.42.216:53853 - 10.249.5.7:8001 connected [p41-keyvalueservice.icloud.com:443]
2018/03/14 11:23:54 conn 192.168.42.216:53853 - 10.249.5.7:8001 released [p41-keyvalueservice.icloud.com:443]
2018/03/14 11:23:54 SNI:https://p41-keyvalueservice.icloud.com:443
2018/03/14 11:23:54 use proxy : true, p41-keyvalueservice.icloud.com:443
2018/03/14 11:23:54 conn 192.168.42.216:53854 - 10.249.5.7:8001 connected [p41-keyvalueservice.icloud.com:443]
2018/03/14 11:23:54 conn 192.168.42.216:53854 - 10.249.5.7:8001 released [p41-keyvalueservice.icloud.com:443]

另外,直接在浏览器中设置代理可以正常访问各网站。

后台守护运行如何结束啊

我在配置文件里面写了
--local-type=tcp
--local=:58000
--daemon
--forever
现在没法结束了呢,proxy的pid一直在增加,没法kill了

websocket代理怎么搞?

我看介绍里有支持websocket代理,但文档里没有说怎么使用。

我想实现的效果大概如下:

client <--[http,socks,...]--> proxy local <--[websocket]--> proxy remote <--[direct]--> server

UDP proxy does not work properly

I did a try to use it in UDP proxy mode for my KCP on other server and it did not work.
Does UDP proxy forward all UDP packets properly?

Windows执行 proxy.exe keygen 报错

提示 err:exec: "sh": executable file not found in %PATH%

是没有针对widnows修改的原因吗?

Windows10 1709 ,powershell和CMD都出现这个问题

GO依赖管理

可否搞个依赖管理呢? 这样git clone下来 不用git build看错误输出 再去go get了...

发现有异常的dns请求

程序会发起不必要的DNS 请求,有时候会有请求被代理到 阿里云的服务器,出现404 或者 403 ,这是什么原因?
有很多dns请求查询的是 不存在的域名,像是随机的,但是没有后缀

外部API认证支持仅认证IP和target

先说下问题:
这边我这里是使用程序为公司的爬虫代理池提供服务,貌似当前的外部认证API是需要提供Proxy-Authorization字段才能继续访问.........我这里客户端有的不支持设置这个字段
我看了structs.go这个文件的第460行,发现如果用户名和密码不存在就不会通过api请求验证
我这里通过修改structs.go文件让代理可以仅验证IP和target

希望作者大大能考虑在下一个版本支持这个功能~~~
感谢辛苦付出!!!

使用配置文件出现了很诡异的问题

proxy @config.txt

                ########  ########   #######  ##     ## ##    ##
                ##     ## ##     ## ##     ##  ##   ##   ##  ##
                ##     ## ##     ## ##     ##   ## ##     ####
                ########  ########  ##     ##    ###       ##
                ##        ##   ##   ##     ##   ## ##      ##
                ##        ##    ##  ##     ##  ##   ##     ##
                ##        ##     ##  #######  ##     ##    ##

                v3.3 by snail , blog : http://www.host900.com/

2017/10/20 20:29:16 use tcp parent "127.0.0.1:1080"
2017/10/20 20:29:16 conn pool closed
2017/10/20 20:29:16 blocked file loaded , domains : 4833
2017/10/20 20:29:16 direct file loaded , domains : 456
2017/10/20 20:29:16 http servcie fail, ERR: listen tcp: lookup "0.0.0.0: no such host

配置文件config.txt

http
--local-type=tcp
--local="0.0.0.0:8090"
--parent-type=tcp
--parent="127.0.0.1:1080"

然后修改为如下

http
--local-type=tcp
--local="[::]:8090"
--parent-type=tcp
--parent="127.0.0.1:1080"

却出现这种情况

proxy @config.txt

                ########  ########   #######  ##     ## ##    ##
                ##     ## ##     ## ##     ##  ##   ##   ##  ##
                ##     ## ##     ## ##     ##   ## ##     ####
                ########  ########  ##     ##    ###       ##
                ##        ##   ##   ##     ##   ## ##      ##
                ##        ##    ##  ##     ##  ##   ##     ##
                ##        ##     ##  #######  ##     ##    ##

                v3.3 by snail , blog : http://www.host900.com/

2017/10/20 20:30:57 use tcp parent "127.0.0.1:1080"
2017/10/20 20:30:57 conn pool closed
2017/10/20 20:30:57 blocked file loaded , domains : 4833
2017/10/20 20:30:57 direct file loaded , domains : 456
2017/10/20 20:30:57 tcp http(s) proxy on [::]:64199
proxy @config.txt

                ########  ########   #######  ##     ## ##    ##
                ##     ## ##     ## ##     ##  ##   ##   ##  ##
                ##     ## ##     ## ##     ##   ## ##     ####
                ########  ########  ##     ##    ###       ##
                ##        ##   ##   ##     ##   ## ##      ##
                ##        ##    ##  ##     ##  ##   ##     ##
                ##        ##     ##  #######  ##     ##    ##

                v3.3 by snail , blog : http://www.host900.com/

2017/10/20 20:32:26 use tcp parent "127.0.0.1:1080"
2017/10/20 20:32:26 conn pool closed
2017/10/20 20:32:26 blocked file loaded , domains : 4833
2017/10/20 20:32:26 direct file loaded , domains : 456
2017/10/20 20:32:26 tcp http(s) proxy on [::]:64288
proxy @config.txt

                ########  ########   #######  ##     ## ##    ##
                ##     ## ##     ## ##     ##  ##   ##   ##  ##
                ##     ## ##     ## ##     ##   ## ##     ####
                ########  ########  ##     ##    ###       ##
                ##        ##   ##   ##     ##   ## ##      ##
                ##        ##    ##  ##     ##  ##   ##     ##
                ##        ##     ##  #######  ##     ##    ##

                v3.3 by snail , blog : http://www.host900.com/

2017/10/20 20:40:13 use tcp parent "127.0.0.1:1080"
2017/10/20 20:40:13 conn pool closed
2017/10/20 20:40:13 blocked file loaded , domains : 4833
2017/10/20 20:40:13 direct file loaded , domains : 456
2017/10/20 20:40:13 tcp http(s) proxy on [::]:64536

这是端口成了随机了?

只有这样没有问题

proxy http -t tcp -p "0.0.0.0:8090" -T tcp -P "127.0.0.1:1080"

                ########  ########   #######  ##     ## ##    ##
                ##     ## ##     ## ##     ##  ##   ##   ##  ##
                ##     ## ##     ## ##     ##   ## ##     ####
                ########  ########  ##     ##    ###       ##
                ##        ##   ##   ##     ##   ## ##      ##
                ##        ##    ##  ##     ##  ##   ##     ##
                ##        ##     ##  #######  ##     ##    ##

                v3.3 by snail , blog : http://www.host900.com/

2017/10/20 20:30:09 use tcp parent 127.0.0.1:1080
2017/10/20 20:30:09 conn pool closed
2017/10/20 20:30:09 blocked file loaded , domains : 4833
2017/10/20 20:30:09 direct file loaded , domains : 456
2017/10/20 20:30:09 tcp http(s) proxy on [::]:8090

proxy centos 7 的开机自启命令

说明
参考网络上其他人文章。

  1. 手动建立proxy.service服务文件
    vi /etc/systemd/system/proxy.service

  2. 写入以下内容(端口及参数改成自己的ExecStart=/usr/bin/proxy http -t tls -p ":8443" -C /etc/proxy/proxy.crt -K /etc/proxy/proxy.key)

[Unit]
Description=proxy daemon
After=syslog.target network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/bin/proxy http -t tls -p ":8443" -C /etc/proxy/proxy.crt -K /etc/proxy/proxy.key
Restart= always
RestartSec=1min
ExecStop=/usr/bin/killall proxy

[Install]
WantedBy=multi-user.target

3. 开启服务

systemctl start proxy

4. 查看服务开启情况

systemctl status proxy

如果出现Proxy 界面则表示开启服务成功

5. 加入开机自启
systemctl enable proxy

HTTP一级代理,浏览器重用TCP链接请求其他站点 导致404 Error

使用HTTP一级代理模式,浏览器会重用连接到HTTP代理的TCP连接。

例如:
用户打开 http://www.xinhuanet.com/,浏览器创建TCP到goproxy,发送HTTP代理

GET http://www.xinhuanet.com/ HTTP1.1
Host: www.xinhuanet.com

请求,goproxy正确返回http://www.xinhuanet.com/的页面

用户在地址栏输入http://www.people.com.cn/, 浏览器重用原先的TCP链接,发送HTTP代理

GET http://www.people.com.cn/ HTTP1.1
Host: www.people.com.cn

请求,goproxy 没有留意域名已经改变,仍然向www.xinhuanet.com, 结果浏览器仍然显示 www.xinhuanet.com的主页

如果用户在地址栏输入网站二级页面,则大部分情况下返回404 Error。

Block all domains by default

Hello
I want to only whitelist specific domains on our web proxy. I can't find a solution. Is that possible with goproxy?
I hope this is a right place to ask questions.
Thank you

"DNS leak" bug in http proxy mode

blow commands initiation http(s) proxy

#client#  proxy http -t tcp -p ":5656" -T tls -P "SERVER_IP:10801" -C p.crt -K p.key -Z "S" 
#server# proxy http -t tls -p ":10801"  -C p.crt -K p.key --forever --daemon  -z "S"

all is good,,
but client listener have "DNS leak" bug,, for example if we request :
curl -x "127.0.0.1:5656" "https://abc.def/"
we can see "adc.def" host name resolve in client side!!!

this line have problem(maybe):

(*s).domainResolver = utils.NewDomainResolver(*s.cfg.DNSAddress, *s.cfg.DNSTTL)

proxy v4.0 使用kcp做sock5代理有问题

服务器 centos 6.7
proxy : 4.0
运行命令 : proxy socks -t kcp -p "0.0.0.0:9999" -B "xxxxxxxxx"
运行后显示正常, 但用netstat 看不到 9999端口被监听,client连接时提示 connection refused

运行 proxy socks -t tcp -p "0.0.0.0:9999" 的话, 可以看到9999端口被监听,client能正常连接

太强大了 有没有小白级别的入门教程啊

想要实现的目标:
我在公式内网一台电脑架设了一个web服务器,因为没有路由权限,所以需要实现内网穿透,让外网可以访问我在公司内网的服务器。
曾用过花生壳等内网穿透,但是太垃圾了。经常连不上。
请问这个能实现内网穿透吧:::
各位大侠给个步骤呗,一头雾水整不明白啊 。系统是window7

Certificate verification failed in sps mode

Hello

I want to forward https traffic from squid+sslbump to socks via goproxy. In such mode squid requires TLS connection with a parent proxy. If I run goproxy sps mode it fails on certificate verification both in goproxy and squid. But if I run it in http mode everything works fine.

sps config

sps
--cert=/etc/ssl/ca-pluto.free/go-proxy.pluto.free.crt
--key=/etc/ssl/ca-pluto.free/go-proxy.pluto.free.key
--ca=/etc/ssl/ca-pluto.free/ca-pluto.free.crt
--local=127.0.0.1:4129
--local-type=tls
--parent=127.0.0.1:9050
--parent-type=tcp
--parent-service-type=socks
--dns-address=127.0.0.1:53
--dns-ttl=300
--debug
--log=/var/log/go-proxy/proxy.log

Gives in squid logs

Error negotiating SSL on FD 12: error14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate (1/0/0)
TCP connection to 127.0.0.1/4129 failed

goproxy log

2018/04/18 15:19:26.094414 sps.go:101: tls http(s)+socks proxy on 127.0.0.1:4129
2018/04/18 15:20:06.536140 sps.go:137: ERR:tls: failed to verify client's certificate: x509: certificate signed by unknown authority
2018/04/18 15:20:06.536251 sps.go:128: connect to tcp parent 127.0.0.1:9050 fail, ERR:tls: failed to verify client's certificate: x509: certificate signed by unknown authority from 127.0.0.1:54256

For http mode

http
--cert=/etc/ssl/ca-pluto.free/go-proxy.pluto.free.crt
--key=/etc/ssl/ca-pluto.free/go-proxy.pluto.free.key
--ca=/etc/ssl/ca-pluto.free/ca-pluto.free.crt
--local=127.0.0.1:4129
--local-type=tls
--dns-address=127.0.0.1:53
--dns-ttl=300
--debug
--log=/var/log/go-proxy/proxy.log

Gives ok in goproxy log

2018/04/18 15:23:22.463111 http.go:146: tls http(s) proxy on 127.0.0.1:4129
2018/04/18 15:23:35.614123 structs.go:360: CONNECT:github.com:443
2018/04/18 15:23:35.736690 http.go:189: use proxy : false, github.com:443

Is there possible some kind of bug in goproxy or just bad config or misunderstanding?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.