@echo off ::netsh advfirewall firewall add rule name="exename" dir=in action=allow program="程序路径" enable=yes ::netsh advfirewall firewall add rule name="yuanchengu" dir=in protocol=udp localport=3390-3391 action=allow netsh advfirewall firewall delete rule name="远程TCP" dir=in netsh advfirewall firewall add rule name="远程TCP" dir=in protocol=tcp localport=3389-3390 action=allow netsh advfirewall firewall delete rule name="远程UCP" dir=in netsh advfirewall firewall add rule name="远程UCP" dir=in protocol=udp localport=3389-3390 action=allow netsh advfirewall firewall delete rule name="DEVICETCP" dir=in netsh advfirewall firewall add rule name="DEVICETCP" dir=in protocol=tcp localport=51609 action=allow netsh advfirewall firewall delete rule name="DEVICEUDP" dir=in netsh advfirewall firewall add rule name="DEVICEUDP" dir=in protocol=udp localport=51609 action=allow netsh advfirewall firewall delete rule name="WebSocket" dir=in netsh advfirewall firewall add rule name="WebSocket" dir=in protocol=tcp localport=10086 action=allow netsh advfirewall firewall delete rule name="Web" dir=in netsh advfirewall firewall add rule name="Web" dir=in protocol=tcp localport=21006 action=allow netsh advfirewall firewall delete rule name="NewWeb" dir=in netsh advfirewall firewall add rule name="NewWeb" dir=in protocol=tcp localport=21008 action=allow ::netsh advfirewall firewall delete rule name="http" dir=in ::netsh advfirewall firewall add rule name="http" dir=in protocol=tcp localport=10088 action=allow ::netsh advfirewall firewall delete rule name="21009" dir=in ::netsh advfirewall firewall add rule name="21009" dir=in protocol=tcp localport=21009 action=allow netsh advfirewall firewall delete rule name="10089" dir=in netsh advfirewall firewall add rule name="10089" dir=in protocol=udp localport=10089 action=allow ::pause