-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
修复sockopt对UDP无效的问题 #3002
修复sockopt对UDP无效的问题 #3002
Conversation
感谢!大佬你觉得有可能跟底下tcp的逻辑写成一样的吗? |
@yuhan6665 我也想 下面那个是go自己的dialer tcp走的是这个 sockopt也是在这个时候把配置应用到连接 但是udp不知道为什么这里搓了一个土制的 就跳过了这一部分 |
可以的 目前先小堆一点 |
On Windows, the File method of UDPConn is not implemented, so this change will break things. Please take a look. |
Sure? What error did you encounter. |
You are right. I found a way to fix this , but the xray code is a little.... odd, I'm worried about disrupting other functions. This bug will only affect specifying interfaces on Windows, and I don't think much people be using this option on Windows, I think it's best to do so. Maybe report this to golang? |
实在不行先给 windows 关掉这个新功能 |
@yuhan6665 这不是新功能是修bug() Windows上这个小问题并不会导致连不上炸掉 只是还是会像之前那样漏udp而已 实际上在sockopt里对Windows上的udp生效的也就interface这个选项 应该没人闲到在Windows上指interface 我觉得影响不大 而且在Windows上失效的选项可不止这一个() |
哦 哦 那先这样也行 |
只要 outbound sockopt 不为空(包括设置了其他不是给 udp 用的选项),该 outbound udp 就会“连不上炸掉“ |
在 windows 上暂时先关掉了 bf02392 |
This seems to cause some goroutines to stuck forever:
I'm still figuring it out but please consider making it possible to disable this feature via a switch. |
看来这个改动较大。。加个 env var,先默认关掉? |
我觉得是可以的,把前面那个 OS 的判断直接换成一个环境变量来控制就好 |
|
What's your OS and config? |
openwrt/openwrt@4883e4c04f + yichya/luci-app-xray@b5e4393 The configuration generated is massive. I'll try to post a minimal configuration for this later. |
This seems enough: {
"inbounds": [
{
"listen": "127.0.0.53",
"port": 5300,
"protocol": "dokodemo-door",
"settings": {
"address": "1.1.1.1",
"port": 53,
"network": "tcp,udp"
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct",
"settings": {
"domainStrategy": "UseIPv4",
"redirect": ""
},
"streamSettings": {
"sockopt": {
"mark": 252
}
}
}
]
} Run |
May be related to golang/go#29277. Try replacing |
Tried this and seems solved the issue. @yuhan6665 @Fangliding please confirm as well |
I just push a quick patch 3778a36 so all can test it.. |
Tried 3778a36 and it is working well. |
发去warp再也不用打mark了
为了整洁的路由表而战!