File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,12 @@ internal static class BrowserConfig {
2525 public static bool WebGL = true ;
2626 public static bool ApplicationCache = true ;
2727
28-
28+ public static bool Proxy = false ;
29+ public static string ProxyIP = "123.123.123.123" ;
30+ public static int ProxyPort = 123 ;
31+ public static string ProxyUsername = "username" ;
32+ public static string ProxyPassword = "pass" ;
33+ public static string ProxyBypassList = "" ;
2934
3035 }
3136}
Original file line number Diff line number Diff line change @@ -159,6 +159,12 @@ private void InitBrowser() {
159159
160160 settings . CachePath = GetAppDir ( "Cache" ) ;
161161
162+ if ( BrowserConfig . Proxy ) {
163+ CefSharpSettings . Proxy = new ProxyOptions ( BrowserConfig . ProxyIP ,
164+ BrowserConfig . ProxyPort . ToString ( ) , BrowserConfig . ProxyUsername ,
165+ BrowserConfig . ProxyPassword , BrowserConfig . ProxyBypassList ) ;
166+ }
167+
162168 Cef . Initialize ( settings ) ;
163169
164170 dHandler = new DownloadHandler ( this ) ;
You can’t perform that action at this time.
0 commit comments