Click or drag to resize

RequestContextExtensionsSetProxyAsync Method (IRequestContext, String, NullableInt32)

Version 94.4.20
Sets the proxy server for the specified IRequestContext. Protocol for the proxy server is http

Namespace:  CefSharp
Assembly:  CefSharp (in CefSharp.dll) Version: (
public static Task<SetProxyResponse> SetProxyAsync(
	this IRequestContext requestContext,
	string host,
	int? port


Type: CefSharpIRequestContext
request context
Type: SystemString
proxy host
Type: SystemNullableInt32
proxy port

Return Value

Type: TaskSetProxyResponse
returns Success true if successfull, false otherwise.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRequestContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Internally calls with preference 'proxy' and mode of 'fixed_servers'
See Also