upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/tor.cpp
diff options
context:
space:
mode:
authorbitflash <admin@bitflash.network>2026-08-18 10:24:01 -0300
committerbitflash <admin@bitflash.network>2026-08-18 10:24:01 -0300
commit33092ffe8ee5fb5f7c080a44831e5557b63deb63 (patch)
treeded284f5c10d89cad8071bcaac2d33dfc2c1012d /src/tor.cpp
parentdb84acfc5f99ac1ddf4962879b4cbaf1af9952dd (diff)
net: exempt loopback from the per-IP connection cap
Review follow-up. A managed-Tor node receives every inbound onion peer over its local hidden-service listener, so they all accept as 127.0.0.1. Capping loopback would cap onion peers as one group and refuse the 33rd legitimate onion peer -- the wrong limit for a network moving toward onion-only. Exempt loopback (127.0.0.0/8): the global MAX_CONNECTIONS still bounds the total, and the direct-IP flood this defends against never arrives over loopback. Bench: a 40-connection flood from 127.0.0.1 is now held in full (no per-IP refusal), while a flood from the machine's LAN address still caps at exactly 32.
Diffstat (limited to 'src/tor.cpp')
0 files changed, 0 insertions, 0 deletions