Skip to content

Redirect PeerWeb ORC URLs to bittorrent handle#322

Open
cp89cyber wants to merge 3 commits intoAgregoreWeb:masterfrom
cp89cyber:fix/peerweb-bittorrent-redirect
Open

Redirect PeerWeb ORC URLs to bittorrent handle#322
cp89cyber wants to merge 3 commits intoAgregoreWeb:masterfrom
cp89cyber:fix/peerweb-bittorrent-redirect

Conversation

@cp89cyber
Copy link

@cp89cyber cp89cyber commented Feb 26, 2026

Summary

  • add a rewritePeerWebURL helper that turns peerweb.lol/?orc= links into bittorrent:// URLs, preserving other query params, fragments, and non-root paths
  • wire the helper into Window.loadURL and webContents navigation events so both programmatic and user-driven navigation are rewritten before the page loads
  • validate the bittorrent handler and include any necessary bt-protocol compatibility adjustments so rewritten URLs actually load
    fixes Get peerweb.lol sites loading as bittorrent:// #319

Copy link
Member

@RangerMauve RangerMauve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there, thanks for the PR. Mind also posting a screenshot of what it looks like? I haven't been able to get any peerweb sites to load 😅

@cp89cyber
Copy link
Author

Updated per review feedback:

  • Moved PeerWeb ORC rewrite into the UI rewrite path in src/ui/omni-box.js (submit, paste-and-go, URL suggestions, and nav item click).
  • Removed main-process rewrite interception from src/window.js (will-navigate/loadURL rewrite behavior is gone).
  • Removed the standalone rewrite helper/test files so scope stays in OmniBox.

On the earlier bt-protocol compat change: that was an attempt to normalize request shape for bt-fetch, but I’ve removed it from this PR to keep scope focused on the PeerWeb URL rewrite only.

https://peerweb.lol/?orc=<hash> now rewrites pre-navigation to bittorrent://<hash>/index.html (preserving non-orc query params and hash fragment).

I can’t attach a successful page screenshot from this environment because it’s headless (no desktop Electron window to capture), and the public PeerWeb demo hashes were not consistently seeded during verification, so there wasn’t a stable rendered page to screenshot.

@RangerMauve
Copy link
Member

I'd rather not merge something we can't consistently load since it'd be a broken feature for anybody that tries it. Lets wait for peerweb to become more reliable or for some other fix.

@RangerMauve
Copy link
Member

Would you be interested in taking a crack at #282 or #313 instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get peerweb.lol sites loading as bittorrent://

2 participants