Commit 8c2affe6 authored by Nick Mathewson's avatar Nick Mathewson 👁
Browse files

Merge remote branch 'origin/maint-0.2.2'

Conflicts:
	src/or/config.c
	src/or/cpuworker.c
parents 3d7772ec ac2c0cb5
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.
o Minor features:
- Make hidden services work better in private networks by not requiring
any uptime to join the dht. Implements ticket 2088.
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.
......@@ -4,17 +4,14 @@ use strict;
my %options = ();
my %descOptions = ();
my %torrcSampleOptions = ();
my %torrcCompleteOptions = ();
my %manPageOptions = ();
# Load the canonical list as actually accepted by Tor.
my $mostRecentOption;
open(F, "./src/or/tor --list-torrc-options |") or die;
while (<F>) {
next if m!\[notice\] Tor v0\.!;
if (m!^([A-Za-z0-9_]+)!) {
$mostRecentOption = lc $1;
$options{$mostRecentOption} = 1;
$options{$1} = 1;
} else {
print "Unrecognized output> ";
print;
......@@ -22,7 +19,7 @@ while (<F>) {
}
close F;
# Load the contents of torrc.sample and torrc.complete
# Load the contents of torrc.sample
sub loadTorrc {
my ($fname, $options) = @_;
local *F;
......@@ -30,7 +27,7 @@ sub loadTorrc {
while (<F>) {
next if (m!##+!);
if (m!#([A-Za-z0-9_]+)!) {
$options->{lc $1} = 1;
$options->{$1} = 1;
}
}
close F;
......@@ -38,7 +35,6 @@ sub loadTorrc {
}
loadTorrc("./src/config/torrc.sample.in", \%torrcSampleOptions);
loadTorrc("./src/config/torrc.complete.in", \%torrcCompleteOptions);
# Try to figure out what's in the man page.
......@@ -46,7 +42,7 @@ my $considerNextLine = 0;
open(F, "./doc/tor.1.txt") or die;
while (<F>) {
if (m!^\*\*([A-Za-z0-9_]+)\*\*!) {
$manPageOptions{lc $1} = 1;
$manPageOptions{$1} = 1;
}
}
close F;
......@@ -66,8 +62,6 @@ sub subtractHashes {
# subtractHashes("No online docs", \%options, \%descOptions);
# subtractHashes("Orphaned online docs", \%descOptions, \%options);
subtractHashes("Not in torrc.complete.in", \%options, \%torrcCompleteOptions);
subtractHashes("Orphaned in torrc.complete.in", \%torrcCompleteOptions, \%options);
subtractHashes("Orphaned in torrc.sample.in", \%torrcSampleOptions, \%options);
subtractHashes("Not in man page", \%options, \%manPageOptions);
......
......@@ -12,7 +12,7 @@
These hostnames can be passed to Tor as the address part of a SOCKS4a or
SOCKS5 request. If the application is connected to Tor using an IP-only
method (such as SOCKS4, TransPort, or NatdPort), these hostnames can be
method (such as SOCKS4, TransPort, or NATDPort), these hostnames can be
substituted for certain IP addresses using the MapAddress configuration
option or the MAPADDRESS control command.
......
......@@ -89,14 +89,14 @@ Other options can be specified either on the command-line (--option
without impacting network performance.
**RelayBandwidthRate** __N__ **bytes**|**KB**|**MB**|**GB**::
If defined, a separate token bucket limits the average incoming bandwidth
If not 0, a separate token bucket limits the average incoming bandwidth
usage for \_relayed traffic_ on this node to the specified number of bytes
per second, and the average outgoing bandwidth usage to that same value.
Relayed traffic currently is calculated to include answers to directory
requests, but that may change in future versions. (Default: 0)
**RelayBandwidthBurst** __N__ **bytes**|**KB**|**MB**|**GB**::
Limit the maximum token bucket size (also known as the burst) for
If not 0, limit the maximum token bucket size (also known as the burst) for
\_relayed traffic_ to the given number of bytes in each direction.
(Default: 0)
......@@ -110,7 +110,7 @@ Other options can be specified either on the command-line (--option
You should never need to change this value, since a network-wide value is
published in the consensus and your relay will use that value. (Default: 0)
**ConLimit** __NUM__::
**ConnLimit** __NUM__::
The minimum number of file descriptors that must be available to the Tor
process before it will start. Tor will ask the OS for as many file
descriptors as the OS will allow (you can find this by "ulimit -H -n").
......@@ -426,7 +426,9 @@ The following options are useful only for clients (that is, if
This option controls whether circuits built by Tor will include relays with
the AllowSingleHopExits flag set to true. If ExcludeSingleHopRelays is set
to 0, these relays will be included. Note that these relays might be at
higher risk of being seized or observed, so they are not normally included.
higher risk of being seized or observed, so they are not normally
included. Also note that relatively few clients turn off this option,
so using these relays might make your client stand out.
(Default: 1)
**Bridge** __IP__:__ORPort__ [fingerprint]::
......@@ -683,7 +685,7 @@ The following options are useful only for clients (that is, if
**AllowDotExit** **0**|**1**::
If enabled, we convert "www.google.com.foo.exit" addresses on the
SocksPort/TransPort/NatdPort into "www.google.com" addresses that exit from
SocksPort/TransPort/NATDPort into "www.google.com" addresses that exit from
the node "foo". Disabled by default since attacking websites and exit
relays can use it to manipulate your path selection. (Default: 0)
......@@ -764,6 +766,11 @@ The following options are useful only for clients (that is, if
Like WarnPlaintextPorts, but instead of warning about risky port uses, Tor
will instead refuse to make the connection. (Default: None).
**AllowSingleHopCircuits** **0**|**1**::
When this option is set, the attached Tor controller can use relays
that have the **AllowSingleHopExits** option turned on to build
one-hop Tor connections. (Default: 0)
SERVER OPTIONS
--------------
......@@ -781,7 +788,9 @@ is non-zero):
**AllowSingleHopExits** **0**|**1**::
This option controls whether clients can use this server as a single hop
proxy. If set to 1, clients can use this server as an exit even if it is
the only hop in the circuit. (Default: 0)
the only hop in the circuit. Note that most clients will refuse to use
servers that set this option, since most clients have
ExcludeSingleHopRelays set. (Default: 0)
**AssumeReachable** **0**|**1**::
This option is used when bootstrapping a new Tor network. If set to 1,
......@@ -1216,6 +1225,11 @@ DIRECTORY AUTHORITY SERVER OPTIONS
server's preferred number, but the consensus of all preferences. Must be at
least 2. (Default: 3.)
**V3BandwidthsFile** __FILENAME__::
V3 authoritative directories only. Configures the location of the
bandiwdth-authority generated file storing information on relays' measured
bandwidth capacities. (Default: unset.)
HIDDEN SERVICE OPTIONS
----------------------
......@@ -1284,6 +1298,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
......
This diff is collapsed.
......@@ -85,7 +85,7 @@ static config_abbrev_t _option_abbrevs[] = {
PLURAL(LongLivedPort),
PLURAL(HiddenServiceNode),
PLURAL(HiddenServiceExcludeNode),
PLURAL(NumCpu),
PLURAL(NumCPU),
PLURAL(RendNode),
PLURAL(RendExcludeNode),
PLURAL(StrictEntryNode),
......@@ -279,10 +279,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),
......@@ -304,13 +304,13 @@ static config_var_t _option_vars[] = {
V(MyFamily, STRING, NULL),
V(NewCircuitPeriod, INTERVAL, "30 seconds"),
VAR("NamingAuthoritativeDirectory",BOOL, NamingAuthoritativeDir, "0"),
V(NatdListenAddress, LINELIST, NULL),
V(NatdPort, UINT, "0"),
V(NATDListenAddress, LINELIST, NULL),
V(NATDPort, UINT, "0"),
V(Nickname, STRING, NULL),
V(WarnUnsafeSocks, BOOL, "1"),
V(NoPublish, BOOL, "0"),
OBSOLETE("NoPublish"),
VAR("NodeFamily", LINELIST, NodeFamilies, NULL),
V(NumCpus, UINT, "0"),
V(NumCPUs, UINT, "0"),
V(NumEntryGuards, UINT, "3"),
V(ORListenAddress, LINELIST, NULL),
V(ORPort, UINT, "0"),
......@@ -343,7 +343,8 @@ static config_var_t _option_vars[] = {
V(RephistTrackTime, INTERVAL, "24 hours"),
OBSOLETE("RouterFile"),
V(RunAsDaemon, BOOL, "0"),
V(RunTesting, BOOL, "0"),
// V(RunTesting, BOOL, "0"),
OBSOLETE("RunTesting"), // currently unused
V(SafeLogging, STRING, "1"),
V(SafeSocks, BOOL, "0"),
V(ServerDNSAllowBrokenConfig, BOOL, "1"),
......@@ -2952,8 +2953,8 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (options->TransPort == 0 && options->TransListenAddress != NULL)
REJECT("TransPort must be defined if TransListenAddress is defined.");
if (options->NatdPort == 0 && options->NatdListenAddress != NULL)
REJECT("NatdPort must be defined if NatdListenAddress is defined.");
if (options->NATDPort == 0 && options->NATDListenAddress != NULL)
REJECT("NATDPort must be defined if NATDListenAddress is defined.");
/* Don't gripe about SocksPort 0 with SocksListenAddress set; a standard
* configuration does this. */
......@@ -2972,8 +2973,8 @@ options_validate(or_options_t *old_options, or_options_t *options,
old = old_options ? old_options->TransListenAddress : NULL;
tp = "transparent proxy";
} else {
opt = options->NatdListenAddress;
old = old_options ? old_options->NatdListenAddress : NULL;
opt = options->NATDListenAddress;
old = old_options ? old_options->NATDListenAddress : NULL;
tp = "natd proxy";
}
......@@ -3030,14 +3031,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (options_init_logs(options, 1)<0) /* Validate the log(s) */
REJECT("Failed to validate Log options. See logs for details.");
if (options->NoPublish) {
log(LOG_WARN, LD_CONFIG,
"NoPublish is obsolete. Use PublishServerDescriptor instead.");
SMARTLIST_FOREACH(options->PublishServerDescriptor, char *, s,
tor_free(s));
smartlist_clear(options->PublishServerDescriptor);
}
if (authdir_mode(options)) {
/* confirm that our address isn't broken, so we can complain now */
uint32_t tmp;
......@@ -3065,14 +3058,14 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (options->TransPort < 0 || options->TransPort > 65535)
REJECT("TransPort option out of bounds.");
if (options->NatdPort < 0 || options->NatdPort > 65535)
REJECT("NatdPort option out of bounds.");
if (options->NATDPort < 0 || options->NATDPort > 65535)
REJECT("NATDPort option out of bounds.");
if (options->SocksPort == 0 && options->TransPort == 0 &&
options->NatdPort == 0 && options->ORPort == 0 &&
options->NATDPort == 0 && options->ORPort == 0 &&
options->DNSPort == 0 && !options->RendConfigLines)
log(LOG_WARN, LD_CONFIG,
"SocksPort, TransPort, NatdPort, DNSPort, and ORPort are all "
"SocksPort, TransPort, NATDPort, DNSPort, and ORPort are all "
"undefined, and there aren't any hidden services configured. "
"Tor will still run, but probably won't do anything.");
......@@ -3435,32 +3428,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 */
......@@ -3661,10 +3654,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,
......@@ -3845,7 +3838,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 ||
......@@ -3877,7 +3870,6 @@ options_transition_affects_descriptor(or_options_t *old_options,
old_options->ORPort != new_options->ORPort ||
old_options->DirPort != new_options->DirPort ||
old_options->ClientOnly != new_options->ClientOnly ||
old_options->NoPublish != new_options->NoPublish ||
old_options->_PublishServerDescriptor !=
new_options->_PublishServerDescriptor ||
get_effective_bwrate(old_options) != get_effective_bwrate(new_options) ||
......@@ -5000,11 +4992,11 @@ config_parse_interval(const char *s, int *ok)
int
get_num_cpus(const or_options_t *options)
{
if (options->NumCpus == 0) {
if (options->NumCPUs == 0) {
int n = compute_num_cpus();
return (n >= 1) ? n : 1;
} else {
return options->NumCpus;
return options->NumCPUs;
}
}
......
......@@ -623,7 +623,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,
......@@ -1413,7 +1413,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 */
......@@ -1918,8 +1918,8 @@ retry_all_listeners(smartlist_t *replaced_conns,
replaced_conns, new_conns, 0,
AF_INET)<0)
return -1;
if (retry_listeners(CONN_TYPE_AP_NATD_LISTENER, options->NatdListenAddress,
options->NatdPort, "127.0.0.1",
if (retry_listeners(CONN_TYPE_AP_NATD_LISTENER, options->NATDListenAddress,
options->NATDPort, "127.0.0.1",
replaced_conns, new_conns, 0,
AF_INET)<0)
return -1;
......
......@@ -2004,13 +2004,13 @@ connection_ap_process_natd(edge_connection_t *conn)
if (err == 0)
return 0;
if (err < 0) {
log_warn(LD_APP,"Natd handshake failed (DEST too long). Closing");
log_warn(LD_APP,"NATD handshake failed (DEST too long). Closing");
connection_mark_unattached_ap(conn, END_STREAM_REASON_INVALID_NATD_DEST);
return -1;
}
if (strcmpstart(tmp_buf, "[DEST ")) {
log_warn(LD_APP,"Natd handshake was ill-formed; closing. The client "
log_warn(LD_APP,"NATD handshake was ill-formed; closing. The client "
"said: %s",
escaped(tmp_buf));
connection_mark_unattached_ap(conn, END_STREAM_REASON_INVALID_NATD_DEST);
......@@ -2019,7 +2019,7 @@ connection_ap_process_natd(edge_connection_t *conn)
daddr = tbuf = &tmp_buf[0] + 6; /* after end of "[DEST " */
if (!(tbuf = strchr(tbuf, ' '))) {
log_warn(LD_APP,"Natd handshake was ill-formed; closing. The client "
log_warn(LD_APP,"NATD handshake was ill-formed; closing. The client "
"said: %s",
escaped(tmp_buf));
connection_mark_unattached_ap(conn, END_STREAM_REASON_INVALID_NATD_DEST);
......@@ -2033,7 +2033,7 @@ connection_ap_process_natd(edge_connection_t *conn)
socks->port = (uint16_t)
tor_parse_long(tbuf, 10, 1, 65535, &port_ok, &daddr);
if (!port_ok) {
log_warn(LD_APP,"Natd handshake failed; port %s is ill-formed or out "
log_warn(LD_APP,"NATD handshake failed; port %s is ill-formed or out "
"of range.", escaped(tbuf));
connection_mark_unattached_ap(conn, END_STREAM_REASON_INVALID_NATD_DEST);
return -1;
......
......@@ -326,7 +326,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;
......@@ -842,10 +842,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);
......
......@@ -860,7 +860,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!");
......@@ -891,9 +891,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,
......@@ -1084,9 +1084,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) {
......
......@@ -2535,7 +2535,7 @@ typedef struct {
* connections. */
config_line_t *TransListenAddress;
/** Addresses to bind for listening for transparent natd connections */
config_line_t *NatdListenAddress;
config_line_t *NATDListenAddress;
/** Addresses to bind for listening for SOCKS connections. */
config_line_t *DNSListenAddress;
/** Addresses to bind for listening for OR connections. */
......@@ -2559,7 +2559,7 @@ typedef struct {
int SocksPort; /**< Port to listen on for SOCKS connections. */
/** Port to listen on for transparent pf/netfilter connections. */
int TransPort;
int NatdPort; /**< Port to listen on for transparent natd connections. */
int NATDPort; /**< Port to listen on for transparent natd connections. */
int ControlPort; /**< Port to listen on for control connections. */
config_line_t *ControlSocket; /**< List of Unix Domain Sockets to listen on
* for control connections. */
......@@ -2603,8 +2603,6 @@ typedef struct {
int AvoidDiskWrites; /**< Boolean: should we never cache things to disk?
* Not used yet. */
int ClientOnly; /**< Boolean: should we never evolve into a server role? */
/** Boolean: should we never publish a descriptor? Deprecated. */
int NoPublish;
/** To what authority types do we publish our descriptor? Choices are
* "v1", "v2", "v3", "bridge", or "". */
smartlist_t *PublishServerDescriptor;
......@@ -2703,24 +2701,24 @@ 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 RunTesting; /**< If true, create testing circuits to measure how well the
* other ORs are running. */
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
* for rendezvous services. */
config_line_t *HidServAuth; /**< List of configuration lines for client-side
* 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. */
......
......@@ -1104,7 +1104,7 @@ proxy_mode(or_options_t *options)
{
return (options->SocksPort != 0 || options->SocksListenAddress ||
options->TransPort != 0 || options->TransListenAddress ||
options->NatdPort != 0 || options->NatdListenAddress ||
options->NATDPort != 0 || options->NATDListenAddress ||
options->DNSPort != 0 || options->DNSListenAddress);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment