shadowsocks-rust
shadowsocks-rust copied to clipboard
Support [SIP008] Online Config
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.
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?
$ 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.
This is gonna be a great feature, actually I'm so surprised that shadowsocks-rust doesn't support SIP008.
Because in practice, the SIP008 configuration file get from an URL usually require some modifications. So what I was doing was:
- Add a crontab script to download the SIP008 configuration file from an URL
- Do my modifications, produce a new configuration file
- Send a signal to
sslocalprocess, and let it reload the configuration file
What if make it work as an alternative of "servers": [] part for sslocal and ssservice local? We can still do our modifications locally.
There may be quite a lot of works to do:
- Run a background task for pulling SIP008 configurations in a fix interval. (EASY)
PingBalancersupports updating servers separately from different sources (command line, configuration file, SIP008).- Make HTTPS requests to SIP008 URL:
- Which HTTP library?
reqwestshould be a choice. - Which TLS library?
rust-tlsfor using system provided TLS framework, orrustls. - HTTP's outbound sockets should follow the
outbound-*configurations. (HARD)
- Which HTTP library?
Still wondering how to customize the sockets with reqwest's API.
Glad to see shadowsocks-rust supports SIP008 since v1.16.2.