-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement port hopping #1064
Conversation
6321cfb
to
092e535
Compare
@@ -82,6 +91,41 @@ func closeHysteria2(h *Hysteria2) { | |||
} | |||
} | |||
|
|||
func parsePorts(portStr string) (ports []uint16) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
common.utils中有NewUnsignedRanges可以直接用,不需要重新写一个新的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
主要是这里接收的参数不是 []uint16,而是 string,格式是 port1,port2-port3,port4,需要解析成前者。
我看 transport/hysteria/conns/udp/hop.go 也是自己实现的 parsePorts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那就先这样吧
* implement port hopping using sing and sing-quic * 更新quic-go * 更新sing * Update go.sum --------- Co-authored-by: wwqgtxx <wwqgtxx@gmail.com>
* implement port hopping using sing and sing-quic * 更新quic-go * 更新sing * Update go.sum --------- Co-authored-by: wwqgtxx <wwqgtxx@gmail.com>
在使用固定端口时,更新到此版本会产生 配置文件中有这种写法
|
@YaeSakuraQvQ 目前server为域名事暂时不可用,请等待修复 |
昨天好像忘记提交这个了,刚才切换分支时才发现 然后测了下老版本是支持域名的,估计是改成 ListenPacket 后解析有问题。我现在得出门了,晚上再研究。 |
@keakon 明天晚上我来修吧,其实不是ListenPacket本身不支持域名,是WriteTo不支持。原来的Unbind是调用Write的,所以在DialContext的时候就已经解析完了 |
@YaeSakuraQvQ @666dechaoge 你们可以试一下7ad37ca |
可以的,单端口域名的也能hy2节点能联通 |
No description provided.