コード例 #1
0
        public static void DoRequest(SocksServer server, Socket client, TunnelConfig tunnelConfig)
        {
            SocksConnection connection = new SocksConnection(server, client, tunnelConfig);

            client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1);
            ThreadPool.QueueUserWorkItem(new WaitCallback(connection.DoRequest));
        }
コード例 #2
0
		//<listener ip="LoopBack" port="ServerPort">
		//  <target ip="endpoint.Address" port="endpoint.Port" ssl="false" />
		//</listener>
		protected override void AddServer(TunnelConfig config, IPEndPoint endpoint)
		{
			config.Add(new TunnelListener(
				LoopBack, ServerPort,
				new TunnelSender(endpoint.Address.ToString(), endpoint.Port, false)
			));
		}
コード例 #3
0
		//<listener ip="LoopBack" port="ClientPort">
		//  <target ip="LoopBack" port="ServerPort" ssl="false" />
		//</listener>
		protected override void AddClient(TunnelConfig config)
		{
			config.Add(new TunnelListener(
				LoopBack, ClientPort,
				new TunnelSender(LoopBack, ServerPort, false)
			));
		}
コード例 #4
0
 public TunnelsApiController(TunnelProvider tunnelProvider, UsersProvider usersProvider, IOptions <TunnelConfig> config, IStringLocalizer <TunnelsApiController> localizer)
 {
     _tunnelProvider = tunnelProvider;
     _usersProvider  = usersProvider;
     _tunnelConfig   = config.Value;
     _localizer      = localizer;
 }
