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

Support [SIP008] Online Config #302

Closed
zonyitoo opened this issue Oct 19, 2020 · 7 comments
Closed

Support [SIP008] Online Config #302

zonyitoo opened this issue Oct 19, 2020 · 7 comments

Comments

@zonyitoo
Copy link
Collaborator

shadowsocks/shadowsocks-org#89

This feature allows sslocal to update configurations dynamically from a config that hosts on a HTTPS server.

@DuckSoft
Copy link
Contributor

DuckSoft commented Oct 19, 2020

did you mean something like this?

ss-local --sip008 '{"server":"xxxxxx","port":12345,"password":"somerandomnode","method":"aes-128-gcm"}' ....


in other words, IN WHAT FORM do you want SIP008 to be supported?

@zonyitoo
Copy link
Collaborator Author

zonyitoo commented Oct 19, 2020

$ sslocal --sip008 "https://URL-TO-SSCONF"

Maybe something like this. SIP008 JSON format is the same as the JSON config file that already being accepted by the argument -c.

@fernvenue
Copy link
Contributor

fernvenue commented Mar 6, 2023

This is gonna be a great feature, actually I'm so surprised that shadowsocks-rust doesn't support SIP008.

@zonyitoo
Copy link
Collaborator Author

zonyitoo commented Mar 6, 2023

Because in practice, the SIP008 configuration file get from an URL usually require some modifications. So what I was doing was:

  1. Add a crontab script to download the SIP008 configuration file from an URL
  2. Do my modifications, produce a new configuration file
  3. Send a signal to sslocal process, and let it reload the configuration file

@fernvenue
Copy link
Contributor

What if make it work as an alternative of "servers": [] part for sslocal and ssservice local? We can still do our modifications locally.

@zonyitoo
Copy link
Collaborator Author

There may be quite a lot of works to do:

  1. Run a background task for pulling SIP008 configurations in a fix interval. (EASY)
  2. PingBalancer supports updating servers separately from different sources (command line, configuration file, SIP008).
  3. Make HTTPS requests to SIP008 URL:
    • Which HTTP library? reqwest should be a choice.
    • Which TLS library? rust-tls for using system provided TLS framework, or rustls.
    • HTTP's outbound sockets should follow the outbound-* configurations. (HARD)

Still wondering how to customize the sockets with reqwest's API.

@fernvenue
Copy link
Contributor

Glad to see shadowsocks-rust supports SIP008 since v1.16.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants