Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3: consider merging DHT and Relay clients #101

Open
Nuhvi opened this issue Nov 27, 2024 · 0 comments
Open

v3: consider merging DHT and Relay clients #101

Nuhvi opened this issue Nov 27, 2024 · 0 comments
Assignees

Comments

@Nuhvi
Copy link
Collaborator

Nuhvi commented Nov 27, 2024

Clients can use relays and DHT in parallel, which at least has the advantages:

  1. working even in networks that blocks UDP and or Bittorrent-like packets
  2. using the DHT even if you trust a relay increases the censorship resistance
  3. might make resolvers redundant? but only if the user doesn't disable relay feature
  4. Massively simplifies the extra features since there will only be one Client struct instead of two in native.

Cons:

  1. Redundant bandwith consumption, especially when you use the same server as a resolver and a relay.
  2. Harder to debug.
  3. Harder to use a testnet, since you have to override default relays too.
  4. Dependency on Tokio runtime unless you disable the relay feature.

Using relays can be done in parallel, or only when UDP issues are detected, although that is easier said than done.

@Nuhvi Nuhvi self-assigned this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant