How to set up a forward proxy
TON Proxy bridges HTTP traffic to ADNL, allowing conventional browsers to reach TON Sites.
Prerequisites
Section titled “Prerequisites”rldp-http-proxybinary from a TON monorepo release (v2024.01 or newer) or built from source- Optional alternative: Tonutils-Proxy (v1.8.0 or newer), a Go client with a GUI and built-in tunnel support
- TON global network configuration file (
global.config.json), available from the TON monorepo
Set up rldp-http-proxy
Section titled “Set up rldp-http-proxy”Start the forward proxy:
rldp-http-proxy -p 8080 -c 3333 -C global.config.jsonConfigure the browser HTTP proxy to 127.0.0.1:8080. TON Sites are reachable by .ton domain names. The full flag list is documented in the TON Proxy reference.
Set up Tonutils-Proxy
Section titled “Set up Tonutils-Proxy”Tonutils-Proxy is a Go alternative with built-in support for garlic-routed ADNL tunnels.
Tunnel client configuration
Section titled “Tunnel client configuration”| Field | Default | Description |
|---|---|---|
TunnelSectionsNum | 1 | Number of relay hops |
MaxPricePerPacket | 0 | Maximum nanoTON per packet, 0 = no limit |
NodesPoolConfigPath | empty | Path to a JSON file pinning specific relays |
The tunnel rebuilds automatically after 45 seconds of inactivity.
Verify
Section titled “Verify”Confirm the proxy is running by requesting a known TON Site:
curl --proxy http://127.0.0.1:8080 http://foundation.ton/A successful response returns HTML content from the TON Foundation site. If the proxy process is up, ps aux | grep rldp-http-proxy (or ps aux | grep tonutils-proxy) also confirms it is running.
Troubleshoot
Section titled “Troubleshoot”- Port already in use: another process is bound to port 8080. Change the port with
-p <PORT>and update the browser proxy setting accordingly. global.config.jsonnot found: the-Cflag path must point to the actual file location. Pass the absolute path or run from the directory containing the file..tondomain does not resolve: the proxy connects to the TON DHT on startup. Wait a few seconds after launch, then retry. Check that UDP outbound traffic on port 3333 (or the port set by-c) is not blocked by a firewall.
Related pages
Section titled “Related pages”- TON Proxy: how the proxy bridge works
- TON Proxy reference: all CLI flags and configuration fields