From 3f7859fcfb87285aeacb884df63c9312f7f787a3 Mon Sep 17 00:00:00 2001 From: mzz2017 <2017@duck.com> Date: Thu, 20 Jul 2023 22:23:01 +0800 Subject: [PATCH] feat(h2): add utls support --- component/outbound/dialer/v2ray/v2ray.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/component/outbound/dialer/v2ray/v2ray.go b/component/outbound/dialer/v2ray/v2ray.go index 9df69b35f..76a6b8077 100644 --- a/component/outbound/dialer/v2ray/v2ray.go +++ b/component/outbound/dialer/v2ray/v2ray.go @@ -156,7 +156,11 @@ func (s *V2Ray) Dialer(option *dialer.GlobalOption, iOption dialer.InstanceOptio Host: net.JoinHostPort(s.Add, s.Port), } if s.SNI != "" { - u.RawQuery = url.Values{"sni": []string{sni}, "allowInsecure": []string{common.BoolToString(s.AllowInsecure)}}.Encode() + u.RawQuery = url.Values{ + "sni": []string{sni}, + "allowInsecure": []string{common.BoolToString(s.AllowInsecure)}, + "utlsImitate": []string{option.UtlsImitate}, + }.Encode() } d, err = http.NewHTTPProxy(&u, direct.SymmetricDirect) if err != nil {