http://maverick.i2p/blog/darknet-dev
Use getaddrinfo for full dual-stack. ip = socket . gethostbyname ( hostname ) if ipaddress . ip_address ( ip ) . is_private : raise ValueError ( " Internal IP blocked " ) # Host header mandatory for vhosts. Redirects disabled. return requests . get ( f " http:// { ip } / " , headers = { " Host " : hostname } , allow_redirects = False ) Open Proxy / Relay Abuse If your server is misconfigured, attackers can use it as a free proxy to attack other sites, scan networks, or steal bandwidth.