nsc/doc/HOW_WORKS_ROUTING.md
2026-10-01 22:26:54 +03:00

12 lines
985 B
Markdown

# Basic NSC routing principles
NSC implements its own DNS server, which resolves domains according to the configured routing policies.
The current sniffing-based routing flow works as follows:
* The user enters a domain in their browser, for example `http://reg.i2p`.
* The NSC FakeDNS server responds with an address from the [RFC 2544](https://www.rfc-editor.org/info/rfc2544/) benchmarking address space (`198.18.0.0/15`) and stores the corresponding `domain:IP` mapping.
* When the application attempts to connect to the assigned IP address, NSC intercepts the connection and looks up the original domain using the stored mapping.
* NSC then establishes a connection to the appropriate overlay network proxy (mostly SOCKS) and forwards the intercepted traffic through it. Supported interception backends include TPROXY and eBPF.
* Responses from the overlay network are forwarded back to the original application as if it were communicating directly with the resolved address.