A recent incident has led me to rethink traditional domain access services, which we have always considered to be very stable. It turns out that even domain resolution services can encounter issues. This makes me wonder if a decentralized solution might be a worthwhile alternative to explore?
After some thought, deploying a page on the blockchain may have the following benefits:
I previously saw the domain name solution on TON and thought it seemed just for fun, with general practicality, as traditional access methods are already quite stable and commonly used. But now that I think about it, there might really be places where it could be useful, so I plan to study it more carefully.
This article will attempt to deploy a website on TON, allowing users to access the page in their browser. The process is divided into three steps: 1. Purchase a domain name; 2. Prepare the front-end page; 3. Bind the page to the domain name.
The concept of domain names in blockchain is actually similar to that in the WEB2 world; both serve as aliases for complex and hard-to-remember addresses. In blockchain, they represent the user’s address, while in WEB2, they represent the service’s IP address.
Taking TON as an example, the official purchase address for the domain is https://dns.ton.org/, toPriced in TON. Like WEB2, the shorter the domain name, the more expensive it is, with prices ranging from 1 to 100 TON.
If the domain name is not owned by anyone, you can place a bid at a low price and enter a countdown after bidding, during which everyone can compete until the countdown ends. After the auction, the domain name will be stored in the user’s wallet in the form of an NFT. The domain name NFT can be traded. The validity period of the domain name is 1 year, after which it will be reclaimed.
In summary, domain names can be obtained through auctions on the official website or traded from other users.
In this step, a front-end page needs to be prepared for display. For simplicity, this article only prepares an HTML file along with Nginx to expose the page, and of course, the project also requires a cloud server to run the front-end page. This step is similar to deploying traditional front-end applications.
After obtaining a .ton domain name, you can bind your ANDL address on the official TON DNS website. Of course, you can also use the binding tool provided by TON to bind your page according to the instructions on the official website.
After the binding is complete, you also need to start a listening port on the server to listen for HTTP requests and forward them to UDP. You can use the official rldp-http-proxy tool for this, simply enter the command below to start it:
rldp-http-proxy/rldp-http-proxy -p 8080 -c 3333 -C global.config.json
Among them, 8080 is the TCP port that will listen for incoming HTTP queries on the local host, while 3333 is the UDP port that will be used for all outbound and inbound RLDP and ADNL activities (i.e., connecting to the TON website through the TON network). global.config.json is the filename for the TON global configuration, which can be downloaded here.
Trying to directly enter a .ton domain in the browser to access a website will not work, because the browser does not know where to resolve this domain. Therefore, some additional operations are needed here.
When requesting a .ton domain, the corresponding ANDL address will first be queried on-chain. This address can be simply understood as the IP address in WEB2, which is automatically generated when you deploy a website. This querying process can also be likened to the DNS querying process.
After that, based on the address of ANDL, the request will be forwarded to your corresponding machine, at which point you can specify the corresponding return page. The overall process is quite similar to WEB2, with the main difference being that the query method for address and domain name mapping is somewhat different.
The most recommended way is to use the proxy tool Tonutils Reverse Proxy provided by the official website. After downloading, installing, and starting it, a port 8080 will be opened for proxying, and then you can access the .ton domain.
You can see websites that can access .ton domains.
Currently, after using it, I have encountered the following issues:
In summary, the current experience is actually quite average, and there are many areas for improvement ahead. However, I think this direction is quite good and innovative, and it’s worth trying.
A recent incident has led me to rethink traditional domain access services, which we have always considered to be very stable. It turns out that even domain resolution services can encounter issues. This makes me wonder if a decentralized solution might be a worthwhile alternative to explore?
After some thought, deploying a page on the blockchain may have the following benefits:
I previously saw the domain name solution on TON and thought it seemed just for fun, with general practicality, as traditional access methods are already quite stable and commonly used. But now that I think about it, there might really be places where it could be useful, so I plan to study it more carefully.
This article will attempt to deploy a website on TON, allowing users to access the page in their browser. The process is divided into three steps: 1. Purchase a domain name; 2. Prepare the front-end page; 3. Bind the page to the domain name.
The concept of domain names in blockchain is actually similar to that in the WEB2 world; both serve as aliases for complex and hard-to-remember addresses. In blockchain, they represent the user’s address, while in WEB2, they represent the service’s IP address.
Taking TON as an example, the official purchase address for the domain is https://dns.ton.org/, toPriced in TON. Like WEB2, the shorter the domain name, the more expensive it is, with prices ranging from 1 to 100 TON.
If the domain name is not owned by anyone, you can place a bid at a low price and enter a countdown after bidding, during which everyone can compete until the countdown ends. After the auction, the domain name will be stored in the user’s wallet in the form of an NFT. The domain name NFT can be traded. The validity period of the domain name is 1 year, after which it will be reclaimed.
In summary, domain names can be obtained through auctions on the official website or traded from other users.
In this step, a front-end page needs to be prepared for display. For simplicity, this article only prepares an HTML file along with Nginx to expose the page, and of course, the project also requires a cloud server to run the front-end page. This step is similar to deploying traditional front-end applications.
After obtaining a .ton domain name, you can bind your ANDL address on the official TON DNS website. Of course, you can also use the binding tool provided by TON to bind your page according to the instructions on the official website.
After the binding is complete, you also need to start a listening port on the server to listen for HTTP requests and forward them to UDP. You can use the official rldp-http-proxy tool for this, simply enter the command below to start it:
rldp-http-proxy/rldp-http-proxy -p 8080 -c 3333 -C global.config.json
Among them, 8080 is the TCP port that will listen for incoming HTTP queries on the local host, while 3333 is the UDP port that will be used for all outbound and inbound RLDP and ADNL activities (i.e., connecting to the TON website through the TON network). global.config.json is the filename for the TON global configuration, which can be downloaded here.
Trying to directly enter a .ton domain in the browser to access a website will not work, because the browser does not know where to resolve this domain. Therefore, some additional operations are needed here.
When requesting a .ton domain, the corresponding ANDL address will first be queried on-chain. This address can be simply understood as the IP address in WEB2, which is automatically generated when you deploy a website. This querying process can also be likened to the DNS querying process.
After that, based on the address of ANDL, the request will be forwarded to your corresponding machine, at which point you can specify the corresponding return page. The overall process is quite similar to WEB2, with the main difference being that the query method for address and domain name mapping is somewhat different.
The most recommended way is to use the proxy tool Tonutils Reverse Proxy provided by the official website. After downloading, installing, and starting it, a port 8080 will be opened for proxying, and then you can access the .ton domain.
You can see websites that can access .ton domains.
Currently, after using it, I have encountered the following issues:
In summary, the current experience is actually quite average, and there are many areas for improvement ahead. However, I think this direction is quite good and innovative, and it’s worth trying.