Skip to content

WebSocket support #32

@hangim

Description

@hangim

1. What version of Caddy are you using (caddy -version)?

Caddy 0.11.0

2. What are you trying to do?

Make a http2 proxy use caddy, I hope it can support WebSocket.

I use Chrome + SwitchyOmega for client.

PAC file:

function FindProxyForURL(url, host) {
  return "HTTPS example.com:443";
}

3. What is your entire Caddyfile?

example.com:443 {
    tls /***/cert.pem /***/privkey.pem
    forwardproxy {
        basicauth user pass
        hide_ip
        hide_via
        response_timeout 10
        dial_timeout 10
    }
}

4. How did you run Caddy (give the full command and describe the execution environment)?

caddy --conf Caddyfile

5. Please paste any relevant HTTP request(s) here.

Please open this js code example:

http://jsbin.com/muqamiqimu/2/edit?js,console

Click run, modify the first line from wss://echo.websocket.org to ws://echo.websocket.org, and run again.

6. What did you expect to see?

Both protocols should be supported (ws and wss).

7. What did you see instead (give full error messages and/or log)?

Only wss supported, ws cant work, which works normally without proxy.

8. How can someone who is starting from scratch reproduce the bug as minimally as possible?

  • Install caddy with forwardproxy.
  • Copy Caddyfile.
  • Run caddy as a http2 proxy server.
  • Configure Chrome to use the http2 proxy.
  • Open the URL I support in above and test.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions