Skip to content

Commit

Permalink
chore: fix clash yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Aug 31, 2024
1 parent e48d659 commit f89dfe9
Showing 1 changed file with 19 additions and 36 deletions.
55 changes: 19 additions & 36 deletions templates/clash/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,34 @@ proxy-groups:
type: select
proxies:
- auto
{% for loc in node_location_set %}- {{ loc }}
{% endfor %}
use:
- {{ provider_name }}-all

{% for loc in node_location_set %}
- name: {{ loc }}
type: select
- name: HK-LB
type: load-balance
strategy: consistent-hashing
filter: "香港|hk|HK"
use:
- {{ provider_name }}-{{ loc }}
{% endfor %}
- {{ provider_name }}-all

- name: PROXY-NATIVE-IP
type: select
- name: JP-LB
type: load-balance
strategy: consistent-hashing
filter: "日本|jp|JP"
use:
- {{ provider_name }}-native-ip
- {{ provider_name }}-all

- name: auto
type: url-test
- name: US-LB
type: load-balance
strategy: consistent-hashing
filter: "美国|us|US"
use:
- {{ provider_name }}-all
url: "http://www.gstatic.com/generate_204"
interval: 300
tolerance: 150
lazy: true

- name: PROXY-NATIVE-IP
type: select
use:
- {{ provider_name }}-native-ip

- name: Final
type: select
Expand All @@ -60,25 +63,6 @@ proxy-providers:
url: {{ native_ip_proxy_provider_url|safe }}
interval: 3600
path: ./providers/{{ provider_name }}-native-ip.yaml
health-check:
enable: true
interval: 300
tolerance: 150
lazy: true
url: http://www.gstatic.com/generate_204
{% for loc in node_location_set %}
{{ provider_name }}-{{ loc }}:
type: http
url: {{ all_proxy_provider_url|safe }}&location={{ loc }}
interval: 3600
path: ./providers/{{ provider_name }}-{{ loc }}.yaml
health-check:
enable: true
interval: 300
tolerance: 150
lazy: true
url: http://www.gstatic.com/generate_204
{% endfor %}

rule-providers:
reject:
Expand Down Expand Up @@ -209,4 +193,3 @@ rules:
- GEOIP,LAN,DIRECT
- GEOIP,CN,DIRECT
- MATCH,Final

0 comments on commit f89dfe9

Please sign in to comment.