1. Caddy version (caddy version
):
v2.1
2. How I run Caddy:
caddy run
a. System environment:
Windows Server 2016
b. Command:
caddy run
c. Service/unit/compose file:
d. My complete Caddyfile or JSON config:
:43001 {
reverse_proxy {
to 10.0.0.102:4000
header_up Host {http.reverse_proxy.upstream.host}
header_up X-Real-IP {http.request.remote_host}
header_up X-Forwarded-For {http.request.remote_host}
header_up X-Forwarded-Port {http.request.port}
header_up X-Forwarded-Proto {http.request.scheme}
}
@websockets {
header Connection * Upgrade *
header Upgrade websocket
}
}
3. The problem I’m having:
I want to send Websocket requests (wss) coming in on port 43001 to other socket servers. Im not getting a proper socket handshake on the socket server side.
4. Error messages and/or full log output:
2020/07/07 17:54:46.419 ←[31mERROR←[0m http.handlers.reverse_
with incomplete response {“error”: “context canceled”}
Socket Server is getting the connection but fails handshake, therefore closes connection.
5. What I already tried:
Tried so many examples and read docs, I cant figure this out.
Doesnt seems like Im needing it to do much, just a simple load balancer…
Current CaddyFile is:
:43001 {
log {
level DEBUG
output file caddy_test.log {
roll_size 10MiB
roll_keep 10
roll_keep_for 336h
}
}
handle_path /* {
reverse_proxy 10.0.0.102:4000
}
}
Client is disconnecting because of failed handshake… I dont know what Im doing wrong…
}