feat(ton): add TON Sites support - #34
Open
TONresistor wants to merge 3 commits into
Open
Conversation
Introduce ton-manager, fetch script, IPC channels and build-system wiring to download and run the bundled tonutils-freedom-cli binary. The fetch script pins the bundled binaries to SHA256 checksums published by the TONresistor/Tonutils-Proxy release, preventing silent binary substitution.
Hook session.defaultSession to the tonManager event stream. When the proxy starts, install a PAC script that routes *.ton / *.adnl / *.bag / *.t.me hosts through the loopback proxy and leaves everything else DIRECT. A certificate-error handler scoped to TON TLDs accepts the self-signed responses that ADNL Sites produce. TON_SUFFIXES and isTonHost live in src/shared/ton-suffixes.js as a single source of truth for the main process.
Add a TON section to the existing nodes dropdown, mirroring the Bee/IPFS/Radicle structure. The renderer displays the TON icon and canonicalises the address bar to ton://host/path after any navigation to a .ton / .adnl / .bag / .t.me host, regardless of user input form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds navigation to
.ton,.adnl,.bag, and.t.mehosts through abundled local TON proxy, with a PAC script handling the routing.
Follows the same pattern as the Bee, IPFS, and Radicle integrations.
The three commits split the feature into the daemon lifecycle (state
machine, binary fetch with SHA256 verification, IPC,
startTonAtLaunchsetting), the PAC and cert-error wiring (scoped to TON TLDs, shared
TON_SUFFIXESinsrc/shared/ton-suffixes.js), and the UI (nodesdropdown section, protocol icon, canonical
ton://host/pathaddressbar rewrite).
The binary comes from
TONresistor/Tonutils-Proxy,an MIT-only fork of
xssnick/tonutils-proxywith the GPLadnl-tunneldependency removed. The address bar canonicalises TONinput forms to match the existing
bzz:///ipfs:///rad://behaviour. See #16 for the rationale.