forked from ElectronNET/Electron.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProxyConfig.cs
More file actions
42 lines (38 loc) · 1.51 KB
/
Copy pathProxyConfig.cs
File metadata and controls
42 lines (38 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
namespace ElectronNET.API.Entities
{
/// <summary>
/// Proxy configuration for app.setProxy / session.setProxy. Matches Electron's ProxyConfig structure.
/// </summary>
public class ProxyConfig
{
/// <summary>
/// The proxy mode. One of: 'direct' | 'auto_detect' | 'pac_script' | 'fixed_servers' | 'system'.
/// Defaults to 'pac_script' if 'PacScript' is specified, otherwise defaults to 'fixed_servers'.
/// </summary>
public string Mode { get; set; }
/// <summary>
/// The URL associated with the PAC file.
/// </summary>
public string PacScript { get; set; }
/// <summary>
/// Rules indicating which proxies to use.
/// </summary>
public string ProxyRules { get; set; }
/// <summary>
/// Rules indicating which URLs should bypass the proxy settings.
/// </summary>
public string ProxyBypassRules { get; set; }
/// <summary>
///
/// </summary>
/// <param name="pacScript">The URL associated with the PAC file.</param>
/// <param name="proxyRules">Rules indicating which proxies to use.</param>
/// <param name="proxyBypassRules">Rules indicating which URLs should bypass the proxy settings.</param>
public ProxyConfig(string pacScript, string proxyRules, string proxyBypassRules)
{
PacScript = pacScript;
ProxyRules = proxyRules;
ProxyBypassRules = proxyBypassRules;
}
}
}