├── LICENSE ├── configs └── basic.ini ├── samples └── rewrite.yaml └── templates └── basic.yaml /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /configs/basic.ini: -------------------------------------------------------------------------------- 1 | [custom] 2 | 3 | custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT`.* 4 | custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50 5 | custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 直连政策`.* 6 | custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 直连政策`.* 7 | custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 直连政策`.* 8 | custom_proxy_group=🎯 直连政策`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择 9 | custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT 10 | custom_proxy_group=🆎 广告拦截`select`[]REJECT`[]DIRECT 11 | custom_proxy_group=🐟 兜底政策`select`[]🚀 节点选择`[]🎯 直连政策`[]♻️ 自动选择`.* 12 | 13 | enable_rule_generator=false 14 | overwrite_original_rules=false 15 | 16 | clash_rule_base=https://raw.githubusercontent.com/Watfaq/choc-configs/main/templates/basic.yaml 17 | -------------------------------------------------------------------------------- /samples/rewrite.yaml: -------------------------------------------------------------------------------- 1 | mitm: 2 | enable: true 3 | hostnames: 4 | - '*.jd.com' 5 | - 'www.google.cn' 6 | - '*.google.com' 7 | 8 | ca: 9 | passphase: "" 10 | certificate: "" 11 | rewrite: 12 | - regex: ^https?://www.google.cn/(.*) 13 | match: url 14 | action: "302" 15 | target: https://www.google.com/$1 # redirect with params 16 | - regex: ^http://www.google.cn 17 | match: url 18 | action: "header" # rewrite request header Host 19 | target: http://www.google.com 20 | - regex: ^https?:\/\/(www.)?jd\.com\/ 21 | match: url 22 | action: "302" 23 | target: https://www.jd.com/ 24 | - regex: ^https?://(www.)?google.cn/search 25 | match: url 26 | action: "404" # response with http status code 404 27 | target: https://www.google.com/search 28 | - regex: ^https?:\/\/.+\.googlevideo\.com\/.+&oad 29 | match: url 30 | action: reject-image # response with 1x1 pixel emtpy image 31 | target: "" 32 | - regex: ^http://www.google.cn 33 | match: url 34 | action: "reject" # close connection immediately 35 | target: "" 36 | -------------------------------------------------------------------------------- /templates/basic.yaml: -------------------------------------------------------------------------------- 1 | ### subscription-url {{ request.url }} 2 | 3 | --- 4 | port: 8888 5 | socks-port: 8889 6 | mixed-port: 8899 7 | mode: rule 8 | log-level: error 9 | external-controller: 127.0.0.1:9090 10 | 11 | # DNS server settings 12 | # This section is optional. When not present, the DNS server will be disabled. 13 | dns: 14 | enable: true 15 | listen: 0.0.0.0:53 16 | default-nameserver: 17 | - 114.114.114.114 18 | - 8.8.8.8 19 | enhanced-mode: redir-host # or fake-ip 20 | nameserver: 21 | - 114.114.114.114 # default value 22 | - 8.8.8.8 # default value 23 | - tls://dns.rubyfish.cn:853 # DNS over TLS 24 | - https://1.1.1.1/dns-query # DNS over HTTPS 25 | 26 | rules: 27 | - RULE-SET,Netflix,🌍 国外媒体 28 | - RULE-SET,Spotify,🌍 国外媒体 29 | - RULE-SET,YouTube,🌍 国外媒体 30 | - RULE-SET,Disney Plus,🌍 国外媒体 31 | - RULE-SET,Bilibili,🎯 直连政策 32 | - RULE-SET,IQ,🎯 直连政策 33 | - RULE-SET,IQIYI,🎯 直连政策 34 | - RULE-SET,Letv,🎯 直连政策 35 | - RULE-SET,Netease Music,🎯 直连政策 36 | - RULE-SET,Tencent Video,🎯 直连政策 37 | - RULE-SET,Youku,🎯 直连政策 38 | - RULE-SET,WeTV,🎯 直连政策 39 | - RULE-SET,ABC,🌍 国外媒体 40 | - RULE-SET,Abema TV,🌍 国外媒体 41 | - RULE-SET,Amazon,🌍 国外媒体 42 | - RULE-SET,Apple News,🌍 国外媒体 43 | - RULE-SET,Apple TV,🌍 国外媒体 44 | - RULE-SET,Bahamut,🌍 国外媒体 45 | - RULE-SET,BBC iPlayer,🌍 国外媒体 46 | - RULE-SET,DAZN,🌍 国外媒体 47 | - RULE-SET,Discovery Plus,🌍 国外媒体 48 | - RULE-SET,encoreTVB,🌍 国外媒体 49 | - RULE-SET,Fox Now,🌍 国外媒体 50 | - RULE-SET,Fox+,🌍 国外媒体 51 | - RULE-SET,HBO Max,🌍 国外媒体 52 | - RULE-SET,Hulu Japan,🌍 国外媒体 53 | - RULE-SET,Hulu,🌍 国外媒体 54 | - RULE-SET,Japonx,🌍 国外媒体 55 | - RULE-SET,JOOX,🌍 国外媒体 56 | - RULE-SET,KKBOX,🌍 国外媒体 57 | - RULE-SET,KKTV,🌍 国外媒体 58 | - RULE-SET,Line TV,🌍 国外媒体 59 | - RULE-SET,myTV SUPER,🌍 国外媒体 60 | - RULE-SET,Pandora,🌍 国外媒体 61 | - RULE-SET,PBS,🌍 国外媒体 62 | - RULE-SET,Pornhub,🌍 国外媒体 63 | - RULE-SET,Soundcloud,🌍 国外媒体 64 | - RULE-SET,ViuTV,🌍 国外媒体 65 | - RULE-SET,Reject,🆎 广告拦截 66 | - RULE-SET,Special,🎯 直连政策 67 | - RULE-SET,Telegram,📲 电报信息 68 | - RULE-SET,Speedtest,🚀 节点选择 69 | - RULE-SET,Apple,🍎 苹果服务 70 | - RULE-SET,PROXY,🚀 节点选择 71 | - RULE-SET,Domestic,🎯 直连政策 72 | - RULE-SET,Domestic IPs,🎯 直连政策 73 | - RULE-SET,LAN,🎯 直连政策 74 | - GEOIP,CN,🎯 直连政策 75 | - MATCH,🐟 兜底政策 76 | 77 | rule-providers: 78 | Reject: 79 | type: http 80 | behavior: classical 81 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Reject.yaml 82 | path: ./Rules/Reject 83 | interval: 86400 84 | Special: 85 | type: http 86 | behavior: classical 87 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Special.yaml 88 | path: ./Rules/Special 89 | interval: 86400 90 | Netflix: 91 | type: http 92 | behavior: classical 93 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Netflix.yaml 94 | path: ./Rules/Media/Netflix 95 | interval: 86400 96 | Spotify: 97 | type: http 98 | behavior: classical 99 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Spotify.yaml 100 | path: ./Rules/Media/Spotify 101 | interval: 86400 102 | YouTube: 103 | type: http 104 | behavior: classical 105 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/YouTube.yaml 106 | path: ./Rules/Media/YouTube 107 | interval: 86400 108 | Bilibili: 109 | type: http 110 | behavior: classical 111 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Bilibili.yaml 112 | path: ./Rules/Media/Bilibili 113 | interval: 86400 114 | IQ: 115 | type: http 116 | behavior: classical 117 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/IQ.yaml 118 | path: ./Rules/Media/IQI 119 | interval: 86400 120 | IQIYI: 121 | type: http 122 | behavior: classical 123 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/IQIYI.yaml 124 | path: ./Rules/Media/IQYI 125 | interval: 86400 126 | HBO Go: 127 | type: http 128 | behavior: classical 129 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/HBO%20Go.yaml 130 | path: ./Rules/Media/HBO_Go 131 | interval: 86400 132 | Letv: 133 | type: http 134 | behavior: classical 135 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Letv.yaml 136 | path: ./Rules/Media/Letv 137 | interval: 86400 138 | Netease Music: 139 | type: http 140 | behavior: classical 141 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Netease%20Music.yaml 142 | path: ./Rules/Media/Netease_Music 143 | interval: 86400 144 | Tencent Video: 145 | type: http 146 | behavior: classical 147 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Tencent%20Video.yaml 148 | path: ./Rules/Media/Tencent_Video 149 | interval: 86400 150 | Youku: 151 | type: http 152 | behavior: classical 153 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Youku.yaml 154 | path: ./Rules/Media/Youku 155 | interval: 86400 156 | WeTV: 157 | type: http 158 | behavior: classical 159 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/WeTV.yaml 160 | path: ./Rules/Media/WeTV 161 | interval: 86400 162 | ABC: 163 | type: http 164 | behavior: classical 165 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/ABC.yaml 166 | path: ./Rules/Media/ABC 167 | interval: 86400 168 | Abema TV: 169 | type: http 170 | behavior: classical 171 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Abema%20TV.yaml 172 | path: ./Rules/Media/Abema_TV 173 | interval: 86400 174 | Amazon: 175 | type: http 176 | behavior: classical 177 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Amazon.yaml 178 | path: ./Rules/Media/Amazon 179 | interval: 86400 180 | Apple News: 181 | type: http 182 | behavior: classical 183 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Apple%20News.yaml 184 | path: ./Rules/Media/Apple_News 185 | interval: 86400 186 | Apple TV: 187 | type: http 188 | behavior: classical 189 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Apple%20TV.yaml 190 | path: ./Rules/Media/Apple_TV 191 | interval: 86400 192 | Bahamut: 193 | type: http 194 | behavior: classical 195 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Bahamut.yaml 196 | path: ./Rules/Media/Bahamut 197 | interval: 86400 198 | BBC iPlayer: 199 | type: http 200 | behavior: classical 201 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/BBC%20iPlayer.yaml 202 | path: ./Rules/Media/BBC_iPlayer 203 | interval: 86400 204 | DAZN: 205 | type: http 206 | behavior: classical 207 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/DAZN.yaml 208 | path: ./Rules/Media/DAZN 209 | interval: 86400 210 | Discovery Plus: 211 | type: http 212 | behavior: classical 213 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Discovery%20Plus.yaml 214 | path: ./Rules/Media/Discovery_Plus 215 | interval: 86400 216 | Disney Plus: 217 | type: http 218 | behavior: classical 219 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Disney%20Plus.yaml 220 | path: ./Rules/Media/Disney_Plus 221 | interval: 86400 222 | encoreTVB: 223 | type: http 224 | behavior: classical 225 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/encoreTVB.yaml 226 | path: ./Rules/Media/encoreTVB 227 | interval: 86400 228 | Fox Now: 229 | type: http 230 | behavior: classical 231 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Fox%20Now.yaml 232 | path: ./Rules/Media/Fox_Now 233 | interval: 86400 234 | Fox+: 235 | type: http 236 | behavior: classical 237 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Fox%2B.yaml 238 | path: ./Rules/Media/Fox+ 239 | interval: 86400 240 | HBO Max: 241 | type: http 242 | behavior: classical 243 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/HBO%20Max.yaml 244 | path: ./Rules/Media/HBO_Max 245 | interval: 86400 246 | Hulu Japan: 247 | type: http 248 | behavior: classical 249 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Hulu%20Japan.yaml 250 | path: ./Rules/Media/Hulu_Japan 251 | interval: 86400 252 | Hulu: 253 | type: http 254 | behavior: classical 255 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Hulu.yaml 256 | path: ./Rules/Media/Hulu 257 | interval: 86400 258 | Japonx: 259 | type: http 260 | behavior: classical 261 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Japonx.yaml 262 | path: ./Rules/Media/Japonx 263 | interval: 86400 264 | JOOX: 265 | type: http 266 | behavior: classical 267 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/JOOX.yaml 268 | path: ./Rules/Media/JOOX 269 | interval: 86400 270 | KKBOX: 271 | type: http 272 | behavior: classical 273 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/KKBOX.yaml 274 | path: ./Rules/Media/KKBOX 275 | interval: 86400 276 | KKTV: 277 | type: http 278 | behavior: classical 279 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/KKTV.yaml 280 | path: ./Rules/Media/KKTV 281 | interval: 86400 282 | Line TV: 283 | type: http 284 | behavior: classical 285 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Line%20TV.yaml 286 | path: ./Rules/Media/Line_TV 287 | interval: 86400 288 | myTV SUPER: 289 | type: http 290 | behavior: classical 291 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/myTV%20SUPER.yaml 292 | path: ./Rules/Media/myTV_SUPER 293 | interval: 86400 294 | Pandora: 295 | type: http 296 | behavior: classical 297 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Pandora.yaml 298 | path: ./Rules/Media/Pandora 299 | interval: 86400 300 | PBS: 301 | type: http 302 | behavior: classical 303 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/PBS.yaml 304 | path: ./Rules/Media/PBS 305 | interval: 86400 306 | Pornhub: 307 | type: http 308 | behavior: classical 309 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Pornhub.yaml 310 | path: ./Rules/Media/Pornhub 311 | interval: 86400 312 | Soundcloud: 313 | type: http 314 | behavior: classical 315 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/Soundcloud.yaml 316 | path: ./Rules/Media/Soundcloud 317 | interval: 86400 318 | ViuTV: 319 | type: http 320 | behavior: classical 321 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Media/ViuTV.yaml 322 | path: ./Rules/Media/ViuTV 323 | interval: 86400 324 | Telegram: 325 | type: http 326 | behavior: classical 327 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Telegram.yaml 328 | path: ./Rules/Telegram 329 | interval: 86400 330 | Steam: 331 | type: http 332 | behavior: classical 333 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Steam.yaml 334 | path: ./Rules/Steam 335 | interval: 86400 336 | Speedtest: 337 | type: http 338 | behavior: classical 339 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Speedtest.yaml 340 | path: ./Rules/Speedtest 341 | interval: 86400 342 | PayPal: 343 | type: http 344 | behavior: classical 345 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/PayPal.yaml 346 | path: ./Rules/PayPal 347 | interval: 86400 348 | Microsoft: 349 | type: http 350 | behavior: classical 351 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Microsoft.yaml 352 | path: ./Rules/Microsoft 353 | interval: 86400 354 | PROXY: 355 | type: http 356 | behavior: classical 357 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Proxy.yaml 358 | path: ./Rules/Proxy 359 | interval: 86400 360 | Domestic: 361 | type: http 362 | behavior: classical 363 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Domestic.yaml 364 | path: ./Rules/Domestic 365 | interval: 86400 366 | Apple: 367 | type: http 368 | behavior: classical 369 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Apple.yaml 370 | path: ./Rules/Apple 371 | interval: 86400 372 | Google FCM: 373 | type: http 374 | behavior: classical 375 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Google%20FCM.yaml 376 | path: ./Rules/Google FCM 377 | interval: 86400 378 | Scholar: 379 | type: http 380 | behavior: classical 381 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Scholar.yaml 382 | path: ./Rules/Scholar 383 | interval: 86400 384 | Domestic IPs: 385 | type: http 386 | behavior: ipcidr 387 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/Domestic%20IPs.yaml 388 | path: ./Rules/Domestic_IPs 389 | interval: 86400 390 | LAN: 391 | type: http 392 | behavior: classical 393 | url: https://cdn.jsdelivr.net/gh/lhie1/Rules@master/Clash/Provider/LAN.yaml 394 | path: ./Rules/LAN 395 | interval: 86400 396 | --------------------------------------------------------------------------------