From b2212bf9b4e7f06d7383eb9235392cbdf735bbdb Mon Sep 17 00:00:00 2001 From: Robert Ransom Date: Wed, 1 Jun 2011 07:03:01 -0700 Subject: [PATCH] Add Tor2webMode configuration option --- doc/tor.1.txt | 4 ++++ src/or/config.c | 1 + src/or/or.h | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/doc/tor.1.txt b/doc/tor.1.txt index f5be391052..22c8e88062 100644 --- a/doc/tor.1.txt +++ b/doc/tor.1.txt @@ -957,6 +957,10 @@ The following options are useful only for clients (that is, if Tor will look at the UseOptimisticData parameter in the networkstatus. (Default: auto) +**Tor2webMode** **0**|**1**:: + When this option is set, Tor connects to hidden services + **non-anonymously**. This option also disables client connections to + non-hidden-service hostnames through Tor. (Default: 0) SERVER OPTIONS -------------- diff --git a/src/or/config.c b/src/or/config.c index 06d7d5c022..b2de15e7f0 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -394,6 +394,7 @@ static config_var_t _option_vars[] = { V(TestSocks, BOOL, "0"), OBSOLETE("TestVia"), V(TokenBucketRefillInterval, MSEC_INTERVAL, "100 msec"), + V(Tor2webMode, BOOL, "0"), V(TrackHostExits, CSV, NULL), V(TrackHostExitsExpire, INTERVAL, "30 minutes"), OBSOLETE("TrafficShaping"), diff --git a/src/or/or.h b/src/or/or.h index 67ba62bdd6..8515db6673 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3008,6 +3008,11 @@ typedef struct { int AllDirActionsPrivate; /**< Should every directory action be sent * through a Tor circuit? */ + /** Run in 'tor2web mode'? (I.e. only make client connections to hidden + * services, and use a single hop for all hidden-service-related + * circuits.) */ + int Tor2webMode; + int ConnLimit; /**< Demanded minimum number of simultaneous connections. */ int _ConnLimit; /**< Maximum allowed number of simultaneous connections. */ int RunAsDaemon; /**< If true, run in the background. (Unix only) */