diff --git a/foundations/services.mdx b/foundations/services.mdx index 0920aff44..0673647ef 100644 --- a/foundations/services.mdx +++ b/foundations/services.mdx @@ -7,7 +7,7 @@ import { Image } from '/snippets/image.jsx'; Although many people refer to TON only as a blockchain, _The Open Network_ is a combination of the following components: - A flexible multi-blockchain platform with Turing-complete smart contracts (TON Blockchain) -- A peer-to-peer network used by Blockchain Nodes (TON Network) +- A peer-to-peer network used by blockchain nodes (TON Network) - A distributed file storage technology (TON Storage) - A network proxy/anonymizer layer (TON Proxy) - A Kademlia-like distributed hash table (TON DHT) @@ -36,7 +36,62 @@ TON Storage allows users to share and store files using _The Open Network_. Sinc TON Proxy provides a protocol where nodes wishing to offer their services (with or without compensation) as tunnels for ADNL network traffic can register. Those needing them can then choose one of these nodes based on the price, latency, and bandwidth offered. Since ADNL traffic is encrypted, Proxy can't access tunneled data, meaning that this protocol is secure. -Running TON Proxy allows you to visit TON Sites (HTTP over ADNL). This can be combined with TON DNS and other TON Services, forming together what is called "Open Network". +Running TON Proxy enables access to TON Sites (HTTP over ADNL). This can be combined with TON DNS and other TON Services, forming together what is called "Open Network". + +### Reverse proxy + +To use TON Proxy, install [Tonutils Reverse Proxy](https://github.com/tonutils/reverse-proxy). + +1. Download + + - Linux: + + ```bash + wget https://github.com/tonutils/reverse-proxy/releases/latest/download/tonutils-reverse-proxy-linux-amd64 + chmod +x tonutils-reverse-proxy-linux-amd64 + ``` + + - For other OS: + + Build it from sources. A `Go` environment is required to build. + + ```bash + git clone https://github.com/tonutils/reverse-proxy.git + cd reverse-proxy + make build + ``` + + To build for other operating systems, run `make build`. + + + +1. Run + + - with domain configuration: + + ```bash + ./tonutils-reverse-proxy-linux-amd64 --domain + ``` + + Then, scan the QR code shown in the terminal using the wallet. Confirm the transaction to link the required domain to the site. + + - without domain configuration: + + Alternatively, if there is no a `.ton` or `.t.me` domain, run the proxy in simple mode with an ADNL address (suffix `.adnl`): + + ```bash + ./tonutils-reverse-proxy-linux-amd64 + ``` + +1. Usage + + The TON Site is now accessible via the ADNL address or the domain. To change settings such as the proxy pass URL, edit the `config.json` file and restart the proxy. The default proxy pass URL is: `http://127.0.0.1:80/`. + + The proxy also adds the following headers: + + - `X-Adnl-Ip` – the client's IP address. + - `X-Adnl-Id` – the client's ADNL ID. + ## TON DNS