แชร์ผ่าน


ProxyOverrideRules

Proxy override rules

Supported versions

  • On Windows and macOS since 145 or later

Description

This policy enables rule-based proxy selection that determines which proxy Microsoft Edge uses based on the destination URL and any other conditions you define.

When this policy is configured, it takes precedence over proxy settings configured by the ProxySettings policy, the Edge.proxy extension API, and any manual user settings.

If this policy is disabled or not configured, existing proxy policies and user-defined settings continue to apply.

When Edge selects a proxy, it evaluates entries in the ProxyOverrideRules policy in order. A rule is considered a match when all the following conditions are met:

  • At least one URL pattern in DestinationMatchers is matched.
  • No URL pattern in ExcludeDestinationMatchers is matched.
  • If Conditions is specified and non-empty, all conditions are satisfied.

For a matching rule, the value specified in ProxyList is used as the proxy. If no rule matches, proxy selection falls back to the settings defined by the ProxySettings policy.

The URL patterns supported by DestinationMatchers and ExcludeDestinationMatchers are documented at https://review.learn.microsoft.com/en-us/DeployEdge/configure-microsoft-edge-proxy-support?branch=pr-en-us-6681#proxy-config-url-patterns . Entries in ProxyList correspond to PAC-style proxy strings, such as:

  • DIRECT
  • PROXY host:port
  • HTTPS host:port
  • SOCKS4 host:port
  • SOCKS5 host:port

Alternatively, URL-form proxy specifiers can be used, for example:

  • http://host :port
  • https://host :port
  • socks4://host:port
  • socks5://host:port

The first reachable proxy in the list is used. Invalid entries are ignored.

Supported features

  • Can be mandatory: Yes
  • Can be recommended: No
  • Dynamic Policy Refresh: Yes
  • Per Profile: Yes
  • Applies to a profile that is signed in with a Microsoft account: Yes

Data type

  • Dictionary

Windows information and settings

Group Policy (ADMX) info

  • GP unique name: ProxyOverrideRules
  • GP name: Proxy override rules
  • GP path (Mandatory): Administrative Templates/Microsoft Edge/Proxy server
  • GP path (Recommended): N/A
  • GP ADMX file name: MSEdge.admx

Example value

[{"Conditions": [{"DnsProbe": {"Host": "corp.ads", "Result": "resolved"}}], "DestinationMatchers": ["https://some.app.com", "https://other.app.org"], "ProxyList": ["HTTPS proxy.app:443", "DIRECT"]}, {"DestinationMatchers": ["https://Contoso.com"], "ExcludeDestinationMatchers": ["https://mail.Contoso.com"], "ProxyList": ["HTTPS proxy.app:443", "DIRECT"]}]

Registry settings

  • Path (Mandatory): SOFTWARE\Policies\Microsoft\Edge
  • Path (Recommended): N/A
  • Value name: ProxyOverrideRules
  • Value type: REG_SZ

Example registry value

[{"Conditions": [{"DnsProbe": {"Host": "corp.ads", "Result": "resolved"}}], "DestinationMatchers": ["https://some.app.com", "https://other.app.org"], "ProxyList": ["HTTPS proxy.app:443", "DIRECT"]}, {"DestinationMatchers": ["https://Contoso.com"], "ExcludeDestinationMatchers": ["https://mail.Contoso.com"], "ProxyList": ["HTTPS proxy.app:443", "DIRECT"]}]

Expanded example registry value

[
  {
    "Conditions": [
      {
        "DnsProbe": {
          "Host": "corp.ads",
          "Result": "resolved"
        }
      }
    ],
    "DestinationMatchers": [
      "https://some.app.com",
      "https://other.app.org"
    ],
    "ProxyList": [
      "HTTPS proxy.app:443",
      "DIRECT"
    ]
  },
  {
    "DestinationMatchers": [
      "https://Contoso.com"
    ],
    "ExcludeDestinationMatchers": [
      "https://mail.Contoso.com"
    ],
    "ProxyList": [
      "HTTPS proxy.app:443",
      "DIRECT"
    ]
  }
]

Mac information and settings

  • Preference Key name: ProxyOverrideRules
  • Example value:
<key>ProxyOverrideRules</key>
<array>
  <dict>
    <key>Conditions</key>
    <array>
      <dict>
        <key>DnsProbe</key>
        <dict>
          <key>Host</key>
          <string>corp.ads</string>
          <key>Result</key>
          <string>resolved</string>
        </dict>
      </dict>
    </array>
    <key>DestinationMatchers</key>
    <array>
      <string>https://some.app.com</string>
      <string>https://other.app.org</string>
    </array>
    <key>ProxyList</key>
    <array>
      <string>HTTPS proxy.app:443</string>
      <string>DIRECT</string>
    </array>
  </dict>
  <dict>
    <key>DestinationMatchers</key>
    <array>
      <string>https://Contoso.com</string>
    </array>
    <key>ExcludeDestinationMatchers</key>
    <array>
      <string>https://mail.Contoso.com</string>
    </array>
    <key>ProxyList</key>
    <array>
      <string>HTTPS proxy.app:443</string>
      <string>DIRECT</string>
    </array>
  </dict>
</array>

See also