Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Awesomium C# WebControl, change proxy settings

How can i change the proxy settings in Awesomium (c#)? i've this simple code for now

Awesomium.Windows.Forms.WebControl browser =
    new Awesomium.Windows.Forms.WebControl();

browser = new Awesomium.Windows.Forms.WebControl();
browser.Paint += browser_Paint;
browser.Location = new System.Drawing.Point(1, 1);
browser.Name = "webControl";
browser.Size = new System.Drawing.Size(1024, 768);
browser.Source = new System.Uri("http://checkip.dyndns.com/", System.UriKind.Absolute);
browser.TabIndex = 0;
like image 270
Ldg Avatar asked Nov 13 '22 07:11

Ldg


1 Answers

  WebPreferences prefs = new WebPreferences(){ ProxyConfig = "xxx.xxx.xxx.xxx:port" }
  session = WebCore.CreateWebSession(prefs);
  browser.WebSession = session; 
  browser.Source = new System.Uri("http://checkip.dyndns.com/", System.UriKind.Absolute);

check this answer for more details

like image 74
user1590636 Avatar answered Nov 15 '22 07:11

user1590636