From 975b53db41c9185d580c5c787f2d7968af83d0f6 Mon Sep 17 00:00:00 2001 From: Peng-YM <1048217874@qq.com> Date: Tue, 24 May 2022 12:25:14 +0800 Subject: [PATCH] Add vmess ws obfs host script --- scripts/vmess-ws-obfs-host.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 scripts/vmess-ws-obfs-host.js diff --git a/scripts/vmess-ws-obfs-host.js b/scripts/vmess-ws-obfs-host.js new file mode 100644 index 0000000..c048dc2 --- /dev/null +++ b/scripts/vmess-ws-obfs-host.js @@ -0,0 +1,9 @@ +function operator(proxies) { + const host = $arguments.host; + proxies.forEach(p => { + if (p.type === 'vmess') { + p["ws-opts"]["headers"]["Host"] = host; + } + }); + return proxies; +} \ No newline at end of file