Skip to content

Instantly share code, notes, and snippets.

@zenwalk
Forked from Kr328/clash-config-template.yaml
Last active September 3, 2023 17:21
Show Gist options
  • Select an option

  • Save zenwalk/8349a27de9ddba115a8b46c17cd0a111 to your computer and use it in GitHub Desktop.

Select an option

Save zenwalk/8349a27de9ddba115a8b46c17cd0a111 to your computer and use it in GitHub Desktop.

Revisions

  1. zenwalk revised this gist Sep 3, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -154,6 +154,7 @@ proxy-provider-common: &proxy-provider-common
    proxy-providers:
    Remote:
    # <<: *proxy-provider-common
    type: http
    path: "./sub.yaml"
    url: "https://gist.github.com/zenwalk/8349a27de9ddba115a8b46c17cd0a111/raw/5873f1d3c501f3043a6c0d6a9dfc6bbf0e15bcfa/sub.yaml"

  2. zenwalk revised this gist Sep 3, 2023. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -151,11 +151,11 @@ proxy-provider-common: &proxy-provider-common
    interval: 180
    enable: true

    # proxy-providers:
    # Remote:
    proxy-providers:
    Remote:
    # <<: *proxy-provider-common
    # path: "./{{hostOf .subscribe_url}}/HK.yaml"
    # url: "{{print .subscribe_url}}"
    path: "./sub.yaml"
    url: "https://gist.github.com/zenwalk/8349a27de9ddba115a8b46c17cd0a111/raw/5873f1d3c501f3043a6c0d6a9dfc6bbf0e15bcfa/sub.yaml"

    domestic-group-common: &domestic-group-common
    type: select
  3. zenwalk revised this gist Sep 3, 2023. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions sub.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    proxies:
    - name: Local
    type: http
    server: 192.168.200.10
    port: 8080
    - name: Hotspot
    type: http
    server: 192.168.43.233
    port: 8080
  4. zenwalk revised this gist Sep 3, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -151,7 +151,7 @@ proxy-provider-common: &proxy-provider-common
    interval: 180
    enable: true

    proxy-providers:
    # proxy-providers:
    # Remote:
    # <<: *proxy-provider-common
    # path: "./{{hostOf .subscribe_url}}/HK.yaml"
  5. zenwalk revised this gist Sep 3, 2023. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -152,10 +152,10 @@ proxy-provider-common: &proxy-provider-common
    enable: true

    proxy-providers:
    Remote:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/HK.yaml"
    url: "{{print .subscribe_url}}"
    # Remote:
    # <<: *proxy-provider-common
    # path: "./{{hostOf .subscribe_url}}/HK.yaml"
    # url: "{{print .subscribe_url}}"

    domestic-group-common: &domestic-group-common
    type: select
  6. @Kr328 Kr328 revised this gist Jul 10, 2023. 1 changed file with 20 additions and 39 deletions.
    59 changes: 20 additions & 39 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -21,10 +21,6 @@ tun:
    auto-route: true
    auto-detect-interface: true

    clash-for-android:
    append-system-dns: true
    ui-subtitle-pattern: "(香港|日本) "

    dns:
    enable: true
    ipv6: true
    @@ -142,9 +138,10 @@ rule-providers:
    path: ./microsoft_cn.yaml

    script:
    engine: expr
    shortcuts:
    QUIC: "network == 'udp' and dst_port == 443"
    BilibiliP2P: "network == 'udp' and match_provider('Bilibili')"
    BilibiliP2P: "network == 'udp' and match_provider(\"Bilibili\")"

    proxy-provider-common: &proxy-provider-common
    type: http
    @@ -155,30 +152,16 @@ proxy-provider-common: &proxy-provider-common
    enable: true

    proxy-providers:
    HKRef:
    Remote:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/HK.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(香港|HK)`}}"
    JPRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/JP.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(日本|JP)`}}"
    TWRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/TW.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(台湾|TW)`}}"
    SGRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/SG.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(新加坡|SG)`}}"
    url: "{{print .subscribe_url}}"

    domestic-group-common: &domestic-group-common
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    - Remote
    filter: ".*HK|TW|JP|SG.*"
    proxies:
    - DOMESTIC
    - PROXY
    @@ -192,10 +175,8 @@ domestic-group-common: &domestic-group-common
    global-group-common: &global-group-common
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    - Remote
    filter: ".*HK|TW|JP|SG.*"
    proxies:
    - PROXY
    - DOMESTIC
    @@ -210,22 +191,26 @@ proxy-groups:
    - name: HK
    type: url-test
    use:
    - HKRef
    - Remote
    filter: ".*HK.*"

    - name: JP
    type: url-test
    use:
    - JPRef
    - Remote
    filter: ".*JP.*"

    - name: TW
    type: url-test
    use:
    - TWRef
    - Remote
    filter: ".*TW.*"

    - name: SG
    type: url-test
    use:
    - SGRef
    - Remote
    filter: ".*SG.*"

    - name: DEBUG
    type: select
    @@ -236,10 +221,8 @@ proxy-groups:
    - name: DOMESTIC
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    - Remote
    filter: ".*HK|TW|JP|SG.*"
    proxies:
    - DIRECT
    - HK
    @@ -251,10 +234,8 @@ proxy-groups:
    - name: PROXY
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    - Remote
    filter: ".*HK|TW|JP|SG.*"
    proxies:
    - HK
    - JP
  7. @Kr328 Kr328 revised this gist Jun 1, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -284,9 +284,9 @@ rules:
    - SCRIPT,QUIC,REJECT,no-resolve
    - SCRIPT,BilibiliP2P,REJECT,no-resolve
    - DOMAIN,mitm.it,DEBUG
    - DOMAIN-SUFFIX,googleapis.cn,PROXY
    - DOMAIN,b23.tv,PROXY
    - DOMAIN-SUFFIX,safelinks.protection.outlook.com,DIRECT
    - DOMAIN-KEYWORD,google,PROXY
    - DOMAIN-KEYWORD,tracker,DIRECT
    - DOMAIN-KEYWORD,torrent,DIRECT
    - PROCESS-NAME,com.tencent.mobileqq,MOBILEQQ
  8. @Kr328 Kr328 revised this gist Apr 13, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -241,11 +241,11 @@ proxy-groups:
    - TWRef
    - SGRef
    proxies:
    - DIRECT
    - HK
    - JP
    - TW
    - SG
    - DIRECT
    - DEBUG

    - name: PROXY
  9. @Kr328 Kr328 revised this gist Apr 11, 2023. 1 changed file with 115 additions and 115 deletions.
    230 changes: 115 additions & 115 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ tun:
    auto-redir: true
    auto-route: true
    auto-detect-interface: true

    clash-for-android:
    append-system-dns: true
    ui-subtitle-pattern: "(香港|日本) "
    @@ -57,14 +57,14 @@ profile:
    store-fake-ip: true

    proxies:
    - name: Local
    type: http
    server: 192.168.200.10
    port: 8080
    - name: Hotspot
    type: http
    server: 192.168.43.233
    port: 8080
    - name: Local
    type: http
    server: 192.168.200.10
    port: 8080
    - name: Hotspot
    type: http
    server: 192.168.43.233
    port: 8080

    rule-provider-common: &rule-provider-common
    type: http
    @@ -75,70 +75,70 @@ rule-providers:
    LocalIPs:
    <<: *rule-provider-common
    behavior: ipcidr
    url: 'https://rules.kr328.app/local-ips.yaml'
    url: "https://rules.kr328.app/local-ips.yaml"
    path: ./local_ips.yaml
    PublicDNS:
    <<: *rule-provider-common
    behavior: ipcidr
    url: 'https://rules.kr328.app/public-dns.yaml'
    url: "https://rules.kr328.app/public-dns.yaml"
    path: ./public_dns.yaml
    PublicDNSDomains:
    <<: *rule-provider-common
    behavior: domain
    url: 'https://rules.kr328.app/public-dns-domain.yaml'
    url: "https://rules.kr328.app/public-dns-domain.yaml"
    path: ./public_dns_domain.yaml
    DomesticDomains:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/cn.yaml'
    url: "https://rules.kr328.app/cn.yaml"
    path: ./cn.yaml
    DomesticIPs:
    <<: *rule-provider-common
    behavior: ipcidr
    url: 'https://rules.kr328.app/cn-ips.yaml'
    url: "https://rules.kr328.app/cn-ips.yaml"
    path: ./cn_ips.yaml
    GlobalScholarDomains:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/category-scholar-!cn.yaml'
    url: "https://rules.kr328.app/category-scholar-!cn.yaml"
    path: ./category_scholar_not_cn.yaml
    GlobalDomains:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/geolocation-!cn.yaml'
    url: "https://rules.kr328.app/geolocation-!cn.yaml"
    path: ./geolocation_not_cn.yaml
    GlobalTldDomains:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/tld-!cn.yaml'
    url: "https://rules.kr328.app/tld-!cn.yaml"
    path: ./tld_not_cn.yaml
    Bilibili:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/bilibili.yaml'
    url: "https://rules.kr328.app/bilibili.yaml"
    path: ./bilibili.yaml
    Blizzard:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/blizzard.yaml'
    url: "https://rules.kr328.app/blizzard.yaml"
    path: ./blizzard.yaml
    Steam:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/steam.yaml'
    url: "https://rules.kr328.app/steam.yaml"
    path: ./steam.yaml
    Microsoft:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/microsoft.yaml'
    url: "https://rules.kr328.app/microsoft.yaml"
    path: ./microsoft.yaml
    MihoyoCN:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/[email protected]'
    url: "https://rules.kr328.app/[email protected]"
    path: ./mihoyo_cn.yaml
    Mihoyo:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/mihoyo.yaml'
    url: "https://rules.kr328.app/mihoyo.yaml"
    path: ./mihoyo.yaml
    SteamCN:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/[email protected]'
    url: "https://rules.kr328.app/[email protected]"
    path: ./steam_cn.yaml
    MicrosoftCN:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/[email protected]'
    url: "https://rules.kr328.app/[email protected]"
    path: ./microsoft_cn.yaml

    script:
    @@ -181,6 +181,7 @@ domestic-group-common: &domestic-group-common
    - SGRef
    proxies:
    - DOMESTIC
    - PROXY
    - HK
    - JP
    - TW
    @@ -197,6 +198,7 @@ global-group-common: &global-group-common
    - SGRef
    proxies:
    - PROXY
    - DOMESTIC
    - HK
    - JP
    - TW
    @@ -205,106 +207,104 @@ global-group-common: &global-group-common
    - DEBUG

    proxy-groups:
    - name: HK
    type: url-test
    use:
    - HKRef
    - name: HK
    type: url-test
    use:
    - HKRef

    - name: JP
    type: url-test
    use:
    - JPRef
    - name: JP
    type: url-test
    use:
    - JPRef

    - name: TW
    type: url-test
    use:
    - TWRef
    - name: TW
    type: url-test
    use:
    - TWRef

    - name: SG
    type: url-test
    use:
    - SGRef
    - name: SG
    type: url-test
    use:
    - SGRef

    - name: DEBUG
    type: select
    proxies:
    - Local
    - Hotspot
    - name: DEBUG
    type: select
    proxies:
    - Local
    - Hotspot

    - name: DOMESTIC
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    proxies:
    - DIRECT
    - HK
    - JP
    - TW
    - SG
    - DEBUG
    - name: DOMESTIC
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    proxies:
    - HK
    - JP
    - TW
    - SG
    - DIRECT
    - DEBUG

    - name: PROXY
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    proxies:
    - HK
    - JP
    - TW
    - SG
    - DIRECT
    - DEBUG
    - name: PROXY
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    proxies:
    - HK
    - JP
    - TW
    - SG
    - DIRECT
    - DEBUG

    - <<: *domestic-group-common
    name: BILIBILI

    - <<: *global-group-common
    name: STEAM
    - <<: *domestic-group-common
    name: BILIBILI

    - <<: *global-group-common
    name: MICROSOFT
    - <<: *global-group-common
    name: STEAM

    - <<: *global-group-common
    name: KR328APPS
    - <<: *global-group-common
    name: MICROSOFT

    - <<: *domestic-group-common
    name: MIHOYO
    - <<: *domestic-group-common
    name: MIHOYO

    - <<: *domestic-group-common
    name: MOBILEQQ
    - <<: *domestic-group-common
    name: MOBILEQQ

    rules:
    - RULE-SET,PublicDNS,REJECT,no-resolve
    - RULE-SET,PublicDNSDomains,REJECT,no-resolve
    - SCRIPT,QUIC,REJECT,no-resolve
    - SCRIPT,BilibiliP2P,REJECT,no-resolve
    - DOMAIN,mitm.it,DEBUG
    - DOMAIN-SUFFIX,googleapis.cn,PROXY
    - DOMAIN,b23.tv,PROXY
    - DOMAIN-SUFFIX,safelinks.protection.outlook.com,DIRECT
    - DOMAIN-SUFFIX,kr328.app,KR328APPS
    - PROCESS-NAME,com.tencent.mobileqq,MOBILEQQ
    - PROCESS-NAME,com.tencent.tim,MOBILEQQ
    - PROCESS-NAME,uu.exe,DIRECT
    - PROCESS-NAME,uu_ball.exe,DIRECT
    - RULE-SET,SteamCN,DOMESTIC
    - RULE-SET,MicrosoftCN,DOMESTIC
    - RULE-SET,Steam,STEAM
    - RULE-SET,Bilibili,BILIBILI
    - RULE-SET,Blizzard,PROXY
    - RULE-SET,Microsoft,MICROSOFT
    - RULE-SET,MihoyoCN,MIHOYO
    - RULE-SET,Mihoyo,PROXY
    - RULE-SET,GlobalTldDomains,PROXY
    - RULE-SET,GlobalDomains,PROXY
    - RULE-SET,DomesticDomains,DOMESTIC
    - RULE-SET,GlobalScholarDomains,PROXY
    - RULE-SET,DomesticIPs,DOMESTIC
    - RULE-SET,LocalIPs,DIRECT
    - MATCH,PROXY
    - RULE-SET,PublicDNS,REJECT,no-resolve
    - RULE-SET,PublicDNSDomains,REJECT,no-resolve
    - SCRIPT,QUIC,REJECT,no-resolve
    - SCRIPT,BilibiliP2P,REJECT,no-resolve
    - DOMAIN,mitm.it,DEBUG
    - DOMAIN-SUFFIX,googleapis.cn,PROXY
    - DOMAIN,b23.tv,PROXY
    - DOMAIN-SUFFIX,safelinks.protection.outlook.com,DIRECT
    - DOMAIN-KEYWORD,tracker,DIRECT
    - DOMAIN-KEYWORD,torrent,DIRECT
    - PROCESS-NAME,com.tencent.mobileqq,MOBILEQQ
    - PROCESS-NAME,com.tencent.tim,MOBILEQQ
    - PROCESS-NAME,uu.exe,DIRECT
    - PROCESS-NAME,uu_ball.exe,DIRECT
    - RULE-SET,SteamCN,DOMESTIC
    - RULE-SET,MicrosoftCN,DOMESTIC
    - RULE-SET,Steam,STEAM
    - RULE-SET,Bilibili,BILIBILI
    - RULE-SET,Blizzard,PROXY
    - RULE-SET,Microsoft,MICROSOFT
    - RULE-SET,MihoyoCN,MIHOYO
    - RULE-SET,Mihoyo,PROXY
    - RULE-SET,GlobalTldDomains,PROXY
    - RULE-SET,GlobalDomains,PROXY
    - RULE-SET,DomesticDomains,DOMESTIC
    - RULE-SET,GlobalScholarDomains,PROXY
    - RULE-SET,DomesticIPs,DOMESTIC
    - RULE-SET,LocalIPs,DIRECT
    - MATCH,PROXY
  10. @Kr328 Kr328 revised this gist Mar 13, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,8 @@ dns:
    - "+.stun.*.*"
    - "+.stun.*.*.*"
    - "+.stun.*.*.*.*"
    - "ddns.*.*"
    - "ddns.*.*.*"
    - "lens.l.google.com"
    - "stun.l.google.com"
    - "*.n.n.srv.nintendo.net"
  11. @Kr328 Kr328 revised this gist Mar 12, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ dns:
    listen: ":53"
    enhanced-mode: fake-ip
    nameserver:
    - 192.168.0.1
    - 192.168.50.1
    - 119.29.29.29
    - 223.5.5.5
    fake-ip-filter:
  12. @Kr328 Kr328 revised this gist Mar 12, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -27,6 +27,7 @@ clash-for-android:

    dns:
    enable: true
    ipv6: true
    listen: ":53"
    enhanced-mode: fake-ip
    nameserver:
  13. @Kr328 Kr328 revised this gist Mar 12, 2023. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,6 @@ external-controller: 127.0.0.1:6170

    hosts:
    local.lan: "127.0.0.1"
    "5505.lan": "192.168.100.1"

    tun:
    enable: true
    @@ -46,6 +45,8 @@ dns:
    - "www.msftncsi.com"
    - "www.msftconnecttest.com"
    - "connect.rom.miui.com"
    - "+.asuscomm.cn"
    - "+.asuscomm.com"
    - "WORKGROUP"

    profile:
  14. @Kr328 Kr328 revised this gist Mar 8, 2023. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -31,10 +31,9 @@ dns:
    listen: ":53"
    enhanced-mode: fake-ip
    nameserver:
    - 192.168.200.1
    - 192.168.3.1
    - 192.168.0.1
    - 119.29.29.29
    - https://223.5.5.5/dns-query
    - 223.5.5.5
    fake-ip-filter:
    - "+.stun.*.*"
    - "+.stun.*.*.*"
  15. @Kr328 Kr328 revised this gist Feb 5, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -288,6 +288,8 @@ rules:
    - DOMAIN-SUFFIX,kr328.app,KR328APPS
    - PROCESS-NAME,com.tencent.mobileqq,MOBILEQQ
    - PROCESS-NAME,com.tencent.tim,MOBILEQQ
    - PROCESS-NAME,uu.exe,DIRECT
    - PROCESS-NAME,uu_ball.exe,DIRECT
    - RULE-SET,SteamCN,DOMESTIC
    - RULE-SET,MicrosoftCN,DOMESTIC
    - RULE-SET,Steam,STEAM
  16. @Kr328 Kr328 revised this gist Feb 4, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -292,7 +292,7 @@ rules:
    - RULE-SET,MicrosoftCN,DOMESTIC
    - RULE-SET,Steam,STEAM
    - RULE-SET,Bilibili,BILIBILI
    - RULE-SET,Blizzard,DOMESTIC
    - RULE-SET,Blizzard,PROXY
    - RULE-SET,Microsoft,MICROSOFT
    - RULE-SET,MihoyoCN,MIHOYO
    - RULE-SET,Mihoyo,PROXY
  17. @Kr328 Kr328 revised this gist Jan 8, 2023. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    # Attribute: userinfo-url={{print .subscribe_url}}
    # Attribute: filename={{hostOf .subscribe_url}}.yaml

    ipv6: true
    mixed-port: 7890
    mode: rule
  18. @Kr328 Kr328 revised this gist Sep 29, 2022. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -264,9 +264,15 @@ proxy-groups:
    - <<: *global-group-common
    name: MICROSOFT

    - <<: *global-group-common
    name: KR328APPS

    - <<: *domestic-group-common
    name: MIHOYO

    - <<: *domestic-group-common
    name: MOBILEQQ

    rules:
    - RULE-SET,PublicDNS,REJECT,no-resolve
    - RULE-SET,PublicDNSDomains,REJECT,no-resolve
    @@ -276,6 +282,9 @@ rules:
    - DOMAIN-SUFFIX,googleapis.cn,PROXY
    - DOMAIN,b23.tv,PROXY
    - DOMAIN-SUFFIX,safelinks.protection.outlook.com,DIRECT
    - DOMAIN-SUFFIX,kr328.app,KR328APPS
    - PROCESS-NAME,com.tencent.mobileqq,MOBILEQQ
    - PROCESS-NAME,com.tencent.tim,MOBILEQQ
    - RULE-SET,SteamCN,DOMESTIC
    - RULE-SET,MicrosoftCN,DOMESTIC
    - RULE-SET,Steam,STEAM
  19. @Kr328 Kr328 revised this gist Sep 23, 2022. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -153,6 +153,10 @@ proxy-providers:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/HK.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(香港|HK)`}}"
    JPRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/JP.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(日本|JP)`}}"
    TWRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/TW.yaml"
    @@ -166,11 +170,13 @@ domestic-group-common: &domestic-group-common
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    proxies:
    - DOMESTIC
    - HK
    - JP
    - TW
    - SG
    - DIRECT
    @@ -180,11 +186,13 @@ global-group-common: &global-group-common
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    proxies:
    - PROXY
    - HK
    - JP
    - TW
    - SG
    - DIRECT
    @@ -196,6 +204,11 @@ proxy-groups:
    use:
    - HKRef

    - name: JP
    type: url-test
    use:
    - JPRef

    - name: TW
    type: url-test
    use:
    @@ -216,11 +229,13 @@ proxy-groups:
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    proxies:
    - DIRECT
    - HK
    - JP
    - TW
    - SG
    - DEBUG
    @@ -229,10 +244,12 @@ proxy-groups:
    type: select
    use:
    - HKRef
    - JPRef
    - TWRef
    - SGRef
    proxies:
    - HK
    - JP
    - TW
    - SG
    - DIRECT
  20. @Kr328 Kr328 revised this gist Sep 21, 2022. 1 changed file with 1 addition and 6 deletions.
    7 changes: 1 addition & 6 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -15,12 +15,9 @@ tun:
    dns-hijack:
    - udp://any:53
    - tcp://any:53
    auto-redir: true
    auto-route: true
    auto-detect-interface: true

    auto-redir:
    enable: true
    auto-route: true

    clash-for-android:
    append-system-dns: true
    @@ -30,8 +27,6 @@ dns:
    enable: true
    listen: ":53"
    enhanced-mode: fake-ip
    use-hosts: false
    fake-ip-range: 28.0.0.0/8
    nameserver:
    - 192.168.200.1
    - 192.168.3.1
  21. @Kr328 Kr328 revised this gist Aug 27, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -49,7 +49,7 @@ dns:
    - "www.msftncsi.com"
    - "www.msftconnecttest.com"
    - "connect.rom.miui.com"
    - "*"
    - "WORKGROUP"

    profile:
    store-selected: true
  22. @Kr328 Kr328 revised this gist Aug 27, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    ipv6: true
    mixed-port: 7890
    mode: rule
    allow-lan: true
  23. @Kr328 Kr328 revised this gist Aug 13, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -156,7 +156,7 @@ proxy-providers:
    HKRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/HK.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(香港|HK|)`}}"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(香港|HK)`}}"
    TWRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/TW.yaml"
  24. @Kr328 Kr328 revised this gist Aug 13, 2022. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -74,17 +74,17 @@ rule-providers:
    <<: *rule-provider-common
    behavior: ipcidr
    url: 'https://rules.kr328.app/local-ips.yaml'
    path: ./local-ips.yaml
    path: ./local_ips.yaml
    PublicDNS:
    <<: *rule-provider-common
    behavior: ipcidr
    url: 'https://rules.kr328.app/public-dns.yaml'
    path: ./public-dns.yaml
    path: ./public_dns.yaml
    PublicDNSDomains:
    <<: *rule-provider-common
    behavior: domain
    url: 'https://rules.kr328.app/public-dns-domain.yaml'
    path: ./public-dns-domain.yaml
    path: ./public_dns_domain.yaml
    DomesticDomains:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/cn.yaml'
    @@ -93,11 +93,11 @@ rule-providers:
    <<: *rule-provider-common
    behavior: ipcidr
    url: 'https://rules.kr328.app/cn-ips.yaml'
    path: ./cn-ips.yaml
    path: ./cn_ips.yaml
    GlobalScholarDomains:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/category-scholar-!cn.yaml'
    path: ./scholar_not_cn.yaml
    path: ./category_scholar_not_cn.yaml
    GlobalDomains:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/geolocation-!cn.yaml'
    @@ -137,7 +137,7 @@ rule-providers:
    MicrosoftCN:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/[email protected]'
    path: ./microsoft@cn.yaml
    path: ./microsoft_cn.yaml

    script:
    shortcuts:
  25. @Kr328 Kr328 revised this gist Aug 13, 2022. 1 changed file with 45 additions and 40 deletions.
    85 changes: 45 additions & 40 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -122,6 +122,10 @@ rule-providers:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/microsoft.yaml'
    path: ./microsoft.yaml
    MihoyoCN:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/[email protected]'
    path: ./mihoyo_cn.yaml
    Mihoyo:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/mihoyo.yaml'
    @@ -149,62 +153,62 @@ proxy-provider-common: &proxy-provider-common
    enable: true

    proxy-providers:
    Primary:
    HKRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/PRIMARY.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(日本|JP|Japan)`}}"
    Alternative:
    path: "./{{hostOf .subscribe_url}}/HK.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(香港|HK|)`}}"
    TWRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/ALTERNATIVE.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(香港|HK|Hong Kong)`}}"
    Backup:
    path: "./{{hostOf .subscribe_url}}/TW.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(台湾|TW)`}}"
    SGRef:
    <<: *proxy-provider-common
    path: "./{{hostOf .subscribe_url}}/BACKUP.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(台湾|TW|Taiwan)`}}"
    path: "./{{hostOf .subscribe_url}}/SG.yaml"
    url: "https://webapi.kr328.app/subconverter?url={{encodeUrl .subscribe_url}}&target=clash&list=true&include={{encodeUrl `(新加坡|SG)`}}"

    domestic-group-common: &domestic-group-common
    type: select
    use:
    - Primary
    - Alternative
    - Backup
    - HKRef
    - TWRef
    - SGRef
    proxies:
    - DOMESTIC
    - PRIMARY
    - ALTERNATIVE
    - BACKUP
    - HK
    - TW
    - SG
    - DIRECT
    - DEBUG

    global-group-common: &global-group-common
    type: select
    use:
    - Primary
    - Alternative
    - Backup
    - HKRef
    - TWRef
    - SGRef
    proxies:
    - PROXY
    - PRIMARY
    - ALTERNATIVE
    - BACKUP
    - HK
    - TW
    - SG
    - DIRECT
    - DEBUG

    proxy-groups:
    - name: PRIMARY
    - name: HK
    type: url-test
    use:
    - Primary
    - HKRef

    - name: ALTERNATIVE
    - name: TW
    type: url-test
    use:
    - Alternative
    - TWRef

    - name: BACKUP
    - name: SG
    type: url-test
    use:
    - Backup
    - SGRef

    - name: DEBUG
    type: select
    @@ -215,26 +219,26 @@ proxy-groups:
    - name: DOMESTIC
    type: select
    use:
    - Primary
    - Alternative
    - Backup
    - HKRef
    - TWRef
    - SGRef
    proxies:
    - DIRECT
    - PRIMARY
    - ALTERNATIVE
    - BACKUP
    - HK
    - TW
    - SG
    - DEBUG

    - name: PROXY
    type: select
    use:
    - Primary
    - Alternative
    - Backup
    - HKRef
    - TWRef
    - SGRef
    proxies:
    - PRIMARY
    - ALTERNATIVE
    - BACKUP
    - HK
    - TW
    - SG
    - DIRECT
    - DEBUG

    @@ -265,7 +269,8 @@ rules:
    - RULE-SET,Bilibili,BILIBILI
    - RULE-SET,Blizzard,DOMESTIC
    - RULE-SET,Microsoft,MICROSOFT
    - RULE-SET,Mihoyo,MIHOYO
    - RULE-SET,MihoyoCN,MIHOYO
    - RULE-SET,Mihoyo,PROXY
    - RULE-SET,GlobalTldDomains,PROXY
    - RULE-SET,GlobalDomains,PROXY
    - RULE-SET,DomesticDomains,DOMESTIC
  26. @Kr328 Kr328 revised this gist Jul 4, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -258,6 +258,7 @@ rules:
    - DOMAIN,mitm.it,DEBUG
    - DOMAIN-SUFFIX,googleapis.cn,PROXY
    - DOMAIN,b23.tv,PROXY
    - DOMAIN-SUFFIX,safelinks.protection.outlook.com,DIRECT
    - RULE-SET,SteamCN,DOMESTIC
    - RULE-SET,MicrosoftCN,DOMESTIC
    - RULE-SET,Steam,STEAM
  27. @Kr328 Kr328 revised this gist Jun 13, 2022. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -135,6 +135,11 @@ rule-providers:
    url: 'https://rules.kr328.app/[email protected]'
    path: ./[email protected]

    script:
    shortcuts:
    QUIC: "network == 'udp' and dst_port == 443"
    BilibiliP2P: "network == 'udp' and match_provider('Bilibili')"

    proxy-provider-common: &proxy-provider-common
    type: http
    interval: 3600
    @@ -248,6 +253,8 @@ proxy-groups:
    rules:
    - RULE-SET,PublicDNS,REJECT,no-resolve
    - RULE-SET,PublicDNSDomains,REJECT,no-resolve
    - SCRIPT,QUIC,REJECT,no-resolve
    - SCRIPT,BilibiliP2P,REJECT,no-resolve
    - DOMAIN,mitm.it,DEBUG
    - DOMAIN-SUFFIX,googleapis.cn,PROXY
    - DOMAIN,b23.tv,PROXY
  28. @Kr328 Kr328 revised this gist Jun 12, 2022. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,10 @@ tun:
    - tcp://any:53
    auto-route: true
    auto-detect-interface: true

    auto-redir:
    enable: true
    auto-route: true

    clash-for-android:
    append-system-dns: true
    @@ -31,6 +35,7 @@ dns:
    - 192.168.200.1
    - 192.168.3.1
    - 119.29.29.29
    - https://223.5.5.5/dns-query
    fake-ip-filter:
    - "+.stun.*.*"
    - "+.stun.*.*.*"
    @@ -43,6 +48,7 @@ dns:
    - "www.msftncsi.com"
    - "www.msftconnecttest.com"
    - "connect.rom.miui.com"
    - "*"

    profile:
    store-selected: true
  29. @Kr328 Kr328 revised this gist Apr 30, 2022. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -245,7 +245,6 @@ rules:
    - DOMAIN,mitm.it,DEBUG
    - DOMAIN-SUFFIX,googleapis.cn,PROXY
    - DOMAIN,b23.tv,PROXY
    - PROCESS-NAME,com.bilibili.app.in,BILIBILI
    - RULE-SET,SteamCN,DOMESTIC
    - RULE-SET,MicrosoftCN,DOMESTIC
    - RULE-SET,Steam,STEAM
  30. @Kr328 Kr328 revised this gist Apr 30, 2022. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions clash-config-template.yaml
    Original file line number Diff line number Diff line change
    @@ -74,6 +74,11 @@ rule-providers:
    behavior: ipcidr
    url: 'https://rules.kr328.app/public-dns.yaml'
    path: ./public-dns.yaml
    PublicDNSDomains:
    <<: *rule-provider-common
    behavior: domain
    url: 'https://rules.kr328.app/public-dns-domain.yaml'
    path: ./public-dns-domain.yaml
    DomesticDomains:
    <<: *rule-provider-common
    url: 'https://rules.kr328.app/cn.yaml'
    @@ -236,6 +241,7 @@ proxy-groups:

    rules:
    - RULE-SET,PublicDNS,REJECT,no-resolve
    - RULE-SET,PublicDNSDomains,REJECT,no-resolve
    - DOMAIN,mitm.it,DEBUG
    - DOMAIN-SUFFIX,googleapis.cn,PROXY
    - DOMAIN,b23.tv,PROXY