0.0.0 • Published 5 years ago
bzz-web v0.0.0
bzz-web
Adds bzz-web:/ that proxies bzz:/ URLs,
so that you can surf the Dweb on Swarm.
How to use
- Run Swarm, which should be listening for HTTP requests on
localhost:8500 - Run
bzz-web, which should listen for HTTP requests onlocalhost:8511npx bzz-swarm - Point your browser to:
- Instead of:
http://localhost:8500/bzz:/somehash/ - ...this:
http://localhost:8511/bzz-web:/somehash/
- Instead of:
You can use PORT, BZZ_HOST, and BZZ_PORT to override default values.
Why
The built-in HTTP router that handles bzz:/ URLs in Swarm,
does not cater to web-browser specific routing customs & expectations,
for example handling trailing /-es and index.html files.
This is a simple server which takes the URLs,
and treats them as a "regular" HTTP web server would,
traverse the Swarm manifest tries,
and proxies the requests to Swarm as bzz-raw:/ file hashes.
Caveat
This is only intended to be a proof-of-concept, and have demo quality.
It might (probably will) not work for your use case.
Patches welcome!
Author
Licence
GPL-3.0
0.0.0
5 years ago