If you want to understand why/how nmap
leaks IPs maybe these post two post may help you to get started:
SELFPROMO MODE ON
SELFPROMO MODE OFF
TL;DR;
Normal HTTP proxies, as well as SOCKSv4, only support TCP
traffic, therefore any nmap
flag that requires the transmission of UDP
or ICMP
packets will just not go through the proxy connection. That’s why, in your table you need to use -Pn
to avoid leaking your IP by ICMP
packets.
SOCKSv5 supports UDP, but looks like nmap
does not support that (not yet) so, also anything that sends UDP packets will also be transmitted outside the proxy connection and therefore leak your IP. This is what happens with the -O
flag. This flag will force nmap
to send some UDP
packets even when you specify -sT
. Check the nmap
documentation or the man page for details.
Anyway, as @Nitrax said, the best you can do is to try yourself and see what happens. You can use VMs or some cheap computer (Rpi) to set up a test environment and then just fire tcpdump
at each end and see what you get.
Hope it helps.