UncleWang +

Clash proxy provider 即Clash订阅list使用教程

Clash proxy provider 即Clash订阅list使用教程

Clash proxy provider is available in Clash Dev Branch from v0.17.0-29cf3ca.

Users can individually place some proxies into a specific file. By repeatedly referencing this file, users can quickly populate these same proxies in different policy groups, greatly increasing the flexibility and controllability of the policy groups.

Thanks to this feature, once the proxies names changed, users don’t have to use “Search and Replace” function to modify in config.yamlone by one. Users just need to change names in (a) specific file(s), and policy group referenced will be auto updated.

Note: proxy-provider is a part of config.yaml

Provider now offer theses following options:

proxy-provider:
	name: #name of the provider
		type: #type of the provider, it can be a HTTP or a File
		path: #where is the file, ./ relative to clash home
		url: #only available when type is HTTP, where to download a file. You don't need to create a new file in local space.
		interval: #auto-update interval,only available when type is HTTP
		health-check: #health check opinion start at here
			enable:
			url: 
			interval: 

Learn more about Health Check

Here is an example:

proxy-provider:
	hk:
		type: http
		path: ./hk.yaml
		url: <http://remote.lancelinked.icu/files/hk.yaml>
		interval: 3600
		health-check:
			enable: true
			url: <http://www.gstatic.com/generate_204>
			interval: 300
	us:
		type: file
		path: /home/lance/.clash/provider/us.yaml
		health-check:
			enable: true
			url: <http://www.gstatic.com/generate_204>
			interval: 300

Here is an example of hk.yaml

proxies:
- name: "ss1"
  type: ss
  server: server
  port: 443
  cipher: chacha20-ietf-poly1305
  password: "password"
  # udp: true

# old obfs configuration format remove after prerelease
- name: "ss2"
  type: ss
  server: server
  port: 443
  cipher: chacha20-ietf-poly1305
  password: "password"
  plugin: obfs
  plugin-opts:
    mode: tls # or http
    # host: bing.com

- name: "ss3"
  type: ss
  server: server
  port: 443
  cipher: chacha20-ietf-poly1305
  password: "password"
  plugin: v2ray-plugin
  plugin-opts:
    mode: websocket # no QUIC now
    # tls: true # wss
    # skip-cert-verify: true
    # host: bing.com
    # path: "/"
    # mux: true
    # headers:
    #   custom: value

If you want to use Provider, you should place Provider name in use instead of proxies. Certainly, you can combine use Provider and Proxies in Proxy Group, but provider can’t check health any more in this group. Here is a part example of config.yaml .

Proxy Group: 
  - name: Proxy
    type: select
    use:
      - hk
      - us

  - name: Domestic
    type: select
    use:
      - hk
      - us
    proxies:
      - DIRECT

  - name: Others
    type: select
    proxies:
      - Proxy
      - DIRECT
      - Domestic

  - name: AdBlock
    type: select
    proxies:
      - REJECT
      - DIRECT
      - Proxy

  - name: Apple
    type: select
    proxies:
      - DIRECT
      - Proxy

  - name: AsianTV
    type: select
    use:
      - hk
    proxies:
      - DIRECT
      - Proxy
      
  - name: GlobalTV
    type: select
    use:
      - hk
      - us
    proxies:
      - Proxy
      - DIRECT

proxy-provider:
	hk:
		type: http
		path: ./hk.yaml
		url: <http://remote.lancelinked.icu/files/hk.yaml>
		interval: 3600
		health-check:
			enable: true
			url: <http://www.gstatic.com/generate_204>
			interval: 300
	us:
		type: file
		path: /home/lance/.clash/provider/us.yaml
		health-check:
			enable: true
			url: <http://www.gstatic.com/generate_204>
			interval: 300

以dlercloud为例

proxy-provider:
  HK-IPLC1:
    type: http
    path: ./HK-IPLC1
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&lv=5&area=hk&isp=iplc
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300
  HK-IPLC2:
    type: http
    path: ./HK-IPLC2
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&lv=4&area=hk
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300
  HK-BGP1:
    type: http
    path: ./HK-BGP1
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&lv=3&area=hk
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300
  HK-BGP2:
    type: http
    path: ./HK-BGP2
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&lv=2&area=hk
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300
  JP-Relay:
    type: http
    path: ./JP-Relay
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&type=relay&area=jp
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300
  TW-Relay:
    type: http
    path: ./TW-Relay
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&type=relay&area=tw
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300
  SG-Relay:
    type: http
    path: ./SG-Relay
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&type=relay&area=sg
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300
  All-Relay:
    type: http
    path: ./All-Relay
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&type=relay&noarea=hk+jp+tw+sg
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300
  All-PRO:
    type: http
    path: ./All-PRO
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&lv=5&isp=pro
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300      
  CN-Back:
    type: http
    path: ./CN-Back
    url: https://dler.cloud/subscribe/token?protocols=ss&list=clash&isp=back
    interval: 3600
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300      
Proxy Group:
- name: Proxy
  type: select
  proxies:
  - HK-IPLC1
  - HK-IPLC2
  - HK-BGP1
  - HK-BGP2
  - JP-Relay
  - TW-Relay
  - SG-Relay
  - All-Relay
  - All-PRO
  - CN-Back
  - DIRECT
- name: Domestic
  type: select
  proxies:
  - DIRECT
  - CN-Back
  - Proxy
- name: Others
  type: select
  proxies:
  - Proxy
  - DIRECT
  - Domestic
- name: AdBlock
  type: select
  proxies:
  - REJECT
  - DIRECT
  - Proxy
- name: Apple
  type: select
  proxies:
  - DIRECT
  - Proxy
- name: AsianTV
  type: select
  proxies:
  - DIRECT
  - Domestic
  - Proxy
- name: GlobalTV
  type: select
  proxies:
  - Proxy
  - HK-IPLC1
  - HK-IPLC2
  - HK-BGP1
  - HK-BGP2
  - JP-Relay
  - TW-Relay
  - SG-Relay
  - All-Relay
  - All-PRO
  - CN-Back
  - DIRECT
- name: Telegram
  type: select
  proxies:
  - Proxy
  - DIRECT
- name: Steam
  type: select
  proxies:
  - Proxy
  - DIRECT
- name: Speedtest
  type: select
  proxies:
  - Proxy
  - DIRECT
  - Domestic
- name: Microsoft
  type: select
  proxies:
  - DIRECT
  - Proxy
- name: Netease Music
  type: select
  proxies:
  - DIRECT
  - Domestic
- name: HK-IPLC1
  type: url-test
  use:
  - HK-IPLC1
  url: http://www.gstatic.com/generate_204
  interval: "600"
- name: HK-IPLC2
  type: url-test
  use:
  - HK-IPLC2
  url: http://www.gstatic.com/generate_204
  interval: "600"  
- name: HK-BGP1
  type: fallback
  use:
  - HK-BGP1
  url: http://www.gstatic.com/generate_204
  interval: "600" 
- name: HK-BGP2
  type: url-test
  use:
  - HK-BGP2
  url: http://www.gstatic.com/generate_204
  interval: "600"     
- name: JP-Relay
  type: select
  use:
  - JP-Relay
- name: TW-Relay
  type: select
  use:
  - TW-Relay
- name: SG-Relay
  type: select
  use:
  - SG-Relay
- name: All-Relay
  type: select
  use:
  - All-Relay
- name: All-PRO
  type: select
  use:
  - All-PRO
- name: CN-Back
  type: select
  use:
  - CN-Back

Blog

Dump

Project