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; }
/// <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); }
public TcpDemultiplexer(TcpServer server) : base(server) { _targets = new Dictionary <int, TcpClient>(); }
public TcpDemultiplexer(TcpServer server) : base(server) { _targets = new Dictionary<int, TcpClient>(); }
internal ConnectedEventArgs(TcpServer server, System.Net.Sockets.TcpClient client, Stream stream) { _server = server; _client = client; _stream = stream; }
public void Add(TcpServer server) { base.AddServer(server); }