What is this?#
Through the STUN server, you can expose your internal network port to the public network, but the IP and port are dynamic and will change every few days (redial if changed)
What is the difference between this and FRP?#
FRP forwards your service to a public network server. During this process, there is loss when connecting to the FRP server, and it is also limited by the bandwidth of the FRP server
Advantages of STUN?#
STUN punching directly exposes your internal network port to your internet IP, with absolute bandwidth advantage and latency advantage
With so many advantages of STUN, are there no disadvantages?#
Yes, first of all, the public IP and port are not fixed, and there is no port 80 and 443, so you cannot host a website (you can use CloudFlare to host a website, which is easier!). Secondly, it requires the network environment to be NAT1, which will be explained later
Getting Started#
Log in to your router, enable DMZ, and set the DMZ host to the internal host you want to open
Clone the repository: Natter - Github
python natter.py -p 25565
Map the internal host's port 25565 to your internet IP. Remember to disable the firewall on the internal host