Caches active connections and limits the number of simultaneous connections to each server
Exemple #1
0
        public WebUI(Proxy proxy, ConnectionManager connectionManager)
        {
            this.proxy = proxy;
            this.connectionManager = connectionManager;

            if (webUI != null)
                throw new InvalidOperationException ("There can only be one WebUI");
            webUI = this;
        }
Exemple #2
0
        /// <summary>
        /// Start a new session thread for the incoming client.
        /// </summary>
        public ProxySession(Socket socket, Proxy proxy, ConnectionManager connectionManager)
        {
            this.ClientSocket = socket;
            this.ClientStream = new NetworkStream (socket, true);
            this.proxy = proxy;
            this.connectionManager = connectionManager;
            thread = new Thread (Run);

            name = "[Session " + (socket.RemoteEndPoint as IPEndPoint).Port + "]";
            thread.Name = name;
        }
Exemple #3
0
        public Proxy(IPAddress address, int port)
        {
            this.address = address;
            this.port = port;
            this.Browser = new BrowserProxy (this);
            this.connectionManager = new ConnectionManager ();
            this.WebUI = new Filters.WebUI (this, this.connectionManager);

            //Read Settings
            if (File.Exists (SettingsPath)) {
                using (Stream s = new FileStream (SettingsPath, FileMode.Open)) {
                    this.Settings = Serializer.Deserialize<Settings> (s);
                }
            } else
                this.Settings = new Settings ();
        }
Exemple #4
0
 public CachedServer(IPEndPoint endpoint, ConnectionManager manager)
 {
     this.endpoint = endpoint;
     this.manager = manager;
 }