xjasonlyu / tun2socks

tun2socks - powered by gVisor TCP/IP stack
https://github.com/xjasonlyu/tun2socks/wiki
GNU General Public License v3.0
2.86k stars 407 forks source link

[Feature Request] GOST Relay Protocol Support #63

Closed f4nff closed 2 years ago

f4nff commented 2 years ago

github.com/go-gost/relay

socks5 多了一次rtt 握手比较慢

relay响应很快, ss非透明协议,加密,性能需求比较高。

xjasonlyu commented 2 years ago

但它既不是標準協議也不是廣泛使用的協議,而且SS性能要求其實不算高。

xjasonlyu commented 2 years ago

目前有支持relay的服務端嗎,gost支持了?

f4nff commented 2 years ago

https://github.com/ginuerzh/gost/blob/master/relay.go

https://docs.ginuerzh.xyz/gost/relay/

gost -L relay://:12345

支持的,比socks5少一次rtt,而且针对ipv6 udp支持没问题的。

xjasonlyu commented 2 years ago

搞呀,relay 握手速度比socks5 快多了。

有点忙

xjasonlyu commented 2 years ago

或者把gost的 relay+ws/relay+wss 协议移植过来, 然后再加一个负载均衡,那么就不用gost了。

工程量更大了…

bb33bb commented 2 years ago

目前其实速度也挺不错了。

f4nff commented 2 years ago

添加个websocket协议吧,就gost里面的ws,这样一个tun2socks就可以了, 用来用去,也就你这个tun2socks没有功能性bug

cuckoohello commented 2 years ago

把tun2socks移植到了 gost,不过当前udp测速很慢

gost -L "vpn://:0?net=192.168.123.1/24&name=vpn&mtu=1350" -F "relay+wss://"

xjasonlyu commented 2 years ago

把tun2socks移植到了 gost,不过当前udp测速很慢

gost -L "vpn://:0?net=192.168.123.1/24&name=vpn&mtu=1350" -F "relay+wss://"

不知道你是怎么移植的🤔

cuckoohello commented 2 years ago

把tun2socks移植到了 gost,不过当前udp测速很慢 gost -L "vpn://:0?net=192.168.123.1/24&name=vpn&mtu=1350" -F "relay+wss://"

不知道你是怎么移植的🤔 囧,忘记贴了 https://github.com/cuckoohello/gost

f4nff commented 2 years ago

其实,只需要gost的ws/wss协议,其他都没多大作用, 然后负载均衡搞好一些,gost的负载均衡一般, gost 目前太臃肿,

xjasonlyu commented 2 years ago

其实,只需要gost的ws/wss协议,其他都没多大作用, 然后负载均衡搞好一些,gost的负载均衡一般, gost 目前太臃肿,

你项目定位弄错了,本项目重心在于将网络层流量转换成代理,你要的需求应当由代理服务完成。

f4nff commented 2 years ago

如果tun2socks支持ws/wss,那么本地转换就可以少一次,

f4nff commented 2 years ago

tun2socks 支持relay+ws

f4nff commented 2 years ago

socks5握手太慢,多了一次rtt,

f4nff commented 2 years ago

我看tun2socks其实调用了ws库,

xjasonlyu commented 2 years ago

socks5握手太慢,多了一次rtt

你本地哪怕内网转发,都是<1ms的时间,没必要纠结这点无关紧要的rtt。而且现在已经支持了socks5 over unix domain socket,你说的问题更不存在了。

我看tun2socks其实调用了ws库,

是的,不过那只是stats模块http api用的,和代理协议无关。

f4nff commented 2 years ago

根据我实际测试,tun2socks+relay/ws,比现在tun2socks + gost wss响应快很多,只不过那个他没开源

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days