[torsocks/master] Read environment variables before creating the SOCKS5 connection.

commit c9abecb19f523bc11ff656e4466d355bcd10d81d Author: Alexander Færøy <ahf@0x90.dk> Date: Mon Oct 12 23:38:19 2015 +0200 Read environment variables before creating the SOCKS5 connection. Signed-off-by: David Goulet <dgoulet@ev0ke.net> --- src/lib/torsocks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/torsocks.c b/src/lib/torsocks.c index 60d586d..7944e57 100644 --- a/src/lib/torsocks.c +++ b/src/lib/torsocks.c @@ -175,6 +175,9 @@ static void init_config(void) tsocks_config.conf_file.onion_mask = atoi(DEFAULT_ONION_ADDR_MASK); } + /* Handle possible env. variables. */ + read_env(); + /* Create the Tor SOCKS5 connection address. */ ret = connection_addr_set(tsocks_config.conf_file.tor_domain, tsocks_config.conf_file.tor_address, @@ -187,9 +190,6 @@ static void init_config(void) clean_exit(EXIT_FAILURE); } - /* Handle possible env. variables. */ - read_env(); - /* Finalize the SOCKS auth (Isolation) settings. */ ret = conf_apply_socks_auth(&tsocks_config); if (ret < 0) {
participants (1)
-
dgoulet@torproject.org