| 
					
				 | 
			
			
				@@ -1,32 +1,24 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #!/usr/bin/utpl -S 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-{% if (acl_http_addr): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 set acl_neteasemusic_http { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	type ipv4_addr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	flags interval; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	auto-merge; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	elements = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{% for (let addr in split(trim(acl_http_addr), '\n')): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{{ addr }}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{% endfor %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{% if (acl_http_addr): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	elements = { {{ join(', ', split(trim(acl_http_addr), '\n')) }} } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{% endif %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-{% endif -%} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-{% if (acl_https_addr): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 set acl_neteasemusic_https { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	type ipv4_addr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	flags interval; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	auto-merge; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	elements = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{% for (let addr in split(trim(acl_https_addr), '\n')): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{{ addr }}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{% endfor %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{% if (acl_https_addr): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	elements = { {{ join(', ', split(trim(acl_https_addr), '\n')) }} } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{% endif %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-{% endif -%} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 {% if (hijack_ways === 'use_ipset'): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 set neteasemusic { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -35,11 +27,7 @@ set neteasemusic { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	auto-merge; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	{% if (neteasemusic_addr): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	elements = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{% for (let addr in split(trim(neteasemusic_addr), '\n')): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{{ addr }}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		{% endfor %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	elements = { {{ join(', ', split(trim(neteasemusic_addr), '\n')) }} } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	{% endif %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -67,12 +55,8 @@ chain netease_cloud_music_redir { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		2001::/32, 2001:10::/28, 2001:20::/28, 2001:db8::/28, 2002::/16, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		fc00::/7, fe80::/10, ff00::/8 } counter return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	{% if (acl_http_addr): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	ip saddr @acl_neteasemusic_http tcp dport 80 counter return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	{% endif %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	{% if (acl_https_addr): %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	ip saddr @acl_neteasemusic_https tcp dport 443 counter return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	{% endif %} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	tcp dport 80 counter redirect to :{{ http_port }}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	tcp dport 443 counter redirect to :{{ https_port }}; 
			 |