Skip to content
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

add source ip support to macOS rootless solution #22

Merged
merged 2 commits into from
Nov 11, 2023
Merged

add source ip support to macOS rootless solution #22

merged 2 commits into from
Nov 11, 2023

Conversation

fakeboboliu
Copy link

还有啥地方要动👴忘了,你改吧(
反正 srcip 是好的

do you guys not have macos devices?
@tsosunchia
Copy link
Member

TCP不需要修改吗?

@tsosunchia tsosunchia self-assigned this Nov 11, 2023
@tsosunchia tsosunchia added the enhancement New feature or request label Nov 11, 2023
@fakeboboliu
Copy link
Author

TCP不需要修改吗?

TCP 不支持,macOS 只给 ICMP 开了口子

@tsosunchia
Copy link
Member

TCP不需要修改吗?

TCP 不支持,macOS 只给 ICMP 开了口子

所以会发生什么,我在macOS上 sudo nexttrace -T 1.1.1.1 --dev ens256的话

@fakeboboliu
Copy link
Author

fakeboboliu commented Nov 11, 2023

TCP不需要修改吗?

TCP 不支持,macOS 只给 ICMP 开了口子

所以会发生什么,我在macOS上 sudo nexttrace -T 1.1.1.1 --dev ens256的话

什么,原来有 --dev arg 吗(
这个参数处理你看着改改吧,处理方式就 getinterfacebyname 然后用 index 写到下面 ctrlFn 里
我只是看到你 1580c61 加的注释就只改了 srcIP
哦看到一开始就转成 srcIP 了,那没事了

至于会发生什么,我又没改 TCP 相关,他该发生什么就会发生什么啊(

@tsosunchia
Copy link
Member

TCP不需要修改吗?

TCP 不支持,macOS 只给 ICMP 开了口子

所以会发生什么,我在macOS上 sudo nexttrace -T 1.1.1.1 --dev ens256的话

什么,原来有 --dev arg 吗( 这个参数处理你看着改改吧,处理方式就 getinterfacebyname 然后用 index 写到下面 ctrlFn 里 我只是看到你 1580c61 加的注释就只改了 srcIP 哦看到一开始就转成 srcIP 了,那没事了

至于会发生什么,我又没改 TCP 相关,他该发生什么就会发生什么啊(

我测试一下看看吧

@tsosunchia
Copy link
Member

tsosunchia commented Nov 11, 2023

ICMP mode IPv4/v6 经检查没问题

@tsosunchia
Copy link
Member

话说你可以帮忙看看
当不用sudo直接nexttrace --tcp 报错 “socket: operation not permitted”时 捕获一下异常,然后告诉用户此时用sudo运行吗

@fakeboboliu
Copy link
Author

fakeboboliu commented Nov 11, 2023

话说你可以帮忙看看 当不用sudo直接nexttrace --tcp 报错 “socket: operation not permitted”时 捕获一下异常,然后告诉用户此时用sudo运行吗

当然,看起来这很简单,得益于正常的抽象我只需要改一处

@fakeboboliu fakeboboliu changed the title add source ip support for macOS rootless solution add source ip support to macOS rootless solution Nov 11, 2023
@tsosunchia
Copy link
Member

经测试可正常运作,并且没有影响其他平台兼容性👍

@tsosunchia tsosunchia merged commit cb63e9b into nxtrace:main Nov 11, 2023
36 checks passed
@tsosunchia
Copy link
Member

已合并,感谢

@tsosunchia
Copy link
Member

大概在周二/周三发版
然后周末合并至主线core

@tsosunchia
Copy link
Member

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

Successfully merging this pull request may close these issues.

2 participants