-
Notifications
You must be signed in to change notification settings - Fork 114
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
指定网卡请求功能 #288
Comments
ok, 最近的版本安排上. |
这个功能是开发完, 比较头疼的是自测代码不好写. |
是的 我这里也在看看~不过我看的估计只有linux才可以吧 |
这个测试麻烦在于, 如果在内网, 指定url, 其实就不需要这个功能. 同网段通信, 目标ip 和网卡出口ip是一个网段的.所以只要指定url就不需要这个功能. 我想到一种测试方式, 在本机虚拟出两块网卡, 中间经过路由器跳到另一个网段的某台机器, 然后观察下源ip地址. 这块可能要看下iptables的一些用法. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl可以使用interface参数指定网卡请求,当遇到多张网卡的时候想要指定一张网卡进行请求就需要用到了
golang我测试了一下也可以实现 希望作者能集成到库中
实现源码
https://github.com/hardPass/code_go_network/blob/master/Golang%20%E7%94%A8%E6%8C%87%E5%AE%9A%E7%BD%91%E5%8D%A1%E7%9A%84IP%E5%8F%91%E9%80%81HTTP%E8%AF%B7%E6%B1%82.go
The text was updated successfully, but these errors were encountered: