diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-08-26 11:27:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-08-26 11:27:19 -0400 |
commit | 707a6bd6595024e0b4a998e0a99eb284499a37e3 (patch) | |
tree | dd3230c44404c42b7fcab590466b0c2d3ad99c61 /src/or/directory.c | |
parent | f1b5fd2aaa81daaa9065a7f0193be5855e7d4e32 (diff) | |
parent | 903f9ef50e418f6ec1a1ab7ae8146e9d6d2a7767 (diff) | |
download | tor-707a6bd6595024e0b4a998e0a99eb284499a37e3.tar.gz tor-707a6bd6595024e0b4a998e0a99eb284499a37e3.zip |
Merge commit 'public/socks-client'
Resolved conflict in:
src/or/or.h
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 93046489f0..3a72b94327 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -747,6 +747,15 @@ directory_initiate_command_rend(const char *address, const tor_addr_t *_addr, log_debug(LD_DIR, "Initiating %s", dir_conn_purpose_to_string(dir_purpose)); + /* ensure that we don't make direct connections when a SOCKS server is + * configured. */ + if (!anonymized_connection && !use_begindir && !options->HttpProxy && + (options->Socks4Proxy || options->Socks5Proxy)) { + log_warn(LD_DIR, "Cannot connect to a directory server through a " + "SOCKS proxy!"); + return; + } + conn = dir_connection_new(AF_INET); /* set up conn so it's got all the data we need to remember */ @@ -772,7 +781,7 @@ directory_initiate_command_rend(const char *address, const tor_addr_t *_addr, /* then we want to connect to dirport directly */ if (options->HttpProxy) { - tor_addr_from_ipv4h(&addr, options->HttpProxyAddr); + tor_addr_copy(&addr, &options->HttpProxyAddr); dir_port = options->HttpProxyPort; } |