Skip to content

Sockopt: Add custom sockopt on 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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Fangliding
Copy link
Member

图一乐功能现在扩展到 Windows 和 Darwin
添加了不知道有没有用的system选项 和GOOS不匹配就跳过

@yuhan6665
Copy link
Member

I think system param is not needed? If user need a different setting for windows vs linux, they just need to have different config

@Fangliding
Copy link
Member Author

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)

@xqzr
Copy link
Contributor

xqzr commented Apr 2, 2025

@Fangliding
Copy link
Member Author

简单原因是 lc.Control 传进来的是它的 ctrlNetwork 类型 在绝大多数时候系统都使用 ipv6 socket 操作 v4 地址 所以外面传来一个 udp6 导致判断错误(之前是用地址手动判断所以就没事)
现在改成一直使用地址判断 不会出错了
顺便之前改的udp还传个空地址进去 明明目标地址就在下面(

@xqzr
Copy link
Contributor

xqzr commented Apr 3, 2025

可能要再加个 proto ,有些选项在 UDP 调用会失败

[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

CustomSockoptInt101An

CustomSockoptInt 10 1 An

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants