NetworkProxy 云解决方案提供商NetworkProxy CSP

NetworkProxy 配置服务提供程序 (CSP) 用于配置用于以太网和 Wi-Fi 连接的代理服务器。The NetworkProxy configuration service provider (CSP) is used to configure a proxy server for ethernet and Wi-Fi connections. 这些设置不适用于 VPN 连接。These settings do not apply to VPN connections. 此 CSP 已添加到 Windows 10 版本 1703 中。This CSP was added in Windows 10, version 1703.

备注

在 Windows 10 移动版中,NetworkProxy CSP 仅适用于以太网连接。In Windows 10 Mobile, the NetworkProxy CSP only works in ethernet connections. 使用 WiFi CSP 为移动设备中的网络连接配置Wi-Fi代理。Use the WiFi CSP to configure per-network proxy for Wi-Fi connections in mobile devices.

设置如何工作:How the settings work:

  1. 如果启用了自动检测,系统将尝试通过 PAC (查找代理自动配置) 并下载它。If auto-detect is enabled, the system tries to find the path to a proxy auto config (PAC) script and download it.
  2. 如果#1失败并指定安装脚本,系统将尝试下载显式配置的 PAC 脚本。If #1 fails and a setup script is specified, the system tries to download the explicitly configured PAC script.
  3. 如果#2失败并指定代理服务器,系统将尝试使用显式配置的代理服务器。If #2 fails and a proxy server is specified, the system tries to use the explicitly configured proxy server.
  4. 否则,系统将尝试直接访问网站。Otherwise, the system tries to reach the site directly.

下面以树格式显示 NetworkProxy 配置服务提供程序。The following shows the NetworkProxy configuration service provider in tree format.

./Vendor/MSFT
NetworkProxy
----ProxySettingsPerUser
----AutoDetect
----SetupScriptUrl
----ProxyServer
--------ProxyAddress
--------Exceptions
--------UseProxyForLocalAddresses

./Vendor/MSFT/NetworkProxy./Vendor/MSFT/NetworkProxy
NetworkProxy 配置服务提供程序的根节点。The root node for the NetworkProxy configuration service provider..

ProxySettingsPerUserProxySettingsPerUser
已添加到 Windows 10 版本 1803。Added in Windows 10, version 1803. 设置为 0 时,它将启用作为全局、计算机范围的代理配置。When set to 0, it enables proxy configuration as global, machine wide.

支持的操作包括添加、获取、替换和删除。Supported operations are Add, Get, Replace, and Delete.

备注

不支持使用配置文件(仅修改本地计算机上注册表设置)按用户代理配置设置。Per user proxy configuration setting is not supported using a configuration file, only modifying registry settings on a local machine.

AutoDetect 自动检测设置。AutoDetect Automatically detect settings. 如果启用,系统将尝试查找 PAC 脚本的路径。If enabled, the system tries to find the path to a PAC script.

有效值:Valid values:

  • 0 - 已禁用0 - Disabled
  • 1 (默认) - 已启用1 (default) - Enabled

值数据类型整数。The data type is integer. 支持的操作包括 Get 和 Replace。Supported operations are Get and Replace. 从 Windows 10 版本 1803 开始,也支持删除操作。Starting in Windows 10, version 1803, the Delete operation is also supported.

SetupScriptUrl 想要使用的 PAC 脚本的地址。SetupScriptUrl Address to the PAC script you want to use.

字符串数据类型字符串。The data type is string. 支持的操作包括 Get 和 Replace。Supported operations are Get and Replace. 从 Windows 10 版本 1803 开始,也支持删除操作。Starting in Windows 10, version 1803, the Delete operation is also supported.

ProxyServerProxyServer
用于为以太网和 Wi-Fi 连接配置静态代理的节点。Node for configuring a static proxy for Ethernet and Wi-Fi connections. 所有协议(包括 HTTP、HTTPS、FTP 和 SOCKS)使用相同的代理服务器。The same proxy server is used for all protocols - including HTTP, HTTPS, FTP, and SOCKS. 这些设置不适用于 VPN 连接。These settings do not apply to VPN connections.

支持的操作为 Get。Supported operation is Get.

ProxyAddressProxyAddress
代理服务器的地址。Address to the proxy server. 以格式服务器 < > [":"port ] 指定 < > 地址。Specify an address in the format <server>[“:”<port>].

字符串数据类型字符串。The data type is string. 支持的操作包括 Get 和 Replace。Supported operations are Get and Replace. 从 Windows 10 版本 1803 开始,也支持删除操作。Starting in Windows 10, version 1803, the Delete operation is also supported.

异常Exceptions
不应使用代理服务器的地址。Addresses that should not use the proxy server. 系统不会将代理服务器用于以此节点中指定内容开头的地址。The system will not use the proxy server for addresses beginning with what is specified in this node. 使用分号 (;) 分隔条目。Use semicolons (;) to separate entries.

字符串数据类型字符串。The data type is string. 支持的操作包括 Get 和 Replace。Supported operations are Get and Replace. 从 Windows 10 版本 1803 开始,也支持删除操作。Starting in Windows 10, version 1803, the Delete operation is also supported.

UseProxyForLocalAddressesUseProxyForLocalAddresses
指定是否应该将代理服务器用于本地 (Intranet) 地址。Specifies whether the proxy server should be used for local (intranet) addresses. 有效值:Valid values:

  • 0 (默认) - 对本地地址使用代理服务器0 (default) - Use proxy server for local addresses
  • 1 - 不将代理服务器用于本地地址1 - Do not use proxy server for local addresses

值数据类型整数。The data type is integer. 支持的操作包括 Get 和 Replace。Supported operations are Get and Replace. 从 Windows 10 版本 1803 开始,也支持删除操作。Starting in Windows 10, version 1803, the Delete operation is also supported.

配置示例Configuration Example

选项ProxySettingsPerUser、Autodetect和**** SetupScriptURL的这些通用代码部分可用于特定操作,例如 Replace。These generic code portions for the options ProxySettingsPerUser, Autodetect, and SetupScriptURL can be used for a specific operation, for example Replace. 仅在"替换"部分输入所需的 代码 部分。Only enter the portion of code needed in the Replace section.

<Replace>
    <CmdID>1</CmdID>
    <Item>
        <Target>
            <LocURI>./Vendor/MSFT/NetworkProxy/ProxySettingsPerUser</LocURI>
        </Target>
        <Meta>
            <Format xmlns="syncml:metinf">int</Format>
            <Type>text/plain</Type>
        </Meta>
        <Data>0</Data>
    </Item>
</Replace>
<Replace>
    <CmdID>2</CmdID>
    <Item>
        <Target>
            <LocURI>./Vendor/MSFT/NetworkProxy/AutoDetect</LocURI>
        </Target>
        <Meta>
            <Format xmlns="syncml:metinf">int</Format>
            <Type>text/plain</Type>
        </Meta>
        <Data>1</Data>
    </Item>
</Replace> 
<Replace>
    <CmdID>3</CmdID>
    <Item>
        <Target>
            <LocURI>./Vendor/MSFT/NetworkProxy/SetupScriptUrl</LocURI>
        </Target>
        <Meta>
            <Format xmlns="syncml:metinf">chr</Format>
            <Type>text/plain</Type>
        </Meta>
        <Data>Insert the proxy PAC URL location here:</Data>
    </Item>
</Replace>