From 40fd0c1ca184c5f04e1d345585df0a059d3a86fe Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Fri, 29 Oct 2010 23:04:21 +0200 Subject: Remove the torrc.complete file. We haven't been keeping it up to date, and the manpage exists as a replacement for users who want an overview of all available options. --- changes/torrc.complete | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changes/torrc.complete (limited to 'changes') diff --git a/changes/torrc.complete b/changes/torrc.complete new file mode 100644 index 000000000..03d51c121 --- /dev/null +++ b/changes/torrc.complete @@ -0,0 +1,4 @@ + o Code simplifications and refactorings: + - Remove the torrc.complete file. It hasn't been kept up to date + and users will have better luck checking out the manpage. + -- cgit v1.2.3 From b9cac605abf029d9f0eb3d83a5f64f5b484d61c1 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Fri, 29 Oct 2010 19:41:24 +0200 Subject: Synx manpage and source wrt option capitalization We had a spelling discrepancy between the manpage and the source code for some option. Resolve these in favor of the manpage, because it makes more sense (for example, HTTP should be capitalized). --- changes/HTTP | 4 ++++ src/or/config.c | 54 +++++++++++++++++++++++++------------------------- src/or/connection.c | 4 ++-- src/or/connection_or.c | 8 ++++---- src/or/cpuworker.c | 2 +- src/or/directory.c | 12 +++++------ src/or/or.h | 18 ++++++++--------- 7 files changed, 53 insertions(+), 49 deletions(-) create mode 100644 changes/HTTP (limited to 'changes') diff --git a/changes/HTTP b/changes/HTTP new file mode 100644 index 000000000..078d9b3bc --- /dev/null +++ b/changes/HTTP @@ -0,0 +1,4 @@ + o Code simplifications and refactoring: + - Some options used different conventions for uppercasing of acronyms + when comparing manpage and source. Fix those in favor of the + manpage, as it makes sense to capitalize acronyms. diff --git a/src/or/config.c b/src/or/config.c index 655af3797..1339dd1a9 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -83,7 +83,7 @@ static config_abbrev_t _option_abbrevs[] = { PLURAL(LongLivedPort), PLURAL(HiddenServiceNode), PLURAL(HiddenServiceExcludeNode), - PLURAL(NumCpu), + PLURAL(NumCPU), PLURAL(RendNode), PLURAL(RendExcludeNode), PLURAL(StrictEntryNode), @@ -276,10 +276,10 @@ static config_var_t _option_vars[] = { V(HidServAuth, LINELIST, NULL), V(HSAuthoritativeDir, BOOL, "0"), OBSOLETE("HSAuthorityRecordStats"), - V(HttpProxy, STRING, NULL), - V(HttpProxyAuthenticator, STRING, NULL), - V(HttpsProxy, STRING, NULL), - V(HttpsProxyAuthenticator, STRING, NULL), + V(HTTPProxy, STRING, NULL), + V(HTTPProxyAuthenticator, STRING, NULL), + V(HTTPSProxy, STRING, NULL), + V(HTTPSProxyAuthenticator, STRING, NULL), V(Socks4Proxy, STRING, NULL), V(Socks5Proxy, STRING, NULL), V(Socks5ProxyUsername, STRING, NULL), @@ -306,7 +306,7 @@ static config_var_t _option_vars[] = { V(WarnUnsafeSocks, BOOL, "1"), V(NoPublish, BOOL, "0"), VAR("NodeFamily", LINELIST, NodeFamilies, NULL), - V(NumCpus, UINT, "1"), + V(NumCPUs, UINT, "1"), V(NumEntryGuards, UINT, "3"), V(ORListenAddress, LINELIST, NULL), V(ORPort, UINT, "0"), @@ -3394,32 +3394,32 @@ options_validate(or_options_t *old_options, or_options_t *options, if (accounting_parse_options(options, 1)<0) REJECT("Failed to parse accounting options. See logs for details."); - if (options->HttpProxy) { /* parse it now */ - if (tor_addr_port_parse(options->HttpProxy, - &options->HttpProxyAddr, &options->HttpProxyPort) < 0) - REJECT("HttpProxy failed to parse or resolve. Please fix."); - if (options->HttpProxyPort == 0) { /* give it a default */ - options->HttpProxyPort = 80; + if (options->HTTPProxy) { /* parse it now */ + if (tor_addr_port_parse(options->HTTPProxy, + &options->HTTPProxyAddr, &options->HTTPProxyPort) < 0) + REJECT("HTTPProxy failed to parse or resolve. Please fix."); + if (options->HTTPProxyPort == 0) { /* give it a default */ + options->HTTPProxyPort = 80; } } - if (options->HttpProxyAuthenticator) { - if (strlen(options->HttpProxyAuthenticator) >= 48) - REJECT("HttpProxyAuthenticator is too long (>= 48 chars)."); + if (options->HTTPProxyAuthenticator) { + if (strlen(options->HTTPProxyAuthenticator) >= 48) + REJECT("HTTPProxyAuthenticator is too long (>= 48 chars)."); } - if (options->HttpsProxy) { /* parse it now */ - if (tor_addr_port_parse(options->HttpsProxy, - &options->HttpsProxyAddr, &options->HttpsProxyPort) <0) - REJECT("HttpsProxy failed to parse or resolve. Please fix."); - if (options->HttpsProxyPort == 0) { /* give it a default */ - options->HttpsProxyPort = 443; + if (options->HTTPSProxy) { /* parse it now */ + if (tor_addr_port_parse(options->HTTPSProxy, + &options->HTTPSProxyAddr, &options->HTTPSProxyPort) <0) + REJECT("HTTPSProxy failed to parse or resolve. Please fix."); + if (options->HTTPSProxyPort == 0) { /* give it a default */ + options->HTTPSProxyPort = 443; } } - if (options->HttpsProxyAuthenticator) { - if (strlen(options->HttpsProxyAuthenticator) >= 48) - REJECT("HttpsProxyAuthenticator is too long (>= 48 chars)."); + if (options->HTTPSProxyAuthenticator) { + if (strlen(options->HTTPSProxyAuthenticator) >= 48) + REJECT("HTTPSProxyAuthenticator is too long (>= 48 chars)."); } if (options->Socks4Proxy) { /* parse it now */ @@ -3616,10 +3616,10 @@ options_validate(or_options_t *old_options, or_options_t *options, REJECT("Must set TunnelDirConns if PreferTunneledDirConns is set."); if ((options->Socks4Proxy || options->Socks5Proxy) && - !options->HttpProxy && !options->PreferTunneledDirConns) + !options->HTTPProxy && !options->PreferTunneledDirConns) REJECT("When Socks4Proxy or Socks5Proxy is configured, " "PreferTunneledDirConns and TunnelDirConns must both be " - "set to 1, or HttpProxy must be configured."); + "set to 1, or HTTPProxy must be configured."); if (options->AutomapHostsSuffixes) { SMARTLIST_FOREACH(options->AutomapHostsSuffixes, char *, suf, @@ -3800,7 +3800,7 @@ options_transition_affects_workers(or_options_t *old_options, or_options_t *new_options) { if (!opt_streq(old_options->DataDirectory, new_options->DataDirectory) || - old_options->NumCpus != new_options->NumCpus || + old_options->NumCPUs != new_options->NumCPUs || old_options->ORPort != new_options->ORPort || old_options->ServerDNSSearchDomains != new_options->ServerDNSSearchDomains || diff --git a/src/or/connection.c b/src/or/connection.c index 91ce74b5b..c19632dae 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -579,7 +579,7 @@ connection_about_to_close_connection(connection_t *conn) or_options_t *options = get_options(); rep_hist_note_connect_failed(or_conn->identity_digest, now); entry_guard_register_connect_status(or_conn->identity_digest,0, - !options->HttpsProxy, now); + !options->HTTPSProxy, now); if (conn->state >= OR_CONN_STATE_TLS_HANDSHAKING) { int reason = tls_error_to_orconn_end_reason(or_conn->tls_error); control_event_or_conn_status(or_conn, OR_CONN_EVENT_FAILED, @@ -1370,7 +1370,7 @@ connection_proxy_connect(connection_t *conn, int type) case PROXY_CONNECT: { char buf[1024]; char *base64_authenticator=NULL; - const char *authenticator = options->HttpsProxyAuthenticator; + const char *authenticator = options->HTTPSProxyAuthenticator; /* Send HTTP CONNECT and authentication (if available) in * one request */ diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 052da6763..415a48dca 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -308,7 +308,7 @@ connection_or_finished_connecting(or_connection_t *or_conn) proxy_type = PROXY_NONE; - if (get_options()->HttpsProxy) + if (get_options()->HTTPSProxy) proxy_type = PROXY_CONNECT; else if (get_options()->Socks4Proxy) proxy_type = PROXY_SOCKS4; @@ -805,10 +805,10 @@ connection_or_connect(const tor_addr_t *_addr, uint16_t port, control_event_or_conn_status(conn, OR_CONN_EVENT_LAUNCHED, 0); /* use a proxy server if available */ - if (options->HttpsProxy) { + if (options->HTTPSProxy) { using_proxy = 1; - tor_addr_copy(&addr, &options->HttpsProxyAddr); - port = options->HttpsProxyPort; + tor_addr_copy(&addr, &options->HTTPSProxyAddr); + port = options->HTTPSProxyPort; } else if (options->Socks4Proxy) { using_proxy = 1; tor_addr_copy(&addr, &options->Socks4ProxyAddr); diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index 6f943d78b..ae8d69f6e 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -367,7 +367,7 @@ spawn_cpuworker(void) static void spawn_enough_cpuworkers(void) { - int num_cpuworkers_needed = get_options()->NumCpus; + int num_cpuworkers_needed = get_options()->NumCPUs; if (num_cpuworkers_needed < MIN_CPUWORKERS) num_cpuworkers_needed = MIN_CPUWORKERS; diff --git a/src/or/directory.c b/src/or/directory.c index b109cb53a..fbdd496c1 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -819,7 +819,7 @@ directory_initiate_command_rend(const char *address, const tor_addr_t *_addr, /* ensure that we don't make direct connections when a SOCKS server is * configured. */ - if (!anonymized_connection && !use_begindir && !options->HttpProxy && + 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!"); @@ -850,9 +850,9 @@ directory_initiate_command_rend(const char *address, const tor_addr_t *_addr, if (!anonymized_connection && !use_begindir) { /* then we want to connect to dirport directly */ - if (options->HttpProxy) { - tor_addr_copy(&addr, &options->HttpProxyAddr); - dir_port = options->HttpProxyPort; + if (options->HTTPProxy) { + tor_addr_copy(&addr, &options->HTTPProxyAddr); + dir_port = options->HTTPProxyPort; } switch (connection_connect(TO_CONN(conn), conn->_base.address, &addr, @@ -1036,9 +1036,9 @@ directory_send_command(dir_connection_t *conn, } /* come up with some proxy lines, if we're using one. */ - if (direct && get_options()->HttpProxy) { + if (direct && get_options()->HTTPProxy) { char *base64_authenticator=NULL; - const char *authenticator = get_options()->HttpProxyAuthenticator; + const char *authenticator = get_options()->HTTPProxyAuthenticator; tor_snprintf(proxystring, sizeof(proxystring),"http://%s", hoststring); if (authenticator) { diff --git a/src/or/or.h b/src/or/or.h index e4d57dd7b..14f050deb 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2547,7 +2547,7 @@ typedef struct { * use in a second for all relayed conns? */ uint64_t PerConnBWRate; /**< Long-term bw on a single TLS conn, if set. */ uint64_t PerConnBWBurst; /**< Allowed burst on a single TLS conn, if set. */ - int NumCpus; /**< How many CPUs should we try to use? */ + int NumCPUs; /**< How many CPUs should we try to use? */ //int RunTesting; /**< If true, create testing circuits to measure how well the // * other ORs are running. */ config_line_t *RendConfigLines; /**< List of configuration lines @@ -2556,15 +2556,15 @@ typedef struct { * authorizations for hidden services */ char *ContactInfo; /**< Contact info to be published in the directory. */ - char *HttpProxy; /**< hostname[:port] to use as http proxy, if any. */ - tor_addr_t HttpProxyAddr; /**< Parsed IPv4 addr for http proxy, if any. */ - uint16_t HttpProxyPort; /**< Parsed port for http proxy, if any. */ - char *HttpProxyAuthenticator; /**< username:password string, if any. */ + char *HTTPProxy; /**< hostname[:port] to use as http proxy, if any. */ + tor_addr_t HTTPProxyAddr; /**< Parsed IPv4 addr for http proxy, if any. */ + uint16_t HTTPProxyPort; /**< Parsed port for http proxy, if any. */ + char *HTTPProxyAuthenticator; /**< username:password string, if any. */ - char *HttpsProxy; /**< hostname[:port] to use as https proxy, if any. */ - tor_addr_t HttpsProxyAddr; /**< Parsed addr for https proxy, if any. */ - uint16_t HttpsProxyPort; /**< Parsed port for https proxy, if any. */ - char *HttpsProxyAuthenticator; /**< username:password string, if any. */ + char *HTTPSProxy; /**< hostname[:port] to use as https proxy, if any. */ + tor_addr_t HTTPSProxyAddr; /**< Parsed addr for https proxy, if any. */ + uint16_t HTTPSProxyPort; /**< Parsed port for https proxy, if any. */ + char *HTTPSProxyAuthenticator; /**< username:password string, if any. */ char *Socks4Proxy; /**< hostname:port to use as a SOCKS4 proxy, if any. */ tor_addr_t Socks4ProxyAddr; /**< Derived from Socks4Proxy. */ -- cgit v1.2.3 From 6bde512edce7e7bbf2b4246212d05dbbe8cf8da2 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Mon, 8 Nov 2010 08:34:03 +0100 Subject: Document hs dht min uptime change in privnets In f87c6f100d2faf8d we made it so that MinUptimeHidServDirectoryV2 defaults to 0 if TestingTorNetwork is set. Add a manpage entry and a changes file. --- changes/minuptimehs | 3 +++ doc/tor.1.txt | 1 + 2 files changed, 4 insertions(+) create mode 100644 changes/minuptimehs (limited to 'changes') diff --git a/changes/minuptimehs b/changes/minuptimehs new file mode 100644 index 000000000..d7474d21f --- /dev/null +++ b/changes/minuptimehs @@ -0,0 +1,3 @@ + o Minor features: + - Make hidden services work better in private networks by not requiring + any uptime to join the dht. Implements ticket 2088. diff --git a/doc/tor.1.txt b/doc/tor.1.txt index 29e49e8d4..f7cccb521 100644 --- a/doc/tor.1.txt +++ b/doc/tor.1.txt @@ -1267,6 +1267,7 @@ The following options are used for running a testing Tor network. V3AuthVotingInterval 5 minutes V3AuthVoteDelay 20 seconds V3AuthDistDelay 20 seconds + MinUptimeHidServDirectoryV2 0 seconds TestingV3AuthInitialVotingInterval 5 minutes TestingV3AuthInitialVoteDelay 20 seconds TestingV3AuthInitialDistDelay 20 seconds -- cgit v1.2.3