From 695fb64fa85bb1fc3bc2ffe703b072884f360536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 9 Jun 2022 16:23:06 +0800 Subject: [PATCH] fix: vmess ws --- adapter/outbound/vmess.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/adapter/outbound/vmess.go b/adapter/outbound/vmess.go index 939855e4..0d65b31e 100644 --- a/adapter/outbound/vmess.go +++ b/adapter/outbound/vmess.go @@ -87,14 +87,13 @@ func (v *Vmess) StreamConn(c net.Conn, metadata *C.Metadata) (net.Conn, error) { Path: v.option.WSOpts.Path, MaxEarlyData: v.option.WSOpts.MaxEarlyData, EarlyDataHeaderName: v.option.WSOpts.EarlyDataHeaderName, + Headers: make(http.Header), } if len(v.option.WSOpts.Headers) != 0 { - header := http.Header{} for key, value := range v.option.WSOpts.Headers { - header.Add(key, value) + wsOpts.Headers.Add(key, value) } - wsOpts.Headers = header } if v.option.TLS {