HttpClientHandler.UseProxy Property (System.Net.Http)

eProxy Property () | Microsoft Docs
Skip to main content
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In this article
Gets or sets a value that indicates whether the handler uses a proxy for requests.
property bool UseProxy { bool get(); void set(bool value);};
public bool UseProxy { get; set;}
[rsioning. UnsupportedOSPlatform(“browser”)]
member eProxy: bool with get, set
Public Property UseProxy As Boolean
Property Value
true if the handler should use a proxy for requests; otherwise false. The default value is true.
Applies to
Why does HttpClientHandler have both Proxy and UseProxy ...

Why does HttpClientHandler have both Proxy and UseProxy …

Why is it that having a Proxy property would not be enough?
If it is null, then don’t use the proxy, if it is non-null, then use the provided proxy.
asked Apr 22 ’16 at 21:27
Proxy property allows you specify a proxy to use by the HttpClientHandler.
UseProxy property allows indicates whether the handler uses a proxy for requests.
But if you want to use the default proxy, you don’t have to defined it in Proxy property, is enough with set UseProxy.
When UseProxy is true and Proxy is null, the faultWebProxy is used.
DefaultWebProxy property reads proxy settings from the config file. If there is no one, the current user’s Internet Explorer (IE) proxy settings are used.
answered Apr 22 ’16 at 21:35
Arturo MenchacaArturo Menchaca15. 1k1 gold badge27 silver badges49 bronze badges
Not the answer you’re looking for? Browse other questions tagged c# or ask your own question.
.useProxy() | Runner Object | TestCafe API | Reference | Docs

.useProxy() | Runner Object | TestCafe API | Reference | Docs

Specifies the proxy server used in your local network to access the Internet. Allows TestCafe to bypass the proxy when it accesses specific resources.
async useProxy(host [, bypassRules]) → this
The proxy server host.
bypassRules (optional)
String | Array
A set of rules that specify which resources TestCafe should access directly.
If you access the Internet through a proxy server, use the useProxy method to specify its host.
When you use a proxy server, you may still need to access local or external resources directly. In this instance, provide their URLs in the bypassRules option.
The bypassRules parameter takes one or several URLs that require direct access. You can replace parts of the URL with the * wildcard that corresponds to a string of any length. Wildcards at the beginning and end of the rules can be omitted (*. and. have the same effect).
Related configuration file properties:
The following example shows how to use the proxy server at
In the example below, the proxy server address is 172. 0. 10. 10:8080 and two resources at localhost:8080 and are accessed directly.
eProxy(‘172. 10:8080’, [‘localhost:8080’, ”]);
The *. proxy bypass rule means that all URLs in subdomains are accessed directly.
eProxy(”, ‘*. ‘);
You can also use the proxy host to specify authentication credentials.

Frequently Asked Questions about useproxy

Leave a Reply

Your email address will not be published. Required fields are marked *