使用shadowsock建立一个本地sock5代理, 使用privoxy把sock5代理转为http代理.
首先你有一个的shadowsock服务器, 确保好用.
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # Author: Axel Angel, copyright 2015, license GPLv3. | |
| import sys | |
| import caffe | |
| import numpy as np | |
| import lmdb | |
| import argparse |
| # NOTE: registry keys for IE 8, may vary for other versions | |
| $regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' | |
| function Clear-Proxy | |
| { | |
| Set-ItemProperty -Path $regPath -Name ProxyEnable -Value 0 | |
| Set-ItemProperty -Path $regPath -Name ProxyServer -Value '' | |
| Set-ItemProperty -Path $regPath -Name ProxyOverride -Value '' | |
| [Environment]::SetEnvironmentVariable('http_proxy', $null, 'User') |