weshnet icon indicating copy to clipboard operation
weshnet copied to clipboard

feat: browser support via wasm + helia

Open n0izn0iz opened this issue 1 year ago • 2 comments

Depends on https://github.com/berty/go-orbit-db/pull/151

Demo

https://github.com/berty/weshnet/assets/7917064/609fcb18-6b7d-4c80-bc6d-d68fdbdd3eda

Usage

cd wasm && make serve the navigate to "localhost:4242" in two browsers

Caveats

  • The group invitation is printed in the console only, you can then paste it in the input next to "join" button and click it
  • You need to dial the other peer manually via helia.libp2p.dial(Libp2PPeerId.peerIdFromString("<peerId-of-other-browser>")) in the browser console
  • It only got it to work between a firefox and a chrome, not 2 chrome or 2 ff, and only once bidirectionally

n0izn0iz avatar Jun 10 '24 14:06 n0izn0iz

:warning: We detected 9 security issues in this pull request:

Insecure File Management (1)
Severity Details Docs
Medium Title: Sensitve Directories Exposed vis http.Dir
https://github.com/berty/weshnet/blob/a97781c847744e417ada125a6f5288f3d54ab67c/wasm/serve/main.go#L10
:books:

More info on how to fix Insecure File Management in Go.


Insecure Network Communication (1)
Severity Details Docs
High Title: Plaintext HTTP Server
https://github.com/berty/weshnet/blob/a97781c847744e417ada125a6f5288f3d54ab67c/wasm/serve/main.go#L10
:books:

More info on how to fix Insecure Network Communication in Go.


Vulnerable Libraries (7)
Severity Details
High pkg:golang/github.com/ipfs/[email protected] upgrade to: > v0.5.0
High pkg:golang/github.com/ipld/[email protected] upgrade to: > v0.20.0
High pkg:golang/github.com/ipfs/[email protected] upgrade to: > v0.10.0
High pkg:golang/github.com/ipfs/[email protected] upgrade to: > v0.4.0
High pkg:golang/github.com/ipfs/[email protected] upgrade to: > v1.2.0
High pkg:golang/github.com/ipfs/[email protected] upgrade to: > v0.1.1
High pkg:golang/github.com/ipfs/[email protected] upgrade to: > v0.2.0

More info on how to fix Vulnerable Libraries in Go.


👉 Go to the dashboard for detailed results.

📥 Happy? Share your feedback with us.

guardrails[bot] avatar Jun 10 '24 15:06 guardrails[bot]

This PR/issue depends on:

github-actions[bot] avatar Jun 10 '24 15:06 github-actions[bot]