예제 #1
0
 public TCPRelay(FuckshadowsController controller, Configuration conf)
 {
     _controller    = controller;
     _config        = conf;
     Handlers       = new HashSet <TCPHandler>();
     _lastSweepTime = DateTime.Now;
 }
예제 #2
0
        public TCPHandler(FuckshadowsController controller, Configuration config, TCPRelay tcprelay, Socket socket)
        {
            _controller  = controller;
            _config      = config;
            _tcprelay    = tcprelay;
            _localSocket = socket;
            _argsPool    = tcprelay._argsPool;

            lastActivity = DateTime.Now;
        }
예제 #3
0
        public TCPHandler(FuckshadowsController controller, Configuration config, TCPRelay tcprelay, Socket socket)
        {
            _controller    = controller;
            _config        = config;
            _tcprelay      = tcprelay;
            _connection    = socket;
            _serverTimeout = 30 * 1000;

            lastActivity = DateTime.Now;
        }
예제 #4
0
        public TCPHandler(FuckshadowsController controller, Configuration config, TCPRelay tcprelay, Socket socket)
        {
            _controller    = controller;
            _config        = config;
            _tcprelay      = tcprelay;
            _connection    = socket;
            _proxyTimeout  = config.proxy.proxyTimeout * 1000;
            _serverTimeout = config.GetCurrentServer().timeout * 1000;

            lastActivity = DateTime.Now;
        }
예제 #5
0
 internal void UpdateConfiguration(FuckshadowsController controller)
 {
     _controller = controller;
     Reset();
     try
     {
         if (Config.StatisticsEnabled)
         {
             StartTimerWithoutState(ref _recorder, Run, RecordingInterval);
             LoadRawStatistics();
             StartTimerWithoutState(ref _speedMonior, UpdateSpeed, _monitorInterval);
         }
         else
         {
             _recorder?.Dispose();
             _speedMonior?.Dispose();
         }
     }
     catch (Exception e)
     {
         Logging.LogUsefulException(e);
     }
 }
예제 #6
0
 public UDPRelay(FuckshadowsController controller)
 {
     this._controller = controller;
     InitArgsPool();
 }
예제 #7
0
 public UDPRelay(FuckshadowsController controller)
 {
     this._controller = controller;
 }