├── .gitignore ├── Dockerfile ├── groups.txt ├── Dockerfile.OLD ├── rulesets.txt ├── README.md ├── pref.yml └── pref.ini.OLD /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM tindy2013/subconverter 2 | LABEL maintainer="Stille " 3 | 4 | ENV VERSION 0.9.0 5 | 6 | WORKDIR /base 7 | RUN apk add tzdata && \ 8 | cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ 9 | echo "Asia/Shanghai" > /etc/timezone && \ 10 | apk del tzdata 11 | 12 | COPY groups.txt rulesets.txt /base/snippets/ 13 | COPY pref.yml /base 14 | 15 | EXPOSE 25500 16 | 17 | WORKDIR /base 18 | 19 | CMD subconverter 20 | -------------------------------------------------------------------------------- /groups.txt: -------------------------------------------------------------------------------- 1 | 🔰 PROXY`select`[]🎯 DIRECT`.* 2 | 🎬 Media`select`(香港|HK|hk|🇭🇰|台湾|TW|tw|新加坡|SG|sg|🇸🇬) 3 | ▶️ YouTube`select`[]🔰 PROXY`[]🎬 Media`.* 4 | 🍿 Netflix`select`[]🔰 PROXY`[]🎬 Media`.* 5 | 🐰 DisneyPlus`select`[]🔰 PROXY`[]🎬 Media`.* 6 | 📺 AppleTV`select`[]🔰 PROXY`[]🎬 Media`.* 7 | 🍎 Apple`select`[]🎯 DIRECT`[]🔰 PROXY`.* 8 | Ⓜ️ Microsoft`select`[]🎯 DIRECT`[]🔰 PROXY`.* 9 | 💰 PayPal`select`[]🎯 DIRECT`[]🔰 PROXY`.* 10 | 🚫 AdBlock`select`[]🎯 DIRECT`[]🔰 PROXY`[]REJECT`.* 11 | 🐟 Other`select`[]🎯 DIRECT`[]🔰 PROXY`.* 12 | 🎯 DIRECT`select`[]DIRECT -------------------------------------------------------------------------------- /Dockerfile.OLD: -------------------------------------------------------------------------------- 1 | FROM alpine:3.8 2 | MAINTAINER Stille 3 | 4 | ENV VERSION v0.6.4 5 | 6 | WORKDIR /base 7 | RUN apk add wget tzdata && \ 8 | cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ 9 | echo "Asia/Shanghai" > /etc/timezone && \ 10 | wget -P /base https://github.com/tindy2013/subconverter/releases/download/${VERSION}/subconverter_linux64.tar.gz && \ 11 | tar xzf subconverter_linux64.tar.gz && \ 12 | rm -rf subconverter_linux64.tar.gz && \ 13 | apk del wget tzdata 14 | 15 | COPY groups.txt rulesets.txt /base/subconverter/snippets/ 16 | 17 | EXPOSE 25500 18 | 19 | CMD ./subconverter/subconverter 20 | -------------------------------------------------------------------------------- /rulesets.txt: -------------------------------------------------------------------------------- 1 | 🚫 AdBlock,https://raw.githubusercontent.com/NobyDa/Script/master/Surge/AdRule.list 2 | 🚫 AdBlock,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list 3 | ▶️ YouTube,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list 4 | 🍿 Netflix,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list 5 | 🐰 DisneyPlus,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list 6 | 💰 PayPal,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/PayPal/PayPal.list 7 | 📺 AppleTV,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AppleTV/AppleTV.list 8 | 🍎 Apple,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple.list 9 | Ⓜ️ Microsoft,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list 10 | 🔰 PROXY,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Global.list 11 | 🎯 DIRECT,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list 12 | 🎯 DIRECT,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/China/China.list 13 | 🎯 DIRECT,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/ChinaIPs/ChinaIPs.list 14 | 🎯 DIRECT,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/PrivateTracker/PrivateTracker.list 15 | 🎯 DIRECT,[]GEOIP,CN 16 | 🐟 Other,[]FINAL -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # subconverter 2 | ## 简介 3 | 基于 [tindy2013/subconverter](https://github.com/tindy2013/subconverter) 项目的 docker 镜像.仅修改 **分组配置文件** 以解决以下问题. 4 | 5 | - **增加**`Netflix,DisneyPlus`等分组. 6 | - **去除**`自动选择 url-test`以解决连接数爆涨问题. 7 | - **修改时区** 镜像默认时区为 Asia/Shanghai 8 | 9 | ## 示例 10 | [https://sub.ops.ci](https://sub.ops.ci) 11 | *`前后端示例,可以直接使用.`* 12 | 13 | ## 更新 14 | - **2022-07-16** 新增 [stilleshan/sub](https://github.com/stilleshan/dockerfiles/tree/main/sub) subweb + subconverter 合并进阶版. 15 | - **2022-07-04** 新增 [stilleshan/subweb](https://github.com/stilleshan/subweb) 前端项目. 16 | - **2022-04-03** 更新`v0.7.2`版 docker 镜像 17 | - **2021-12-20** 更新优化规则和分组 18 | - **2021-12-01** 添加`Disney+`规则分组 19 | - **2021-09-30** 更新`v0.7.1`版 docker 镜像 20 | - **2021-09-21** 更新`v0.7.0`版 docker 镜像 21 | - **2021-06-09** 更新`v0.6.4`版 docker 镜像,新增同时支持 X86 和 ARM 架构. 22 | 23 | ## 部署 24 | ### docker 25 | ```shell 26 | docker run -d --name=subconverter --restart=always -p 25500:25500 stilleshan/subconverter 27 | ``` 28 | 29 | ### docker compose 30 | 下载 [docker-compose.yml](https://raw.githubusercontent.com/stilleshan/dockerfiles/main/subconverter/docker-compose.yml) 执行以下命令启动: 31 | ```shell 32 | docker-compose up -d 33 | ``` 34 | 35 | ### subweb + subconverter 合并进阶版 36 | 详情查看 [stilleshan/sub](https://github.com/stilleshan/dockerfiles/tree/main/sub) 37 | 38 | ## 链接 39 | - [stilleshan/sub](https://github.com/stilleshan/dockerfiles/tree/main/sub) 40 | - [stilleshan/subweb](https://github.com/stilleshan/subweb) 41 | - [stilleshan/subconverter](https://github.com/stilleshan/subconverter) 42 | - [tindy2013/subconverter](https://github.com/tindy2013/subconverter) 43 | -------------------------------------------------------------------------------- /pref.yml: -------------------------------------------------------------------------------- 1 | common: 2 | api_mode: false 3 | api_access_token: password 4 | default_url: [] 5 | enable_insert: true 6 | insert_url: [] 7 | prepend_insert_url: true 8 | exclude_remarks: ["(到期|剩余流量|时间|官网|产品|平台)"] 9 | include_remarks: [] 10 | enable_filter: false 11 | filter_script: "" 12 | default_external_config: "" # config/example_external_config.yml 13 | base_path: base 14 | clash_rule_base: base/all_base.tpl 15 | surge_rule_base: base/all_base.tpl 16 | surfboard_rule_base: base/all_base.tpl 17 | mellow_rule_base: base/all_base.tpl 18 | quan_rule_base: base/all_base.tpl 19 | quanx_rule_base: base/all_base.tpl 20 | loon_rule_base: base/all_base.tpl 21 | sssub_rule_base: base/all_base.tpl 22 | proxy_config: SYSTEM 23 | proxy_ruleset: SYSTEM 24 | proxy_subscription: NONE 25 | append_proxy_type: false 26 | 27 | userinfo: 28 | stream_rule: 29 | - {match: "^剩余流量:(.*?)\\|总流量:(.*)$", replace: "total=$2&left=$1"} 30 | - {match: "^剩余流量:(.*?) (.*)$", replace: "total=$1&left=$2"} 31 | - {match: "^Bandwidth: (.*?)/(.*)$", replace: "used=$1&total=$2"} 32 | - {match: "^.*剩余(.*?)(?:\\s*?)@(?:.*)$", replace: "total=$1"} 33 | - {match: "^.*?流量:(.*?) 剩:(?:.*)$", replace: "total=$1"} 34 | time_rule: 35 | - {match: "^过期时间:(\\d+)-(\\d+)-(\\d+) (\\d+):(\\d+):(\\d+)$", replace: "$1:$2:$3:$4:$5:$6"} 36 | - {match: "^到期时间(:|:)(\\d+)-(\\d+)-(\\d+)$", replace: "$1:$2:$3:0:0:0"} 37 | - {match: "^Smart Access expire: (\\d+)/(\\d+)/(\\d+)$", replace: "$1:$2:$3:0:0:0"} 38 | - {match: "^.*?流量:(?:.*?) 剩:(.*?)天$", replace: "left=$1d"} 39 | 40 | node_pref: 41 | # udp_flag: false 42 | # tcp_fast_open_flag: false 43 | # skip_cert_verify_flag: false 44 | # tls13_flag: false 45 | sort_flag: false 46 | sort_script: "" 47 | filter_deprecated_nodes: false 48 | append_sub_userinfo: true 49 | clash_use_new_field_name: true 50 | clash_proxies_style: flow 51 | rename_node: 52 | # - {match: "\\(?((x|X)?(\\d+)(\\.?\\d+)?)((\\s?倍率?)|(x|X))\\)?", replace: "$1x"} 53 | # - {script: "function rename(node){}"} 54 | # - {script: "path:/path/to/script.js"} 55 | - {import: snippets/rename_node.txt} 56 | 57 | managed_config: 58 | write_managed_config: true 59 | managed_config_prefix: "http://127.0.0.1:25500" 60 | config_update_interval: 86400 61 | config_update_strict: false 62 | quanx_device_id: "" 63 | 64 | surge_external_proxy: 65 | surge_ssr_path: "" # /usr/bin/ssr-local 66 | resolve_hostname: true 67 | 68 | emojis: 69 | add_emoji: true 70 | remove_old_emoji: true 71 | rules: 72 | # - {match: "(流量|时间|应急)", emoji: "🏳️‍🌈"} 73 | # - {script: "function getEmoji(node){}"} 74 | # - {script: "path:/path/to/script.js"} 75 | - {import: snippets/emoji.txt} 76 | 77 | rulesets: 78 | enabled: true 79 | overwrite_original_rules: false 80 | update_ruleset_on_request: false 81 | rulesets: 82 | # - {rule: "GEOIP,CN", group: "DIRECT"} 83 | # - {ruleset: "rules/LocalAreaNetwork.list", group: "DIRECT"} 84 | # - {ruleset: "surge:rules/LocalAreaNetwork.list", group: "DIRECT"} 85 | # - {ruleset: "quanx:https://raw.githubusercontent.com/ConnersHua/Profiles/master/Quantumult/X/Filter/Advertising.list", group: "Advertising", interval: 86400} 86 | # - {ruleset: "clash-domain:https://ruleset.dev/clash_domestic_services_domains", group: "Domestic Services", interval: 86400} 87 | # - {ruleset: "clash-ipcidr:https://ruleset.dev/clash_domestic_services_ips", group: "Domestic Services", interval: 86400} 88 | # - {ruleset: "clash-classic:https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/China.yaml", group: "DIRECT", interval: 86400} 89 | - {import: snippets/rulesets.txt} 90 | 91 | proxy_groups: 92 | custom_proxy_group: 93 | # - {name: UrlTest, type: url-test, rule: [".*"], url: http://www.gstatic.com/generate_204, interval: 300, tolerance: 100, timeout: 5} 94 | # - {name: Proxy, type: select, rule: [".*"]} 95 | # - {name: group1, type: select, rule: ["!!GROUPID=0"]} 96 | # - {name: v2ray, type: select, rule: ["!!GROUP=V2RayProvider"]} 97 | # - {import: snippets/groups_forcerule.txt} 98 | # - {name: ssid group, type: ssid, rule: ["default_group", "celluar=group0,ssid1=group1,ssid2=group2"]} 99 | - {import: snippets/groups.txt} 100 | 101 | template: 102 | template_path: "" 103 | globals: 104 | - {key: clash.http_port, value: 7890} 105 | - {key: clash.socks_port, value: 7891} 106 | - {key: clash.allow_lan, value: true} 107 | - {key: clash.log_level, value: info} 108 | 109 | aliases: 110 | - {uri: /v, target: /version} 111 | - {uri: /clash, target: "/sub?target=clash"} 112 | - {uri: /clashr, target: "/sub?target=clashr"} 113 | - {uri: /surge, target: "/sub?target=surge"} 114 | - {uri: /quan, target: "/sub?target=quan"} 115 | - {uri: /quanx, target: "/sub?target=quanx"} 116 | - {uri: /mellow, target: "/sub?target=mellow"} 117 | - {uri: /surfboard, target: "/sub?target=surfboard"} 118 | - {uri: /loon, target: "/sub?target=loon"} 119 | - {uri: /ss, target: "/sub?target=ss"} 120 | - {uri: /ssd, target: "/sub?target=ssd"} 121 | - {uri: /sssub, target: "/sub?target=sssub"} 122 | - {uri: /ssr, target: "/sub?target=ssr"} 123 | - {uri: /v2ray, target: "/sub?target=v2ray"} 124 | - {uri: /trojan, target: "/sub?target=trojan"} 125 | 126 | tasks: 127 | # - name: tick 128 | # cronexp: "0/10 * * * * ?" 129 | # path: tick.js 130 | # timeout: 3 131 | 132 | server: 133 | listen: 0.0.0.0 134 | port: 25500 135 | serve_file_root: "" 136 | 137 | advanced: 138 | log_level: info 139 | print_debug_info: false 140 | max_pending_connections: 10240 141 | max_concurrent_threads: 2 142 | max_allowed_rulesets: 0 143 | max_allowed_rules: 0 144 | max_allowed_download_size: 0 145 | enable_cache: false 146 | cache_subscription: 60 147 | cache_config: 300 148 | cache_ruleset: 21600 149 | script_clean_context: true 150 | async_fetch_ruleset: false 151 | skip_failed_links: false -------------------------------------------------------------------------------- /pref.ini.OLD: -------------------------------------------------------------------------------- 1 | [common] 2 | ;API mode, set to true to prevent loading local subscriptions or serving local files directly 3 | api_mode=false 4 | 5 | ;Access token used for performing critical action through Web interface 6 | api_access_token=password 7 | 8 | ;Default URLs, used when no URL is provided in request, use "|" to separate multiple subscription links, supports local files/URL 9 | default_url= 10 | 11 | ;Insert subscription links to requests. Can be used to add node(s) to all exported subscriptions. 12 | enable_insert=true 13 | ;URLs to insert to subscription links, use "|" to separate multiple subscription links, supports local files/URL 14 | insert_url= 15 | ;Prepend inserted URLs to subscription links. Nodes in insert_url will be added to groups first with non-group-specific match pattern. 16 | prepend_insert_url=true 17 | 18 | ;Exclude nodes which remarks match the following patterns. Supports regular expression. 19 | exclude_remarks=(到期|剩余流量|时间|官网|产品) 20 | ;exclude_remarks=(other rule) 21 | 22 | ;Only include nodes which remarks match the following patterns. Supports regular expression. 23 | ;include_remarks=V3.*港 24 | 25 | ;Enable script support for filtering nodes 26 | enable_filter=false 27 | ;Script used for filtering nodes. Supports inline script and script path. A "filter" function with 1 argument which is a node should be defined in the script. 28 | ;Example: Inline script: Set value to content of script. Replace all line break with "\n". 29 | ; Script path: Set value to "path:/path/to/script.js". 30 | ;filter_script=function filter(node) {\n const info = JSON.parse(node.ProxyInfo);\n if(info.EncryptMethod.includes('chacha20'))\n return true;\n return false;\n} 31 | 32 | ;Setting an external config file as default when none is specified, supports local files/URL 33 | ;default_external_config=config/example_external_config.ini 34 | 35 | ;The file scope limit of the 'rule_base' options in external configs. 36 | base_path=base 37 | 38 | ;Clash config base used by the generator, supports local files/URL 39 | clash_rule_base=base/all_base.tpl 40 | 41 | ;Surge config base used by the generator, supports local files/URL 42 | surge_rule_base=base/all_base.tpl 43 | 44 | ;Surfboard config base used by the generator, supports local files/URL 45 | surfboard_rule_base=base/all_base.tpl 46 | 47 | ;Mellow config base used by the generator, supports local files/URL 48 | mellow_rule_base=base/all_base.tpl 49 | 50 | ;Quantumult config base used by the generator, supports local files/URL 51 | quan_rule_base=base/all_base.tpl 52 | 53 | ;Quantumult X config base used by the generator, supports local files/URL 54 | quanx_rule_base=base/all_base.tpl 55 | 56 | ;Loon config base used by the generator, supports local files/URL 57 | loon_rule_base=base/all_base.tpl 58 | 59 | ;Shadowsocks Android config base used by the generator, supports local files/URL 60 | sssub_rule_base=base/all_base.tpl 61 | 62 | ;Proxy used to download configs, rulesets or subscriptions, set to NONE or empty to disable it, set to SYSTEM to use system proxy. 63 | ;Accept cURL-supported proxies (http:// https:// socks4a:// socks5://) 64 | ;Additional support for CORS proxy ( https://github.com/Rob--W/cors-anywhere https://github.com/Zibri/cloudflare-cors-anywhere etc.), prefix the address with "cors:" to recognize the address as CORS proxy. 65 | ;Example: http://127.0.0.1:80 socks5://example.com:1080 cors:https://cors-anywhere.herokuapp.com/ 66 | proxy_config=SYSTEM 67 | proxy_ruleset=SYSTEM 68 | proxy_subscription=NONE 69 | 70 | ;Append a proxy type string ([SS] [SSR] [VMess]) to node remark. 71 | append_proxy_type=false 72 | 73 | [userinfo] 74 | ;Rules to extract stream data from node 75 | ;Format: full_match_regex|new_format_regex 76 | ;where new_format_regex should be like "total=$1&left=$2&used=$3" 77 | stream_rule=^剩余流量:(.*?)\|总流量:(.*)$|total=$2&left=$1 78 | stream_rule=^剩余流量:(.*?) (.*)$|total=$1&left=$2 79 | stream_rule=^Bandwidth: (.*?)/(.*)$|used=$1&total=$2 80 | stream_rule=^\[.*?\]剩余(.*?)@(?:.*)$|total=$1 81 | stream_rule=^.*?流量:(.*?) 剩:(?:.*)$|total=$1 82 | 83 | ;Rules to extract expire time data from node 84 | ;Format: full_match_regex|new_format_regex 85 | ;where new_format_regex should follow this example: yyyy:mm:dd:hh:mm:ss 86 | time_rule=^过期时间:(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)$|$1:$2:$3:$4:$5:$6 87 | time_rule=^到期时间(:|:)(\d+)-(\d+)-(\d+)$|$1:$2:$3:0:0:0 88 | time_rule=^Smart Access expire: (\d+)/(\d+)/(\d+)$|$1:$2:$3:0:0:0 89 | time_rule=^.*?流量:(?:.*?) 剩:(.*)$|left=$1d 90 | 91 | [node_pref] 92 | ;udp_flag=false 93 | ;tcp_fast_open_flag=false 94 | ;skip_cert_verify_flag=false 95 | ;tls13_flag=false 96 | 97 | sort_flag=false 98 | ;Script used for sorting nodes. A "compare" function with 2 arguments which are the 2 nodes to be compared should be defined in the script. Supports inline script and script path. 99 | ;Examples can be seen at the filter_script option in [common] section. 100 | ;sort_script=function compare(node_a, node_b) {\n const info_a = JSON.parse(node_a.ProxyInfo);\n const info_b = JSON.parse(node_b.ProxyInfo);\n return info_a.Remark > info_b.Remark;\n} 101 | 102 | filter_deprecated_nodes=false 103 | append_sub_userinfo=true 104 | clash_use_new_field_name=true 105 | 106 | ;Generate style of the proxies section of Clash subscriptions. 107 | ;Supported styles: block, flow, compact 108 | ;Block: - name: name1 Flow: - {name: name1, key: value} Compact: [{name: name1, key: value},{name: name2, key: value}] 109 | ; key: value - {name: name2, key: value} 110 | ; - name: name2 111 | ; key: value 112 | clash_proxies_style=flow 113 | 114 | ;Rename remarks with the following patterns. Supports regular expression. 115 | ;Format: Search_Pattern@Replace_Pattern 116 | ;rename_node=IPLC@专线 117 | ;rename_node=RELAY@中转 118 | ;rename_node=BGP-@ 119 | ;rename_node=!!script:function rename(node) {\n const info = JSON.parse(node.ProxyInfo);\n const geoinfo = JSON.parse(geoip(info.Hostname));\n if(geoinfo.country_code == "CN")\n return "CN " + node.Remark;\n} 120 | ;rename_node=!!script:path:/path/to/script.js 121 | 122 | rename_node=!!import:snippets/rename_node.txt 123 | 124 | [managed_config] 125 | ;Append a '#!MANAGED-CONFIG' info to Surge configurations 126 | write_managed_config=true 127 | 128 | ;Address prefix for MANAGED-CONFIG info, without the trailing "/". 129 | ;This address will also be used for generating /getruleset, /qx-rewrite, /qx-script addresses. 130 | managed_config_prefix=http://127.0.0.1:25500 131 | 132 | ;Managed config update interval in seconds, determine how long the config will be updated. 133 | config_update_interval=86400 134 | 135 | ;If config_update_strict is set to true, Surge will require a force update after the interval. 136 | config_update_strict=false 137 | 138 | ;Device ID to be written to rewrite scripts for some version of Quantumult X 139 | quanx_device_id= 140 | 141 | [surge_external_proxy] 142 | ;surge_ssr_path=/usr/bin/ssr-local 143 | resolve_hostname=true 144 | 145 | [emojis] 146 | add_emoji=true 147 | remove_old_emoji=true 148 | 149 | ;Rule to add emojis. Supports regular expression. 150 | ;Format: Remark_Search_Pattern,emoji 151 | 152 | ;rule=(流量|时间|应急|过期|Bandwidth|expire),🏳️‍🌈 153 | ;rule=AC,🇦🇨 154 | ;rule=!!script:function getEmoji(node) {\n const info = JSON.parse(node.ProxyInfo);\n const geoinfo = JSON.parse(geoip(info.Hostname));\n if(geoinfo.country_code == "CN")\n return "🏳️‍🌈";\n} 155 | ;rule=!!script:path:/path/to/script/.js 156 | 157 | rule=!!import:snippets/emoji.txt 158 | 159 | [rulesets] 160 | ;Enable generating rules with rulesets 161 | enabled=true 162 | 163 | ;Overwrite the existing rules in rule_base 164 | overwrite_original_rules=false 165 | 166 | ;Perform a ruleset update on request 167 | update_ruleset_on_request=false 168 | 169 | ;Ruleset addresses, supports local files/URL 170 | ;Format: Group name,[type:]URL[,interval] 171 | ; Group name,[]Rule 172 | ;where "type" supports the following value: surge, quanx, clash-domain, clash-ipcidr, clash-classic 173 | ;type defaults to surge if omitted 174 | 175 | ;ruleset=DIRECT,https://raw.githubusercontent.com/ConnersHua/Profiles/master/Surge/Ruleset/Unbreak.list,86400 176 | ;ruleset=🎯 全球直连,rules/LocalAreaNetwork.list 177 | ;ruleset=DIRECT,surge:rules/LocalAreaNetwork.list 178 | ;ruleset=Advertising,quanx:https://raw.githubusercontent.com/ConnersHua/Profiles/master/Quantumult/X/Filter/Advertising.list,86400 179 | ;ruleset=Domestic Services,clash-domain:https://ruleset.dev/clash_domestic_services_domains,86400 180 | ;ruleset=Domestic Services,clash-ipcidr:https://ruleset.dev/clash_domestic_services_ips,86400 181 | ;ruleset=DIRECT,clash-classic:https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/China.yaml,86400 182 | ;ruleset=🎯 全球直连,[]GEOIP,CN 183 | ;ruleset=🐟 漏网之鱼,[]FINAL 184 | 185 | ruleset=!!import:snippets/rulesets.txt 186 | 187 | [proxy_groups] 188 | ;Generate Clash Proxy Group with the following patterns. Node filtering rule supports regular expression. 189 | ;Format: Group_Name`select`Rule_1`Rule_2`... 190 | ; Group_Name`url-test|fallback|load-balance`Rule_1`Rule_2`...`test_url`interval[,timeout][,tolerance] 191 | ;Rule with "[]" prefix will be added directly. 192 | 193 | ;custom_proxy_group=Proxy`select`.*`[]AUTO`[]DIRECT`.* 194 | ;custom_proxy_group=UrlTest`url-test`.*`http://www.gstatic.com/generate_204`300,5,100 195 | ;custom_proxy_group=FallBack`fallback`.*`http://www.gstatic.com/generate_204`300,5 196 | ;custom_proxy_group=LoadBalance`load-balance`.*`http://www.gstatic.com/generate_204`300,,100 197 | ;custom_proxy_group=SSID`ssid`default_group`celluar=group0,ssid1=group1,ssid2=group2 198 | 199 | ;custom_proxy_group=g1`select`!!GROUPID=0 200 | ;custom_proxy_group=g2`select`!!GROUPID=1 201 | ;custom_proxy_group=v2ray`select`!!GROUP=V2RayProvider 202 | 203 | ;custom_proxy_group=g1hk`select`!!GROUPID=0!!(HGC|HKBN|PCCW|HKT|hk|港) 204 | ;custom_proxy_group=sstw`select`!!GROUP=V2RayProvider!!(深台|彰化|新北|台|tw) 205 | ;custom_proxy_group=provider`select`!!PROVIDER=prov1,prov2,prov3`fallback_nodes 206 | 207 | ;Also supports using script for filtering nodes. A "filter" function with one argument which is an array of all available nodes should be defined in the script. 208 | ;custom_proxy_group=script`select`script:/path/to/script.js 209 | 210 | ;for forcerule.yml 211 | ;custom_proxy_group=!!import:snippets/groups_forcerule.txt 212 | 213 | ;for Surge rulesets 214 | custom_proxy_group=!!import:snippets/groups.txt 215 | 216 | [template] 217 | ;The file scope limit of 'include' statement inside the templates. 218 | template_path=templates 219 | 220 | ;The following settings will be added to the "global" scope of the template variables 221 | ;Value of 'clash.http_port' can be accessed with 'global.clash.http_port' in the template. 222 | clash.http_port=7890 223 | clash.socks_port=7891 224 | clash.allow_lan=true 225 | clash.log_level=info 226 | 227 | [aliases] 228 | ;Aliases for accessing interfaces. Can be used to shorten the URI. 229 | ;All arguments passed when accessing the alias name will be appended to the arguments of the alias target. 230 | ;Format: uri=target 231 | /v=/version 232 | /clash=/sub?target=clash 233 | /clashr=/sub?target=clashr 234 | /surge=/sub?target=surge 235 | /quan=/sub?target=quan 236 | /quanx=/sub?target=quanx 237 | /mellow=/sub?target=mellow 238 | /surfboard=/sub?target=surfboard 239 | /loon=/sub?target=loon 240 | /ss=/sub?target=ss 241 | /ssd=/sub?target=ssd 242 | /sssub=/sub?target=sssub 243 | /ssr=/sub?target=ssr 244 | /v2ray=/sub?target=v2ray 245 | /trojan=/sub?target=trojan 246 | 247 | [server] 248 | ;Address to bind on for Web Server 249 | listen=0.0.0.0 250 | 251 | ;Port to bind on for Web Server 252 | port=25500 253 | 254 | [advanced] 255 | log_level=info 256 | print_debug_info=false 257 | max_pending_connections=10240 258 | max_concurrent_threads=2 259 | max_allowed_rulesets=0 260 | max_allowed_rules=0 261 | max_allowed_download_size=0 262 | enable_cache=false 263 | cache_subscription=60 264 | cache_config=300 265 | cache_ruleset=21600 266 | async_fetch_ruleset=false 267 | skip_failed_links=false 268 | --------------------------------------------------------------------------------