-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Sockopt: Allow customSockopt
work for Windows & Darwin
#4576
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
Conversation
I think system param is not needed? If user need a different setting for windows vs linux, they just need to have different config |
It's asked by #4504 (comment) |
简单原因是 lc.Control 传进来的是它的 ctrlNetwork 类型 在绝大多数时候系统都使用 ipv6 socket 操作 v4 地址 所以外面传来一个 udp6 导致判断错误(之前是用地址手动判断所以就没事) |
可能要再加个 [Info] [210361720] app/dispatcher: default route for udp:[2606:4700::]:80
[Debug] [210361720] transport/internet: dialing to udp:[2606:4700::]:80
from [::1]:56594 accepted udp:[2606:4700::]:80
[Info] [210361720] transport/internet: transport/internet: failed to set CustomSockoptInt101An invalid argument was supplied.failed to apply socket options
[Info] [210361720] proxy/freedom: connection opened to udp:[2606:4700::]:80, local endpoint [::]:56595, remote endpoint [2606:4700::]:80
CustomSockoptInt 10 1 An |
@xqzr |
customSockopt
work for Windows & Darwin
因为所有 applyOutboundSocketOptions() 的实现根本就没用到传入的 address,我为了标明它没被用到就写了 ""
|
没看代码,先合了,反正 |
我混淆了...需要的是 IP 版本。有些选项只能在 IPv6 或 IPv4 中调用,跨 IP 版本调用会失败(立即返回) |
图一乐功能现在扩展到 Windows 和 Darwin
添加了不知道有没有用的system选项 和GOOS不匹配就跳过