diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 52 | ||||
-rw-r--r-- | src/or/or.h | 12 | ||||
-rw-r--r-- | src/or/rendservice.c | 14 |
3 files changed, 39 insertions, 39 deletions
diff --git a/src/or/config.c b/src/or/config.c index 6d168c4b74..949c8a973f 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -298,8 +298,8 @@ static config_var_t option_vars_[] = { V(HidServAuth, LINELIST, NULL), V(CloseHSClientCircuitsImmediatelyOnTimeout, BOOL, "0"), V(CloseHSServiceRendCircuitsImmediatelyOnTimeout, BOOL, "0"), - V(OnionServiceSingleHopMode, BOOL, "0"), - V(OnionServiceNonAnonymousMode,BOOL, "0"), + V(HiddenServiceSingleHopMode, BOOL, "0"), + V(HiddenServiceNonAnonymousMode,BOOL, "0"), V(HTTPProxy, STRING, NULL), V(HTTPProxyAuthenticator, STRING, NULL), V(HTTPSProxy, STRING, NULL), @@ -2826,15 +2826,15 @@ STATIC int options_validate_single_onion(or_options_t *options, char **msg) { /* The two single onion service options must have matching values. */ - if (options->OnionServiceSingleHopMode && - !options->OnionServiceNonAnonymousMode) { - REJECT("OnionServiceSingleHopMode does not provide any server anonymity. " - "It must be used with OnionServiceNonAnonymousMode set to 1."); - } - if (options->OnionServiceNonAnonymousMode && - !options->OnionServiceSingleHopMode) { - REJECT("OnionServiceNonAnonymousMode does not provide any server " - "anonymity. It must be used with OnionServiceSingleHopMode set to " + if (options->HiddenServiceSingleHopMode && + !options->HiddenServiceNonAnonymousMode) { + REJECT("HiddenServiceSingleHopMode does not provide any server anonymity. " + "It must be used with HiddenServiceNonAnonymousMode set to 1."); + } + if (options->HiddenServiceNonAnonymousMode && + !options->HiddenServiceSingleHopMode) { + REJECT("HiddenServiceNonAnonymousMode does not provide any server " + "anonymity. It must be used with HiddenServiceSingleHopMode set to " "1."); } @@ -2849,9 +2849,9 @@ options_validate_single_onion(or_options_t *options, char **msg) options->DNSPort_set); if (rend_service_non_anonymous_mode_enabled(options) && client_port_set && !options->Tor2webMode) { - REJECT("OnionServiceNonAnonymousMode is incompatible with using Tor as an " - "anonymous client. Please set Socks/Trans/NATD/DNSPort to 0, or " - "OnionServiceNonAnonymousMode to 0, or use the non-anonymous " + REJECT("HiddenServiceNonAnonymousMode is incompatible with using Tor as " + "an anonymous client. Please set Socks/Trans/NATD/DNSPort to 0, or " + "HiddenServiceNonAnonymousMode to 0, or use the non-anonymous " "Tor2webMode."); } @@ -2862,7 +2862,7 @@ options_validate_single_onion(or_options_t *options, char **msg) REJECT("Non-anonymous (Tor2web) mode is incompatible with using Tor as a " "hidden service. Please remove all HiddenServiceDir lines, or use " "a version of tor compiled without --enable-tor2web-mode, or use " - " OnionServiceNonAnonymousMode."); + " HiddenServiceNonAnonymousMode."); } if (rend_service_allow_non_anonymous_connection(options) @@ -2875,7 +2875,7 @@ options_validate_single_onion(or_options_t *options, char **msg) * make path bias compatible with single onions. */ log_notice(LD_CONFIG, - "OnionServiceSingleHopMode is enabled; disabling " + "HiddenServiceSingleHopMode is enabled; disabling " "UseEntryGuards."); options->UseEntryGuards = 0; } @@ -2885,9 +2885,9 @@ options_validate_single_onion(or_options_t *options, char **msg) * have. We'll poison new keys in options_act() just before we create them. */ if (rend_service_list_verify_single_onion_poison(NULL, options) < 0) { - log_warn(LD_GENERAL, "We are configured with OnionServiceNonAnonymousMode " - "%d, but one or more hidden service keys were created in %s " - "mode. This is not allowed.", + log_warn(LD_GENERAL, "We are configured with " + "HiddenServiceNonAnonymousMode %d, but one or more hidden " + "service keys were created in %s mode. This is not allowed.", rend_service_non_anonymous_mode_enabled(options) ? 1 : 0, rend_service_non_anonymous_mode_enabled(options) ? "an anonymous" : "a non-anonymous" @@ -3451,9 +3451,9 @@ options_validate(or_options_t *old_options, or_options_t *options, /* Single Onion Services: non-anonymous hidden services */ if (rend_service_non_anonymous_mode_enabled(options)) { log_warn(LD_CONFIG, - "OnionServiceNonAnonymousNode is set. Every hidden service on " + "HiddenServiceNonAnonymousMode is set. Every hidden service on " "this tor instance is NON-ANONYMOUS. If " - "the OnionServiceNonAnonymousMode option is changed, Tor will " + "the HiddenServiceNonAnonymousMode option is changed, Tor will " "refuse to launch hidden services from the same directories, to " "protect your anonymity against config errors. This setting is " "for experimental use only."); @@ -4408,16 +4408,16 @@ options_transition_allowed(const or_options_t *old, return -1; } - if (old->OnionServiceSingleHopMode != new_val->OnionServiceSingleHopMode) { + if (old->HiddenServiceSingleHopMode != new_val->HiddenServiceSingleHopMode) { *msg = tor_strdup("While Tor is running, changing " - "OnionServiceSingleHopMode is not allowed."); + "HiddenServiceSingleHopMode is not allowed."); return -1; } - if (old->OnionServiceNonAnonymousMode != - new_val->OnionServiceNonAnonymousMode) { + if (old->HiddenServiceNonAnonymousMode != + new_val->HiddenServiceNonAnonymousMode) { *msg = tor_strdup("While Tor is running, changing " - "OnionServiceNonAnonymousMode is not allowed."); + "HiddenServiceNonAnonymousMode is not allowed."); return -1; } diff --git a/src/or/or.h b/src/or/or.h index 849cd4c7a1..9179f08caf 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3701,25 +3701,25 @@ typedef struct { * they reach the normal circuit-build timeout. */ int CloseHSServiceRendCircuitsImmediatelyOnTimeout; - /** Onion Services in OnionServiceSingleHopMode make one-hop (direct) + /** Onion Services in HiddenServiceSingleHopMode make one-hop (direct) * circuits between the onion service server, and the introduction and * rendezvous points. (Onion service descriptors are still posted using * 3-hop paths, to avoid onion service directories blocking the service.) * This option makes every hidden service instance hosted by * this tor instance a Single Onion Service. - * OnionServiceSingleHopMode requires OnionServiceNonAnonymousMode to be set - * to 1. + * HiddenServiceSingleHopMode requires HiddenServiceNonAnonymousMode to be + * set to 1. * Use rend_service_allow_non_anonymous_connection() or * rend_service_reveal_startup_time() instead of using this option directly. */ - int OnionServiceSingleHopMode; + int HiddenServiceSingleHopMode; /* Makes hidden service clients and servers non-anonymous on this tor - * instance. Allows the non-anonymous OnionServiceSingleHopMode. Enables + * instance. Allows the non-anonymous HiddenServiceSingleHopMode. Enables * non-anonymous behaviour in the hidden service protocol. * Use rend_service_non_anonymous_mode_enabled() instead of using this option * directly. */ - int OnionServiceNonAnonymousMode; + int HiddenServiceNonAnonymousMode; int ConnLimit; /**< Demanded minimum number of simultaneous connections. */ int ConnLimit_; /**< Maximum allowed number of simultaneous connections. */ diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 9400b591ee..cce63f29fa 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -4179,26 +4179,26 @@ rend_service_set_connection_addr_port(edge_connection_t *conn, return -2; } -/* Are OnionServiceSingleHopMode and OnionServiceNonAnonymousMode consistent? +/* Are HiddenServiceSingleHopMode and HiddenServiceNonAnonymousMode consistent? */ static int rend_service_non_anonymous_mode_consistent(const or_options_t *options) { /* !! is used to make these options boolean */ - return (!! options->OnionServiceSingleHopMode == - !! options->OnionServiceNonAnonymousMode); + return (!! options->HiddenServiceSingleHopMode == + !! options->HiddenServiceNonAnonymousMode); } /* Do the options allow onion services to make direct (non-anonymous) * connections to introduction or rendezvous points? * Must only be called after options_validate_single_onion() has successfully * checked onion service option consistency. - * Returns true if tor is in OnionServiceSingleHopMode. */ + * Returns true if tor is in HiddenServiceSingleHopMode. */ int rend_service_allow_non_anonymous_connection(const or_options_t *options) { tor_assert(rend_service_non_anonymous_mode_consistent(options)); - return options->OnionServiceSingleHopMode ? 1 : 0; + return options->HiddenServiceSingleHopMode ? 1 : 0; } /* Do the options allow us to reveal the exact startup time of the onion @@ -4215,7 +4215,7 @@ rend_service_reveal_startup_time(const or_options_t *options) return rend_service_non_anonymous_mode_enabled(options); } -/* Is non-anonymous mode enabled using the OnionServiceNonAnonymousMode +/* Is non-anonymous mode enabled using the HiddenServiceNonAnonymousMode * config option? * Must only be called after options_validate_single_onion() has successfully * checked onion service option consistency. @@ -4224,5 +4224,5 @@ int rend_service_non_anonymous_mode_enabled(const or_options_t *options) { tor_assert(rend_service_non_anonymous_mode_consistent(options)); - return options->OnionServiceNonAnonymousMode ? 1 : 0; + return options->HiddenServiceNonAnonymousMode ? 1 : 0; } |