When user running ss-local but not input any argument, ss-local will try to use ./config(if exist).

bettter way.

change default config path as /etc/shadowsocks/config.json

When user running ss-local but not input any argument, ss-local will try to use ./config(if exist).

Fixed the indent
This commit is contained in:
JohnnySun
2015-03-06 11:20:01 +08:00
parent 2de1ef639b
commit cc639b18a4
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -37,6 +37,8 @@
#endif
#define DEFAULT_CONF_PATH "/etc/shadowsocks/config.json"
#ifndef SOL_TCP
#define SOL_TCP IPPROTO_TCP
#endif
+5
View File
@@ -963,6 +963,11 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
if (argc == 1) {
if (conf_path == NULL) {
conf_path = DEFAULT_CONF_PATH;
}
}
if (conf_path != NULL) {
jconf_t *conf = read_jconf(conf_path);
if (remote_num == 0) {