public void AddProxyManager(IProxyManager proxyManager) { if (proxyManager == null) { string msg = "BehaviorTreeManager.AddProxyManager() \n proxyManager is null."; LogError(msg); throw new Exception(msg); } EProxyType proxyType = proxyManager.GetProxyType(); if (m_ProxyManagers.Count == 0) { m_ProxyManagers.Add(proxyManager); } else { //插入排序,EProxyType的枚举值越大,优先级越高 for (int i = 0; i < m_ProxyManagers.Count; i++) { IProxyManager tempProxyManager = m_ProxyManagers[i]; EProxyType tempProxyType = tempProxyManager.GetProxyType(); if (tempProxyType < proxyType) { m_ProxyManagers.Insert(i, proxyManager); break; } } } }
public ProxySettingsForBookmaker() { this._proxyType = EProxyType.Http; this.ProxyAdress = ""; this._isProxyAuth = false; this.ProxyLogin = ""; this.ProxyPassword = ""; this.ProxyPort = 8080; }
private ProxyForChrome ExtractMainProxyFromProxyConfig(ProxyConfig config) { EProxyType proxyType = config.CurrentProxy.ProxyType; string proxyAddress = config.CurrentProxy.ProxyAddress; int proxyPort = config.CurrentProxy.ProxyPort; if (!config.IsUsedProxyInProgram) { proxyType = EProxyType.Direct; } return(ProxyForChrome.ConvertToProxyChrome(proxyType, proxyAddress, proxyPort)); }
public Proxy() { Port = 8888; Host = "127.0.0.1"; ProxyType = EProxyType.System; }