コード例 #5
0
        public void TestConfigListener2()
        {
            TunnelConfig config = null;

            using (XmlReader rdr = new XmlTextReader(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SslTunnel.Test.Sample.config")))
                config = TunnelConfig.Load(rdr);
            Assert.IsNotNull(config);
            Assert.AreEqual(4, config.Listeners.Length);

            //<listener ip="127.0.0.1" port="11443" serverCertFile="server.localhost.nunit.cer" serverCertPassword="******">
            Assert.AreEqual(typeof(TunnelListener), config.Listeners[3].GetType());
            Assert.AreEqual("127.0.0.1", ((TunnelListener)config.Listeners[3]).IpEndpoint);
            Assert.AreEqual(11443, ((TunnelListener)config.Listeners[3]).Port);
            Assert.AreEqual("server.localhost.nunit.cer", ((TunnelListener)config.Listeners[3]).ServerCertificate);
            Assert.AreEqual("password", ((TunnelListener)config.Listeners[3]).ServerCertPassword);
            //  <!--only allow name/hash/publicKey = client.localhost.nunit.cer-->
            //  <accept issuedTo="client.localhost.nunit"
            Assert.AreEqual(1, ((TunnelListener)config.Listeners[3]).AllowedClients.Length);
            Assert.AreEqual("client.localhost.nunit", ((TunnelListener)config.Listeners[3]).AllowedClients[0].IssuedTo);
            //    hash="68D757B929A1A91806C098C9BF89297EAB16675D"
            Assert.AreEqual("68D757B929A1A91806C098C9BF89297EAB16675D", ((TunnelListener)config.Listeners[3]).AllowedClients[0].Hash);
            //    publicKey="30818902818100CF2B2CCF01956ADE2725104674FE107173446061A694BEFF31FDCAC134EA69125E1704CD0BBFBE1806F29909C60416FFEF811A03C8A3A248CD7086F7BDE959BC29DE4999A8A44191BCE8102DDC56E245476B91F773C2E7A47C32BC3935AF8766082F391E165976A46D6A57B609540B92E4BE681EC4E2EFB8C3F1C12B5709DFE90203010001"
            Assert.AreEqual("30818902818100CF2B2CCF01956ADE2725104674FE107173446061A694BEFF31FDCAC134EA69125E1704CD0BBFBE1806F29909C60416FFEF811A03C8A3A248CD7086F7BDE959BC29DE4999A8A44191BCE8102DDC56E245476B91F773C2E7A47C32BC3935AF8766082F391E165976A46D6A57B609540B92E4BE681EC4E2EFB8C3F1C12B5709DFE90203010001",
                            ((TunnelListener)config.Listeners[3]).AllowedClients[0].PublicKey);
            //    ignoreErrors="All" />
            Assert.AreEqual(IgnorePolicyErrors.All, ((TunnelListener)config.Listeners[3]).AllowedClients[0].IgnoredErrors);
            //  <target ip="google.com" port="443" ssl="true" />
            Assert.AreEqual("google.com", ((TunnelListener)config.Listeners[3]).Target.IpEndpoint);
            Assert.AreEqual(443, ((TunnelListener)config.Listeners[3]).Target.Port);
            Assert.AreEqual(true, ((TunnelListener)config.Listeners[3]).Target.UseSsl);
            //</listener>
        }
コード例 #6
0
		//<multiplexer ip="LoopBack">
		//  <add port="_mixInPort"/>
		//  <add port="ClientPort"/>
		//  <target ip="LoopBack" port="ServerPort" ssl="false" />
		//</multiplexer>
		protected override void AddClient(TunnelConfig config)
		{
			config.Add(new TunnelMultiplexer(
				LoopBack, new int[] { _mixInPort, ClientPort },
				new TunnelSender(LoopBack, ServerPort, false)
			));
		}
コード例 #7
0
 public UsersApiController(UsersProvider usersProvider, LoginLogProvider loginLogProvider, IStringLocalizer <UsersApiController> localizer, IOptions <TunnelConfig> config)
 {
     _usersProvider    = usersProvider;
     _loginLogProvider = loginLogProvider;
     _localizer        = localizer;
     _tunnelConfig     = config.Value;
 }
コード例 #8
0
 //<listener ip="LoopBack" port="ClientPort">
 //  <target ip="LoopBack" port="ServerPort" ssl="false" />
 //</listener>
 protected override void AddClient(TunnelConfig config)
 {
     config.Add(new TunnelListener(
                    LoopBack, ClientPort,
                    new TunnelSender(LoopBack, ServerPort, false)
                    ));
 }
コード例 #9
0
 //<listener ip="LoopBack" port="ServerPort">
 //  <target ip="endpoint.Address" port="endpoint.Port" ssl="false" />
 //</listener>
 protected override void AddServer(TunnelConfig config, IPEndPoint endpoint)
 {
     config.Add(new TunnelListener(
                    LoopBack, ServerPort,
                    new TunnelSender(endpoint.Address.ToString(), endpoint.Port, false)
                    ));
 }
コード例 #10
0
        public void TestConfigMultiplexer()
        {
            TunnelConfig config = null;

            using (XmlReader rdr = new XmlTextReader(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SslTunnel.Test.Sample.config")))
                config = TunnelConfig.Load(rdr);
            Assert.IsNotNull(config);
            Assert.AreEqual(4, config.Listeners.Length);

            //<multiplexer ip="127.0.0.1">
            Assert.AreEqual(typeof(TunnelMultiplexer), config.Listeners[0].GetType());
            Assert.AreEqual("127.0.0.1", ((TunnelMultiplexer)config.Listeners[0]).IpEndpoint);
            //  <accept ?
            Assert.IsNull(((TunnelMultiplexer)config.Listeners[0]).AllowedClients);
            //  <add port="10080"/>
            Assert.AreEqual(10080, ((TunnelMultiplexer)config.Listeners[0]).Ports[0].Port);
            //  <add port="10081"/>
            Assert.AreEqual(10081, ((TunnelMultiplexer)config.Listeners[0]).Ports[1].Port);
            //  <target ip="127.0.0.1" port="10443" clientCertFile="client.localhost.nunit.cer" clientCertPassword="******">
            Assert.AreEqual("127.0.0.1", ((TunnelMultiplexer)config.Listeners[0]).Target.IpEndpoint);
            Assert.AreEqual(10443, ((TunnelMultiplexer)config.Listeners[0]).Target.Port);
            Assert.AreEqual("client.localhost.nunit.cer", ((TunnelMultiplexer)config.Listeners[0]).Target.ClientCertificate);
            Assert.AreEqual("password", ((TunnelMultiplexer)config.Listeners[0]).Target.ClientCertPassword);
            //    <!--expect publicKey = server.localhost.nunit.cer-->
            //    <expect ignoreErrors="All" publicKey="30818902818100A3F81009F73AC50EDA186F8EDBB846C63A8BB8F0E8C25179DEA8FA376372E9394D470B071A76AA0F8D6250B98B8665FF2C03097D7055080AD237F1038404C99F44F2235BC319FFEBF70505225DAD4D47A1868FC92B4E9DEECA06F7BC5171CD96603B35AA6F7816DE294885E0AEF5B62EA981983822174CFDF2C46F392276DA8F0203010001" />
            Assert.AreEqual("30818902818100A3F81009F73AC50EDA186F8EDBB846C63A8BB8F0E8C25179DEA8FA376372E9394D470B071A76AA0F8D6250B98B8665FF2C03097D7055080AD237F1038404C99F44F2235BC319FFEBF70505225DAD4D47A1868FC92B4E9DEECA06F7BC5171CD96603B35AA6F7816DE294885E0AEF5B62EA981983822174CFDF2C46F392276DA8F0203010001",
                            ((TunnelMultiplexer)config.Listeners[0]).Target.ExpectedCert.PublicKey);
            Assert.AreEqual(IgnorePolicyErrors.All, ((TunnelMultiplexer)config.Listeners[0]).Target.ExpectedCert.IgnoredErrors);
            //  </target>
            //</multiplexer>
        }
コード例 #11
0
 public OrderApiController(OrderProvider orderProvider, LoginLogProvider loginLogProvider, IStringLocalizer <OrderApiController> localizer, IOptions <TunnelConfig> config)
 {
     _orderProvider    = orderProvider;
     _loginLogProvider = loginLogProvider;
     _localizer        = localizer;
     _tunnelConfig     = config.Value;
 }
コード例 #12
0
 //<multiplexer ip="LoopBack">
 //  <add port="_mixInPort"/>
 //  <add port="ClientPort"/>
 //  <target ip="LoopBack" port="ServerPort" ssl="false" />
 //</multiplexer>
 protected override void AddClient(TunnelConfig config)
 {
     config.Add(new TunnelMultiplexer(
                    LoopBack, new int[] { _mixInPort, ClientPort },
                    new TunnelSender(LoopBack, ServerPort, false)
                    ));
 }
コード例 #13
0
        protected override void OnStart(string[] args)
        {
            Log.Write("Service starting: {0}", Environment.CommandLine);

            TunnelConfig config = TunnelConfig.Load();

            _running = config.Start();

            Log.Verbose("Service running.");
        }
コード例 #14
0
		//<listener ip="LoopBack" port="ClientPort">
		//  <target ip="LoopBack" port="ServerPort" ssl="true" clientCertFile="ClientCert.CertificateFile">
		//    <expect 
		//      publicKey="ServerCert.Certificate.GetPublicKeyString()"
		//      ignoreErrors="All" />
		//  </target>
		//</listener>
		protected override void AddClient(TunnelConfig config)
		{
			config.Add(new TunnelListener(
				LoopBack, ClientPort,
				new TunnelSender(LoopBack, ServerPort, true, 
					new ExpectedCertificate(ServerCert.Certificate.GetPublicKeyString(), IgnorePolicyErrors.All),
					ClientCert.CertificateFile, null
				)
			));
		}
コード例 #15
0
 //<multiplexer ip="LoopBack">
 //  <add port="_mixInPort"/>
 //  <add port="ClientPort"/>
 //  <target ip="LoopBack" port="ServerPort" ssl="true" clientCertFile="ClientCert.CertificateFile">
 //    <expect
 //      publicKey="ServerCert.Certificate.GetPublicKeyString()"
 //      ignoreErrors="All" />
 //  </target>
 //</multiplexer>
 protected override void AddClient(TunnelConfig config)
 {
     config.Add(new TunnelMultiplexer(
                    LoopBack, new int[] { _mixInPort, ClientPort },
                    new TunnelSender(LoopBack, ServerPort, true,
                                     new ExpectedCertificate(ServerCert.Certificate.GetPublicKeyString(), IgnorePolicyErrors.All),
                                     ClientCert.CertificateFile, null
                                     )
                    ));
 }
コード例 #16
0
 //<demultiplexer ip="LoopBack" port="ServerPort">
 //  <target forwardingPort="_mixInPort" ip="192.168.1.1" port="24" ssl="true" />
 //  <target forwardingPort="ClientPort" ip="endpoint.Address" port="endpoint.Port" ssl="false" />
 //</demultiplexer>
 protected override void AddServer(TunnelConfig config, IPEndPoint endpoint)
 {
     config.Add(new TunnelDemultiplexer(
                    LoopBack, ServerPort,
                    new TunnelSenderFromPort[]
     {
         new TunnelSenderFromPort(_mixInPort, "192.168.1.1", 24, true),                         //<= never connected
         new TunnelSenderFromPort(ClientPort, endpoint.Address.ToString(), endpoint.Port, false),
     }
                    ));
 }
コード例 #17
0
 //<listener ip="LoopBack" port="ServerPort" serverCertFile="ServerCert.CertificateFile">
 //  <accept ignoreErrors="All" publicKey="ClientCert.Certificate.GetPublicKeyString()" />
 //  <target ip="endpoint.Address" port="endpoint.Port" ssl="false" />
 //</listener>
 protected override void AddServer(TunnelConfig config, IPEndPoint endpoint)
 {
     config.Add(new TunnelListener(
                    LoopBack, ServerPort,
                    new TunnelSender(endpoint.Address.ToString(), endpoint.Port, false),
                    ServerCert.CertificateFile, null,
                    new ExpectedCertificate[] {
         new ExpectedCertificate(ClientCert.Certificate.GetPublicKeyString(), IgnorePolicyErrors.All)
     }
                    ));
 }
コード例 #18
0
		//<listener ip="LoopBack" port="ServerPort" serverCertFile="ServerCert.CertificateFile">
		//  <accept ignoreErrors="All" publicKey="ClientCert.Certificate.GetPublicKeyString()" />
		//  <target ip="endpoint.Address" port="endpoint.Port" ssl="false" />
		//</listener>
		protected override void AddServer(TunnelConfig config, IPEndPoint endpoint)
		{
			config.Add(new TunnelListener(
				LoopBack, ServerPort,
				new TunnelSender(endpoint.Address.ToString(), endpoint.Port, false),
				ServerCert.CertificateFile, null, 
				new ExpectedCertificate[] { 
					new ExpectedCertificate(ClientCert.Certificate.GetPublicKeyString(), IgnorePolicyErrors.All)
				}
			));
		}
コード例 #19
0
		//<demultiplexer ip="LoopBack" port="ServerPort">
		//  <target forwardingPort="_mixInPort" ip="192.168.1.1" port="24" ssl="true" />
		//  <target forwardingPort="ClientPort" ip="endpoint.Address" port="endpoint.Port" ssl="false" />
		//</demultiplexer>
		protected override void AddServer(TunnelConfig config, IPEndPoint endpoint)
		{
			config.Add(new TunnelDemultiplexer(
				LoopBack, ServerPort,
				new TunnelSenderFromPort[] 
				{
					new TunnelSenderFromPort(_mixInPort, "192.168.1.1", 24, true), //<= never connected
					new TunnelSenderFromPort(ClientPort, endpoint.Address.ToString(), endpoint.Port, false),
				}
			));
		}
コード例 #20
0
        public void TestSingleForward()
        {
            using (TcpTestServer testserver = new TcpTestServer())
            {
                TunnelConfig config = new TunnelConfig();
                AddServer(config, new IPEndPoint(IPAddress.Loopback, testserver.Port));

                using (config.Start())
                {
                    //Send to the serverPort, forwards to testserver.Port
                    TcpTestServer.Test(LoopBack, ServerPort, 10, 50, 500, 5000, 50000, 500000);
                }
            }
        }
コード例 #21
0
		public void TestSingleForward()
		{
			using (TcpTestServer testserver = new TcpTestServer())
			{
				TunnelConfig config = new TunnelConfig();
				AddServer(config, new IPEndPoint(IPAddress.Loopback, testserver.Port));

				using (config.Start())
				{
					//Send to the serverPort, forwards to testserver.Port
					TcpTestServer.Test(LoopBack, ServerPort, 10, 50, 500, 5000, 50000, 500000);
				}
			}
		}
コード例 #22
0
		//<demultiplexer ip="LoopBack" port="ServerPort" serverCertFile="ServerCert.CertificateFile">
		//  <accept ignoreErrors="All" publicKey="ClientCert.Certificate.GetPublicKeyString()" />
		//  <target forwardingPort="_mixInPort" ip="192.168.1.1" port="24" ssl="true" />
		//  <target forwardingPort="ClientPort" ip="endpoint.Address" port="endpoint.Port" ssl="false" />
		//</demultiplexer>
		protected override void AddServer(TunnelConfig config, IPEndPoint endpoint)
		{
			config.Add(new TunnelDemultiplexer(
				LoopBack, ServerPort,
				new TunnelSenderFromPort[] 
				{
					new TunnelSenderFromPort(_mixInPort, "192.168.1.1", 24, true), //<= never connected
					new TunnelSenderFromPort(ClientPort, endpoint.Address.ToString(), endpoint.Port, false),
				},
				ServerCert.CertificateFile, null,
				new ExpectedCertificate[] { 
					new ExpectedCertificate(ClientCert.Certificate.GetPublicKeyString(), IgnorePolicyErrors.All)
				}
			));
		}
コード例 #23
0
 //<demultiplexer ip="LoopBack" port="ServerPort" serverCertFile="ServerCert.CertificateFile">
 //  <accept ignoreErrors="All" publicKey="ClientCert.Certificate.GetPublicKeyString()" />
 //  <target forwardingPort="_mixInPort" ip="192.168.1.1" port="24" ssl="true" />
 //  <target forwardingPort="ClientPort" ip="endpoint.Address" port="endpoint.Port" ssl="false" />
 //</demultiplexer>
 protected override void AddServer(TunnelConfig config, IPEndPoint endpoint)
 {
     config.Add(new TunnelDemultiplexer(
                    LoopBack, ServerPort,
                    new TunnelSenderFromPort[]
     {
         new TunnelSenderFromPort(_mixInPort, "192.168.1.1", 24, true),                         //<= never connected
         new TunnelSenderFromPort(ClientPort, endpoint.Address.ToString(), endpoint.Port, false),
     },
                    ServerCert.CertificateFile, null,
                    new ExpectedCertificate[] {
         new ExpectedCertificate(ClientCert.Certificate.GetPublicKeyString(), IgnorePolicyErrors.All)
     }
                    ));
 }
コード例 #24
0
        public void TestChainForward()
        {
            using (TcpTestServer testserver = new TcpTestServer())
            {
                string       loopback = IPAddress.Loopback.ToString();
                TunnelConfig config   = new TunnelConfig();
                AddClient(config);
                AddServer(config, new IPEndPoint(IPAddress.Loopback, testserver.Port));

                using (config.Start())
                {
                    //Send to the clientPort, forwards to serverPort, forwards to testserver.Port
                    TcpTestServer.Test(loopback, _clientPort, 10, 50, 500, 5000, 50000, 500000);
                }
            }
        }
コード例 #25
0
        private OutboundTunnel CreateOutboundTunnel(ClientDestination dest, TunnelInfo prototype)
        {
            var config = new TunnelConfig(
                TunnelConfig.TunnelDirection.Outbound,
                TunnelConfig.TunnelPool.Client,
                prototype == null ? CreateOutgoingTunnelChain(dest): prototype);

            var tunnel = (OutboundTunnel)TunnelMgr.CreateTunnel(config);

            if (tunnel != null)
            {
                TunnelMgr.AddTunnel(tunnel);
                dest.AddOutboundPending(tunnel);
                lock (Destinations) Destinations[tunnel] = dest;
            }
            return(tunnel);
        }
コード例 #26
0
        private InboundTunnel CreateInboundTunnel(ClientDestination dest, TunnelInfo prototype)
        {
            var config = new TunnelConfig(
                TunnelConfig.TunnelDirection.Inbound,
                TunnelConfig.TunnelPool.Client,
                prototype == null ? CreateIncommingTunnelChain(dest): prototype);

            var tunnel = (InboundTunnel)TunnelMgr.CreateTunnel(config);

            if (tunnel != null)
            {
                tunnel.GarlicMessageReceived += new Action <GarlicMessage>(tunnel_GarlicMessageReceived);
                TunnelMgr.AddTunnel(tunnel);
                dest.AddInboundPending(tunnel);
                lock (Destinations) Destinations[tunnel] = dest;
            }
            return(tunnel);
        }
コード例 #27
0
        public void TestConcurrentChainForward()
        {
            using (TcpTestServer testserver = new TcpTestServer())
            {
                string       loopback = IPAddress.Loopback.ToString();
                TunnelConfig config   = new TunnelConfig();
                AddClient(config);
                AddServer(config, new IPEndPoint(IPAddress.Loopback, testserver.Port));

                using (config.Start())
                {
                    int nCompleted          = 0;
                    ManualResetEvent mreGO  = new ManualResetEvent(false);
                    ThreadStart      tstart = new ThreadStart(
                        delegate()
                    {
                        mreGO.WaitOne();
                        TcpTestServer.Test(loopback, _clientPort, 10, 50, 500, 5000, 50000, 500000);
                        Interlocked.Increment(ref nCompleted);
                    }
                        );

                    Thread[] threads = new Thread[5];
                    for (int i = 0; i < threads.Length; i++)
                    {
                        threads[i]      = new Thread(tstart);
                        threads[i].Name = String.Format("TcpTestClient({0})", i);
                        threads[i].Start();
                    }

                    Thread.Sleep(100);
                    mreGO.Set();

                    foreach (Thread t in threads)
                    {
                        t.Join();
                    }

                    Assert.AreEqual(threads.Length, nCompleted);
                }
            }
        }
コード例 #28
0
ファイル: SocksServer.cs プロジェクト: backrunner/brbypass
 public void Start(string remoteHost, int port, string password)
 {
     if (!this.IsStarted)
     {
         this._Listener = new TcpListener(IPAddress.Any, this.Port);
         this._Listener.Start();
         this._Listener.BeginAcceptSocket(this.OnBeginAcceptSocket, this._Listener);
         this._TunnelConfig = new TunnelConfig(remoteHost, port, password);
         this.IsStarted     = true;
         LogController.Debug(string.Format("Socks server started at {0}", ":" + this.Port.ToString()));
         //start succeed
         MainWindow.mainWindow.updateUI_startSucceed();
     }
     else
     {
         LogController.Warn("A socks server is running, can not start a new one.");
         //start failed
         MainWindow.mainWindow.updateUI_startFailed();
     }
 }
コード例 #29
0
ファイル: GarlicTest.cs プロジェクト: itfenom/i2p-cs
 public CaptureOutTunnel(ITunnelOwner owner, TunnelConfig config) : base(owner, config, 3)
 {
 }
コード例 #30
0
		public void TestChainForward()
		{
			using (TcpTestServer testserver = new TcpTestServer())
			{
				string loopback = IPAddress.Loopback.ToString();
				TunnelConfig config = new TunnelConfig();
				AddClient(config);
				AddServer(config, new IPEndPoint(IPAddress.Loopback, testserver.Port));

				using (config.Start())
				{
					//Send to the clientPort, forwards to serverPort, forwards to testserver.Port
					TcpTestServer.Test(loopback, _clientPort, 10, 50, 500, 5000, 50000, 500000);
				}
			}
		}
コード例 #31
0
		protected abstract void AddServer(TunnelConfig config, IPEndPoint endpoint);
コード例 #32
0
		protected abstract void AddClient(TunnelConfig config);
コード例 #33
0
		public void TestConcurrentChainForward()
		{
			using (TcpTestServer testserver = new TcpTestServer())
			{
				string loopback = IPAddress.Loopback.ToString();
				TunnelConfig config = new TunnelConfig();
				AddClient(config);
				AddServer(config, new IPEndPoint(IPAddress.Loopback, testserver.Port));

				using (config.Start())
				{
					int nCompleted = 0;
					ManualResetEvent mreGO = new ManualResetEvent(false);
					ThreadStart tstart = new ThreadStart(
						delegate() 
						{
							mreGO.WaitOne();
							TcpTestServer.Test(loopback, _clientPort, 10, 50, 500, 5000, 50000, 500000); 
							Interlocked.Increment(ref nCompleted); 
						}
					);

					Thread[] threads = new Thread[5];
					for (int i = 0; i < threads.Length; i++)
					{
						threads[i] = new Thread(tstart);
						threads[i].Name = String.Format("TcpTestClient({0})", i);
						threads[i].Start();
					}

					Thread.Sleep(100);
					mreGO.Set();

					foreach (Thread t in threads)
						t.Join();

					Assert.AreEqual(threads.Length, nCompleted);
				}
			}
		}
コード例 #34
0
 public SocksConnection(SocksServer server, Socket client, TunnelConfig tunnelConfig)
 {
     this.Server       = server;
     this.Client       = client;
     this.TunnelConfig = tunnelConfig;
 }
コード例 #35
0
ファイル: RunConfig.cs プロジェクト: hivie7510/csharptest-net
		public RunConfig(TunnelConfig config)
		{
			_config = config;
		}
コード例 #36
0
 public TunnelController(UsersProvider usersProvider, TunnelProvider tunnelProvider, IOptions <TunnelConfig> config)
 {
     _usersProvider  = usersProvider;
     _tunnelProvider = tunnelProvider;
     _tunnelConfig   = config.Value;
 }
コード例 #37
0
 protected abstract void AddServer(TunnelConfig config, IPEndPoint endpoint);
コード例 #38
0
 protected abstract void AddClient(TunnelConfig config);