-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
electronRelated to electron.jsRelated to electron.jsenhancementNew feature or requestNew feature or requestpriority: highFor important issues that affect many users or major functionality of the projectFor important issues that affect many users or major functionality of the projectprotocolNew protocol to support ://New protocol to support ://
Description
Our current protocol handlers use the deprecated protocol.registerStreamProtocol() API. We need to migrate to the modern protocol.handle() API which uses fetch-style request/response patterns.
### Current approach (deprecated):
protocol.registerStreamProtocol('ipfs', (request, callback) => {
// Stream-based handler
callback({ statusCode: 200, data: stream });
});New approach (protocol.handle):
protocol.handle('ipfs', async (request) => {
// Fetch-style handler - return Response object
return new Response(body, {
status: 200,
headers: { 'content-type': 'text/html' }
});
});Main registration:
- src/main.js - Change protocol.registerStreamProtocol() to protocol.handle()
Protocol handlers (all need fetch-style conversion): - src/protocols/ipfs-handler.js
- src/protocols/hyper-handler.js
- src/protocols/web3-handler.js
- src/protocols/file-handler.js
- src/protocols/hs-handler.js
- src/protocols/bittorrent-handler.js
- src/protocols/peersky-protocol.js
- src/protocols/theme-handler.js
After migration, test all protocols:
Accessing (read operations):
- ipfs:// - Load CID content
- hyper:// - Load Hypercore data
- file:// - Directory listings and file access
- hs:// -
peersky://p2p/p2pmdapp - bittorrent:// / bt:// - Torrent content
- web3:// - Web3 resources
- peersky:// - Internal browser pages
Publishing (write operations):
- IPFS upload via peersky://upload or other p2p apps.
- Hyper publishing same as above
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
electronRelated to electron.jsRelated to electron.jsenhancementNew feature or requestNew feature or requestpriority: highFor important issues that affect many users or major functionality of the projectFor important issues that affect many users or major functionality of the projectprotocolNew protocol to support ://New protocol to support ://