mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Updated scripts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user