mirror of
				https://github.com/kenzok8/openwrt-packages.git
				synced 2025-10-30 07:50:37 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			354 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			354 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| script:
 | |
|   code: |
 | |
|     def main(ctx, metadata):
 | |
|       ip = metadata["dst_ip"] = ctx.resolve_ip(metadata["host"])
 | |
|       if ip == "":
 | |
|         return "DIRECT"
 | |
|         
 | |
|       code = ctx.geoip(ip)
 | |
|       if code == "LAN" or code == "CN":
 | |
|         return "DIRECT"
 | |
|       
 | |
|       return "Proxy" # default policy for requests which are not matched by any other script | 
![github-actions[bot]](/assets/img/avatar_default.png)