예제 #1
0
		private TcpServer MakeListener(string ip, int port, TunnelListenerBase config)
		{
			TcpServer server = null;
			if (String.IsNullOrEmpty(config.ServerCertificate))
				server = new TcpServer(ip, port);
			else
			{
				X509Certificate cert = new X509Certificate(config.ServerCertificate, config.ServerCertPassword);
				server = new SslServer(ip, port, cert, config.AllowedClients);
			}
			return server;
		}
예제 #2
0
        /// <summary>
        /// Forwards this server to the supplied target
        /// </summary>
		public TcpRedirector(TcpServer server, TcpClient target)
			: base(server)
		{
			_target = target;
		}
 /// <summary>
 /// Adds another server to forward connections for
 /// </summary>
 protected void AddServer(TcpServer server)
 {
     _servers.Add(server);
     server.Connected += server_Connected;
 }
 /// <summary>
 /// Constructs the instance with a server
 /// </summary>
 public TcpForwardingBase(TcpServer server)
     : this()
 {
     AddServer(server);
 }
예제 #5
0
 public TcpDemultiplexer(TcpServer server)
     : base(server)
 {
     _targets = new Dictionary <int, TcpClient>();
 }
 /// <summary>
 /// Forwards this server to the supplied target
 /// </summary>
 public TcpRedirector(TcpServer server, TcpClient target)
     : base(server)
 {
     _target = target;
 }
예제 #7
0
        /// <summary>
        /// Adds another server to forward connections for
        /// </summary>
		protected void AddServer(TcpServer server)
		{
			_servers.Add(server);
			server.Connected += server_Connected;
		}
예제 #8
0
		public TcpDemultiplexer(TcpServer server)
			: base(server)
		{
			_targets = new Dictionary<int, TcpClient>();
		}
예제 #9
0
        /// <summary>
        /// Constructs the instance with a server
        /// </summary>
		public TcpForwardingBase(TcpServer server)
			: this()
		{
			AddServer(server);
		}
예제 #10
0
            internal ConnectedEventArgs(TcpServer server, System.Net.Sockets.TcpClient client, Stream stream)
			{
				_server = server;
				_client = client;
				_stream = stream;
			}
예제 #11
0
 public void Add(TcpServer server)
 {
     base.AddServer(server);
 }
예제 #12
0
 internal ConnectedEventArgs(TcpServer server, System.Net.Sockets.TcpClient client, Stream stream)
 {
     _server = server;
     _client = client;
     _stream = stream;
 }
예제 #13
0
		public void Add(TcpServer server) { base.AddServer(server); }