mirror of
				https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
				synced 2025-10-31 09:51:09 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			437 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			437 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /**
 | |
|  * 为 VMess WebSocket 节点修改混淆 host
 | |
|  * 示例
 | |
|  * #host=google.com
 | |
|  */
 | |
| function operator(proxies) {
 | |
|     const { host } = $arguments;
 | |
|     proxies.forEach(p => {
 | |
|         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;
 | |
|         }
 | |
|     });
 | |
|     return proxies;
 | |
| } | 
