How NoRouter works under the hood
How NoRouter works under the hood.
The main NoRouter process launches the remote subprocesses and transfer L3 packets using their stdio streams.
To translate unprivileged socket syscalls into L3 packets, TCP/IP is implemented in userspace using netstack from gVisor & Fuchsia.
Stdio packet protocol
uint8be Magic | 0x42
uint24be Len | Length of the packet in bytes, excluding Magic and Len itself
uint16be Type | 0x0001: L3, 0x0002: JSON (for configuration)
uint16be Reserved | 0x0000
[]byte L3OrJSON | L3 or JSON
JSON messages
JSON messages are used to configure the agent. There are 3 types of messages:
requestare sent from the manager to an agentresultmessages are sent from an agent to the manager as a response to arequesteventare messages sent from an agent to the manager to indicate an independent event.
Messages always have the following structure:
The request body
The request body has the following structure:
The configure message arguments
The configure message has the following arguments:
The Forward object
The forward object has the following fields:
The IPPortProto object
The IPPortProto object contains the following fields:
The HTTP object
The Socks object
The Loopback object
The Route object
The result body
The configure result data
The event message
The event JSON looks like this:
The routeSuggestion event
This event suggests a route to the manager. The data field is as follows:
Further information:
Last modified December 17, 2020: Documented current protocol (9bb5ddb)