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

skywire-cli ut ; skywire-cli proxy ; skywire-cli vpn queries respect dmsghttp-config #1681

Open
0pcom opened this issue Nov 24, 2023 · 0 comments
Labels
bug Something isn't working dmsg issue of dmsg client, connection, or dmsghttp-config

Comments

@0pcom
Copy link
Collaborator

0pcom commented Nov 24, 2023

The service discovery queries will try to use the visor's config value for service discovery. Which could be a dmsghttp url, which is where the error comes from here:
#1659

if you have that dmsghttp-config then the cli would want to connect to SD via dmsg directly, which is not working correctly yet as implemented in this PR
#1679

I thought there was some api for the visor to do service discovery & uptime tracker queries ; perhaps we took that out because it was overly complicated.

skywire-cli proxy list / skywire-cli vpn list / skywire-cli ut desired behavior:

What should happen if one of the above three commands is run? ;

In the instance there is a visor running locally:

  • skywire-cli asks the running visor to query the SD / UT <-- Not implemented (has API?)

In the instance there is no running visor locally:

  • connect to the SD or UT URL specified via flag to skywire-cli (dmsg:// or http://) <-- Not implemented

  • an optional flag to be used with dmsg:// URL for specifying dmsg server <ip>:<port> to connect to for dmsg-direct query <-- Not implemented / issues with implementation improve skywire-cli ut command logic #1679

If a URL is not specified via flag for the SD or UT:

  • skywire-cli should attempt to use the service discovery or uptime tracker URL in the visor's config ; assuming that the config for the visor is detected in one of three standard places:
    -- the current dir ( i.e. running from source)
    -- the package path (/opt/skywire/skywire.json) or
    -- the config path in the user space (~/.skywire/skywire.json or ~/.skywire/skywire-config.json)

  • optional flag to specify config path

If no config is detected

Two options remain:

  • fetch the relevant parts of the config from http://conf.skywire.skycoin.com or from the dmsghttp endpoint that the conf service is served on (I'm not sure if conf serves over dmsghttp currently) ; then do the query to SD or UT with that.

  • fall back on hardcoded defaults (http:// or dmsg://).

...

We should make sure not to do any http queries:

  • if there is a visor running locally with a dmsghttp-config.
  • if a visor config for dmsghttp is found in any of those places.
  • In the instance that flags specify to use either dmsg or dmsg-direct (not implemented currently)
@0pcom 0pcom added the bug Something isn't working label Nov 24, 2023
@0pcom 0pcom added the dmsg issue of dmsg client, connection, or dmsghttp-config label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dmsg issue of dmsg client, connection, or dmsghttp-config
Projects
None yet
Development

No branches or pull requests

1 participant