Пример #1
0
        public List <string> GetProxy(string email, ProxyAssignStatistics proxyAssign)
        {
            if (Map.ContainsKey(email))
            {
                var proxyAddrList = Map[email];
                if (proxyAssign != null)
                {
                    proxyAssign.SetUsed(proxyAddrList);
                }
                return(proxyAddrList);
            }

            if (proxyAssign == null)
            {
                return(DefaultProxies);
            }

            var addr = proxyAssign.GetUnMapedAddress();

            if (string.IsNullOrWhiteSpace(addr))
            {
                return(DefaultProxies);
            }

            _changed = true;
            Add(email, addr);
            proxyAssign.SetUsed(addr);
            return(new List <string> {
                addr
            });
        }
Пример #2
0
 public static void AddAccount(string email, string password, ProxyMap proxyMap, ProxyAssignStatistics proxyAssignStat = null)
 {
     AddAccount(new AirBnbAccount
     {
         Email        = email,
         Password     = password,
         ProxyAddress = proxyMap.GetProxy(email, proxyAssignStat)
     });
 }