Files
openwrt-packages/luci-app-clash/root/usr/share/clash/create/script.yaml
2022-04-11 16:22:56 +08:00

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