FAST NAT is an extended version based on WeNAT, supporting HTTP, TCP, UDP, WebSocket and other protocols. Simply put, you can assign a public IP and port to your intranet computer, for example:
123.1.1.1:8888 -> 192.168.1.123:3306
When the data packet is received by the external network server, it will be forwarded to the internal network port 3306, thereby achieving penetration. The server has been transferred, which is different from the traditional P2P penetration.
The protocol is a JSON string
When connecting to the server for the first time, you need to bring the user's token. After the server is valid, it will open two ports for subsequent use. In the subsequent process, no verification is done. Although there are security risks, common TCP applications: Mysql, Mongodb, Redis, etc. have user mechanisms to protect.
Three tentative agreements
| type |
|---|
| TCP |
| UDP |
| HTTP |
Basic information response
Directly connect to the communication server port 8888 without sending any data. After successful, respond to the following data
| Fields | type | illustrate |
|---|---|---|
| id | string(8) | The id of this session |
| outId | string(8) | External socket session id |
| intPort | int(5) | Intranet connection port, 5-digit port, 30000-65535 |
| outPort | int(5) | Ports for external network connections |
| Command | string | Operation commands |
| protocol | string | Protocol Type |
{
id : 'CucfFpk7' ,
intPort : 61289 ,
outPort : 59918 ,
command : 'start_proxy' ,
outId : 'GpNYO5KW'
}Actively connect to the server
After receiving the basic information response, you get the port of the intranet to establish a TCP connection and bring the outId. The first data packet is a protocol packet, and the subsequent data is normal forwarding.
| Fields | type | illustrate |
|---|---|---|
| outId | string(8) | External socket session id |
{
outId : 'GpNYO5KW'
}