Comments (13)
提供的信息不足,比如运行程序的完整参数。不过我猜测问题是使用了失效的或是不支持TCP协议的STUN服务器。
那么,试试 stun.freeswitch.org
或参考 #18 中的其它地址。
from natmap.
我是根据qBittorrent-NAT-TCP-Hole-Punching使用的,实际命令及输出如下,更换其他stun服务器也不行.
使用环境网络为双wan接入,机器两张网卡做主从备份绑定,断开其中一条wan或指定网卡都没有用
from natmap.
stun.ekiga.net
在我这是无法访问的,stun.freeswitch.org是确定可用的,但我发现你又加了-i bond0参数,那么bond0访问bing.com是否可达?
可以用curl测一下:
curl -i --interface bond0 bing.com
如果不确定的情况下,先不要绑定让默认路由选择出口网卡。
from natmap.
stun_server_tcp = [
"fwa.lifesizecloud.com",
"stun.isp.net.au",
"stun.freeswitch.org",
"stun.voip.blackberry.com",
"stun.nextcloud.com",
"stun.sipnet.com",
"stun.radiojar.com",
"stun.sonetel.com",
"stun.voipgate.com"
bing是正常访问的,在natter正常使用的情况下我尝试了如上natter使用的stun服务器,结果还是跟之前一样
from natmap.
没有贴出实验测试结果,还真猜不到原因。Natter能用就行了,功能是一样的。
from natmap.
一样的问题
root@OpenWrt:~# ./natmap -s stun.freeswitch.org -h www.qq.com -b 2121
[E] hev_sock_client_stun src/hev-sock.c:281
[E] task_entry src/hev-stun.c:289
[E] hev_sock_client_tcp src/hev-sock.c:167
[E] tnsk_run src/hev-tnsk.c:93
[E] hev_sock_client_tcp src/hev-sock.c:167
[E] tnsk_run src/hev-tnsk.c:93
[E] hev_sock_client_tcp src/hev-sock.c:167
[E] tnsk_run src/hev-tnsk.c:93
[E] hev_sock_client_tcp src/hev-sock.c:167
[E] tnsk_run src/hev-tnsk.c:93
[E] hev_sock_client_tcp src/hev-sock.c:167
[E] tnsk_run src/hev-tnsk.c:93
^C
用 natter 可以看到打洞成功
root@OpenWrt:~# python3 natter.py 2121
[INFO] - Getting STUN server IP...
[INFO] - Checking NAT Type for UDP...
[INFO] - NAT Type for UDP: [ Full cone (NAT 1) ]
[INFO] - Checking NAT Type for TCP...
[INFO] - NAT Type for TCP: [ Cone NAT ]
[INFO] - Start punching...
[INFO] - The TCP hole punching appears to be successful. Please test this address from another network: ('xx.x.x.x', 3596)
================================
('xx.x.x.x', 3596)
================================
[INFO] - TCP keep-alive...
from natmap.
大概率是 stun 服务器不可达造成的
from natmap.
我已经使用 IP 44.202.12.120 打洞成功
from natmap.
是的,国外的STUN服务器的可达性在国内不同地区可能有差异,多试试几个地址 #18 。
from natmap.
是的,国外的STUN服务器的可达性在国内不同地区可能有差异,多试试几个地址 #18 。
可以做成传一组服务器,有一个有结果就可以,natter好像是这样的
from natmap.
另外为啥国内没有支持TCP的stun server 呢
from natmap.
小米和腾讯的服务器貌似只支持udp,国内没有tcp服务器吗?
from natmap.
目前没有发现开放的服务,国外的也可以用的,TCP打洞STUN访问频率很低。
from natmap.
Related Issues (20)
- Operation in progress什么鬼报错
- 不知道怎么给wiki提pr,大佬看下能不能更新下wiki上关于ssh的说明 HOT 2
- 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
- Does it support FreeBSD? HOT 6
- 编译成静态链接报错 HOT 4
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.