다음을 통해 공유


<proxy> Element

Defines a proxy server.

<configuration>
   <system.net>
      <defaultProxy>
         <proxy>

<proxy
   usesystemdefault = "false | true"
   bypassonlocal = "true | false"
   proxyaddress = "proxy address including port"
/>

Optional Attributes

Attribute Description
usesystemdefault Indicates that the application should use the default system proxy.
bypassonlocal Indicates that local addresses should not use a proxy.
proxyaddress The URI or IP address of the Internet proxy.

Remarks

The <proxy> element defines a proxy server for an application. When the usesystemdefault attribute is true, the application uses the proxy defined in the Internet Options dialog box.

When the bypassonlocal property is true, local addresses do not use the proxy. A local address has no period; is localhost, loopback, or 127.0.0.1; or matches the machine name of the local computer.

Example

The following example configures an application to use the Internet proxy "proxyserver" on port 80 and to bypass local addresses.

<configuration>
   <system.net>
      <defaultProxy>
         <proxy
            proxyaddress = "http://proxyserver:80"
            bypassonlocal = "true"
/>
      </defaultProxy>
   </system.net>
</configuration>

Configuration File

This element can be used in the application configuration file, the machine configuration file (Machine.config), and the publisher policy file.

See Also

<defaultProxy> Element | Network Settings Schema