This will effectively also deny any bridge to be used as a single hop to the
introduction point since bridge do not authenticate like clients.
Fixes #24963
Signed-off-by: David Goulet <dgoulet@torproject.org>
--- /dev/null
+ o Minor feature (onion service):
+ - Disallow single hop clients to introduce directly at the introduction
+ point. We've removed Tor2web a while back and rendezvous are blocked at
+ the relays. This is to remove load off the network from spammy clients.
+ Close ticket 24963.
#include "core/or/or.h"
#include "app/config/config.h"
+#include "core/or/channel.h"
#include "core/or/circuitlist.h"
#include "core/or/circuituse.h"
#include "core/or/relay.h"
return 0;
}
+ /* Disallow single hop client circuit. */
+ if (channel_is_client(circ->p_chan)) {
+ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
+ "Single hop client was rejected while trying to introduce. "
+ "Closing circuit.");
+ return 0;
+ }
+
return 1;
}