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

[gui] protocol discriminator #768

Open
dskvr opened this issue Feb 6, 2025 · 0 comments
Open

[gui] protocol discriminator #768

dskvr opened this issue Feb 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@dskvr
Copy link
Collaborator

dskvr commented Feb 6, 2025

Certain local checks cannot be conducted (without a proxy at least) when protocols do not match.

Right now, there are a number of assumptions when it comes to local checks (audits, nip-11 fetches, etc)

  1. The web-app is ran on is https://
  2. The websocket being connected to is wss://
  3. The server fetching from is https://

Add a discriminator with that populates application capabilities that can be used in conditions to enable/disable features

  1. When app is running on HTTPS, only HTTPS/WSS relays can be connected to client side
  2. When app is running on HTTP, only HTTP/WS relays can be connected to client side

Additionally, in preparation for alternative network data

  1. When app is running on TOR, only TOR relays can be connected to client-side (for now)
  2. When app is runnning on clearnet, only clearnet relays can be conected to client-side (unless tor proxy is defined)

Note
There's potential complexity and conflicts with the logic above since tor relays run on ws://

@dskvr dskvr added the enhancement New feature or request label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant