summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-02-24 10:56:55 +0000
committerRoger Dingledine <arma@torproject.org>2005-02-24 10:56:55 +0000
commit6faaac27064ba6bf0c8e0b1fc819004d3bf585ba (patch)
tree5df899f6ecbf2608d9632d11f23a82501442bbc5 /src/or/config.c
parent8054f82992105c5e69f7ea10c578e23479234e8a (diff)
downloadtor-6faaac27064ba6bf0c8e0b1fc819004d3bf585ba.tar.gz
tor-6faaac27064ba6bf0c8e0b1fc819004d3bf585ba.zip
add support for CONNECTing through https proxies.
not sure if it works. i don't have an https proxy. svn:r3682
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 7fa6fe853c..d55af562d6 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -131,6 +131,7 @@ static config_var_t config_vars[] = {
VAR("Group", STRING, Group, NULL),
VAR("HashedControlPassword",STRING, HashedControlPassword, NULL),
VAR("HttpProxy", STRING, HttpProxy, NULL),
+ VAR("HttpsProxy", STRING, HttpsProxy, NULL),
VAR("HiddenServiceOptions",LINELIST_V, RendConfigLines, NULL),
VAR("HiddenServiceDir", LINELIST_S, RendConfigLines, NULL),
VAR("HiddenServicePort", LINELIST_S, RendConfigLines, NULL),
@@ -1463,6 +1464,17 @@ options_validate(or_options_t *options)
}
}
+ if (options->HttpsProxy) { /* parse it now */
+ if (parse_addr_port(options->HttpsProxy, NULL,
+ &options->HttpsProxyAddr, &options->HttpsProxyPort) < 0) {
+ log(LOG_WARN,"HttpsProxy failed to parse or resolve. Please fix.");
+ result = -1;
+ }
+ if (options->HttpsProxyPort == 0) { /* give it a default */
+ options->HttpsProxyPort = 443;
+ }
+ }
+
if (options->HashedControlPassword) {
if (decode_hashed_password(NULL, options->HashedControlPassword)<0) {
log_fn(LOG_WARN,"Bad HashedControlPassword: wrong length or bad base64");