27 lines
1000 B
Batchfile
27 lines
1000 B
Batchfile
@echo off
|
|
rem 宿主机端口转发 + 防火墙放行(需「以管理员身份运行」)
|
|
rem 镜像网络模式下通常可直接访问 http://<本机局域网IP>:8088 ,本脚本作兜底。
|
|
net session >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo 请右键本文件 - 以管理员身份运行
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
netsh interface portproxy delete v4tov4 listenport=8088 listenaddress=0.0.0.0 >nul 2>&1
|
|
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=8088 connectaddress=127.0.0.1 connectport=8088
|
|
|
|
netsh advfirewall firewall delete rule name="Juzi H5 8088" >nul 2>&1
|
|
netsh advfirewall firewall add rule name="Juzi H5 8088" dir=in action=allow protocol=TCP localport=8088 profile=any
|
|
|
|
echo.
|
|
echo === portproxy ===
|
|
netsh interface portproxy show all
|
|
echo === firewall ===
|
|
netsh advfirewall firewall show rule name="Juzi H5 8088"
|
|
echo.
|
|
echo 手机访问: http://192.168.3.19:8088/
|
|
echo 后台: http://192.168.3.19:8088/admin.html
|
|
echo mock: http://192.168.3.19:8088/?mock=1
|
|
pause
|