コード例 #1
0
        public StandardRemoteSocks5Handler(RemoteServerConfig remoteServerConfig, DnsCache dnsCache, ILogger logger = null)
        {
            _remoteServerConfig = Throw.IfNull(() => remoteServerConfig);
            _dnsCache           = Throw.IfNull(() => dnsCache);
            _logger             = logger;

            _pipes = new List <DuplexPipe>();
        }
コード例 #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);
        }
コード例 #3
0
ファイル: RemoteServer.cs プロジェクト: ms66/Shadowsocks-Net
 //server 拉闸,结束accept和所有Tunnel双向数据流
 public RemoteServer(RemoteServerConfig remoteServerConfig, ILogger <RemoteServer> logger = null)
 {
     this._remoteServerConfig = Throw.IfNull(() => remoteServerConfig);
     this._logger             = logger;
 }