public StandardRemoteSocks5Handler(RemoteServerConfig remoteServerConfig, DnsCache dnsCache, ILogger logger = null)
        {
            _remoteServerConfig = Throw.IfNull(() => remoteServerConfig);
            _dnsCache           = Throw.IfNull(() => dnsCache);
            _logger             = logger;

            _pipes = new List <DuplexPipe>();
        }
Ejemplo n.º 2
0
        public RemoteServer(RemoteServerConfig remoteServerConfig, ILogger logger = null)
        {
            _remoteServerConfig = Throw.IfNull(() => remoteServerConfig);
            _logger             = logger;

            ServerConfig serverConfig = new ServerConfig()
            {
                BindPoint    = _remoteServerConfig.GetIPEndPoint(),
                MaxNumClient = Defaults.MaxNumClient
            };

            _tcpServer = new TcpServer(serverConfig, _logger);
            _udpServer = new UdpServer(serverConfig, _logger);

            _dnsCache = new DnsCache(_logger);
        }
Ejemplo n.º 3
0
 //server 拉闸,结束accept和所有Tunnel双向数据流
 public RemoteServer(RemoteServerConfig remoteServerConfig, ILogger <RemoteServer> logger = null)
 {
     this._remoteServerConfig = Throw.IfNull(() => remoteServerConfig);
     this._logger             = logger;
 }