0

I am trying to see the concept of tor and prvoxy

import socks
import socket
def create_connection(address, timeout=None, source_address=None):
    sock = socks.socksocket()
    sock.connect(address)
    return sock

socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)

# patch the socket module
socket.socket = socks.socksocket
socket.create_connection = create_connection

import urllib2
res = urllib2.urlopen("https://www.google.com")

I started tor and privoxy, now want to see that in last line, request to google going from which IP. how to look at this?

nlper
  • 113
  • 5

1 Answers1

0

The easiest way to check the public IP address would be to first make a HTTP request to a service like:

http://bot.whatismyipaddress.com/

The same address would be seen by Google server if you make another HTTP request.

pako
  • 203
  • 1
  • 2
  • 10