diff options
author | David Goulet <dgoulet@torproject.org> | 2017-04-25 13:44:06 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-09 10:30:52 -0400 |
commit | d52a1e2faaf0edf8f5899c6fa9864d0cecebf692 (patch) | |
tree | e72f5f89e9017f1c62acc9890c645450db306536 /src/or/connection_edge.c | |
parent | fea72571dfc70ec766edaaea2dc80c1e759a977d (diff) | |
download | tor-d52a1e2faaf0edf8f5899c6fa9864d0cecebf692.tar.gz tor-d52a1e2faaf0edf8f5899c6fa9864d0cecebf692.zip |
config: Remove AllowSingleHopExits option
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans
up the code associated with it.
Partially fixes #22060
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 2c60d8dddb..8f5d34386f 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -3133,15 +3133,13 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ) port = bcell.port; if (or_circ && or_circ->p_chan) { - if (!options->AllowSingleHopExits && - (or_circ->is_first_hop || - (!connection_or_digest_is_known_relay( + if ((or_circ->is_first_hop || + (!connection_or_digest_is_known_relay( or_circ->p_chan->identity_digest) && should_refuse_unknown_exits(options)))) { - /* Don't let clients use us as a single-hop proxy, unless the user - * has explicitly allowed that in the config. It attracts attackers - * and users who'd be better off with, well, single-hop proxies. - */ + /* Don't let clients use us as a single-hop proxy. It attracts + * attackers and users who'd be better off with, well, single-hop + * proxies. */ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL, "Attempt by %s to open a stream %s. Closing.", safe_str(channel_get_canonical_remote_descr(or_circ->p_chan)), |