-
Notifications
You must be signed in to change notification settings - Fork 4.9k
header custom & fix dialerProxy with finalmask/udp #5657
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
base: main
Are you sure you want to change the base?
Conversation
|
|
|
|
|
|
( |
已经可以了,只是无法搭配 dialerProxy, |
|
|
|
|
嗯,我也只测试了 dialerProxy 部分, |
|
看了下 Splice 对于出站只需要读方向的 raw conn,对于入站只需要写方向的 raw conn,而 header-custom 和 fragment 都满足这一要求,所以可以直接默认 tcpmask 支持解 wrap 简单测试了下 tcp header-custom 以及有无 tcpmask 的 splice 下的行为和之前一样 明天再测下 udp 的 header-custom 以及 conn 清理细节方面应该就可以了
|
1ca3c57 to
f66ed82
Compare
|
改了下,去掉 OnCloseHeaderError,增加 ServersError,可选在不同 clients 位置过来的数据不对时回应的不同错误 |
tcp/udp 的 header-custom 与修复伪装层下的 sockopt dialerProxy
tcp header-custom 配置
clients: 二维十进制字节数组,客户端将会发送的数据,与 servers 遵循一发一收
servers: 二维十进制字节数组,服务端将会发送的数据,与 clients 遵循一收一发
errors: 仅服务端,二维十进制字节数组,任一 clients 过来的数据不对时返回的数据,没有对应 clients 将不会触发
udp header-custom 配置
client: 十进制字节数组,客户端每个 udp 包头
server: 十进制字节数组,服务端每个 udp 包头
tcp/udp header-custom 目前只支持固定字节验证
tcp 的 header-custom clients 与 servers 不必数量对应
clients 如果没有要发送的将会直接接收剩下的
servers 如果没有要接收的将会直接发送剩下的
一个伪装 ssh banner 的例子,对应
SSH-2.0-OpenSSH_10.0p2 Debian-7\r\n伪装 socks5 user pass 代理 example.com
对应 hex
go 的 json 对字节数组好像原生支持 base64 解析,不确定,可以试试