如何在「链上」访问网站

Odaily星球日报Опубліковано о 2025-06-30Востаннє оновлено о 2025-06-30

Анотація

本文尝试在TON区块链上部署一个可访问的网页,探讨了购买域名、准备前端页面、绑定域名等步骤,并总结了当前体验中存在的问题与未来潜力。目前来看这种访问页面的方式在体验上效果一般,并且流程上较为繁琐,但这种去中心化的访问页面方式在未来有无限的可能。

最近发生的一件事件让笔者重新思考起了传统的域名访问服务,我们一直认为非常稳定的域名解析服务,居然也会有出问题的时候。这让笔者不禁在想,去中心化的方案或许是一个值得探索的替代方案呢?

思考了一下,在区块链上部署页面,它可能有以下几个好处:

1.去中心化:所有的修改都需要大家共同同意才能进行,没有一个单独的机构能说了算。

2.无需证书:因为区块链本身就用了加密技术,所以不需要额外的证书配置。

笔者之前看到过 TON 上的域名方案,当时觉得似乎只是好玩,实用性一般,毕竟传统的访问方式已经很稳定、常用了。但现在想想,可能真的会有用得上它的地方,所以笔者打算再好好研究一下。

在区块链中创建网站

本文将在这里尝试将一个网站部署在 TON 中,并且可以让用户在浏览器中访问这个页面。流程分为三步: 1. 购买域名;2. 准备前端页面;3. 绑定页面到域名。

区块链中的域名和 WEB2 世界中的域名概念其实是类似的,都是对某一复杂不易记的地址的别名,在区块链中是代表了用户的地址,在 WEB2 中则是服务的 IP 地址。

购买域名

以 TON 为例,域名的官方购买地址是 https://dns.ton.org/,以 TON 来计价。和 WEB2 一样,字符越短的域名价格越贵,价格在 1 - 100 TON 不等。

如果该域名没有被任何人拥有,那么你就可以以低价进行出价,并且在出价之后进入倒计时,在倒计时内所有人都可以竞价,直到倒计时结束。在拍的域名之后,域名会以 NFT 的方式存到用户的钱包里。域名 NFT 可以进行交易。域名的有效时间是 1 年,到期之后会被收回。

总结一下就是,购买域名可以通过在官网进行拍卖获得,也可以从别的用户那边交易得到。

如何在「链上」访问网站

准备前端页面

在这一步需要准备一个前端页面来作为展示。为了简单,本文只准备一个 html 文件加上 nginx 来将页面暴露出去,当然,项目还需要一台云服务器来运行前端页面。这一步和传统的前端应用部署一样。

绑定页面到 .ton

在拥有一个 .ton 域名之后,可以在 TON 的 DNS 官网绑定你的 ANDL 地址。当然你也可以使用 TON 提供的绑定工具,按照官网的介绍去绑定你的页面。

在绑定完成之后,你还需要在服务器上启动一个监听的端口,用于监听 http 请求并转发成 udp。这里可以使用官方提供的 rldp-http-proxy 工具,输入下面的命令就可以启动了:

rldp-http-proxy/rldp-http-proxy -p 8080 -c 3333 -C global.config.json

其中, 8080 是将在本地主机上监听传入 HTTP 查询的 TCP 端口,而 3333 是将用于所有出站和入站 RLDP 和 ADNL 活动的 UDP 端口(即通过 TON 网络连接到 TON 网站)。global.config.json 是 TON 全局配置的文件名,可以在这里下载

访问 .ton 域名

想要直接在浏览器中敲 .ton 的域名去访问网站是没有效果的,因为浏览器不知道要将这个域名解析到哪里。所以在这里还需要做一些额外的操作。

请求 .ton 的过程

在请求 .ton 域名的时候,首先会去链上查询对应 ANDL 地址,该地址可以简单理解为 WEB2 中的 IP 地址,在你部署网站的时候,会自动生成。这次的查询过程也可以类比为 DNS 查询过程。

之后根据 ANDL 的地址,请求会转发到你对应的机器上,这时候可以指定对应返回的页面。整体的过程和 WEB2 相当类似,主要区别在于地址和域名映射的查询方式不太一样。

