Skip to content
This repository was archived by the owner on Jul 28, 2020. It is now read-only.
This repository was archived by the owner on Jul 28, 2020. It is now read-only.

Supports Apache 2.2 proxy #101

Description

@kenjiuno

If I use Apache 2.2 proxy, System.Exception: protocol error: more data has been received occurs.

using SuperSocket.ClientEngine.Proxy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp20
{
    class Program
    {
        static void Main(string[] args)
        {
            var proxy = new HttpConnectProxy(
                new IPEndPoint(IPAddress.Parse("PROXYSERVER"), 55555),
                10000,
                null
                );
            proxy.Completed += Proxy_Completed;
            proxy.Connect(
                new System.Net.DnsEndPoint("ws-mt1.pusher.com", 443)
            );
            Console.ReadLine();
        }

        private static void Proxy_Completed(object sender, SuperSocket.ClientEngine.ProxyEventArgs e)
        {
            Console.WriteLine(e.Connected + " " + e.Exception);
        }
    }
}

Output:

False System.Exception: protocol error: more data has been received

Output with fix-92 (#100) merged.

False System.Exception: protocol error: invalid protocol

I have observed TCP packets communication between ConsoleApp20 and Apache 2.2, where are captured with Wireshark.

Send to proxy:

CONNECT ws-mt1.pusher.com:443 HTTP/1.1
Host: ws-mt1.pusher.com:443
Proxy-Connection: Keep-Alive

Received from proxy:

HTTP/1.0 200 Connection Established
Proxy-agent: Apache/2.2.29 (Win32)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions