Warning: Although this project is generally usable, we do not take any responsibility for its bugs or stability issues. Some toolkits included in this software may be considered in violation of cybersecurity regulations by certain organizations. You assume full responsibility for any consequences arising from the use of this tool.
It can traverse complex NAT networks such as symmetric NAT, and use Poisson sampling and Mean method to quickly predict ports, which may be the most advanced NAT traversal toolkit
- Implement network penetration where either party directly has a public IP address.
- Implement network penetration in environments where either party supports UPnP.
- Implement network penetration in environments where either party uses a full-cone NAT.
- Make best efforts to penetrate networks where either party uses a restricted NAT or even a symmetric NAT.
- After successful penetration, provide reliable stream transmission (STREAM) and unreliable datagram transmission (DGRAM) functionality.
- After successful penetration, provide secure transmission capabilities for stream transmissions.
- Provide a CLI-based daemon program with TCP and UDP port forwarding functionality.
(Although direct TCP hole punching is not feasible, reliable transmission protocols can be run on established UDP connections.) - Cross-platform support for operating systems, with at least support for Linux and Windows, and optionally Android and macOS.
- Cross-CPU architecture support, with at least support for x86-64 and AArch64 CPU architectures.
- Support both small and large data transmissions, employing different strategies for each. For example, small data transmissions can be sent directly through a relay server before establishing a P2P connection, whereas large data transmissions should wait for the connection to be established before sending.
- Support for domestic trusted innovation platforms, enabling deployment on domestic operating systems and CPUs—backed by equipment from Trusted Innovation Industry Academy.
- Open-source under GPL, free, and unrestricted.
This program can also serve as a decentralized VPN.
It is strongly to use Docker Image for the installation.
docker pull kenvix/natpoked
To ensure compatibility, it should be compiled with Java11, but should run on the Java17 platform, as written in the Dockerfile
.
git submodule update --init --recursive
chmod +x ./gradlew
./gradlew shadowJar
git submodule update --init --recursive
chmod +x ./DockerBuild.sh
./DockerBuild.sh
+------------+--------------------------+------------------+---------------+------------+
| Type code | Service name (hashcode) | Destination port | Source port | Unused |
+------------+--------------------------+------------------+---------------+------------+
| 2 bytes | 4 bytes | 2 bytes | 2 bytes | 6 bytes |
+------------+--------------------------+------------------+---------------+------------+