Ejemplo n.º 1
0
 private static void InitProxyMapping()
 {
     ArrProxyMapping[0] = new ProxyMappingInfo("47.102.123.163", 6414, "127.0.0.1", 5501, 6000);
     ArrProxyMapping[1] = new ProxyMappingInfo("47.101.132.111", 6414, "127.0.0.1", 6001, 7000);
     ArrProxyMapping[2] = new ProxyMappingInfo("106.14.173.155", 6414, "127.0.0.1", 7001, 8000);
     ArrProxyMapping[3] = new ProxyMappingInfo("47.102.211.215", 6414, "127.0.0.1", 8001, 9000);
     //var flag =
     //    ArrProxyMapping[0].SetValue("47.100.107.72", 6414, "127.0.0.1", 5002, 6000) &&
     //    ArrProxyMapping[1].SetValue("47.102.211.215", 6414, "127.0.0.1", 6001, 7000) &&
     //    ArrProxyMapping[2].SetValue("47.100.116.187", 6414, "127.0.0.1", 7001, 8000);
     //if (!flag)
     //{
     //    LogHelper.Log("No available port");
     //}
 }
Ejemplo n.º 2
0
        public ProxyServerInfo(ProxyMappingInfo pm)
        {
            InitializeComponent();
            _pm = pm;

            TxtRemotePort.Text = pm.RemotePort.ToString();
            IpRemote.SetIp(pm.RemoteIp);

            TxtMinLocalPort.Text = pm.LocalMinPort.ToString();
            TxtMaxLocalPort.Text = pm.LocalMaxPort.ToString();
            IpLocal.SetIp(pm.LocalIp);

            IpRemote.TextChanged += IpRemote_TextChanged;
            IpLocal.TextChanged  += IpLocal_TextChanged;

            TxtRemotePort.TextChanged   += TxtRemotePort_TextChanged;
            TxtMinLocalPort.TextChanged += TxtLocalPort_TextChanged;
            TxtMaxLocalPort.TextChanged += TxtLocalPort_TextChanged;

            ChkEnabled.Checked = pm.IsEnabled;
        }