Background
JSS already exposes git smart-HTTP via --git and supports HTTP 402 paid access via --pay. Combining these would let a JSS pod act as a CORS-enabled, optionally-paid gateway for browser-side git clients to any remote git server (GitHub, GitLab, Gitea, other JSS pods, etc.).
Why
Browser-side git clients (e.g., JSS Git, built on isomorphic-git) hit CORS preflight failures against major git hosts that don't return browser-friendly headers. Public CORS proxies (cors.isomorphic-git.org) exist but introduce third-party dependencies, privacy concerns, and uptime risk.
A JSS-native proxy would let pod operators:
- Self-host the bridge (no third-party trust)
- Optionally monetize the proxy via per-request HTTP 402 pricing
- Stay within the Solid + Lightning stack already shipping in JSS
Proposed feature
New flag --git-proxy enables a proxy endpoint that:
- Accepts requests at
/git-proxy/<remote-url-or-path>/info/refs?...
- Forwards the request to the remote git host with appropriate headers (
Git-Protocol, Authorization if provided)
- Returns the response with CORS headers attached (
Access-Control-Allow-Origin, Access-Control-Allow-Headers: Git-Protocol, Content-Type, etc.)
- Handles binary responses (pack files) correctly
- Optionally pricing-gated via HTTP 402 (
--pay integration: each proxy request debits the caller's balance per --pay-cost)
URL scheme options
| Option |
Example |
| A. Path-encoded |
/git-proxy/https%3A%2F%2Fgithub.com%2Fuser%2Frepo.git/info/refs |
| B. Subpath mirror |
/git-proxy/github.com/user/repo.git/info/refs |
| C. Query param |
/git-proxy/info/refs?upstream=https://github.com/user/repo.git |
Recommend B for cleaner URLs and easier client handling.
Composing with --pay
Pricing tiers (configurable):
- Free up to N requests/hour per WebID (rate-limited)
- Paid above that: deduct
--pay-cost per request from caller's ledger balance
- HTTP 402 returned when balance insufficient
- Bandwidth-priced option (
--pay-per-byte) for large clones
Marketing story
"JSS Git browses any git repo — your pod, GitHub, Gitea, anywhere — by routing through a pod-hosted proxy. Free for friends; sat-per-request for strangers."
Pulls together: Solid + git smart-HTTP + Lightning + browser-side cloning. A complete decentralized git-hosting story.
Refs
src/handlers/git.js — existing git handler
src/handlers/pay.js — existing payment + ledger
src/wac/checker.js — WAC payment conditions
- JSS Git frontend: github.com/JavaScriptSolidServer/git
- isomorphic-git CORS proxy spec: https://isomorphic-git.org/docs/en/cors
Background
JSS already exposes git smart-HTTP via
--gitand supports HTTP 402 paid access via--pay. Combining these would let a JSS pod act as a CORS-enabled, optionally-paid gateway for browser-side git clients to any remote git server (GitHub, GitLab, Gitea, other JSS pods, etc.).Why
Browser-side git clients (e.g., JSS Git, built on isomorphic-git) hit CORS preflight failures against major git hosts that don't return browser-friendly headers. Public CORS proxies (cors.isomorphic-git.org) exist but introduce third-party dependencies, privacy concerns, and uptime risk.
A JSS-native proxy would let pod operators:
Proposed feature
New flag
--git-proxyenables a proxy endpoint that:/git-proxy/<remote-url-or-path>/info/refs?...Git-Protocol,Authorizationif provided)Access-Control-Allow-Origin,Access-Control-Allow-Headers: Git-Protocol, Content-Type, etc.)--payintegration: each proxy request debits the caller's balance per--pay-cost)URL scheme options
/git-proxy/https%3A%2F%2Fgithub.com%2Fuser%2Frepo.git/info/refs/git-proxy/github.com/user/repo.git/info/refs/git-proxy/info/refs?upstream=https://github.com/user/repo.gitRecommend B for cleaner URLs and easier client handling.
Composing with
--payPricing tiers (configurable):
--pay-costper request from caller's ledger balance--pay-per-byte) for large clonesMarketing story
Pulls together: Solid + git smart-HTTP + Lightning + browser-side cloning. A complete decentralized git-hosting story.
Refs
src/handlers/git.js— existing git handlersrc/handlers/pay.js— existing payment + ledgersrc/wac/checker.js— WAC payment conditions