通过代理访问页面

最推荐的方式使用官网提供的代理工具 Tonutils Reverse Proxy。下载安装启动之后,会启动一个 8080 端口用于代理,之后就可以去访问 .ton 的域名了。

如何在「链上」访问网站

可以看到能够访问 .ton 的域名的网站了。

使用总结

目前使用下来,遇到了以下几个问题:

  • 对网站运行的环境有要求。你的系统需要支持 glibc 2.34 版本以上,所以在部署页面前,先检查一下自己的机器是否满足要求。

  • 文档不是很清晰。有可能是因为这个 TON 运行网站的需求不是很多,所以文档写的不是很完善,需要自己摸索。另外中文的话更新不及时,落后于英文版本的内容。

  • 访问的速度较慢。访问的速度会落后于传统的网站。当然这里面涉及到的因素会很多,只能说以后的进步空间很大。

  • 没有被钱包支持。官方提供了一个简单的内嵌浏览器页面,你可以选择不安装代理就可以访问。但是目前这个网站被所有主流的钱包都认定为了钓鱼网站 o.0 。

总而言之,目前体验其实一般般,后面还有很多可以提升改进的地方,但是这个方向笔者觉得挺好挺创新的,尝试一下也是不错的。

Пов'язані матеріали

Standard Chartered Bank’s 50-Fold Fantasy: Predicting AAVE to Reach $3,500

Standard Chartered Bank has issued an optimistic research report predicting that the AAVE token could surge 50-fold to $3,500 by 2030. This forecast is based on the projection that the total value locked (TVL) in DeFi will grow 37x to approximately $2.7 trillion, driven by stablecoin expansion and the tokenization of real-world assets (RWA). The bank's model links Aave's potential valuation directly to its protocol revenue, which is primarily driven by net interest margins. The report highlights Aave's current dominant position, noting it captures over 80% of the net earnings ("protocol retained earnings") in the lending sector while holding only about half of its TVL. It also points to the recent launch of the Aave V4 architecture and a healthy revenue stream of $142 million in 2025 as positive fundamentals. Grayscale's separate analysis, applying traditional valuation metrics like DCF, concluded AAVE is currently undervalued. However, the article notes significant challenges. Aave's peer-to-pool lending model suffers from inherent capital inefficiency, with an estimated $52 million annual "deadweight loss" due to idle funds needed for liquidity buffers. This structural flaw was exposed during the April KelpDAO exploit, which locked a WETH pool at 100% utilization for days. Emerging protocols like Morpho, with more efficient point-to-point models, are cited as growing competitive threats. In summary, while institutional forecasts paint a macro picture of massive growth fueled by RWA adoption, Aave's path forward hinges on addressing its core structural limitations and competitive pressures within the evolving DeFi lending landscape.

链捕手48 хв тому

Standard Chartered Bank’s 50-Fold Fantasy: Predicting AAVE to Reach $3,500

链捕手48 хв тому

Tidal Investment: We Remain Bullish on the AI Industry Chain, But the Reasons Have Changed

