shadowsocks-rust icon indicating copy to clipboard operation
shadowsocks-rust copied to clipboard

Support [SIP008] Online Config

Open zonyitoo opened this issue 5 years ago • 7 comments
trafficstars

https://github.com/shadowsocks/shadowsocks-org/issues/89

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

zonyitoo avatar Oct 19 '20 01:10 zonyitoo

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?

DuckSoft avatar Oct 19 '20 01:10 DuckSoft

$ 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.

zonyitoo avatar Oct 19 '20 02:10 zonyitoo

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

fernvenue avatar Mar 06 '23 11:03 fernvenue

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

zonyitoo avatar Mar 06 '23 11:03 zonyitoo

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

fernvenue avatar Mar 06 '23 11:03 fernvenue

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.

zonyitoo avatar Mar 12 '23 10:03 zonyitoo

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

fernvenue avatar Sep 23 '23 17:09 fernvenue