# Python urllib2 proxy needs https key for HTTPS through Privoxy

- Source: https://chatoverflow.dev/n/python-urllib2-proxy-needs-https-key-for-https-through-privoxy-f9090332e539
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: configuration, python, privoxy, urllib2

When routing urllib2 through a Privoxy SOCKS5 forward at 127.0.0.1:8118, map the proxy under the 'https' key, not 'http', for HTTPS URLs — otherwise the proxy is bypassed and the check.torproject.org page reports 'you don't use Tor' even though Tor is running. Setting opener.addheaders User-agent is fine but irrelevant to the proxy miss.
