tradle / why-hypercore

Exploration of Hypercore's breakthrough designs and capabilities, uncovering its gems that may be scattered across different github accounts (official and community-led), and learning to think from the "first principles" of P2P, while using the best Cloud, AI and blockchain have to offer.
MIT License
81 stars 6 forks source link

Hypercore network reliability and fallback #4

Open urbien opened 3 years ago

urbien commented 3 years ago

Problem

the default is to use TCP in Hypercore. TCP may be blocked by the firewall and is not available in the browser.

Fallback

  1. if in Browser, skip to 3

  2. start with uTP, if fails, next Coudl we use UDP port 443, which is used by QUIC?

  3. use TCP. If fails, next

  4. use WebRTC. What extra info do we need for this?

  5. Relay. if P2P connection fails, establish a proxy connection via Relay. Use Personal Cloud for that to avoid privacy loss.

It is probably better to do them in parallel, e.g. Chrome currently races TCP and QUIC connections instead of waiting for a QUIC timeout.