private void GeckoSetProxy(Enums.ProxyType proxyType, string host, int port) { switch (proxyType) { case Enums.ProxyType.Socks4: case Enums.ProxyType.Socks5: GeckoPreferences.Default["network.proxy.socks"] = host; GeckoPreferences.Default["network.proxy.socks_port"] = port; break; case Enums.ProxyType.Unknown: case Enums.ProxyType.Http: case Enums.ProxyType.Https: default: GeckoPreferences.Default["network.proxy.http"] = host; GeckoPreferences.Default["network.proxy.http_port"] = port; GeckoPreferences.Default["network.proxy.ssl"] = host; GeckoPreferences.Default["network.proxy.ssl_port"] = port; break; } if (proxyType == Enums.ProxyType.Socks4) { GeckoPreferences.Default["network.proxy.socks_version"] = 4; } else if (proxyType == Enums.ProxyType.Socks5) { GeckoPreferences.Default["network.proxy.socks_version"] = 5; } }
public ProxyItem(string host, int port, Enums.ProxyType type, string user, string password) { Enabled = true; Host = host; Port = port; ProxyType = type; UserName = user; Password = password; }
public ProxyItem(string host, int port, Enums.ProxyType type) : this(host, port, type, null, null) { }