diff --git a/Trojan-gRPC-Caddy2/Nginx/Caddyfile b/Trojan-gRPC-Caddy2/Nginx/Caddyfile index 8ce8b94..5707e74 100644 --- a/Trojan-gRPC-Caddy2/Nginx/Caddyfile +++ b/Trojan-gRPC-Caddy2/Nginx/Caddyfile @@ -1,9 +1,13 @@ example.com { - @grpc { - protocol grpc - path # 填写 /你的 ServiceName/* - } - reverse_proxy @grpc unix//dev/shm/Xray-Trojan-gRPC.socket - root * /var/www - file_server + @grpc { + protocol grpc + path # 填写 /你的 ServiceName/* + } + reverse_proxy @grpc unix//dev/shm/Xray-Trojan-gRPC.socket { + transport http { + versions h2c + } + } + root * /var/www + file_server } diff --git a/VLESS-GRPC/Caddyfile b/VLESS-GRPC/Caddyfile index 9d3fea3..e2c96b1 100644 --- a/VLESS-GRPC/Caddyfile +++ b/VLESS-GRPC/Caddyfile @@ -1,9 +1,13 @@ xx.com { - @grpc { - protocol grpc - path # 填写 /你的 ServiceName/* - } - reverse_proxy @grpc unix//dev/shm/Xray-VLESS-gRPC.socket - root * /var/www - file_server + @grpc { + protocol grpc + path # 填写 /你的 ServiceName/* + } + reverse_proxy @grpc unix//dev/shm/Xray-Trojan-gRPC.socket { + transport http { + versions h2c + } + } + root * /var/www + file_server }