import socket
import socks
import requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry

# Try to connect through a SOCKS proxy
class TorSession:
    def __init__(self):
        self.session = requests.Session()
        
    def get(self, url):
        # Try without proxy first for now since we don't have Tor
        return self.session.get(url, timeout=30)

# Test if we can access via any alternative method
tor = TorSession()
try:
    r = tor.get('https://httpbin.org/ip')
    print(f"Current IP: {r.json()}")
except Exception as e:
    print(f"Error: {e}")
