TCP协议,允许12345端口入站出站
netsh advfirewall firewall add rule name="allow_tcp_12345" dir=in action=allow protocol=TCP localport=12345
netsh advfirewall firewall add rule name="allow_tcp_12345" dir=out action=allow protocol=TCP localport=12345
UDP协议,允许12345端口入站出站
netsh advfirewall firewall add rule name="allow_udp_12345" dir=in action=allow protocol=UDP localport=12345
netsh advfirewall firewall add rule name="allow_udp_12345" dir=out action=allow protocol=UDP localport=12345