Skip to content

TON Proxy reference

Complete reference for rldp-http-proxy. Deployment walkthroughs live in How to set up a forward proxy and How to set up a reverse proxy.

ADNL addresses must be passed in hex encoding (64 hex characters, lowercase).

FlagLong formDefaultDescription
-p <PORT>--portHTTP listening port for browser connections
-c <PORT>--client-portUDP port for client ADNL queries
-C <FILE>--global-configPath to the TON global network config file
-P <YES|NO>--proxy-allNOProxy all HTTP requests, not only .ton, .adnl, .bag
-S <ADNL_ADDRESS>--storage-gatewayADNL address of a TON Storage gateway for .bag resolution
-D <PATH>--dbDatabase root path
-d--daemonizeoffDaemonize the process
-l <FILE>--lognameLog file path
-v <LEVEL>--verbositySet verbosity level
-V--versionPrint build information and exit
-h--helpPrint help message and exit
FlagDescription
-a <IP>:<PORT>Public IP and UDP port for inbound ADNL connections (published to the TON DHT)
-A <ADNL_ADDRESS>ADNL address for the site
-L <HOSTNAME>[:<PORTS>]Forward requests for <HOSTNAME> to 127.0.0.1 (default ports: 80, 443)
-R <HOSTNAME>[:<PORTS>]@<IP>:<PORT>Forward requests for <HOSTNAME> to a remote HTTP server
-C <FILE>Path to the TON global network configuration file
-D <PATH>Database root path
-dDaemonize the process
-l <FILE>Log file path
-v <LEVEL>Set verbosity level (--verbosity)
-VPrint build information and exit (--version)
-hPrint help message and exit (--help)
HeaderAdded byValue format
Ton-Proxy-Site-VersionReverse proxy (server-side)Commit: <SHA>, Date: <DATE>
Ton-Proxy-Entry-VersionForward proxy (client-side)Commit: <SHA>, Date: <DATE>

The proxy supports the HTTP CONNECT method for WebSocket and TCP-based protocol tunneling over ADNL.

FieldDefaultDescription
TunnelSectionsNum1Number of relay hops
MaxPricePerPacket0Maximum nanoTON per packet, 0 = no limit
NodesPoolConfigPathemptyPath to a JSON file pinning specific relays
Rebuild timeout45 sTunnel rebuilds automatically after 45 seconds of inactivity