Esempio n. 1
0
        /// <summary>
        ///     Create server bound to given local endpoint
        /// </summary>
        /// <param name="proxyEndPoint">local endpoint to bind</param>
        /// <param name="httpProxy">proxy which will handle incoming requests</param>
        public HttpProxyServer(IPEndPoint proxyEndPoint, HttpProxy httpProxy)
        {
            Contract.Requires<ArgumentNullException>(proxyEndPoint != null, "proxyEndPoint");
            Contract.Requires<ArgumentNullException>(httpProxy != null, "httpProxy");

            _worker = new HttpProxyWorker(proxyEndPoint, httpProxy);
        }
Esempio n. 2
0
 /// <summary>
 ///     Create server bound to given local endpoint
 /// </summary>
 /// <param name="proxyEndPoint">local endpoint to bind</param>
 /// <param name="httpProxy">proxy which will handle incoming requests</param>
 public HttpProxyServer(DnsEndPoint proxyEndPoint, HttpProxy httpProxy)
     : this(ToIPEndPoint(proxyEndPoint), httpProxy)
 {
 }
Esempio n. 3
0
 /// <summary>
 ///     Create server bound to given hostname and random port
 /// </summary>
 /// <param name="hostname">hostname to bind</param>
 /// <param name="httpProxy">proxy which will handle incoming requests</param>
 public HttpProxyServer(String hostname, HttpProxy httpProxy)
     : this(hostname, 0, httpProxy)
 {
 }
Esempio n. 4
0
 /// <summary>
 ///     Create server bound to given hostname and port
 /// </summary>
 /// <param name="hostname">hostname to bind</param>
 /// <param name="port">port to bind</param>
 /// <param name="httpProxy">proxy which will handle incoming requests</param>
 public HttpProxyServer(String hostname, Int32 port, HttpProxy httpProxy)
     : this(new DnsEndPoint(hostname, port, AddressFamily.InterNetwork), httpProxy)
 {
 }
Esempio n. 5
0
 public HttpProxyWorker(IPEndPoint proxyEndPoint, HttpProxy httpProxy)
     : this(new TcpListener(proxyEndPoint), httpProxy)
 {
 }
Esempio n. 6
0
 private HttpProxyWorker(TcpListener listener, HttpProxy httpProxy)
 {
     _openSockets = new HashSet<Socket>();
     _httpProxy = httpProxy;
     _listener = listener;
 }
Esempio n. 7
0
 /// <summary>
 ///     Create server bound to given local endpoint
 /// </summary>
 /// <param name="proxyEndPoint">local endpoint to bind</param>
 /// <param name="httpProxy">proxy which will handle incoming requests</param>
 public HttpProxyServer(DnsEndPoint proxyEndPoint, HttpProxy httpProxy) : this(ToIPEndPoint(proxyEndPoint), httpProxy)
 {
 }
Esempio n. 8
0
 /// <summary>
 ///     Create server bound to given hostname and port
 /// </summary>
 /// <param name="hostname">hostname to bind</param>
 /// <param name="port">port to bind</param>
 /// <param name="httpProxy">proxy which will handle incoming requests</param>
 public HttpProxyServer(string hostname, int port, HttpProxy httpProxy)
     : this(new DnsEndPoint(hostname, port, AddressFamily.InterNetwork), httpProxy)
 {
 }
Esempio n. 9
0
 /// <summary>
 ///     Create server bound to given hostname and random port
 /// </summary>
 /// <param name="hostname">hostname to bind</param>
 /// <param name="httpProxy">proxy which will handle incoming requests</param>
 public HttpProxyServer(string hostname, HttpProxy httpProxy) : this(hostname, 0, httpProxy)
 {
 }
Esempio n. 10
0
 public HttpProxyWorker(IPEndPoint proxyEndPoint, HttpProxy httpProxy)
     : this(new TcpListener(proxyEndPoint), httpProxy)
 {
 }
Esempio n. 11
0
 private HttpProxyWorker(TcpListener listener, HttpProxy httpProxy)
 {
     _openSockets = new HashSet <Socket>();
     _httpProxy   = httpProxy;
     _listener    = listener;
 }