Comments (6)
FreeBSD暂不支持-i
绑定网卡。
from natmap.
$ ./natmap -4 -i re0 -s turn.cloudflare.com -h qq.com -b 54320 -t 127.0.0.1 -p 8096
[E] hev_sock_client_tcp src/hev-sock.c:155
[E] tnsk_run src/hev-tnsk.c:107 Start TCP keep-alive service failed.
from natmap.
关于 -i
,我觉得可以像 curl 的 --interface
参数一样支持绑定 IP 地址:
https://github.com/curl/curl/blob/fd567d4f06857f4fc8e2f64ea727b1318f76ad33/lib/cf-socket.c#L401-L648
虽然绑定 IP 地址和绑定网络接口不大一样,但是绝大多数情况下是可以互相替代的,也能给一些暂不支持绑定网口的 OS 一种替代选择。
这种想法如何呢。
from natmap.
根据之前的经验,多网口多拨的场景才需要-i
,如果是需要走非默认路由的网口,也没有根据源地址选择路由的高优先级路由规则(一般都没有),仅绑定IP地址是不行的。(我应该没有记错了吧
from natmap.
仅绑定 IP 地址是应该是有用的。
curl 做的比较直接,对所有不能使用 SO_BINDTODEVICE
的情形,都是将网络接口解析为 IP 地址,然后绑定的是 IP 地址。
具体可以参考我上面引用的代码。
毕竟不考虑多个网口IP地址相同这种古怪的情形,指定来源IP,流量也只能从那个IP的网口出,也就相当于绑定了网口了(
from natmap.
最初的实现就是绑定源地址的,群里有人报多wan口时IP会变的问题。刚也搜索了下群里的记录,是mwan3的情况绑定源地址无效,只能绑定设备才能锁定。对于一般场景绑定源地址应该是可行的,考虑加上。谢谢~
from natmap.
Related Issues (20)
- How about creating the docker image for NATMap?
- 问一个非常弱智的问题 HOT 5
- 在Android上执行时发生了错误 HOT 7
- Origin rule无法完成 HOT 4
- [Feature Request] iptables / nftables forwarding HOT 6
- How does stun - http work? HOT 1
- tcp和udp能否共存? HOT 7
- 添加docker支持 HOT 12
- ssh断开连接问题 HOT 4
- 网络变动后故障 HOT 3
- ddns via cloudflare HOT 1
- 希望能增加参数,不要错误日志,或者把日志写入文件。 HOT 3
- notification scripts can be run manually, but natmap cannot
- 在开启clash的服务器上,无法打洞 HOT 7
- 请求在wireguard安卓客户端增加TXT记录解析 HOT 7
- 是否可以增加个先行脚本参数呢 例如-e 带的脚本 HOT 12
- 编译成静态链接报错 HOT 4
- 如何判断打洞成功 HOT 4
- 作者能不能写一个更新日志 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from natmap.