specific local address to bind in `config.json`: `"local": "127.0.0.1"`
@ -137,6 +137,10 @@ jconf_t *read_jconf(const char* file)
{
conf.remote_port = to_string(value);
}
else if (strcmp(name, "local") == 0)
conf.local_addr = to_string(value);
else if (strcmp(name, "local_port") == 0)
conf.local_port = to_string(value);
@ -17,6 +17,7 @@ typedef struct
int remote_num;
remote_addr_t remote_addr[MAX_REMOTE_NUM];
char *remote_port;
char *local_addr;
char *local_port;
char *password;
char *method;
@ -876,6 +876,7 @@ int main (int argc, char **argv)
if (remote_port == NULL) remote_port = conf->remote_port;
if (local_addr == NULL) local_addr = conf->local_addr;
if (local_port == NULL) local_port = conf->local_port;
if (password == NULL) password = conf->password;
if (method == NULL) method = conf->method;
@ -729,6 +729,7 @@ int main (int argc, char **argv)