From e4ba5ba53a27ee256364e7031df3d43afb3b3fe6 Mon Sep 17 00:00:00 2001 From: Sanaei Date: Mon, 4 Aug 2025 16:27:57 +0200 Subject: add ech support (#3310) Co-authored-by: Alireza Ahmadi --- web/assets/js/model/outbound.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'web/assets/js/model/outbound.js') diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 03569b00..a42c400d 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -354,13 +354,15 @@ class TlsStreamSettings extends CommonClass { serverName = '', alpn = [], fingerprint = '', - allowInsecure = false + allowInsecure = false, + echConfigList = '', ) { super(); this.serverName = serverName; this.alpn = alpn; this.fingerprint = fingerprint; this.allowInsecure = allowInsecure; + this.echConfigList = echConfigList; } static fromJson(json = {}) { @@ -369,6 +371,7 @@ class TlsStreamSettings extends CommonClass { json.alpn, json.fingerprint, json.allowInsecure, + json.echConfigList, ); } @@ -378,6 +381,7 @@ class TlsStreamSettings extends CommonClass { alpn: this.alpn, fingerprint: this.fingerprint, allowInsecure: this.allowInsecure, + echConfigList: this.echConfigList }; } } @@ -782,7 +786,8 @@ class Outbound extends CommonClass { let alpn = url.searchParams.get('alpn'); let allowInsecure = url.searchParams.get('allowInsecure'); let sni = url.searchParams.get('sni') ?? ''; - stream.tls = new TlsStreamSettings(sni, alpn ? alpn.split(',') : [], fp, allowInsecure == 1); + let ech = url.searchParams.get('ech') ?? ''; + stream.tls = new TlsStreamSettings(sni, alpn ? alpn.split(',') : [], fp, allowInsecure == 1, ech); } if (security == 'reality') { -- cgit v1.2.3