用powershell脚本切换shadowsocksR代理模式
修改$AutoCfgURL = ‘http://127.0.0.1:1080/pac?auth=JlOPy5rfS7Ki0H1ycQX6’
打开 windows设置->网络和interact->代理->脚本地址
复制里面的地址替换掉http://127.0.0.1:1080/pac?auth=JlOPy5rfS7Ki0H1ycQX6
还需要privoxy这个将socks5代理转http代理的软件! 该软件监听8118端口
param ( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [ValidateSet(0, 1, 2)]$mode # 0-直连模式, 1-PAC模式, 2-全局模式 ) $proxyRegPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" $AutoCfgURL = 'http://127.0.0.1:1080/pac?auth=JlOPy5rfS7Ki0H1ycQX6' $ProxyServer = '127.0.0.1' $port = 8118 switch ($mode) { 0 { Set-ItemProperty -path $proxyRegPath -Name "ProxyEnable" -value 0 Set-ItemProperty -Path $proxyRegPath -Name "AutoConfigURL" -Value '' } 1 { Set-ItemProperty -path $proxyRegPath -Name "ProxyEnable" -value 0 Set-ItemProperty -Path $proxyRegPath -Name "AutoConfigURL" -Value $AutoCfgURL } 2 { Set-ItemProperty -path $proxyRegPath -Name "ProxyEnable" -value 1 Set-ItemProperty -path $proxyRegPath -Name "ProxyServer" -value ( $ProxyServer + ":" + $port ) Set-ItemProperty -Path $proxyRegPath -Name "AutoConfigURL" -Value '' } }