Gostun
本机NAT类型检测工具(Local NAT type detection tool)(NatTypeTester)
Install / Use
/learn @oneclickvirt/GostunREADME
gostun
本机NAT类型检测工具
Local NAT type detection tool (NatTypeTester)
类型说明[Information]
NatMappingBehavior:
inconclusive
endpoint independent (no NAT)
endpoint independent
address dependent
address and port dependent
NatFilteringBehavior:
inconclusive
endpoint independent
address dependent
address and port dependent
| NAT Type | Nat Mapping Behavior | Nat Filtering Behavior |
|----------------------|------------------------|----------------------|
| Full Cone | endpoint independent | endpoint independent |
| Restricted Cone | endpoint independent | address dependent |
| Port Restricted Cone | endpoint independent | address and port dependent |
| Symmetric | address and port dependent | address and port dependent |
| Inconclusive | inconclusive | inconclusive |
使用说明[Usage]
下载、安装、更新
curl https://raw.githubusercontent.com/oneclickvirt/gostun/main/gostun_install.sh -sSf | sh
使用
gostun
或
./gostun
进行测试
无环境依赖,理论上适配所有系统和主流架构,更多架构请查看 https://github.com/oneclickvirt/gostun/releases/tag/output
Usage: gostun [options]
-e Enable logging functionality (default true)
-h Display help information
-server string
Specify STUN server address (default "stun.voipgate.com:3478")
-timeout int
Set timeout in seconds for STUN server response (default 3)
-type string
Specify ip test version: ipv4, ipv6 or both (default "ipv4")
-v Display version information
-verbose int
Set verbosity level
卸载
rm -rf /root/gostun
rm -rf /usr/bin/gostun
在Golang中使用
go get github.com/oneclickvirt/gostun@v0.0.5-20250727155022
感谢[Thanks]
https://datatracker.ietf.org/doc/html/rfc3489
https://datatracker.ietf.org/doc/html/rfc4787
https://datatracker.ietf.org/doc/html/rfc5389
https://datatracker.ietf.org/doc/html/rfc8839
https://github.com/pion/stun/tree/master/cmd/stun-nat-behaviour
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
