栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Windows10代理脚本及配置

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Windows10代理脚本及配置

Windows10代理脚本及配置 一、Pac脚本编写

以下配置保存到文件,扩展名为pac

function FindProxyForURL(url, host) {
	var proxy1 = "PROXY 192.168.6.6:6666";
	var proxy2 = "PROXY 222.22.66.222:6666";
	
    //本地地址直接连接
	if (isPlainHostName(host)) {
        return "DIRECT";
    }
	// 代理1
	if (shExpMatch(url, "*baidu.com*")) {
        return proxy1;
    }
	// 代理2
	if (shExpMatch(url, "*csdn.com*")) {
	   return proxy2;

    return "DIRECT";
}

二、Windows配置 1.界面配置

2.命令配置

以下配置保存到文件执行,扩展名为bat,windows的dos命令

@echo off
color 0a
title Use autoconfig script
echo Starting......
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsConnections" /v DefaultConnectionSettings /t REG_BINARY /d 46000000020000000900 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsConnections" /v SavedLegacySettings /t REG_BINARY /d 46000000020000000900 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v AutoConfigURL /d "http://域名/pac/proxy.pac" /f
echo End
@echo off
注意事项 https不生效 1.IE浏览器

可以修改注册表配置后支持(需要重启系统)

配置内容

以下配置保存到文件执行,扩展名为reg,注册表命令

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwarePoliciesMicrosoftWindowsCurrentVersionInternet Settings]
"EnableAutoproxyResultCache"=0

原文地址:
https://support.microsoft.com/en-us/topic/how-to-disable-automatic-proxy-caching-in-internet-explorer-92735c9c-8a26-d0d8-7f8a-1b46595cbaba

部分原文:

HKEY_CURRENT_USERSoftwarePoliciesMicrosoftWindowsCurrentVersionInternet Settings

Value: EnableAutoproxyResultCache
Type: REG_DWORD
Data value: 0 = disable caching; 1 (or key not present) = enable automatic proxy caching (this is the default behavior)If the registry key is not present, you can create the registry key by using the following registry file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwarePoliciesMicrosoftWindowsCurrentVersionInternet Settings]"EnableAutoProxyResultCache"=dword:00000000"
2.Google浏览器

不支持
原文地址:
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/914059.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号