Open face 502 Bad Gateway when using V2ray WS+TLS+caddy

1. My Caddy version (caddy -version):


2. How I run Caddy:

Please provide all of the relevant information and DO NOT REDACT anything except passwords/keys. Thank you!

Using V2ray ws+tls+caddy mode

a. System environment:

OS, relevant versions, systemd? docker? etc.

Debian 10

d. My complete Caddyfile:
proxy /win localhost:26808 {
header_upstream -Origin

### 3. The problem I'm having:

*Please describe the issue thoroughly enough so that anyone can reproduce the exact behavior you're seeing. Be as specific as possible.*

Using kcp way to open is fine. But when I use ws+tls+caddy mode to open got 502 bad gateway feedback. Other websites open normally.

This is the error information in Chrome developermode
Request URL:
Request Method: GET
Status Code: 502 Bad Gateway
Remote Address:
Referrer Policy: no-referrer-when-downgrade
Connection: keep-alive
Content-Length: 568
Content-Type: text/html
Date: Sat, 19 Oct 2019 00:49:00 GMT
Server: Apple
Provisional headers are shown
Sec-Fetch-Mode: no-cors
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36

Hi @Clyde_Wang, welcome to the Caddy community.

I’m not too well versed with v2ray, I’m afraid, but I can see that your Caddyfile is configured to serve, but your issue is with

Looking at the Server header in your Chrome error information, it looks like that request is served by Apple’s servers.

If this is a v2ray issue, you may need to find support from them.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.