diff --git a/src/jconf.c b/src/jconf.c index 400a8e41..f51195bd 100644 --- a/src/jconf.c +++ b/src/jconf.c @@ -188,6 +188,8 @@ jconf_t *read_jconf(const char * file) conf.timeout = to_string(value); } else if (strcmp(name, "fast_open") == 0) { conf.fast_open = value->u.boolean; + } else if (strcmp(name, "auth") == 0) { + conf.auth = value->u.boolean; } else if (strcmp(name, "nofile") == 0) { conf.nofile = value->u.integer; } else if (strcmp(name, "nameserver") == 0) { diff --git a/src/jconf.h b/src/jconf.h index 0ce40bfd..ceac61f7 100644 --- a/src/jconf.h +++ b/src/jconf.h @@ -50,6 +50,7 @@ typedef struct { char *password; char *method; char *timeout; + int auth; int fast_open; int nofile; char *nameserver; diff --git a/src/local.c b/src/local.c index 5c443a47..1b0f55a6 100644 --- a/src/local.c +++ b/src/local.c @@ -1042,6 +1042,9 @@ int main(int argc, char **argv) if (timeout == NULL) { timeout = conf->timeout; } + if (auth == 0) { + auth = conf->auth; + } if (fast_open == 0) { fast_open = conf->fast_open; } diff --git a/src/redir.c b/src/redir.c index 791c2fc6..b317e6db 100644 --- a/src/redir.c +++ b/src/redir.c @@ -719,6 +719,9 @@ int main(int argc, char **argv) if (timeout == NULL) { timeout = conf->timeout; } + if (auth == 0) { + auth = conf->auth; + } } if (remote_num == 0 || remote_port == NULL || diff --git a/src/server.c b/src/server.c index 4f6a2ad1..b948fedf 100644 --- a/src/server.c +++ b/src/server.c @@ -1343,6 +1343,9 @@ int main(int argc, char **argv) if (timeout == NULL) { timeout = conf->timeout; } + if (auth == 0) { + auth = conf->auth; + } #ifdef TCP_FASTOPEN if (fast_open == 0) { fast_open = conf->fast_open; diff --git a/src/tunnel.c b/src/tunnel.c index e5000066..3e027005 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -784,6 +784,9 @@ int main(int argc, char **argv) if (timeout == NULL) { timeout = conf->timeout; } + if (auth == 0) { + auth = conf->auth; + } } if (remote_num == 0 || remote_port == NULL || tunnel_addr_str == NULL ||