1 Star 0 Fork 4

alex/stund

forked from WolfCS/stund 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
wnattest.bat 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
hanpfei 提交于 2016-03-17 10:50 . Add stund code.
@echo off
rem wnattest.bat
if defined %4 (
goto usage
) else if defined %3 (
goto start
) else (
goto usage
)
:start
stunner %1 -i %2 -i2 %3
if %errorlevel% == -1 (
echo "ERROR! the STUN test program had an error" (
) else if %errorlevel% == 10 (
echo "[PASS] (Address) Restricted Cone NAT with Hairpinning"
) else if %errorlevel% == 21 (
echo "[PASS] Port Restricted Cone NAT with Hairpinning"
) else if %errorlevel% == 8 (
echo "[No NAT] You have open internet access"
) else if %errorlevel% == 2 (
echo "[FAIL] Your (Address) Restricted Cone NAT doesn't do hairpinning"
) else if %errorlevel% == 3 (
echo "[FAIL] Your Port Restricted Cone NAT doesn't do hairpinning"
) else (
echo "[FAIL] You have a NAT or Firewall type which is NOT RECOMMENDED. "
if %errorlevel% LSS 8 (
echo "It also does not support hairpinning"
) else (
each "it does at least support hairpinning"
)
)
goto end
:usage
echo Usage:
echo wnattest <server-ip> <client-primary-ip> <client-secondary-ip>
echo.
echo Example: wnattest 1.1.1.2 192.168.0.2 192.168.0.3
echo.
:end
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/alex16888_admin/stund.git
git@gitee.com:alex16888_admin/stund.git
alex16888_admin
stund
stund
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385