OS:Win10
reg add HKCUEnvironment /F /V http_proxy /d "http://127.0.0.1:8080"
reg add HKCUEnvironment /F /V https_proxy /d "http://127.0.0.1:8080"
I’m pretty sure this is the only place where the variable is set. http_proxy is no longer in the variables shown by set
After deleting it in this way. It is still output the variable values.
import os
print(os.environ['http_proxy'])
print(os.environ['https_proxy'])
python.exe F:Fsharedel1vmwaretestdelf5a.py
http://127.0.0.1:8080
http://127.0.0.1:8080
How can I get the variables to update instantly and clear the cache.
7
Run this from your cmd (instead of tinkering with registry):
setx http_proxy "http://127.0.0.1:8080"
setx https_proxy "http://127.0.0.1:8080"
to quote cmd description setx
Creates or modifies environment variables in the user or system
environment. Can set variables based on arguments, regkeys or
file input.
2