Updated scripts

This commit is contained in:
Peng-YM
2022-05-25 10:33:54 +08:00
parent b56f17606e
commit c389aa19a2
5 changed files with 15 additions and 90 deletions

View File

@@ -1,7 +1,14 @@
/**
* 为 VMess WebSocket 节点修改混淆 host
* 示例
* #host=google.com
*/
function operator(proxies) {
const host = $arguments.host;
const host = 'baidu.com';
proxies.forEach(p => {
if (p.type === 'vmess') {
if (p.type === 'vmess' && p.network === 'ws') {
p["ws-opts"] = p["ws-opts"] || {};
p["ws-opts"]["headers"] = p["ws-opts"]["headers"] || {};
p["ws-opts"]["headers"]["Host"] = host;
}
});