document/文档/windwos/netsh 代理转发.md
2024-06-30 04:47:39 +08:00

657 B

# 查看所有转发
netsh interface portproxy show all
# 转发端口 listenaddress 转发地址  到 connectaddress 
netsh interface portproxy add v4tov4 listenport=7860 listenaddress=117.50.182.144 connectport=7860 connectaddress=127.0.0.1
netsh advfirewall firewall add rule name="Allow Port 7860" protocol=TCP dir=in localport=7860 action=allow


#     interface portproxy add
netsh interface portproxy add v4tov4 listenport=5000 listenaddress=117.50.182.144 connectport=5000 connectaddress=127.0.0.1
# 删除转发
netsh interface portproxy delete v4tov4 listenport=7860 listenaddress=117.50.182.144
# 重启
netsh interface portproxy reset