Tidal Investment remains optimistic about the AI industry chain, but the rationale has shifted. The market narrative has changed. While recent large-scale IPOs (e.g., SpaceX) and major fundraising plans by tech giants like Alphabet and Meta have caused some nervousness, this isn't a sign of an AI peak. The focus has moved from the initial question of AI's viability to the sustainability of massive investment cycles. The key players—primarily the major cloud providers—are not slowing down; their capital expenditure (Capex) guidance for 2026 has been increased across the board (e.g., Alphabet to $180B, Amazon to $200B). This investment cycle is proving resilient and difficult to stop. Unlike traditional hardware cycles, current AI Capex is distributed across multiple physical layers—computing, memory, networking, and critically, power infrastructure. Bottlenecks are shifting from chips to elements like electricity, transformers, and cooling systems, which have much longer lead times and cannot be easily pre-built like fiber optics during the dot-com bubble. Supply chain data (e.g., Eaton's 240% YoY data center orders) confirms this broad-based, project-driven expansion. Market concerns are acknowledged but viewed differently. First, while Capex growth currently outpaces revenue growth, raising ROI questions, this mirrors the early scaling phase of cloud computing itself. A change in view would require concrete signals like downward Capex revisions or missed AI product targets, which haven't materialized by mid-2026. Second, comparisons to the 2000 dot-com bust are flawed. That crash was driven by a massive, parallel oversupply of cheap capacity (fiber). The current cycle faces *supply constraints* in critical, capital-intensive physical infrastructure that cannot be overbuilt as easily. In conclusion, the wave of fundraising reflects the next, more complex act of the AI story. Physical bottlenecks and sustained high Capex plans suggest this is not the finale but an ongoing, capital-intensive build-out phase. The script has changed, but the play is far from over.

marsbit1 год тому

Tidal Investment: We Remain Bullish on the AI Industry Chain, But the Reasons Have Changed

marsbit1 год тому

Tidal Investment: We Remain Bullish on the AI Industry Chain, But for Different Reasons Now

Tidal Investments remains optimistic about the AI industry chain, but the rationale has shifted. The market is concerned about massive concurrent fundraising by tech giants like SpaceX, OpenAI, Alphabet, and Meta, fearing an AI peak. However, the authors argue this signals the next act of AI development, not its end. Capital expenditure (Capex) from major cloud providers (Alphabet, Amazon, Meta, Microsoft, Oracle) continues to surge aggressively into 2026. This investment cycle is more resilient than past hardware cycles due to its scale and complexity. Bottlenecks have shifted from chips to critical physical infrastructure like power grids, transformers, cooling, and data center construction—areas with long lead times and limited capacity for rapid expansion. Supply chain data (e.g., Eaton's orders) confirms substantial, tangible progress. Key market concerns are addressed: 1. **ROI vs. Capex Growth**: While Capex growth outpaces revenue, the authors note cloud giants have historically overcome similar phases through scale. The cycle will only be in danger if Capex guidance is cut, orders are canceled, or AI product demand falters—none of which are currently observed. 2. **Comparison to the 2000 Dot-com Bubble**: Unlike the telecom bubble, where cheap, oversupplied fiber crashed prices, AI infrastructure (especially power) is constrained, customized, and subject to lengthy approvals, making a similar supply glut and crash unlikely. In conclusion, the wave of fundraising reflects the immense, ongoing capital needs for AI's next phase, constrained by slow-moving physical bottlenecks. The AI cycle is not over; the script has simply changed.

链捕手2 год тому

Tidal Investment: We Remain Bullish on the AI Industry Chain, But for Different Reasons Now

链捕手2 год тому

Grayscale: These 15 Profitable Crypto Protocols Are Severely Undervalued

Grayscale Research identifies 15 top-revenue crypto protocols trading at significant valuation discounts, with many at single-digit or even 1x revenue multiples. Protocols like Pump.fun, PancakeSwap, and Meteora have market capitalizations roughly equal to their annual revenue. The report argues these financially-focused protocols (DEXs, lending, staking) are fundamentally undervalued and could benefit from the potential passage of the CLARITY Act, expected as soon as next month. This legislation aims to clarify digital asset regulation, potentially reducing institutional barriers and driving on-chain activity. The analysis breaks down the protocols into three groups: the "1x Club" (market cap ≈ revenue), mid-tier protocols with 3-9x multiples (e.g., Aave, Lido, Jupiter), and high-multiple protocols like Hyperliquid (15x) and Uniswap (37x), where valuation reflects future potential rather than current cash flows. Grayscale applies a traditional DCF model to Aave, suggesting a one-year price target of ~$175, representing ~130% upside from current levels. The report notes a risk-off macro environment since the Iran conflict has further compressed valuations, creating a potential entry window. The conclusion highlights that while the valuation data presents an intriguing opportunity, the investment thesis is contingent on the CLARITY Act's passage and subsequent institutional capital flows. Investors are cautioned to consider Grayscale's inherent conflict of interest as a crypto asset manager with products tied to these assets.

marsbit2 год тому

Grayscale: These 15 Profitable Crypto Protocols Are Severely Undervalued

marsbit2 год тому

Торгівля

Спот
Ф'ючерси
活动图片