Comments (11)
使用的版本是?
from natmap.
20221111 arm32版本
from natmap.
命令如下
natmap -d -u -s stun.stunprotocol.org -b 53490 -e /root/myv4update.sh
系统是
Armbian 22.11.0-trunk Jammy with Linux 5.15.67-meson
from natmap.
20221111这个版本修过udp更新问题的,之前报过PPPoE重拨不能捕获IP变更。
跑在前台看看,当问题发生时,natmap有报错误信息吗?
from natmap.
测试了一下。路由器是双线,线路1有nat1,线路2没有。路由器中armbian设定只走线路1。开两个终端,一个运行tcp,一个运行UDP。都能同时映射。登陆路由器断掉线路1后重拨。Tcp输出如下:
root@YF-BOX:~# natmap -s stun.stunprotocol.org -h qq.com -b 80 -e /root/updatei p.sh
save ok!
[E] get_addr src/hev-sock.c:38
[E] hev_sock_client_tcp src/hev-sock.c:123
[E] tnsk_run src/hev-tnsk.c:93
[E] get_addr src/hev-sock.c:38
[E] hev_sock_client_tcp src/hev-sock.c:123
[E] tnsk_run src/hev-tnsk.c:93
[E] get_addr src/hev-sock.c:38
[E] hev_sock_client_tcp src/hev-sock.c:123
[E] tnsk_run src/hev-tnsk.c:93
[E] get_addr src/hev-sock.c:38
[E] hev_sock_client_tcp src/hev-sock.c:123
[E] tnsk_run src/hev-tnsk.c:93
[E] get_addr src/hev-sock.c:38
[E] hev_sock_client_tcp src/hev-sock.c:123
[E] tnsk_run src/hev-tnsk.c:93
[E] get_addr src/hev-sock.c:38
[E] hev_sock_client_tcp src/hev-sock.c:123
[E] tnsk_run src/hev-tnsk.c:93
save ok!
“save ok!”是我的更新脚本的输出。
UDP终端完全无输出。
说结果:
UDP映射更新了两次(根据脚本提示判断),第一次映射到了线路2,线路1恢复后又映射到线路1,可以正常访问。
TCP映射更新了一次,直接映射恢复后的线路1,日志如上。
长时间后无法测试,一般24小时甚至更长时间后,UDP似乎是睡死了,不会更新,tcp可以更新。建议大佬添加日志功能,方便查找问题。
from natmap.
试试这个程序,把日志重定向到文件中。如果问题触发了,请将日志完整上传,我们再看看是怎么回事吧。
from natmap.
@yulinsoft 请问有进展吗?
from natmap.
是我的问题,新版很稳定。
from natmap.
natmap-linux-mips32el v20221203 在运营商分配的 ip 自动变化的时候,tcp 正常,udp 不能正常更新,看日志似乎在 stun 那一步卡住了;但是手动触发 pppoe 重连又都能正常工作。
# 命令
./natmap -s stun.stunprotocol.org -h qq.com -b 444 -t 127.0.0.1 -p 443 -e ./notify.sh # tcp
./natmap -u -s stun.stunprotocol.org -b 3001 -t 127.0.0.1 -p 3000 -e ./notify.sh # udp
# 日志
natmap: [E] stun_bind src/hev-stun.c:252
natmap: [E] task_entry src/hev-stun.c:305
natmap: [E] stun_bind src/hev-stun.c:252
natmap: [E] task_entry src/hev-stun.c:305
natmap: [E] stun_bind src/hev-stun.c:252
natmap: [E] task_entry src/hev-stun.c:305
natmap: [E] stun_bind src/hev-stun.c:252
natmap: [E] task_entry src/hev-stun.c:305
natmap: [E] stun_bind src/hev-stun.c:252
natmap: [E] task_entry src/hev-stun.c:305
# 系统内核
uname -a
Linux OpenWrt 5.10.138 #0 SMP Sat Sep 3 02:55:34 2022 mips GNU/Linux
from natmap.
natmap-linux-mips32el v20221203 在运营商分配的 ip 自动变化的时候,tcp 正常,udp 不能正常更新,看日志似乎在 stun 那一步卡住了;但是手动触发 pppoe 重连又都能正常工作。
# 命令 ./natmap -s stun.stunprotocol.org -h qq.com -b 444 -t 127.0.0.1 -p 443 -e ./notify.sh # tcp ./natmap -u -s stun.stunprotocol.org -b 3001 -t 127.0.0.1 -p 3000 -e ./notify.sh # udp # 日志 natmap: [E] stun_bind src/hev-stun.c:252 natmap: [E] task_entry src/hev-stun.c:305 natmap: [E] stun_bind src/hev-stun.c:252 natmap: [E] task_entry src/hev-stun.c:305 natmap: [E] stun_bind src/hev-stun.c:252 natmap: [E] task_entry src/hev-stun.c:305 natmap: [E] stun_bind src/hev-stun.c:252 natmap: [E] task_entry src/hev-stun.c:305 natmap: [E] stun_bind src/hev-stun.c:252 natmap: [E] task_entry src/hev-stun.c:305 # 系统内核 uname -a Linux OpenWrt 5.10.138 #0 SMP Sat Sep 3 02:55:34 2022 mips GNU/Linux
从日志上看是UDP发送成功,但接收超时了。我本地模拟不能复现这种情况,不排除一种可能性是STUN服务器主动不响应,这个现象之前在调试程序过程中也遇到过,比如频繁的STUN请求下。UDP模式建议使用国内的服务器,比如 stun.qq.com 等等。
我建议再观察看看,自动重拨时业务中断的时间窗口大概会有多久。
from natmap.
我建议再观察看看,自动重拨时业务中断的时间窗口大概会有多久。
好的,udp 模式已切换成 stun.qq.com,如果还有问题估计也要几天才能复现,到时候再反馈。
from natmap.
Related Issues (20)
- [shares] notification scripts HOT 4
- [shares] usage and demos HOT 12
- luci-app-natmap这个不兼容op HOT 9
- 打洞失败:[E] hev_sock_client_pfwd src/hev-sock.c:316 [W] client_task_entry src/hev-tfwd.c:52 HOT 6
- 怎样在FreeBSD上编译? HOT 2
- 命令行以及luci均报错无法使用 HOT 2
- public STUN servers HOT 1
- 使用-4参数指定的情况下绑定端口,绑定到了ipv6地址上,给ipv4分配了新的端口 HOT 2
- [Feature Request] UPnP Server HOT 9
- [E] hev_sock_client_stun src/hev-sock.c:281 [E] task_entry src/hev-stun.c:289 HOT 13
- [E] hev_exec_run src/hev-exec.c:90 似乎无法调用通知脚本 HOT 2
- 是不是调用脚本一定时间内没响应就终止本进程? HOT 7
- 参数http server是做什么用的 HOT 1
- 一开通知脚本就不能运行了,请求大佬协助 HOT 4
- 可以实现DDNS自动更新IP+端口吗? HOT 1
- [E] Cannot assign requested address
- 请问在ipv6入站被禁的环境中可以使用该程序实现外部访问吗? HOT 3
- [E] tnsk_run src/hev-tnsk.c:103 Start TCP keep-alive service failed. HOT 1
- 建议支持指定服务器端口 HOT 10
- 是不是可以用域名的TXT记录存端口 HOT 2
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.