├── .github └── workflows │ ├── telegram.yml │ └── update.yml ├── .gitignore ├── CHENYK_SURGE.ini ├── CHENYK_SURGE_MEDIA.ini ├── Mac.conf ├── MacAutoUpdate.conf ├── MacAutoUpdateAuto.conf ├── MacAutoUpdateMedia.conf ├── MacLocalEdit.conf ├── Modules ├── ip-info │ ├── ip-info.js │ └── ip-info.sgmodule ├── sub-info │ ├── sub-info.js │ └── sub-info.sgmodule └── txsp │ └── txsp-ad.sgmodule ├── README.md ├── README.zh.md ├── README_v1.md ├── Rules └── TRYpay.list ├── TRYpay.list ├── iPhone.conf ├── iPhoneAutoUpdate.conf ├── iPhoneAutoUpdateAuto.conf ├── iPhoneAutoUpdateMedia.conf ├── iPhoneLocalEdit.conf ├── icon ├── 4g.svg ├── 5g.svg └── wifi.svg ├── install.py ├── static ├── 01.PNG ├── 1.png ├── 10.png ├── 11.png ├── 2.png ├── 3.png ├── 4.png ├── 4g.png ├── 5.png ├── 5g.png ├── 6.png ├── 7.png ├── 8.png ├── 9.png └── wifi.png └── telegram_update.py /.github/workflows/telegram.yml: -------------------------------------------------------------------------------- 1 | name: Plugins Data To Telegraph 2 | 3 | on: 4 | workflow_dispatch: ~ 5 | push: 6 | branches: 7 | - main 8 | tags: 9 | - '**' 10 | # paths: 11 | # - 'list.json' 12 | # - 'telegraph_update.py' 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | steps: 18 | # 此步骤使用 GitHub 的 https://github.com/actions/checkout 19 | - name: checkout actions 20 | uses: actions/checkout@v3 21 | 22 | # 设置python环境 23 | # 此步骤使用 GitHub 的 https://github.com/actions/setup-python 24 | - name: Set up Python 3.9 25 | uses: actions/setup-python@v3 26 | with: 27 | python-version: 3.9 28 | 29 | # 安装依赖 30 | - name: Install dependencies 31 | run: | 32 | python -m pip install --upgrade pip 33 | pip install httpx 34 | 35 | # 更新数据 36 | - name: Update Telegraph 37 | if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }} 38 | run: | 39 | python telegram_update.py ${{ secrets.TELEGRAPH_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/update.yml: -------------------------------------------------------------------------------- 1 | name: 每天自动更新中国的域名和IP 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | # 代表国际标准时间0点0分,北京时间需要+8小时,代表北京时间上午8点运行 6 | - cron: '0 0 * * *' 7 | jobs: 8 | #将工作流程中运行的所有作业组合在一起 9 | build: 10 | #定义名为 build 的作业。 子键将定义作业的属性 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - name: Set up Python 3.11 16 | uses: actions/setup-python@v2 17 | with: 18 | python-version: 3.11.1 19 | - name: install pip packages 20 | run: | 21 | python -m pip install --upgrade pip 22 | pip3 install requests 23 | - name: cn-domain-ip 24 | run: | 25 | python3 install.py 26 | 27 | - name: Push artifacts to release branch 28 | run: | 29 | git config --local user.email "150651687+chenyk1219@users.noreply.github.com" 30 | git config --local user.name "chenyk1219" 31 | 32 | git fetch 33 | git checkout release 34 | 35 | git checkout --orphan release-orphan 36 | 37 | /bin/cp -rf dist/ChinaIP.list ./ 38 | /bin/cp -rf dist/ChinaDomain.list ./ 39 | /bin/cp -rf dist/RealIP.list ./ 40 | /bin/cp -rf dist/UnBreak.list ./ 41 | /bin/cp -rf dist/adg.list ./ 42 | /bin/cp -rf dist/Unblocking.list ./ 43 | 44 | git add ChinaIP.list 45 | git add RealIP.list 46 | git add ChinaDomain.list 47 | git add UnBreak.list 48 | git add adg.list 49 | git add Unblocking.list 50 | git commit -am "Updated at $(date)" 51 | 52 | git branch -D release 53 | git branch -m release 54 | 55 | - name: GitHub Push 56 | uses: ad-m/github-push-action@v0.6.0 57 | with: 58 | github_token: ${{ secrets.GITHUB_TOKEN }} 59 | branch: release 60 | force: true 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | sub-web 5 | subconverter 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | cache\ 10 | test 11 | # Log files 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | test.py 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | ### PyCharm+iml template 25 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 26 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 27 | 28 | # User-specific stuff 29 | .idea/**/workspace.xml 30 | .idea/**/tasks.xml 31 | .idea/**/usage.statistics.xml 32 | .idea/**/dictionaries 33 | .idea/**/shelf 34 | 35 | # AWS User-specific 36 | .idea/**/aws.xml 37 | 38 | # Generated files 39 | .idea/**/contentModel.xml 40 | 41 | # Sensitive or high-churn files 42 | .idea/**/dataSources/ 43 | .idea/**/dataSources.ids 44 | .idea/**/dataSources.local.xml 45 | .idea/**/sqlDataSources.xml 46 | .idea/**/dynamic.xml 47 | .idea/**/uiDesigner.xml 48 | .idea/**/dbnavigator.xml 49 | 50 | # Gradle 51 | .idea/**/gradle.xml 52 | .idea/**/libraries 53 | 54 | # Gradle and Maven with auto-import 55 | # When using Gradle or Maven with auto-import, you should exclude module files, 56 | # since they will be recreated, and may cause churn. Uncomment if using 57 | # auto-import. 58 | # .idea/artifacts 59 | # .idea/compiler.xml 60 | # .idea/jarRepositories.xml 61 | # .idea/modules.xml 62 | # .idea/*.iml 63 | # .idea/modules 64 | # *.iml 65 | # *.ipr 66 | 67 | # CMake 68 | cmake-build-*/ 69 | 70 | # Mongo Explorer plugin 71 | .idea/**/mongoSettings.xml 72 | 73 | # File-based project format 74 | *.iws 75 | 76 | # IntelliJ 77 | out/ 78 | 79 | # mpeltonen/sbt-idea plugin 80 | .idea_modules/ 81 | 82 | # JIRA plugin 83 | atlassian-ide-plugin.xml 84 | 85 | # Cursive Clojure plugin 86 | .idea/replstate.xml 87 | 88 | # SonarLint plugin 89 | .idea/sonarlint/ 90 | 91 | # Crashlytics plugin (for Android Studio and IntelliJ) 92 | com_crashlytics_export_strings.xml 93 | crashlytics.properties 94 | crashlytics-build.properties 95 | fabric.properties 96 | 97 | # Editor-based Rest Client 98 | .idea/httpRequests 99 | 100 | # Android studio 3.1+ serialized cache file 101 | .idea/caches/build_file_checksums.ser 102 | 103 | ### JetBrains template 104 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 105 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 106 | 107 | # User-specific stuff 108 | 109 | # AWS User-specific 110 | 111 | # Gradle and Maven with auto-import 112 | # When using Gradle or Maven with auto-import, you should exclude module files, 113 | # since they will be recreated, and may cause churn. Uncomment if using 114 | # auto-import. 115 | # .idea/artifacts 116 | # .idea/compiler.xml 117 | # .idea/jarRepositories.xml 118 | # .idea/modules.xml 119 | # .idea/*.iml 120 | # .idea/modules 121 | # *.iml 122 | # *.ipr 123 | 124 | 125 | ### Vue template 126 | # gitignore template for Vue.js projects 127 | # 128 | # Recommended template: Node.gitignore 129 | 130 | # TODO: where does this rule come from? 131 | docs/_book 132 | 133 | # TODO: where does this rule come from? 134 | test/ 135 | 136 | ### Node template 137 | # Logs 138 | logs 139 | *.log 140 | lerna-debug.log* 141 | .pnpm-debug.log* 142 | 143 | # Diagnostic reports (https://nodejs.org/api/report.html) 144 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 145 | 146 | # Runtime data 147 | pids 148 | *.pid 149 | *.seed 150 | *.pid.lock 151 | 152 | # Directory for instrumented libs generated by jscoverage/JSCover 153 | lib-cov 154 | 155 | # Coverage directory used by tools like istanbul 156 | coverage 157 | *.lcov 158 | 159 | # nyc test coverage 160 | .nyc_output 161 | 162 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 163 | .grunt 164 | 165 | # Bower dependency directory (https://bower.io/) 166 | bower_components 167 | 168 | # node-waf configuration 169 | .lock-wscript 170 | 171 | # Compiled binary addons (https://nodejs.org/api/addons.html) 172 | build/Release 173 | 174 | # Dependency directories 175 | node_modules/ 176 | jspm_packages/ 177 | 178 | # Snowpack dependency directory (https://snowpack.dev/) 179 | web_modules/ 180 | 181 | # TypeScript cache 182 | *.tsbuildinfo 183 | 184 | # Optional npm cache directory 185 | .npm 186 | 187 | # Optional eslint cache 188 | .eslintcache 189 | 190 | # Optional stylelint cache 191 | .stylelintcache 192 | 193 | # Microbundle cache 194 | .rpt2_cache/ 195 | .rts2_cache_cjs/ 196 | .rts2_cache_es/ 197 | .rts2_cache_umd/ 198 | 199 | # Optional REPL history 200 | .node_repl_history 201 | 202 | # Output of 'npm pack' 203 | *.tgz 204 | 205 | # Yarn Integrity file 206 | .yarn-integrity 207 | 208 | # dotenv environment variable files 209 | .env.development.local 210 | .env.test.local 211 | .env.production.local 212 | 213 | # parcel-bundler cache (https://parceljs.org/) 214 | .cache 215 | .parcel-cache 216 | 217 | # Next.js build output 218 | .next 219 | out 220 | 221 | # Nuxt.js build / generate output 222 | .nuxt 223 | dist 224 | 225 | # Gatsby files 226 | .cache/ 227 | # Comment in the public line in if your project uses Gatsby and not Next.js 228 | # https://nextjs.org/blog/next-9-1#public-directory-support 229 | # public 230 | 231 | # vuepress build output 232 | .vuepress/dist 233 | 234 | # vuepress v2.x temp and cache directory 235 | .temp 236 | 237 | # Docusaurus cache and generated files 238 | .docusaurus 239 | 240 | # Serverless directories 241 | .serverless/ 242 | 243 | # FuseBox cache 244 | .fusebox/ 245 | 246 | # DynamoDB Local files 247 | .dynamodb/ 248 | 249 | # TernJS port file 250 | .tern-port 251 | 252 | # Stores VSCode versions used for testing VSCode extensions 253 | .vscode-test 254 | 255 | # yarn v2 256 | .yarn/cache 257 | .yarn/unplugged 258 | .yarn/build-state.yml 259 | .yarn/install-state.gz 260 | .pnp.* 261 | 262 | ### Vuejs template 263 | # Recommended template: Node.gitignore 264 | 265 | dist/ 266 | npm-debug.log 267 | yarn-error.log 268 | 269 | ### Python template 270 | # Byte-compiled / optimized / DLL files 271 | __pycache__/ 272 | *.py[cod] 273 | *$py.class 274 | 275 | # C extensions 276 | *.so 277 | 278 | # Distribution / packaging 279 | .Python 280 | build/ 281 | develop-eggs/ 282 | downloads/ 283 | eggs/ 284 | .eggs/ 285 | lib/ 286 | lib64/ 287 | parts/ 288 | sdist/ 289 | var/ 290 | wheels/ 291 | share/python-wheels/ 292 | *.egg-info/ 293 | .installed.cfg 294 | *.egg 295 | MANIFEST 296 | 297 | # PyInstaller 298 | # Usually these files are written by a python script from a template 299 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 300 | *.manifest 301 | *.spec 302 | 303 | # Installer logs 304 | pip-log.txt 305 | pip-delete-this-directory.txt 306 | 307 | # Unit test / coverage reports 308 | htmlcov/ 309 | .tox/ 310 | .nox/ 311 | .coverage 312 | .coverage.* 313 | nosetests.xml 314 | coverage.xml 315 | *.cover 316 | *.py,cover 317 | .hypothesis/ 318 | .pytest_cache/ 319 | cover/ 320 | 321 | # Translations 322 | *.mo 323 | *.pot 324 | 325 | # Django stuff: 326 | local_settings.py 327 | db.sqlite3 328 | db.sqlite3-journal 329 | 330 | # Flask stuff: 331 | instance/ 332 | .webassets-cache 333 | 334 | # Scrapy stuff: 335 | .scrapy 336 | 337 | # Sphinx documentation 338 | docs/_build/ 339 | 340 | # PyBuilder 341 | .pybuilder/ 342 | target/ 343 | 344 | # Jupyter Notebook 345 | .ipynb_checkpoints 346 | 347 | # IPython 348 | profile_default/ 349 | ipython_config.py 350 | 351 | # pyenv 352 | # For a library or package, you might want to ignore these files since the code is 353 | # intended to run in multiple environments; otherwise, check them in: 354 | # .python-version 355 | 356 | # pipenv 357 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 358 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 359 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 360 | # install all needed dependencies. 361 | #Pipfile.lock 362 | 363 | # poetry 364 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 365 | # This is especially recommended for binary packages to ensure reproducibility, and is more 366 | # commonly ignored for libraries. 367 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 368 | #poetry.lock 369 | 370 | # pdm 371 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 372 | #pdm.lock 373 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 374 | # in version control. 375 | # https://pdm.fming.dev/#use-with-ide 376 | .pdm.toml 377 | 378 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 379 | __pypackages__/ 380 | 381 | # Celery stuff 382 | celerybeat-schedule 383 | celerybeat.pid 384 | 385 | # SageMath parsed files 386 | *.sage.py 387 | 388 | # Environments 389 | .venv 390 | env/ 391 | venv/ 392 | ENV/ 393 | env.bak/ 394 | venv.bak/ 395 | 396 | # Spyder project settings 397 | .spyderproject 398 | .spyproject 399 | 400 | # Rope project settings 401 | .ropeproject 402 | 403 | # mkdocs documentation 404 | /site 405 | 406 | # mypy 407 | .mypy_cache/ 408 | .dmypy.json 409 | dmypy.json 410 | 411 | # Pyre type checker 412 | .pyre/ 413 | 414 | # pytype static type analyzer 415 | .pytype/ 416 | 417 | # Cython debug symbols 418 | cython_debug/ 419 | 420 | # PyCharm 421 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 422 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 423 | # and can be added to the global gitignore or merged into this file. For a more nuclear 424 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 425 | #.idea/ 426 | 427 | ### PyCharm+all template 428 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 429 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 430 | 431 | # User-specific stuff 432 | 433 | -------------------------------------------------------------------------------- /CHENYK_SURGE.ini: -------------------------------------------------------------------------------- 1 | ;suppress inspection "DuplicateKeyInSection" for whole file 2 | [custom] 3 | ;不要随意改变关键字,否则会导致出错 4 | 5 | ;去广告:支持 6 | ;自动测速:支持 7 | ;微软分流:支持 8 | ;苹果分流:支持 9 | ;增强中国IP段:支持 10 | ;增强国外GFW:支持 11 | 12 | ;设置规则标志位 13 | 14 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list 15 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list 16 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list 17 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list 18 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list 19 | ruleset=⛔️ 禁止访问,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list 20 | ruleset=⛔️ 禁止访问,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list 21 | ruleset=⛔️ 禁止访问,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list 22 | ruleset=⛔️ 禁止访问,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list 23 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list 24 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list 25 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list 26 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list 27 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list 28 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list 29 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list 30 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list 31 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list 32 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list 33 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list 34 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list 35 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list 36 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list 37 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list 38 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list 39 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list 40 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list 41 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list 42 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list 43 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list 44 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list 45 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list 46 | ruleset=🎯 全球直连,[]GEOIP,CN 47 | ruleset=🔰 节点选择,[]FINAL 48 | ;设置规则标志位 49 | 50 | 51 | ;设置分组标志位 52 | custom_proxy_group=🔰 节点选择`select`[]🛃 手动切换`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🇸🇬 新加坡节点`[]🌎 其他节点`[]🎯 全球直连`[]⛔️ 禁止访问 53 | custom_proxy_group=🛃 手动切换`select`^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 54 | custom_proxy_group=♻️ 自动选择`url-test`^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$`http://www.gstatic.com/generate_204`300,,50 55 | custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong|🇭🇰)`http://www.gstatic.com/generate_204`300,,50 56 | custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|🇯🇵)`http://www.gstatic.com/generate_204`300,,50 57 | custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|🇺🇸)`http://www.gstatic.com/generate_204`300,,50 58 | custom_proxy_group=🇨🇳 台湾节点`url-test`(台|新北|彰化|TW|Taiwan)`http://www.gstatic.com/generate_204`300,,50 59 | custom_proxy_group=🇰🇷 韩国节点`url-test`(KR|Korea|KOR|首尔|韩|韓|🇰🇷)`http://www.gstatic.com/generate_204`300,,50 60 | ; custom_proxy_group=🇬🇧 英国节点`url-test`^(?!.*Premium).*(?:UK|英国|🇬🇧).*$`http://www.gstatic.com/generate_204`300,,50 61 | custom_proxy_group=🇸🇬 新加坡节点`url-test`^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore|🇸🇬).*$`http://www.gstatic.com/generate_204`300,,50 62 | ; custom_proxy_group=🇨🇦 加拿大节点`url-test`^(?!.*Premium).*(?:Canada|🇨🇦|加拿大).*$,`http://www.gstatic.com/generate_204`300,,50 63 | ; custom_proxy_group=🇩🇪 德国节点`url-test`^(?!.*Premium).*(?:德国|🇩🇪|Germany).*$`http://www.gstatic.com/generate_204`300,,50 64 | ; custom_proxy_group=🇫🇷 法国节点`url-test`^(?!.*Premium).*(?:法国|🇫🇷|France).*$`http://www.gstatic.com/generate_204`300,,50 65 | ; custom_proxy_group=🇮🇳 印度节点`url-test`^(?!.*Premium).*(?:印度|🇮🇳|India).*$`http://www.gstatic.com/generate_204`300,,50 66 | custom_proxy_group=🌎 其他节点`url-test`^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore).)*$`http://www.gstatic.com/generate_204`300,,50,hidden=1, 67 | custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]REJECT 68 | custom_proxy_group=⛔️ 禁止访问`select`[]REJECT`[]DIRECT 69 | ;设置分组标志位 70 | 71 | enable_rule_generator=true 72 | overwrite_original_rules=true 73 | 74 | ;clash_rule_base=https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GeneralClashConfig.yml 75 | 76 | ;luck 77 | -------------------------------------------------------------------------------- /CHENYK_SURGE_MEDIA.ini: -------------------------------------------------------------------------------- 1 | ;suppress inspection "DuplicateKeyInSection" for whole file 2 | [custom] 3 | ;不要随意改变关键字,否则会导致出错 4 | 5 | ;去广告:支持 6 | ;自动测速:支持 7 | ;微软分流:支持 8 | ;苹果分流:支持 9 | ;增强中国IP段:支持 10 | ;增强国外GFW:支持 11 | 12 | ;设置规则标志位 13 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list 14 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list 15 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list 16 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list 17 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list 18 | ruleset=⛔️ 禁止访问,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list 19 | ruleset=⛔️ 禁止访问,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list 20 | ruleset=⛔️ 禁止访问,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list 21 | ruleset=⛔️ 禁止访问,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list 22 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list 23 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list 24 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list 25 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list 26 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list 27 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list 28 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list 29 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list 30 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list 31 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list 32 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list 33 | ruleset=🇺🇲 美国节点,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list 34 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list 35 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list 36 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list 37 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list 38 | ruleset=🇸🇬 新加坡节点,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list 39 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list 40 | ruleset=🇸🇬 新加坡节点,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list 41 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list 42 | ruleset=🔰 节点选择,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list 43 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list 44 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list 45 | ruleset=🎯 全球直连,[]GEOIP,CN 46 | ruleset=🔰 节点选择,[]FINAL 47 | ;设置规则标志位 48 | 49 | 50 | ;设置分组标志位 51 | custom_proxy_group=🔰 节点选择`select`[]🛃 手动切换`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇰🇷 韩国节点`[]🇸🇬 新加坡节点`[]🌎 其他节点`[]🎯 全球直连`[]⛔️ 禁止访问 52 | custom_proxy_group=🛃 手动切换`select`^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 53 | custom_proxy_group=♻️ 自动选择`url-test`^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$`http://1.0.0.1/generate_204`300,,50 54 | custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong|🇭🇰)`http://1.0.0.1/generate_204`300,,50 55 | custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|🇯🇵)`http://1.0.0.1/generate_204`300,,50 56 | custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|🇺🇸)`http://1.0.0.1/generate_204`300,,50 57 | custom_proxy_group=🇨🇳 台湾节点`url-test`(台|新北|彰化|TW|Taiwan)`http://1.0.0.1/generate_204`300,,50 58 | custom_proxy_group=🇰🇷 韩国节点`url-test`(KR|Korea|KOR|首尔|韩|韓|🇰🇷)`http://1.0.0.1/generate_204`300,,50 59 | ; custom_proxy_group=🇬🇧 英国节点`url-test`^(?!.*Premium).*(?:UK|英国|🇬🇧).*$`http://1.0.0.1/generate_204`300,,50 60 | custom_proxy_group=🇸🇬 新加坡节点`url-test`^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore|🇸🇬).*$`http://1.0.0.1/generate_204`300,,50 61 | ; custom_proxy_group=🇨🇦 加拿大节点`url-test`^(?!.*Premium).*(?:Canada|🇨🇦|加拿大).*$,`http://1.0.0.1/generate_204`300,,50 62 | ; custom_proxy_group=🇩🇪 德国节点`url-test`^(?!.*Premium).*(?:德国|🇩🇪|Germany).*$`http://1.0.0.1/generate_204`300,,50 63 | ; custom_proxy_group=🇫🇷 法国节点`url-test`^(?!.*Premium).*(?:法国|🇫🇷|France).*$`http://1.0.0.1/generate_204`300,,50 64 | ; custom_proxy_group=🇮🇳 印度节点`url-test`^(?!.*Premium).*(?:印度|🇮🇳|India).*$`http://1.0.0.1/generate_204`300,,50 65 | custom_proxy_group=🌎 其他节点`url-test`^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore).)*$`http://1.0.0.1/generate_204`300,,50,hidden=1, 66 | custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]REJECT 67 | custom_proxy_group=⛔️ 禁止访问`select`[]REJECT`[]DIRECT 68 | ;设置分组标志位 69 | 70 | enable_rule_generator=true 71 | overwrite_original_rules=true 72 | 73 | ;clash_rule_base=https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GeneralClashConfig.yml 74 | 75 | ;luck 76 | -------------------------------------------------------------------------------- /Mac.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | # ================ iOS和MacOS共同的 Surge 参数 ================ # 3 | # > 日志级别 verbose, info, notify, or warning 不建议在日常使用中启用详细,因为这会显著降低性能。 4 | loglevel = notify 5 | # > IPv6协议 启用完整的 IPv6 支持。具体来说,开启该选项后,访问域名时会查询该域名的AAAA记录。即使未启用此选项,也可以通过直接访问 IPv6 地址来访问 IPv6 站点。 6 | ipv6 = false 7 | # > 允许 IPv6 通过 Surge VIF。当您希望 Surge 处理连接到 IPv6 地址的原始 TCP 连接时很有用。 8 | # > off :切勿使用 IPv6 设置 Surge VIF 9 | # > auto :仅当本地网络具有有效的 IPv6 网络时,才使用 IPv6 设置 Surge VIF 10 | # > always :始终使用 IPv6 设置 Surge VIF 11 | ipv6-vif = false 12 | # > dns服务器 上游DNS服务器的IP地址 13 | dns-server = system, 223.6.6.6, 223.5.5.5, 119.29.29.29 14 | # > 跳过代理 在 iOS 版本中,此选项强制与这些域/IP 范围的连接由 Surge VIF 而不是 Surge 代理处理。在 macOS 版本中,当启用“设置为系统代理”时,这些设置将应用于系统。此选项用于修复某些应用的兼容性问题。 15 | # > apple.com、*apple.com、192.168.2.* or 192.168.2.0/24 16 | # > 注意:如果输入 IP 地址或地址范围,则只有在使用该地址连接到该主机时才能绕过代理,而不能在通过解析为该地址的域名连接到主机时绕过代理。 17 | skip-proxy = localhost, *.local, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16 18 | # > 排除简单主机名 就像 skip-proxy 参数一样。此选项允许请求使用由 Surge VIF 而不是 Surge 代理处理的简单主机名(不带点)。 19 | # > mysql01、redis01 20 | exclude-simple-hostnames = true 21 | # > 外部控制器访问 此选项允许外部控制器控制 Surge,例如 Surge Dashboard (macOS) 和 Surge iOS 遥控器 (iOS)。例如:key@0.0.0.0:6166 22 | external-controller-access = mima1234@0.0.0.0:6166 23 | # > 使用 HTTPS 协议而不是 HTTP。必须先配置 MitM CA 证书。您需要在客户端设备上手动安装证书。 24 | # http-api-tls = 25 | # > 启用此功能后,您可以通过 Web 浏览器控制 Surge。 26 | http-api-web-dashboard = true 27 | # > 显示错误页面拒绝,如果请求是纯 HTTP 请求,则显示 REJECT 策略的错误网页。 28 | show-error-page-for-reject = true 29 | # > Surge VIF只能处理 TCP 和 UDP 协议。使用此选项可绕过特定 IP 范围,以允许所有流量通过。 30 | # > 注意:此选项仅适用于Surge VIF。Surge Proxy Server 处理的请求不受影响。合并 skip-proxy 并确保 tun-excluded-routes 特定 HTTP 流量绕过 Surge。 31 | # tun-excluded-routes = 32 | # > 默认情况下,Surge VIF 接口将自身声明为默认路由。但是,由于 Wi-Fi 接口的路由较小,因此某些流量可能无法通过浪涌 VIF 接口。使用此选项可添加较小的路由。 33 | # tun-included-routes = 34 | # > Internet 连接测试的 URL, 以及,DIRECT 策略的测试 URL 35 | internet-test-url = http://223.6.6.6 36 | # > 代理策略的默认测试 URL 37 | proxy-test-url = http://1.0.0.1/generate_204 38 | # > 连接测试超时(秒) 39 | test-timeout = 5 40 | # > 始终真实的 IP 此选项要求 Surge 在 Surge VIF 处理 DNS 问题时返回真实 IP 地址而不是虚假 IP 地址 DNS数据包将被转发到上游DNS服务器 此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 41 | # > 使用前缀 - 排除主机名 42 | # > 支持通配符 * 和 ? 43 | # > 使用后缀 :port 匹配其他端口,如果未提供端口号,则 Surge 将自动为该参数附加标准端口号,就像 force-http-engine-hosts 参数一样,如果仅配置了主机名,则仅对端口 80 有效。对于 MITM 功能,它仅对端口 443 有效。 44 | # > 使用后缀 :0 以匹配所有端口 45 | # > 使用 直接使用 IPv4/IPv6 地址(而不是域)匹配所有主机名 46 | # > -*icloud*, -*.mzstatic.com, -*.facebook.com, -*.instagram.com, -*.twitter.com, -*dropbox*, -*apple*, -*.amazonaws.com, -, * 47 | always-real-ip = *.test.com 48 | # > 劫持DNS,默认情况下,Surge 仅返回发送到 Surge DNS 地址 (198.18.0.2) 的 DNS 查询的虚假 IP 地址。发送到标准 DNS 的查询将被转发。某些设备或软件始终使用硬编码的 DNS 服务器。(例如,Google Speakers始终使用 8.8.8.8)。您可以使用此选项劫持查询以获取虚假地址。您可以使用 hijack-dns = *:53 劫持所有DNS查询 49 | hijack-dns = *:53 50 | # > 使 Surge 将 TCP 连接视为 HTTP 请求。Surge HTTP 引擎将处理请求,并且所有高级功能都将可用,例如捕获、重写和脚本编写。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 51 | # force-http-engine-hosts = 52 | # > 加密 DNS 跟随出站模式,默认情况下,加密的 DNS 查找使用直接出站。启用该选项将使 DOH 遵循出站模式设置和规则。 53 | encrypted-dns-follow-outbound-mode = true 54 | # > 加密的 DNS 服务器,加密的 DNS 服务器的 URL。如果配置了加密 DNS,则传统 DNS 将仅用于测试连接并解析加密 DNS URL 中的域。 55 | encrypted-dns-server = https://223.5.5.5/dns-query,quic://223.6.6.6:853,quic://223.5.5.5:853,https://223.6.6.6/dns-query,https://1.12.12.12/dns-query,https://120.53.53.53/dns-query 56 | # , https://8.8.8.8/dns-query, https://1.1.1.1/dns-query 57 | # > 跳过加密的DNS服务器证书验证,这是不安全的。 58 | encrypted-dns-skip-cert-verification = false 59 | # > 使用本地主机代理,默认情况下,如果使用代理策略,则始终在远程服务器上执行 DNS 查找。启用此选项后,如果存在目标域的本地 DNS 映射结果,则 Surge 会使用 IP 地址而不是域来设置代理连接。 60 | use-local-host-item-for-proxy = false 61 | # > 要更新的 GeoIP 数据库的 URL 62 | geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb 63 | # > 禁用 GeoIP 数据库的自动更新 64 | disable-geoip-db-auto-update = false 65 | # > iOS 系统可能会执行 SVCB 记录 DNS 查找,而不是标准 A 记录查找。这会导致 Surge 无法返回虚拟 IP 地址。因此,默认情况下,禁止 SVCB 记录查找,以强制系统执行 A 记录查找。 66 | allow-dns-svcb = false 67 | # > UDP 流量与不支持 UDP 中继的策略匹配时的回退行为,可能的值: DIRECT 、 REJECT, 如果没有代理服务器支持 UDP 转发,可修改为「 direct 」或注释下条,但需注意同一目标主机名 TCP 请求与 UDP 请求的源地址不同所造成的隐私及安全风险。 68 | udp-policy-not-supported-behaviour = REJECT 69 | # > 代理的默认 UDP 测试参数, 例如: apple.com@8.8.8.8 70 | # proxy-test-udp = apple.com@8.8.8.8 71 | # > 当系统负载非常高且数据包处理延迟时,启用将优先处理 UDP 数据包。也称为游戏模式 72 | udp-priority = false 73 | # > Surge 将自动嗅探发送到端口 80 和 443 的 TCP 请求的协议,从而在优化性能的同时启用高级 HTTP/HTTPS 功能。但是,这可能会导致一些兼容性问题。如果遇到问题,可以在此处添加主机名,Surge 不会嗅探这些请求的协议。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 74 | always-raw-tcp-hosts = *.baidu.com 75 | # ================ 仅限 MacOS 的 Surge 参数 ================ # 76 | # > 如果禁用,即使 Wi-Fi 不是主网络接口,SSID/BSSID 模式仍可匹配。 77 | use-default-policy-if-wifi-not-primary = false 78 | # > 遵循 /etc/hosts 中的本地 DNS 映射项 79 | read-etc-hosts = true 80 | # > Surge HTTP 代理服务的端口号 81 | http-listen = 0.0.0.0 82 | # > Surge SOCKS5 代理服务的端口号 83 | socks5-listen = 0.0.0.0 84 | # > 启用 CPU 调试模式。这可能会降低性能。 85 | debug-cpu-usage = false 86 | # > 启用内存调试模式。这可能会降低性能。 87 | debug-memory-usage = false 88 | # > vif模式 89 | # > auto :让Surge自动选择最合适的工作模式。 90 | # > v1 :传统模式,TCP协议栈完全由Surge管理。由于 Surge 运行在用户空间中,这意味着每个数据包都需要从内核空间传输到用户空间进行处理。 91 | # > v2 :在 5.0 版本中引入,它使用 macOS 中的数据包过滤器机制,利用 macOS 的 TCP 协议栈,从而避免了在内核空间和用户空间之间切换的开销,从而显着提高了性能。但是,由于它需要修改 pf 设置,因此它与虚拟机网络和网络共享功能不兼容。 92 | # > v3 :在 5.2 版中引入,它绕过了数据包过滤器,并采用另一种技术来使用 macOS 的 TCP 协议栈。性能略低于 v2,但避免了因调整 pf 设置而导致的兼容性问题。 93 | vif-mode = v3 94 | 95 | [Proxy] 96 | #!include 97 | 98 | [Proxy Group] 99 | 🔰 节点选择 = select, ♻️ 自动选择, 🛃 手动切换, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇺🇸 美国节点, 🇨🇳 台湾节点, 🇰🇷 韩国节点, 🇸🇬 新加坡节点, 🌎 其他节点, 🎯 全球直连, ⛔️ 禁止访问 100 | ♻️ 自动选择 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 101 | 🛃 手动切换 = select, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 102 | 🇭🇰 香港节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:港|HK|hk|Hong Kong|HongKong|hongkong).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 103 | 🇯🇵 日本节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 104 | 🇺🇸 美国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 105 | 🇨🇳 台湾节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:台|新北|彰化|TW|Taiwan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 106 | 🇰🇷 韩国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:KR|Korea|KOR|首尔|韩|韓).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 107 | 🇸🇬 新加坡节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 108 | 🌎 其他节点 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore).)*$, interval=300, tolerance=50 109 | ⛔️ 禁止访问 = select, REJECT 110 | 🎯 全球直连 = select, DIRECT 111 | 112 | [Rule] 113 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list,🎯 全球直连,update-interval=86400 // 白名单 114 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list,🎯 全球直连,update-interval=86400 // 规则修正 115 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list,🎯 全球直连,update-interval=86400 // Lan网 116 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list,🎯 全球直连,update-interval=86400 // 私有网 117 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list,🎯 全球直连,update-interval=86400 // Apple 118 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list,⛔️ 禁止访问,update-interval=86400,no-resolve // AD广告 119 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list,⛔️ 禁止访问,update-interval=86400 // 防劫持 120 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list,⛔️ 禁止访问,update-interval=86400 // 禁用HTTP协议的DNS 121 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list,⛔️ 禁止访问,update-interval=86400 // 隐私保护 122 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list,🎯 全球直连,update-interval=86400 // 亚马逊中国 123 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list,🎯 全球直连,update-interval=86400 // Cloudflare中国 124 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list,🎯 全球直连,update-interval=86400 // 下载网站 125 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list,🎯 全球直连,update-interval=86400 // 谷歌中国 126 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list,🔰 节点选择,update-interval=86400 // Microsoft OneDrive 127 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list,🔰 节点选择,update-interval=86400 // Microsoft服务 128 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list,🔰 节点选择,update-interval=86400 // 亚马逊网站 129 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list,🔰 节点选择,update-interval=86400 // 亚马逊服务器 130 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list,🔰 节点选择,update-interval=86400 // Jetbrains 131 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list,🔰 节点选择,update-interval=86400 // Telegram 132 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,🔰 节点选择,update-interval=86400 // Twitter 133 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list,🔰 节点选择,update-interval=86400 // ChatGPT 134 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,🔰 节点选择,update-interval=86400 // Github 135 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list,🔰 节点选择,update-interval=86400 // Cloudflare 136 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,🔰 节点选择,update-interval=86400 // YouTube 137 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list,🔰 节点选择,update-interval=86400 // YouTube Music 138 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,🔰 节点选择,update-interval=86400 // Netflix 139 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,🔰 节点选择,update-interval=86400 // TikTok 140 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list,🔰 节点选择,update-interval=86400 // Disney 141 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // 国外媒体 142 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // GFW 143 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list,🎯 全球直连,update-interval=86400 // 中国公司IP 144 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list,🎯 全球直连,update-interval=86400 // 中国域名 145 | GEOIP,CN,🎯 全球直连 // 中国IP 146 | FINAL,🔰 节点选择 147 | 148 | [URL Rewrite] 149 | ^https?://(www.)?g.cn https://www.google.com 302 150 | ^https?://(www.)?google.cn https://www.google.com 302 -------------------------------------------------------------------------------- /MacAutoUpdate.conf: -------------------------------------------------------------------------------- 1 | #!MANAGED-CONFIG https://raw.githubusercontent.com/chenyk1219/surge/master/MacAutoUpdate.conf interval=86400 strict=false 2 | 3 | [General] 4 | # ================ iOS和MacOS共同的 Surge 参数 ================ # 5 | # > 日志级别 verbose, info, notify, or warning 不建议在日常使用中启用详细,因为这会显著降低性能。 6 | loglevel = notify 7 | # > IPv6协议 启用完整的 IPv6 支持。具体来说,开启该选项后,访问域名时会查询该域名的AAAA记录。即使未启用此选项,也可以通过直接访问 IPv6 地址来访问 IPv6 站点。 8 | ipv6 = false 9 | # > 允许 IPv6 通过 Surge VIF。当您希望 Surge 处理连接到 IPv6 地址的原始 TCP 连接时很有用。 10 | # > off :切勿使用 IPv6 设置 Surge VIF 11 | # > auto :仅当本地网络具有有效的 IPv6 网络时,才使用 IPv6 设置 Surge VIF 12 | # > always :始终使用 IPv6 设置 Surge VIF 13 | ipv6-vif = false 14 | # > dns服务器 上游DNS服务器的IP地址 15 | dns-server = system, 223.6.6.6, 223.5.5.5, 119.29.29.29 16 | # > 跳过代理 在 iOS 版本中,此选项强制与这些域/IP 范围的连接由 Surge VIF 而不是 Surge 代理处理。在 macOS 版本中,当启用“设置为系统代理”时,这些设置将应用于系统。此选项用于修复某些应用的兼容性问题。 17 | # > apple.com、*apple.com、192.168.2.* or 192.168.2.0/24 18 | # > 注意:如果输入 IP 地址或地址范围,则只有在使用该地址连接到该主机时才能绕过代理,而不能在通过解析为该地址的域名连接到主机时绕过代理。 19 | skip-proxy = localhost, *.local, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16 20 | # > 排除简单主机名 就像 skip-proxy 参数一样。此选项允许请求使用由 Surge VIF 而不是 Surge 代理处理的简单主机名(不带点)。 21 | # > mysql01、redis01 22 | exclude-simple-hostnames = true 23 | # > 外部控制器访问 此选项允许外部控制器控制 Surge,例如 Surge Dashboard (macOS) 和 Surge iOS 遥控器 (iOS)。例如:key@0.0.0.0:6166 24 | external-controller-access = mima1234@0.0.0.0:6166 25 | # > 使用 HTTPS 协议而不是 HTTP。必须先配置 MitM CA 证书。您需要在客户端设备上手动安装证书。 26 | # http-api-tls = 27 | # > 启用此功能后,您可以通过 Web 浏览器控制 Surge。 28 | http-api-web-dashboard = true 29 | # > 显示错误页面拒绝,如果请求是纯 HTTP 请求,则显示 REJECT 策略的错误网页。 30 | show-error-page-for-reject = true 31 | # > Surge VIF只能处理 TCP 和 UDP 协议。使用此选项可绕过特定 IP 范围,以允许所有流量通过。 32 | # > 注意:此选项仅适用于Surge VIF。Surge Proxy Server 处理的请求不受影响。合并 skip-proxy 并确保 tun-excluded-routes 特定 HTTP 流量绕过 Surge。 33 | # tun-excluded-routes = 34 | # > 默认情况下,Surge VIF 接口将自身声明为默认路由。但是,由于 Wi-Fi 接口的路由较小,因此某些流量可能无法通过浪涌 VIF 接口。使用此选项可添加较小的路由。 35 | # tun-included-routes = 36 | # > Internet 连接测试的 URL, 以及,DIRECT 策略的测试 URL 37 | internet-test-url = http://connect.rom.miui.com/generate_204 38 | # > 代理策略的默认测试 URL 39 | proxy-test-url = http://1.0.0.1/generate_204 40 | # > 连接测试超时(秒) 41 | test-timeout = 5 42 | # > 始终真实的 IP 此选项要求 Surge 在 Surge VIF 处理 DNS 问题时返回真实 IP 地址而不是虚假 IP 地址 DNS数据包将被转发到上游DNS服务器 此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 43 | # > 使用前缀 - 排除主机名 44 | # > 支持通配符 * 和 ? 45 | # > 使用后缀 :port 匹配其他端口,如果未提供端口号,则 Surge 将自动为该参数附加标准端口号,就像 force-http-engine-hosts 参数一样,如果仅配置了主机名,则仅对端口 80 有效。对于 MITM 功能,它仅对端口 443 有效。 46 | # > 使用后缀 :0 以匹配所有端口 47 | # > 使用 直接使用 IPv4/IPv6 地址(而不是域)匹配所有主机名 48 | # > -*icloud*, -*.mzstatic.com, -*.facebook.com, -*.instagram.com, -*.twitter.com, -*dropbox*, -*apple*, -*.amazonaws.com, -, * 49 | always-real-ip = *.test.com 50 | # > 劫持DNS,默认情况下,Surge 仅返回发送到 Surge DNS 地址 (198.18.0.2) 的 DNS 查询的虚假 IP 地址。发送到标准 DNS 的查询将被转发。某些设备或软件始终使用硬编码的 DNS 服务器。(例如,Google Speakers始终使用 8.8.8.8)。您可以使用此选项劫持查询以获取虚假地址。您可以使用 hijack-dns = *:53 劫持所有DNS查询 51 | hijack-dns = *:53 52 | # > 使 Surge 将 TCP 连接视为 HTTP 请求。Surge HTTP 引擎将处理请求,并且所有高级功能都将可用,例如捕获、重写和脚本编写。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 53 | # force-http-engine-hosts = 54 | # > 加密 DNS 跟随出站模式,默认情况下,加密的 DNS 查找使用直接出站。启用该选项将使 DOH 遵循出站模式设置和规则。 55 | encrypted-dns-follow-outbound-mode = true 56 | # > 加密的 DNS 服务器,加密的 DNS 服务器的 URL。如果配置了加密 DNS,则传统 DNS 将仅用于测试连接并解析加密 DNS URL 中的域。 57 | encrypted-dns-server = https://223.5.5.5/dns-query,quic://223.6.6.6:853,quic://223.5.5.5:853,https://223.6.6.6/dns-query,https://1.12.12.12/dns-query,https://120.53.53.53/dns-query 58 | # , https://8.8.8.8/dns-query, https://1.1.1.1/dns-query 59 | # > 跳过加密的DNS服务器证书验证,这是不安全的。 60 | encrypted-dns-skip-cert-verification = false 61 | # > 使用本地主机代理,默认情况下,如果使用代理策略,则始终在远程服务器上执行 DNS 查找。启用此选项后,如果存在目标域的本地 DNS 映射结果,则 Surge 会使用 IP 地址而不是域来设置代理连接。 62 | use-local-host-item-for-proxy = false 63 | # > 要更新的 GeoIP 数据库的 URL 64 | geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb 65 | # > 禁用 GeoIP 数据库的自动更新 66 | disable-geoip-db-auto-update = false 67 | # > iOS 系统可能会执行 SVCB 记录 DNS 查找,而不是标准 A 记录查找。这会导致 Surge 无法返回虚拟 IP 地址。因此,默认情况下,禁止 SVCB 记录查找,以强制系统执行 A 记录查找。 68 | allow-dns-svcb = false 69 | # > UDP 流量与不支持 UDP 中继的策略匹配时的回退行为,可能的值: DIRECT 、 REJECT, 如果没有代理服务器支持 UDP 转发,可修改为「 direct 」或注释下条,但需注意同一目标主机名 TCP 请求与 UDP 请求的源地址不同所造成的隐私及安全风险。 70 | udp-policy-not-supported-behaviour = REJECT 71 | # > 代理的默认 UDP 测试参数, 例如: apple.com@8.8.8.8 72 | # proxy-test-udp = apple.com@8.8.8.8 73 | # > 当系统负载非常高且数据包处理延迟时,启用将优先处理 UDP 数据包。也称为游戏模式 74 | udp-priority = false 75 | # > Surge 将自动嗅探发送到端口 80 和 443 的 TCP 请求的协议,从而在优化性能的同时启用高级 HTTP/HTTPS 功能。但是,这可能会导致一些兼容性问题。如果遇到问题,可以在此处添加主机名,Surge 不会嗅探这些请求的协议。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 76 | always-raw-tcp-hosts = *.baidu.com 77 | # ================ 仅限 MacOS 的 Surge 参数 ================ # 78 | # > 如果禁用,即使 Wi-Fi 不是主网络接口,SSID/BSSID 模式仍可匹配。 79 | use-default-policy-if-wifi-not-primary = false 80 | # > 遵循 /etc/hosts 中的本地 DNS 映射项 81 | read-etc-hosts = true 82 | # > Surge HTTP 代理服务的端口号 83 | http-listen = 0.0.0.0 84 | # > Surge SOCKS5 代理服务的端口号 85 | socks5-listen = 0.0.0.0 86 | # > 启用 CPU 调试模式。这可能会降低性能。 87 | debug-cpu-usage = false 88 | # > 启用内存调试模式。这可能会降低性能。 89 | debug-memory-usage = false 90 | # > vif模式 91 | # > auto :让Surge自动选择最合适的工作模式。 92 | # > v1 :传统模式,TCP协议栈完全由Surge管理。由于 Surge 运行在用户空间中,这意味着每个数据包都需要从内核空间传输到用户空间进行处理。 93 | # > v2 :在 5.0 版本中引入,它使用 macOS 中的数据包过滤器机制,利用 macOS 的 TCP 协议栈,从而避免了在内核空间和用户空间之间切换的开销,从而显着提高了性能。但是,由于它需要修改 pf 设置,因此它与虚拟机网络和网络共享功能不兼容。 94 | # > v3 :在 5.2 版中引入,它绕过了数据包过滤器,并采用另一种技术来使用 macOS 的 TCP 协议栈。性能略低于 v2,但避免了因调整 pf 设置而导致的兼容性问题。 95 | vif-mode = v3 96 | 97 | [Proxy] 98 | 99 | 100 | [Proxy Group] 101 | 🔰 节点选择 = select, ♻️ 自动选择, 🛃 手动切换, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇺🇸 美国节点, 🇨🇳 台湾节点, 🇰🇷 韩国节点, 🇬🇧 英国节点, 🇸🇬 新加坡节点, 🇨🇦 加拿大节点, 🇩🇪 德国节点, 🇫🇷 法国节点, 🇮🇳 印度节点, 🌎 其他节点, 🎯 全球直连, ⛔️ 禁止访问 102 | ♻️ 自动选择 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 103 | 🛃 手动切换 = select, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 104 | 🇭🇰 香港节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:港|HK|hk|Hong Kong|HongKong|hongkong).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 105 | 🇯🇵 日本节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 106 | 🇺🇸 美国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 107 | 🇨🇳 台湾节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:台|新北|彰化|TW|Taiwan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 108 | 🇰🇷 韩国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:KR|Korea|KOR|首尔|韩|韓).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 109 | 🇬🇧 英国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:UK|英国).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 110 | 🇸🇬 新加坡节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 111 | 🇨🇦 加拿大节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:Canada|加拿大).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 112 | 🇩🇪 德国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:德国|🇩🇪|Germany).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 113 | 🇫🇷 法国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:法国|🇫🇷|France).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 114 | 🇮🇳 印度节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:印度|🇮🇳|India).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 115 | 🌎 其他节点 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore|英国|UK|Canada|加拿大|德国|🇩🇪|Germany|法国|🇫🇷|France|印度|🇮🇳|India).)*$, interval=300, tolerance=50 116 | ⛔️ 禁止访问 = select, REJECT 117 | 🎯 全球直连 = select, DIRECT 118 | 119 | [Rule] 120 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list,🎯 全球直连,update-interval=86400 // 白名单 121 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list,🎯 全球直连,update-interval=86400 // 规则修正 122 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list,🎯 全球直连,update-interval=86400 // Lan网 123 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list,🎯 全球直连,update-interval=86400 // 私有网 124 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list,🎯 全球直连,update-interval=86400 // Apple 125 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list,⛔️ 禁止访问,update-interval=86400,no-resolve // AD广告 126 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list,⛔️ 禁止访问,update-interval=86400 // 防劫持 127 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list,⛔️ 禁止访问,update-interval=86400 // 禁用HTTP协议的DNS 128 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list,⛔️ 禁止访问,update-interval=86400 // 隐私保护 129 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list,🎯 全球直连,update-interval=86400 // 亚马逊中国 130 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list,🎯 全球直连,update-interval=86400 // Cloudflare中国 131 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list,🎯 全球直连,update-interval=86400 // 下载网站 132 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list,🎯 全球直连,update-interval=86400 // 谷歌中国 133 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list,🔰 节点选择,update-interval=86400 // Microsoft OneDrive 134 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list,🔰 节点选择,update-interval=86400 // Microsoft服务 135 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list,🔰 节点选择,update-interval=86400 // 亚马逊网站 136 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list,🔰 节点选择,update-interval=86400 // 亚马逊服务器 137 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list,🔰 节点选择,update-interval=86400 // Jetbrains 138 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list,🔰 节点选择,update-interval=86400 // Telegram 139 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,🔰 节点选择,update-interval=86400 // Twitter 140 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list,🔰 节点选择,update-interval=86400 // ChatGPT 141 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,🔰 节点选择,update-interval=86400 // Github 142 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list,🔰 节点选择,update-interval=86400 // Cloudflare 143 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,🔰 节点选择,update-interval=86400 // YouTube 144 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list,🔰 节点选择,update-interval=86400 // YouTube Music 145 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,🔰 节点选择,update-interval=86400 // Netflix 146 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,🔰 节点选择,update-interval=86400 // TikTok 147 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list,🔰 节点选择,update-interval=86400 // Disney 148 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // 国外媒体 149 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // GFW 150 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list,🎯 全球直连,update-interval=86400 // 中国公司IP 151 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list,🎯 全球直连,update-interval=86400 // 中国域名 152 | GEOIP,CN,🎯 全球直连 // 中国IP 153 | FINAL,🔰 节点选择 154 | 155 | [URL Rewrite] 156 | ^https?://(www.)?g.cn https://www.google.com 302 157 | ^https?://(www.)?google.cn https://www.google.com 302 -------------------------------------------------------------------------------- /MacAutoUpdateAuto.conf: -------------------------------------------------------------------------------- 1 | #!MANAGED-CONFIG https://raw.githubusercontent.com/chenyk1219/surge/master/MacAutoUpdateAuto.conf interval=86400 strict=false 2 | 3 | [General] 4 | # ================ iOS和MacOS共同的 Surge 参数 ================ # 5 | # > 日志级别 verbose, info, notify, or warning 不建议在日常使用中启用详细,因为这会显著降低性能。 6 | loglevel = notify 7 | # > IPv6协议 启用完整的 IPv6 支持。具体来说,开启该选项后,访问域名时会查询该域名的AAAA记录。即使未启用此选项,也可以通过直接访问 IPv6 地址来访问 IPv6 站点。 8 | ipv6 = false 9 | # > 允许 IPv6 通过 Surge VIF。当您希望 Surge 处理连接到 IPv6 地址的原始 TCP 连接时很有用。 10 | # > off :切勿使用 IPv6 设置 Surge VIF 11 | # > auto :仅当本地网络具有有效的 IPv6 网络时,才使用 IPv6 设置 Surge VIF 12 | # > always :始终使用 IPv6 设置 Surge VIF 13 | ipv6-vif = false 14 | # > dns服务器 上游DNS服务器的IP地址 15 | dns-server = system, 223.6.6.6, 223.5.5.5, 119.29.29.29 16 | # > 跳过代理 在 iOS 版本中,此选项强制与这些域/IP 范围的连接由 Surge VIF 而不是 Surge 代理处理。在 macOS 版本中,当启用“设置为系统代理”时,这些设置将应用于系统。此选项用于修复某些应用的兼容性问题。 17 | # > apple.com、*apple.com、192.168.2.* or 192.168.2.0/24 18 | # > 注意:如果输入 IP 地址或地址范围,则只有在使用该地址连接到该主机时才能绕过代理,而不能在通过解析为该地址的域名连接到主机时绕过代理。 19 | skip-proxy = localhost, *.local, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16 20 | # > 排除简单主机名 就像 skip-proxy 参数一样。此选项允许请求使用由 Surge VIF 而不是 Surge 代理处理的简单主机名(不带点)。 21 | # > mysql01、redis01 22 | exclude-simple-hostnames = true 23 | # > 外部控制器访问 此选项允许外部控制器控制 Surge,例如 Surge Dashboard (macOS) 和 Surge iOS 遥控器 (iOS)。例如:key@0.0.0.0:6166 24 | external-controller-access = mima1234@0.0.0.0:6166 25 | # > 使用 HTTPS 协议而不是 HTTP。必须先配置 MitM CA 证书。您需要在客户端设备上手动安装证书。 26 | # http-api-tls = 27 | # > 启用此功能后,您可以通过 Web 浏览器控制 Surge。 28 | http-api-web-dashboard = true 29 | # > 显示错误页面拒绝,如果请求是纯 HTTP 请求,则显示 REJECT 策略的错误网页。 30 | show-error-page-for-reject = true 31 | # > Surge VIF只能处理 TCP 和 UDP 协议。使用此选项可绕过特定 IP 范围,以允许所有流量通过。 32 | # > 注意:此选项仅适用于Surge VIF。Surge Proxy Server 处理的请求不受影响。合并 skip-proxy 并确保 tun-excluded-routes 特定 HTTP 流量绕过 Surge。 33 | # tun-excluded-routes = 34 | # > 默认情况下,Surge VIF 接口将自身声明为默认路由。但是,由于 Wi-Fi 接口的路由较小,因此某些流量可能无法通过浪涌 VIF 接口。使用此选项可添加较小的路由。 35 | # tun-included-routes = 36 | # > Internet 连接测试的 URL, 以及,DIRECT 策略的测试 URL 37 | internet-test-url = http://connect.rom.miui.com/generate_204 38 | # > 代理策略的默认测试 URL 39 | proxy-test-url = http://1.0.0.1/generate_204 40 | # > 连接测试超时(秒) 41 | test-timeout = 5 42 | # > 始终真实的 IP 此选项要求 Surge 在 Surge VIF 处理 DNS 问题时返回真实 IP 地址而不是虚假 IP 地址 DNS数据包将被转发到上游DNS服务器 此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 43 | # > 使用前缀 - 排除主机名 44 | # > 支持通配符 * 和 ? 45 | # > 使用后缀 :port 匹配其他端口,如果未提供端口号,则 Surge 将自动为该参数附加标准端口号,就像 force-http-engine-hosts 参数一样,如果仅配置了主机名,则仅对端口 80 有效。对于 MITM 功能,它仅对端口 443 有效。 46 | # > 使用后缀 :0 以匹配所有端口 47 | # > 使用 直接使用 IPv4/IPv6 地址(而不是域)匹配所有主机名 48 | # > -*icloud*, -*.mzstatic.com, -*.facebook.com, -*.instagram.com, -*.twitter.com, -*dropbox*, -*apple*, -*.amazonaws.com, -, * 49 | always-real-ip = *.test.com 50 | # > 劫持DNS,默认情况下,Surge 仅返回发送到 Surge DNS 地址 (198.18.0.2) 的 DNS 查询的虚假 IP 地址。发送到标准 DNS 的查询将被转发。某些设备或软件始终使用硬编码的 DNS 服务器。(例如,Google Speakers始终使用 8.8.8.8)。您可以使用此选项劫持查询以获取虚假地址。您可以使用 hijack-dns = *:53 劫持所有DNS查询 51 | hijack-dns = *:53 52 | # > 使 Surge 将 TCP 连接视为 HTTP 请求。Surge HTTP 引擎将处理请求,并且所有高级功能都将可用,例如捕获、重写和脚本编写。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 53 | # force-http-engine-hosts = 54 | # > 加密 DNS 跟随出站模式,默认情况下,加密的 DNS 查找使用直接出站。启用该选项将使 DOH 遵循出站模式设置和规则。 55 | encrypted-dns-follow-outbound-mode = true 56 | # > 加密的 DNS 服务器,加密的 DNS 服务器的 URL。如果配置了加密 DNS,则传统 DNS 将仅用于测试连接并解析加密 DNS URL 中的域。 57 | encrypted-dns-server = https://223.5.5.5/dns-query,quic://223.6.6.6:853,quic://223.5.5.5:853,https://223.6.6.6/dns-query,https://1.12.12.12/dns-query,https://120.53.53.53/dns-query 58 | # , https://8.8.8.8/dns-query, https://1.1.1.1/dns-query 59 | # > 跳过加密的DNS服务器证书验证,这是不安全的。 60 | encrypted-dns-skip-cert-verification = false 61 | # > 使用本地主机代理,默认情况下,如果使用代理策略,则始终在远程服务器上执行 DNS 查找。启用此选项后,如果存在目标域的本地 DNS 映射结果,则 Surge 会使用 IP 地址而不是域来设置代理连接。 62 | use-local-host-item-for-proxy = false 63 | # > 要更新的 GeoIP 数据库的 URL 64 | geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb 65 | # > 禁用 GeoIP 数据库的自动更新 66 | disable-geoip-db-auto-update = false 67 | # > iOS 系统可能会执行 SVCB 记录 DNS 查找,而不是标准 A 记录查找。这会导致 Surge 无法返回虚拟 IP 地址。因此,默认情况下,禁止 SVCB 记录查找,以强制系统执行 A 记录查找。 68 | allow-dns-svcb = false 69 | # > UDP 流量与不支持 UDP 中继的策略匹配时的回退行为,可能的值: DIRECT 、 REJECT, 如果没有代理服务器支持 UDP 转发,可修改为「 direct 」或注释下条,但需注意同一目标主机名 TCP 请求与 UDP 请求的源地址不同所造成的隐私及安全风险。 70 | udp-policy-not-supported-behaviour = REJECT 71 | # > 代理的默认 UDP 测试参数, 例如: apple.com@8.8.8.8 72 | # proxy-test-udp = apple.com@8.8.8.8 73 | # > 当系统负载非常高且数据包处理延迟时,启用将优先处理 UDP 数据包。也称为游戏模式 74 | udp-priority = false 75 | # > Surge 将自动嗅探发送到端口 80 和 443 的 TCP 请求的协议,从而在优化性能的同时启用高级 HTTP/HTTPS 功能。但是,这可能会导致一些兼容性问题。如果遇到问题,可以在此处添加主机名,Surge 不会嗅探这些请求的协议。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 76 | always-raw-tcp-hosts = *.baidu.com 77 | # ================ 仅限 MacOS 的 Surge 参数 ================ # 78 | # > 如果禁用,即使 Wi-Fi 不是主网络接口,SSID/BSSID 模式仍可匹配。 79 | use-default-policy-if-wifi-not-primary = false 80 | # > 遵循 /etc/hosts 中的本地 DNS 映射项 81 | read-etc-hosts = true 82 | # > Surge HTTP 代理服务的端口号 83 | http-listen = 0.0.0.0 84 | # > Surge SOCKS5 代理服务的端口号 85 | socks5-listen = 0.0.0.0 86 | # > 启用 CPU 调试模式。这可能会降低性能。 87 | debug-cpu-usage = false 88 | # > 启用内存调试模式。这可能会降低性能。 89 | debug-memory-usage = false 90 | # > vif模式 91 | # > auto :让Surge自动选择最合适的工作模式。 92 | # > v1 :传统模式,TCP协议栈完全由Surge管理。由于 Surge 运行在用户空间中,这意味着每个数据包都需要从内核空间传输到用户空间进行处理。 93 | # > v2 :在 5.0 版本中引入,它使用 macOS 中的数据包过滤器机制,利用 macOS 的 TCP 协议栈,从而避免了在内核空间和用户空间之间切换的开销,从而显着提高了性能。但是,由于它需要修改 pf 设置,因此它与虚拟机网络和网络共享功能不兼容。 94 | # > v3 :在 5.2 版中引入,它绕过了数据包过滤器,并采用另一种技术来使用 macOS 的 TCP 协议栈。性能略低于 v2,但避免了因调整 pf 设置而导致的兼容性问题。 95 | vif-mode = v3 96 | 97 | [Proxy] 98 | 99 | 100 | [Proxy Group] 101 | 🔰 节点选择 = select, ♻️ 自动选择, 🛃 手动切换, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇺🇸 美国节点, 🇨🇳 台湾节点, 🇰🇷 韩国节点, 🇬🇧 英国节点, 🇸🇬 新加坡节点, 🇨🇦 加拿大节点, 🇩🇪 德国节点, 🇫🇷 法国节点, 🇮🇳 印度节点, 🌎 其他节点, 🎯 全球直连, ⛔️ 禁止访问 102 | ♻️ 自动选择 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 103 | 🛃 手动切换 = select, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 104 | 🇭🇰 香港节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:港|HK|hk|Hong Kong|HongKong|hongkong).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 105 | 🇯🇵 日本节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 106 | 🇺🇸 美国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 107 | 🇨🇳 台湾节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:台|新北|彰化|TW|Taiwan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 108 | 🇰🇷 韩国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:KR|Korea|KOR|首尔|韩|韓).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 109 | 🇬🇧 英国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:UK|英国).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 110 | 🇸🇬 新加坡节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 111 | 🇨🇦 加拿大节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:Canada|加拿大).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 112 | 🇩🇪 德国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:德国|🇩🇪|Germany).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 113 | 🇫🇷 法国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:法国|🇫🇷|France).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 114 | 🇮🇳 印度节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:印度|🇮🇳|India).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 115 | 🌎 其他节点 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore|英国|UK|Canada|加拿大|德国|🇩🇪|Germany|法国|🇫🇷|France|印度|🇮🇳|India).)*$, interval=300, tolerance=50 116 | ⛔️ 禁止访问 = select, REJECT 117 | 🎯 全球直连 = select, DIRECT 118 | 119 | [Rule] 120 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list,🎯 全球直连,update-interval=86400 // 白名单 121 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list,🎯 全球直连,update-interval=86400 // 规则修正 122 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list,🎯 全球直连,update-interval=86400 // Lan网 123 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list,🎯 全球直连,update-interval=86400 // 私有网 124 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list,🎯 全球直连,update-interval=86400 // Apple 125 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list,⛔️ 禁止访问,update-interval=86400,no-resolve // AD广告 126 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list,⛔️ 禁止访问,update-interval=86400 // 防劫持 127 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list,⛔️ 禁止访问,update-interval=86400 // 禁用HTTP协议的DNS 128 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list,⛔️ 禁止访问,update-interval=86400 // 隐私保护 129 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list,🎯 全球直连,update-interval=86400 // 亚马逊中国 130 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list,🎯 全球直连,update-interval=86400 // Cloudflare中国 131 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list,🎯 全球直连,update-interval=86400 // 下载网站 132 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list,🎯 全球直连,update-interval=86400 // 谷歌中国 133 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list,🔰 节点选择,update-interval=86400 // Microsoft OneDrive 134 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list,🔰 节点选择,update-interval=86400 // Microsoft服务 135 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list,🔰 节点选择,update-interval=86400 // 亚马逊网站 136 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list,🔰 节点选择,update-interval=86400 // 亚马逊服务器 137 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list,🔰 节点选择,update-interval=86400 // Jetbrains 138 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list,🔰 节点选择,update-interval=86400 // Telegram 139 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,🔰 节点选择,update-interval=86400 // Twitter 140 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list,🔰 节点选择,update-interval=86400 // ChatGPT 141 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,🔰 节点选择,update-interval=86400 // Github 142 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list,🔰 节点选择,update-interval=86400 // Cloudflare 143 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,🔰 节点选择,update-interval=86400 // YouTube 144 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list,🔰 节点选择,update-interval=86400 // YouTube Music 145 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,🔰 节点选择,update-interval=86400 // Netflix 146 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,🔰 节点选择,update-interval=86400 // TikTok 147 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list,🔰 节点选择,update-interval=86400 // Disney 148 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // 国外媒体 149 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // GFW 150 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list,🎯 全球直连,update-interval=86400 // 中国公司IP 151 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list,🎯 全球直连,update-interval=86400 // 中国域名 152 | GEOIP,CN,🎯 全球直连 // 中国IP 153 | FINAL,🔰 节点选择 154 | 155 | [URL Rewrite] 156 | ^https?://(www.)?g.cn https://www.google.com 302 157 | ^https?://(www.)?google.cn https://www.google.com 302 -------------------------------------------------------------------------------- /MacAutoUpdateMedia.conf: -------------------------------------------------------------------------------- 1 | #!MANAGED-CONFIG https://raw.githubusercontent.com/chenyk1219/surge/master/MacAutoUpdateMedia.conf interval=86400 strict=false 2 | 3 | [General] 4 | # ================ iOS和MacOS共同的 Surge 参数 ================ # 5 | # > 日志级别 verbose, info, notify, or warning 不建议在日常使用中启用详细,因为这会显著降低性能。 6 | loglevel = notify 7 | # > IPv6协议 启用完整的 IPv6 支持。具体来说,开启该选项后,访问域名时会查询该域名的AAAA记录。即使未启用此选项,也可以通过直接访问 IPv6 地址来访问 IPv6 站点。 8 | ipv6 = false 9 | # > 允许 IPv6 通过 Surge VIF。当您希望 Surge 处理连接到 IPv6 地址的原始 TCP 连接时很有用。 10 | # > off :切勿使用 IPv6 设置 Surge VIF 11 | # > auto :仅当本地网络具有有效的 IPv6 网络时,才使用 IPv6 设置 Surge VIF 12 | # > always :始终使用 IPv6 设置 Surge VIF 13 | ipv6-vif = false 14 | # > dns服务器 上游DNS服务器的IP地址 15 | dns-server = system, 223.6.6.6, 223.5.5.5, 119.29.29.29 16 | # > 跳过代理 在 iOS 版本中,此选项强制与这些域/IP 范围的连接由 Surge VIF 而不是 Surge 代理处理。在 macOS 版本中,当启用“设置为系统代理”时,这些设置将应用于系统。此选项用于修复某些应用的兼容性问题。 17 | # > apple.com、*apple.com、192.168.2.* or 192.168.2.0/24 18 | # > 注意:如果输入 IP 地址或地址范围,则只有在使用该地址连接到该主机时才能绕过代理,而不能在通过解析为该地址的域名连接到主机时绕过代理。 19 | skip-proxy = localhost, *.local, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16 20 | # > 排除简单主机名 就像 skip-proxy 参数一样。此选项允许请求使用由 Surge VIF 而不是 Surge 代理处理的简单主机名(不带点)。 21 | # > mysql01、redis01 22 | exclude-simple-hostnames = true 23 | # > 外部控制器访问 此选项允许外部控制器控制 Surge,例如 Surge Dashboard (macOS) 和 Surge iOS 遥控器 (iOS)。例如:key@0.0.0.0:6166 24 | external-controller-access = mima1234@0.0.0.0:6166 25 | # > 使用 HTTPS 协议而不是 HTTP。必须先配置 MitM CA 证书。您需要在客户端设备上手动安装证书。 26 | # http-api-tls = 27 | # > 启用此功能后,您可以通过 Web 浏览器控制 Surge。 28 | http-api-web-dashboard = true 29 | # > 显示错误页面拒绝,如果请求是纯 HTTP 请求,则显示 REJECT 策略的错误网页。 30 | show-error-page-for-reject = true 31 | # > Surge VIF只能处理 TCP 和 UDP 协议。使用此选项可绕过特定 IP 范围,以允许所有流量通过。 32 | # > 注意:此选项仅适用于Surge VIF。Surge Proxy Server 处理的请求不受影响。合并 skip-proxy 并确保 tun-excluded-routes 特定 HTTP 流量绕过 Surge。 33 | # tun-excluded-routes = 34 | # > 默认情况下,Surge VIF 接口将自身声明为默认路由。但是,由于 Wi-Fi 接口的路由较小,因此某些流量可能无法通过浪涌 VIF 接口。使用此选项可添加较小的路由。 35 | # tun-included-routes = 36 | # > Internet 连接测试的 URL, 以及,DIRECT 策略的测试 URL 37 | internet-test-url = http://connect.rom.miui.com/generate_204 38 | # > 代理策略的默认测试 URL 39 | proxy-test-url = http://1.0.0.1/generate_204 40 | # > 连接测试超时(秒) 41 | test-timeout = 5 42 | # > 始终真实的 IP 此选项要求 Surge 在 Surge VIF 处理 DNS 问题时返回真实 IP 地址而不是虚假 IP 地址 DNS数据包将被转发到上游DNS服务器 此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 43 | # > 使用前缀 - 排除主机名 44 | # > 支持通配符 * 和 ? 45 | # > 使用后缀 :port 匹配其他端口,如果未提供端口号,则 Surge 将自动为该参数附加标准端口号,就像 force-http-engine-hosts 参数一样,如果仅配置了主机名,则仅对端口 80 有效。对于 MITM 功能,它仅对端口 443 有效。 46 | # > 使用后缀 :0 以匹配所有端口 47 | # > 使用 直接使用 IPv4/IPv6 地址(而不是域)匹配所有主机名 48 | # > -*icloud*, -*.mzstatic.com, -*.facebook.com, -*.instagram.com, -*.twitter.com, -*dropbox*, -*apple*, -*.amazonaws.com, -, * 49 | always-real-ip = *.test.com 50 | # > 劫持DNS,默认情况下,Surge 仅返回发送到 Surge DNS 地址 (198.18.0.2) 的 DNS 查询的虚假 IP 地址。发送到标准 DNS 的查询将被转发。某些设备或软件始终使用硬编码的 DNS 服务器。(例如,Google Speakers始终使用 8.8.8.8)。您可以使用此选项劫持查询以获取虚假地址。您可以使用 hijack-dns = *:53 劫持所有DNS查询 51 | hijack-dns = *:53 52 | # > 使 Surge 将 TCP 连接视为 HTTP 请求。Surge HTTP 引擎将处理请求,并且所有高级功能都将可用,例如捕获、重写和脚本编写。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 53 | # force-http-engine-hosts = 54 | # > 加密 DNS 跟随出站模式,默认情况下,加密的 DNS 查找使用直接出站。启用该选项将使 DOH 遵循出站模式设置和规则。 55 | encrypted-dns-follow-outbound-mode = true 56 | # > 加密的 DNS 服务器,加密的 DNS 服务器的 URL。如果配置了加密 DNS,则传统 DNS 将仅用于测试连接并解析加密 DNS URL 中的域。 57 | encrypted-dns-server = https://223.5.5.5/dns-query,quic://223.6.6.6:853,quic://223.5.5.5:853,https://223.6.6.6/dns-query,https://1.12.12.12/dns-query,https://120.53.53.53/dns-query 58 | # , https://8.8.8.8/dns-query, https://1.1.1.1/dns-query 59 | # > 跳过加密的DNS服务器证书验证,这是不安全的。 60 | encrypted-dns-skip-cert-verification = false 61 | # > 使用本地主机代理,默认情况下,如果使用代理策略,则始终在远程服务器上执行 DNS 查找。启用此选项后,如果存在目标域的本地 DNS 映射结果,则 Surge 会使用 IP 地址而不是域来设置代理连接。 62 | use-local-host-item-for-proxy = false 63 | # > 要更新的 GeoIP 数据库的 URL 64 | geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb 65 | # > 禁用 GeoIP 数据库的自动更新 66 | disable-geoip-db-auto-update = false 67 | # > iOS 系统可能会执行 SVCB 记录 DNS 查找,而不是标准 A 记录查找。这会导致 Surge 无法返回虚拟 IP 地址。因此,默认情况下,禁止 SVCB 记录查找,以强制系统执行 A 记录查找。 68 | allow-dns-svcb = false 69 | # > UDP 流量与不支持 UDP 中继的策略匹配时的回退行为,可能的值: DIRECT 、 REJECT, 如果没有代理服务器支持 UDP 转发,可修改为「 direct 」或注释下条,但需注意同一目标主机名 TCP 请求与 UDP 请求的源地址不同所造成的隐私及安全风险。 70 | udp-policy-not-supported-behaviour = REJECT 71 | # > 代理的默认 UDP 测试参数, 例如: apple.com@8.8.8.8 72 | # proxy-test-udp = apple.com@8.8.8.8 73 | # > 当系统负载非常高且数据包处理延迟时,启用将优先处理 UDP 数据包。也称为游戏模式 74 | udp-priority = false 75 | # > Surge 将自动嗅探发送到端口 80 和 443 的 TCP 请求的协议,从而在优化性能的同时启用高级 HTTP/HTTPS 功能。但是,这可能会导致一些兼容性问题。如果遇到问题,可以在此处添加主机名,Surge 不会嗅探这些请求的协议。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 76 | always-raw-tcp-hosts = *.baidu.com 77 | # ================ 仅限 MacOS 的 Surge 参数 ================ # 78 | # > 如果禁用,即使 Wi-Fi 不是主网络接口,SSID/BSSID 模式仍可匹配。 79 | use-default-policy-if-wifi-not-primary = false 80 | # > 遵循 /etc/hosts 中的本地 DNS 映射项 81 | read-etc-hosts = true 82 | # > Surge HTTP 代理服务的端口号 83 | http-listen = 0.0.0.0 84 | # > Surge SOCKS5 代理服务的端口号 85 | socks5-listen = 0.0.0.0 86 | # > 启用 CPU 调试模式。这可能会降低性能。 87 | debug-cpu-usage = false 88 | # > 启用内存调试模式。这可能会降低性能。 89 | debug-memory-usage = false 90 | # > vif模式 91 | # > auto :让Surge自动选择最合适的工作模式。 92 | # > v1 :传统模式,TCP协议栈完全由Surge管理。由于 Surge 运行在用户空间中,这意味着每个数据包都需要从内核空间传输到用户空间进行处理。 93 | # > v2 :在 5.0 版本中引入,它使用 macOS 中的数据包过滤器机制,利用 macOS 的 TCP 协议栈,从而避免了在内核空间和用户空间之间切换的开销,从而显着提高了性能。但是,由于它需要修改 pf 设置,因此它与虚拟机网络和网络共享功能不兼容。 94 | # > v3 :在 5.2 版中引入,它绕过了数据包过滤器,并采用另一种技术来使用 macOS 的 TCP 协议栈。性能略低于 v2,但避免了因调整 pf 设置而导致的兼容性问题。 95 | vif-mode = v3 96 | 97 | [Proxy] 98 | 99 | 100 | [Proxy Group] 101 | 🔰 节点选择 = select, ♻️ 自动选择, 🛃 手动切换, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇺🇸 美国节点, 🇨🇳 台湾节点, 🇰🇷 韩国节点, 🇬🇧 英国节点, 🇸🇬 新加坡节点, 🇨🇦 加拿大节点, 🇩🇪 德国节点, 🇫🇷 法国节点, 🇮🇳 印度节点, 🌎 其他节点, 🎯 全球直连, ⛔️ 禁止访问 102 | ♻️ 自动选择 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 103 | 🛃 手动切换 = select, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 104 | 🇭🇰 香港节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:港|HK|hk|Hong Kong|HongKong|hongkong).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 105 | 🇯🇵 日本节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 106 | 🇺🇸 美国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 107 | 🇨🇳 台湾节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:台|新北|彰化|TW|Taiwan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 108 | 🇰🇷 韩国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:KR|Korea|KOR|首尔|韩|韓).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 109 | 🇬🇧 英国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:UK|英国).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 110 | 🇸🇬 新加坡节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 111 | 🇨🇦 加拿大节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:Canada|加拿大).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 112 | 🇩🇪 德国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:德国|🇩🇪|Germany).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 113 | 🇫🇷 法国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:法国|🇫🇷|France).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 114 | 🇮🇳 印度节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:印度|🇮🇳|India).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 115 | 🌎 其他节点 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore|英国|UK|Canada|加拿大|德国|🇩🇪|Germany|法国|🇫🇷|France|印度|🇮🇳|India).)*$, interval=300, tolerance=50 116 | ⛔️ 禁止访问 = select, REJECT 117 | 🎯 全球直连 = select, DIRECT 118 | 119 | [Rule] 120 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list,🎯 全球直连,update-interval=86400 // 白名单 121 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list,🎯 全球直连,update-interval=86400 // 规则修正 122 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list,🎯 全球直连,update-interval=86400 // Lan网 123 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list,🎯 全球直连,update-interval=86400 // 私有网 124 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list,🎯 全球直连,update-interval=86400 // Apple 125 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list,⛔️ 禁止访问,update-interval=86400,no-resolve // AD广告 126 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list,⛔️ 禁止访问,update-interval=86400 // 防劫持 127 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list,⛔️ 禁止访问,update-interval=86400 // 禁用HTTP协议的DNS 128 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list,⛔️ 禁止访问,update-interval=86400 // 隐私保护 129 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list,🎯 全球直连,update-interval=86400 // 亚马逊中国 130 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list,🎯 全球直连,update-interval=86400 // Cloudflare中国 131 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list,🎯 全球直连,update-interval=86400 // 下载网站 132 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list,🎯 全球直连,update-interval=86400 // 谷歌中国 133 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list,🔰 节点选择,update-interval=86400 // Microsoft OneDrive 134 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list,🔰 节点选择,update-interval=86400 // Microsoft服务 135 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list,🔰 节点选择,update-interval=86400 // 亚马逊网站 136 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list,🔰 节点选择,update-interval=86400 // 亚马逊服务器 137 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list,🔰 节点选择,update-interval=86400 // Jetbrains 138 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list,🔰 节点选择,update-interval=86400 // Telegram 139 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,🔰 节点选择,update-interval=86400 // Twitter 140 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list,🔰 节点选择,update-interval=86400 // ChatGPT 141 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,🔰 节点选择,update-interval=86400 // Github 142 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list,🔰 节点选择,update-interval=86400 // Cloudflare 143 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,🔰 节点选择,update-interval=86400 // YouTube 144 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list,🔰 节点选择,update-interval=86400 // YouTube Music 145 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,🔰 节点选择,update-interval=86400 // Netflix 146 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,🔰 节点选择,update-interval=86400 // TikTok 147 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list,🔰 节点选择,update-interval=86400 // Disney 148 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // 国外媒体 149 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // GFW 150 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list,🎯 全球直连,update-interval=86400 // 中国公司IP 151 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list,🎯 全球直连,update-interval=86400 // 中国域名 152 | GEOIP,CN,🎯 全球直连 // 中国IP 153 | FINAL,🔰 节点选择 154 | 155 | [URL Rewrite] 156 | ^https?://(www.)?g.cn https://www.google.com 302 157 | ^https?://(www.)?google.cn https://www.google.com 302 -------------------------------------------------------------------------------- /MacLocalEdit.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | #!include MacAutoUpdate.conf 3 | 4 | [Proxy] 5 | #!include 6 | 7 | [Proxy Group] 8 | #!include MacAutoUpdate.conf 9 | 10 | [Rule] 11 | #!include MacAutoUpdate.conf 12 | 13 | [URL Rewrite] 14 | #!include MacAutoUpdate.conf -------------------------------------------------------------------------------- /Modules/ip-info/ip-info.js: -------------------------------------------------------------------------------- 1 | function getIpInfo() { 2 | let title = getSSID() ?? getCellularInfo() 3 | const {v4, v6} = $network; 4 | let info = []; 5 | if (!v4 && !v6) { 6 | info = ['网路可能中断', '请手动刷新以重新获取 IP']; 7 | } else { 8 | if (v4?.primaryAddress) info.push(`${title} IP:${v4?.primaryAddress}`); 9 | if (v6?.primaryAddress) info.push(`IPv6地址:已分配`); 10 | if (v4?.primaryRouter && getSSID()) info.push(`路由器IP:${v4?.primaryRouter}`); 11 | if (v6?.primaryRouter && getSSID()) info.push(`IPv6地址:已分配`); 12 | } 13 | // info = info.join("\n"); 14 | return info.join("\n") + '\n'; 15 | } 16 | 17 | function getFlagEmoji(countryCode) { 18 | 19 | if (countryCode.toUpperCase() === 'TW') { 20 | countryCode = 'CN' 21 | } 22 | 23 | const codePoints = countryCode 24 | .toUpperCase() 25 | .split('') 26 | .map((char) => 127397 + char.charCodeAt()); 27 | return String.fromCodePoint(...codePoints); 28 | } 29 | 30 | function loadCarrierNames() { 31 | //整理逻辑:前三码相同->后两码相同运营商->剩下的 32 | return { 33 | //台湾运营商 Taiwan 34 | '466-11': '中華電信', 35 | '466-92': '中華電信', 36 | '466-01': '遠傳電信', 37 | '466-03': '遠傳電信', 38 | '466-97': '台灣大哥大', 39 | '466-89': '台灣之星', 40 | '466-05': 'GT', 41 | //大陆运营商 China 42 | '460-03': '中国电信', 43 | '460-05': '中国电信', 44 | '460-11': '中国电信', 45 | '460-01': '中国联通', 46 | '460-06': '中国联通', 47 | '460-09': '中国联通', 48 | '460-00': '中国移动', 49 | '460-02': '中国移动', 50 | '460-04': '中国移动', 51 | '460-07': '中国移动', 52 | '460-08': '中国移动', 53 | '460-15': '中国广电', 54 | '460-20': '中移铁通', 55 | //香港运营商 HongKong 56 | '454-00': 'CSL', 57 | '454-02': 'CSL', 58 | '454-10': 'CSL', 59 | '454-18': 'CSL', 60 | '454-03': '3', 61 | '454-04': '3', 62 | '454-05': '3', 63 | '454-06': 'SMC HK', 64 | '454-15': 'SMC HK', 65 | '454-17': 'SMC HK', 66 | '454-09': 'CMHK', 67 | '454-12': 'CMHK', 68 | '454-13': 'CMHK', 69 | '454-28': 'CMHK', 70 | '454-31': 'CMHK', 71 | '454-16': 'csl.', 72 | '454-19': 'csl.', 73 | '454-20': 'csl.', 74 | '454-29': 'csl.', 75 | '454-01': '中信國際電訊', 76 | '454-07': 'UNICOM HK', 77 | '454-08': 'Truphone', 78 | '454-11': 'CHKTL', 79 | '454-23': 'Lycamobile', 80 | //日本运营商 Japan 81 | '440-00': 'Y!mobile', 82 | '440-10': 'docomo', 83 | '440-11': 'Rakuten', 84 | '440-20': 'SoftBank', 85 | '440-50': ' au', 86 | '440-51': ' au', 87 | '440-52': ' au', 88 | '440-53': ' au', 89 | '440-54': ' au', 90 | '441-00': 'WCP', 91 | '441-10': 'UQ WiMAX', 92 | //韩国运营商 Korea 93 | '450-03': 'SKT', 94 | '450-05': 'SKT', 95 | '450-02': 'KT', 96 | '450-04': 'KT', 97 | '450-08': 'KT', 98 | '450-06': 'LG U+', 99 | '450-10': 'LG U+', 100 | //美国运营商 USA 101 | '310-030': 'AT&T', 102 | '310-070': 'AT&T', 103 | '310-150': 'AT&T', 104 | '310-170': 'AT&T', 105 | '310-280': 'AT&T', 106 | '310-380': 'AT&T', 107 | '310-410': 'AT&T', 108 | '310-560': 'AT&T', 109 | '310-680': 'AT&T', 110 | '310-980': 'AT&T', 111 | '310-160': 'T-Mobile', 112 | '310-200': 'T-Mobile', 113 | '310-210': 'T-Mobile', 114 | '310-220': 'T-Mobile', 115 | '310-230': 'T-Mobile', 116 | '310-240': 'T-Mobile', 117 | '310-250': 'T-Mobile', 118 | '310-260': 'T-Mobile', 119 | '310-270': 'T-Mobile', 120 | '310-300': 'T-Mobile', 121 | '310-310': 'T-Mobile', 122 | '310-660': 'T-Mobile', 123 | '310-800': 'T-Mobile', 124 | '311-660': 'T-Mobile', 125 | '311-882': 'T-Mobile', 126 | '311-490': 'T-Mobile', 127 | '312-530': 'T-Mobile', 128 | '311-870': 'T-Mobile', 129 | '311-880': 'T-Mobile', 130 | '310-004': 'Verizon', 131 | '310-010': 'Verizon', 132 | '310-012': 'Verizon', 133 | '310-013': 'Verizon', 134 | '311-110': 'Verizon', 135 | '311-270': 'Verizon', 136 | '311-271': 'Verizon', 137 | '311-272': 'Verizon', 138 | '311-273': 'Verizon', 139 | '311-274': 'Verizon', 140 | '311-275': 'Verizon', 141 | '311-276': 'Verizon', 142 | '311-277': 'Verizon', 143 | '311-278': 'Verizon', 144 | '311-279': 'Verizon', 145 | '311-280': 'Verizon', 146 | '311-281': 'Verizon', 147 | '311-282': 'Verizon', 148 | '311-283': 'Verizon', 149 | '311-284': 'Verizon', 150 | '311-285': 'Verizon', 151 | '311-286': 'Verizon', 152 | '311-287': 'Verizon', 153 | '311-288': 'Verizon', 154 | '311-289': 'Verizon', 155 | '311-390': 'Verizon', 156 | '311-480': 'Verizon', 157 | '311-481': 'Verizon', 158 | '311-482': 'Verizon', 159 | '311-483': 'Verizon', 160 | '311-484': 'Verizon', 161 | '311-485': 'Verizon', 162 | '311-486': 'Verizon', 163 | '311-487': 'Verizon', 164 | '311-488': 'Verizon', 165 | '311-489': 'Verizon', 166 | '310-590': 'Verizon', 167 | '310-890': 'Verizon', 168 | '310-910': 'Verizon', 169 | '310-120': 'Sprint', 170 | '310-850': 'Aeris Comm. Inc.', 171 | '310-510': 'Airtel Wireless LLC', 172 | '312-090': 'Allied Wireless Communications Corporation', 173 | '310-710': 'Arctic Slope Telephone Association Cooperative Inc.', 174 | '311-440': 'Bluegrass Wireless LLC', 175 | '311-800': 'Bluegrass Wireless LLC', 176 | '311-810': 'Bluegrass Wireless LLC', 177 | '310-900': 'Cable & Communications Corp.', 178 | '311-590': 'California RSA No. 3 Limited Partnership', 179 | '311-500': 'Cambridge Telephone Company Inc.', 180 | '310-830': 'Caprock Cellular Ltd.', 181 | '312-270': 'Cellular Network Partnership LLC', 182 | '312-280': 'Cellular Network Partnership LLC', 183 | '310-360': 'Cellular Network Partnership LLC', 184 | '311-120': 'Choice Phone LLC', 185 | '310-480': 'Choice Phone LLC', 186 | '310-420': 'Cincinnati Bell Wireless LLC', 187 | '310-180': 'Cingular Wireless', 188 | '310-620': 'Coleman County Telco /Trans TX', 189 | '310-06': 'Consolidated Telcom', 190 | '310-60': 'Consolidated Telcom', 191 | '310-700': 'Cross Valliant Cellular Partnership', 192 | '312-030': 'Cross Wireless Telephone Co.', 193 | '311-140': 'Cross Wireless Telephone Co.', 194 | '312-040': 'Custer Telephone Cooperative Inc.', 195 | '310-440': 'Dobson Cellular Systems', 196 | '310-990': 'E.N.M.R. Telephone Coop.', 197 | '312-120': 'East Kentucky Network LLC', 198 | '312-130': 'East Kentucky Network LLC', 199 | '310-750': 'East Kentucky Network LLC', 200 | '310-090': 'Edge Wireless LLC', 201 | '310-610': 'Elkhart TelCo. / Epic Touch Co.', 202 | '311-311': 'Farmers', 203 | '311-460': 'Fisher Wireless Services Inc.', 204 | '311-370': 'GCI Communication Corp.', 205 | '310-430': 'GCI Communication Corp.', 206 | '310-920': 'Get Mobile Inc.', 207 | '311-340': 'Illinois Valley Cellular RSA 2 Partnership', 208 | '312-170': 'Iowa RSA No. 2 Limited Partnership', 209 | '311-410': 'Iowa RSA No. 2 Limited Partnership', 210 | '310-770': 'Iowa Wireless Services LLC', 211 | '310-650': 'Jasper', 212 | '310-870': 'Kaplan Telephone Company Inc.', 213 | '312-180': 'Keystone Wireless LLC', 214 | '310-690': 'Keystone Wireless LLC', 215 | '311-310': 'Lamar County Cellular', 216 | '310-016': 'Leap Wireless International Inc.', 217 | '310-040': 'Matanuska Tel. Assn. Inc.', 218 | '310-780': 'Message Express Co. / Airlink PCS', 219 | '311-330': 'Michigan Wireless LLC', 220 | '310-400': 'Minnesota South. Wirel. Co. / Hickory', 221 | '311-010': 'Missouri RSA No 5 Partnership', 222 | '312-010': 'Missouri RSA No 5 Partnership', 223 | '311-020': 'Missouri RSA No 5 Partnership', 224 | '312-220': 'Missouri RSA No 5 Partnership', 225 | '311-920': 'Missouri RSA No 5 Partnership', 226 | '310-350': 'Mohave Cellular LP', 227 | '310-570': 'MTPCS LLC', 228 | '310-290': 'NEP Cellcorp Inc.', 229 | '310-34': 'Nevada Wireless LLC', 230 | '310-600': 'New-Cell Inc.', 231 | '311-300': 'Nexus Communications Inc.', 232 | '310-130': 'North Carolina RSA 3 Cellular Tel. Co.', 233 | '312-230': 'North Dakota Network Company', 234 | '311-610': 'North Dakota Network Company', 235 | '310-450': 'Northeast Colorado Cellular Inc.', 236 | '311-710': 'Northeast Wireless Networks LLC', 237 | '310-011': 'Northstar', 238 | '310-670': 'Northstar', 239 | '311-420': 'Northwest Missouri Cellular Limited Partnership', 240 | '310-760': 'Panhandle Telephone Cooperative Inc.', 241 | '310-580': 'PCS ONE', 242 | '311-170': 'PetroCom', 243 | '311-670': 'Pine Belt Cellular, Inc.', 244 | '310-100': 'Plateau Telecommunications Inc.', 245 | '310-940': 'Poka Lambro Telco Ltd.', 246 | '310-500': 'Public Service Cellular Inc.', 247 | '312-160': 'RSA 1 Limited Partnership', 248 | '311-430': 'RSA 1 Limited Partnership', 249 | '311-350': 'Sagebrush Cellular Inc.', 250 | '310-46': 'SIMMETRY', 251 | '311-260': 'SLO Cellular Inc / Cellular One of San Luis', 252 | '310-320': 'Smith Bagley Inc.', 253 | '316-011': 'Southern Communications Services Inc.', 254 | '310-740': 'Telemetrix Inc.', 255 | '310-14': 'Testing', 256 | '310-860': 'Texas RSA 15B2 Limited Partnership', 257 | '311-050': 'Thumb Cellular Limited Partnership', 258 | '311-830': 'Thumb Cellular Limited Partnership', 259 | '310-460': 'TMP Corporation', 260 | '310-490': 'Triton PCS', 261 | '312-290': 'Uintah Basin Electronics Telecommunications Inc.', 262 | '311-860': 'Uintah Basin Electronics Telecommunications Inc.', 263 | '310-960': 'Uintah Basin Electronics Telecommunications Inc.', 264 | '310-020': 'Union Telephone Co.', 265 | '311-220': 'United States Cellular Corp.', 266 | '310-730': 'United States Cellular Corp.', 267 | '311-650': 'United Wireless Communications Inc.', 268 | '310-003': 'Unknown', 269 | '310-15': 'Unknown', 270 | '310-23': 'Unknown', 271 | '310-24': 'Unknown', 272 | '310-25': 'Unknown', 273 | '310-26': 'Unknown', 274 | '310-190': 'Unknown', 275 | '310-950': 'Unknown', 276 | '310-38': 'USA 3650 AT&T', 277 | '310-999': 'Various Networks', 278 | '310-520': 'VeriSign', 279 | '310-530': 'West Virginia Wireless', 280 | '310-340': 'Westlink Communications, LLC', 281 | '311-070': 'Wisconsin RSA #7 Limited Partnership', 282 | '310-390': 'Yorkville Telephone Cooperative', 283 | //英国运营商 UK 284 | '234-08': 'BT OnePhone UK', 285 | '234-10': 'O2-UK', 286 | '234-15': 'vodafone UK', 287 | '234-20': '3', 288 | '234-30': 'EE', 289 | '234-33': 'EE', 290 | '234-38': 'Virgin', 291 | '234-50': 'JT', 292 | '234-55': 'Sure', 293 | '234-58': 'Manx Telecom', 294 | //菲律宾运营商 Philippine 295 | '515-01': 'Islacom', 296 | '515-02': 'Globe', 297 | '515-03': 'Smart', 298 | '515-04': 'Sun', 299 | '515-08': 'Next Mobile', 300 | '515-18': 'Cure', 301 | '515-24': 'ABS-CBN', 302 | //越南运营商 Vietnam 303 | '452-01': 'Mobifone', 304 | '452-02': 'VinaPhone', 305 | '452-03': 'S-Fone', 306 | '452-04': 'Viettel', 307 | '452-05': 'VietNamobile', 308 | '452-06': 'E-mobile', 309 | '452-07': 'Gmobile', 310 | }; 311 | } 312 | 313 | 314 | function getCellularInfo() { 315 | const radioGeneration = { 316 | 'GPRS': '2.5G', 317 | 'CDMA1x': '2.5G', 318 | 'EDGE': '2.75G', 319 | 'WCDMA': '3G', 320 | 'HSDPA': '3.5G', 321 | 'CDMAEVDORev0': '3.5G', 322 | 'CDMAEVDORevA': '3.5G', 323 | 'CDMAEVDORevB': '3.75G', 324 | 'HSUPA': '3.75G', 325 | 'eHRPD': '3.9G', 326 | 'LTE': '4G', 327 | 'NRNSA': '5G', 328 | 'NR': '5G', 329 | }; 330 | 331 | let cellularInfo = ''; 332 | const carrierNames = loadCarrierNames(); 333 | if ($network['cellular-data']) { 334 | const carrierId = $network['cellular-data'].carrier; 335 | const radio = $network['cellular-data'].radio; 336 | if ($network.wifi?.ssid == null && radio) { 337 | cellularInfo = carrierNames[carrierId] ? 338 | `${carrierNames[carrierId]} | ${radioGeneration[radio]} - ${radio} ` : 339 | `蜂窝数据 | ${radioGeneration[radio]} - ${radio}`; 340 | } 341 | } 342 | return cellularInfo; 343 | } 344 | 345 | function getSSID() { 346 | return $network.wifi?.ssid; 347 | } 348 | 349 | function getIcon() { 350 | if (getSSID()) { 351 | return "https://raw.githubusercontent.com/chenyk1219/surge/main/icon/wifi.svg" 352 | } else { 353 | name = getCellularInfo() 354 | if (name.indexOf('5G') !== -1) { 355 | return "https://raw.githubusercontent.com/chenyk1219/surge/main/icon/5g.svg" 356 | } else { 357 | return "https://raw.githubusercontent.com/chenyk1219/surge/main/icon/4g.svg" 358 | } 359 | } 360 | } 361 | 362 | (async () => { 363 | let panel_msg = { 364 | title: '', 365 | content: '', 366 | icon: getSSID() ? 'wifi' : 'simcard', 367 | 'icon-color': getSSID() ? '#5A9AF9' : '#8AB8DD', 368 | } 369 | let content = [] 370 | let title = getSSID() ?? getCellularInfo() 371 | let getIpInfoPromise = new Promise((resolve, reject) => { 372 | $httpClient.get('http://ip-api.com/json', function (error, response, data) { 373 | if (error) { 374 | console.log(error); 375 | reject(error); 376 | } else { 377 | resolve(JSON.parse(data)); 378 | } 379 | }); 380 | }); 381 | 382 | let getLocalInfoPromise = new Promise((resolve, reject) => { 383 | $httpClient.get('https://ip.useragentinfo.com/json', function (error, response, data) { 384 | if (error) { 385 | console.log(error); 386 | reject(error); 387 | } else { 388 | resolve(JSON.parse(data)); 389 | } 390 | }); 391 | }); 392 | 393 | 394 | await getLocalInfoPromise.then(info => { 395 | content.push(`${title} 公网IP:${info.ip}`); 396 | content.push(`${title} 运营商:${info.isp} - ${info.net}`); 397 | content.push(`${title} 位置:${getFlagEmoji(info.short_name)} | ${info.country} - ${info.province} - ${info.city}`); 398 | }).catch(error => { 399 | content.push(`本机IP:获取失败`) 400 | }) 401 | 402 | await getIpInfoPromise.then(info => { 403 | content.push(`节点IP:${info.query}`) 404 | content.push(`节点运营商:${info.isp}`) 405 | content.push(`节点位置:${getFlagEmoji(info.countryCode)} | ${info.country} - ${info.city}`) 406 | }).catch(error => { 407 | content.push(`节点IP:获取失败`) 408 | }) 409 | 410 | 411 | panel_msg.title = title 412 | panel_msg.content = getIpInfo() + content.join("\n") 413 | $done(panel_msg) 414 | })() -------------------------------------------------------------------------------- /Modules/ip-info/ip-info.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=IPInfoPanel 2 | #!desc=详细的显示你当前的网络信息 3 | #!system=ios 4 | # @chenyk1219 5 | # 更新日期:2024.01.28 6 | # 版本:2.3 7 | 8 | [Panel] 9 | IPInfoPanel=title="",content="",style=info,script-name=ip-info.js,update-interval=1 10 | 11 | [Script] 12 | ip-info.js=script-path=https://raw.githubusercontent.com/chenyk1219/surge/main/Modules/ip-info/ip-info.js,type=generic,timeout=30 13 | 14 | [Host] 15 | ip-api.com = 208.95.112.1 16 | ip.useragentinfo.com = 39.100.139.241 -------------------------------------------------------------------------------- /Modules/sub-info/sub-info.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 部分方法引用脚本: https://raw.githubusercontent.com/mieqq/mieqq/master/sub_info_panel.js 3 | * 部分方法引用脚本:https://github.com/Rabbit-Spec/Surge/blob/Master/Module/Panel/Sub-info/Moore/Sub-info.js 4 | * 作者: @chenyk1219 5 | * */ 6 | function geArg() { 7 | return Object.fromEntries( 8 | $argument.split("&").map((i) => i.split("=")) 9 | .map(([k, v]) => [k, decodeURIComponent(v)]) 10 | ); 11 | } 12 | 13 | function flagIconToHex(flagIcon) { 14 | // 提取国旗图标的字母部分 15 | var regionIndicatorLetter = flagIcon.replace(/[\uD83C\uDDE6-\uD83C\uDDFF]/gu, ''); 16 | 17 | // 获取字母的 Unicode 码点并转换为十六进制字符串 18 | var countryCode = regionIndicatorLetter.codePointAt(0).toString(16); 19 | 20 | return countryCode; 21 | } 22 | 23 | 24 | function httpAPI(path = '', method = 'POST', body = null) { 25 | return new Promise(resolve => { 26 | $httpAPI(method, path, body, result => { 27 | resolve(result) 28 | }) 29 | }) 30 | } 31 | 32 | function bytesToSize(bytes) { 33 | if (bytes === 0) return "0B"; 34 | let k = 1024; 35 | sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; 36 | let i = Math.floor(Math.log(bytes) / Math.log(k)); 37 | return (bytes / Math.pow(k, i)).toFixed(2) + " " + sizes[i]; 38 | } 39 | 40 | function timeTransform(dateNow, dateTime) { 41 | let dateDiff = dateNow - dateTime; 42 | let days = Math.floor(dateDiff / (24 * 3600 * 1000));//计算出相差天数 43 | let leave1 = dateDiff % (24 * 3600 * 1000) //计算天数后剩余的毫秒数 44 | let hours = Math.floor(leave1 / (3600 * 1000))//计算出小时数 45 | let leave2 = leave1 % (3600 * 1000) //计算小时数后剩余的毫秒数 46 | let minutes = Math.floor(leave2 / (60 * 1000))//计算相差分钟数 47 | let leave3 = leave2 % (60 * 1000) //计算分钟数后剩余的毫秒数 48 | let seconds = Math.round(leave3 / 1000) 49 | 50 | if (days === 0) { 51 | 52 | if (hours === 0) { 53 | if (minutes === 0) return (`${seconds}秒`); 54 | return (`${minutes}分${seconds}秒`) 55 | } 56 | return (`${hours}时${minutes}分${seconds}秒`) 57 | } else { 58 | return (`${days}天${hours}时${minutes}分`) 59 | } 60 | 61 | } 62 | 63 | (async () => { 64 | let panel_msg = { 65 | title: '当前订阅&流量信息', 66 | content: '', 67 | icon: 'airplane.circle', 68 | 'icon-color': '#5A9AF9', 69 | } 70 | 71 | const data = await httpAPI('/v1/policies', 'GET') 72 | 73 | let content = []; 74 | content.push("⭐️⭐️订阅信息:") 75 | let length = data['proxies'].length | 0 76 | for (let i = 0; i < length; i++) { 77 | const code = flagIconToHex(data['proxies'][i].split()[0]) 78 | if (code !== "20" && /:|:|Days|GB|Expire|Reset|date|到期|剩余|流量/.test(data['proxies'][i])) { 79 | content.push(data['proxies'][i]) 80 | } 81 | } 82 | 83 | content.push("⭐️⭐️流量信息:") 84 | 85 | let runInfo = await httpAPI('/v1/traffic', 'GET') 86 | 87 | let currentTimeStamp = new Date() 88 | let startTimeStamp = Math.floor(runInfo.startTime * 1000) 89 | let runTime = timeTransform(currentTimeStamp, startTimeStamp) 90 | content.push(`Surge Pro® 运行时长:${runTime}`) 91 | 92 | let connectorObj = runInfo.connector 93 | let connector = 0 94 | Object.keys(connectorObj).forEach(function (key) { 95 | connector += connectorObj[key].in 96 | }) 97 | let direct = connectorObj.DIRECT.in 98 | 99 | 100 | let interfaceObj = runInfo.interface 101 | let interfaceIn = 0 102 | Object.keys(interfaceObj).forEach(function (key) { 103 | interfaceIn += interfaceObj[key].in 104 | }) 105 | 106 | let proxy = interfaceIn - direct 107 | content.push(`本次运行用的总流量:${bytesToSize(interfaceIn)}`) 108 | content.push(`本次运行用的直连流量:${bytesToSize(direct)}`) 109 | content.push(`本次运行用的代理流量:${bytesToSize(proxy)}`) 110 | 111 | if (direct > 10 * 1024 * 1024 * 1024) { 112 | $notification.post("流量使用警告", '', `本次运行用的直连流量已达:${bytesToSize(direct)}`) 113 | } 114 | 115 | if (proxy > 10 * 1024 * 1024 * 1024) { 116 | $notification.post("流量使用警告", '', `本次运行用的代理流量已达:${bytesToSize(proxy)}`) 117 | } 118 | 119 | 120 | panel_msg.content = content.join('\n') 121 | $done(panel_msg) 122 | })() -------------------------------------------------------------------------------- /Modules/sub-info/sub-info.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=SubInfoPanel 2 | #!desc=详细的显示你当前的订阅信息 3 | #!system=ios 4 | # @chenyk1219 5 | # 更新日期:2024.01.29 6 | # 版本:2.5 7 | # 参数: 8 | # regex= 订阅信息的正则表达式,用于匹配订阅信息,可自行修改 9 | 10 | [Panel] 11 | SubInfoPanel=title="",content="",style=info,script-name=sub-info.js,update-interval=1 12 | 13 | [Script] 14 | sub-info.js=script-path=https://raw.githubusercontent.com/chenyk1219/surge/main/Modules/sub-info/sub-info.js,type=generic,timeout=300 15 | 16 | [Host] 17 | -------------------------------------------------------------------------------- /Modules/txsp/txsp-ad.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=广告拦截-腾讯视频 2 | #!desc= 适用于腾讯视频的广告拦截,建议配合本仓库的adg.list一起使用 3 | #!system=ios 4 | # @chenyk1219 5 | # 更新日期:2024.02.20 6 | # 版本:2024.02.20 7 | 8 | [URL Rewrite] 9 | ^http:\/\/[\d\.:]*\/?(defaultts\.tc|vmind\.qqvideo\.tc|finderpdd\.video)\.qq\.com\/\w+ - reject 10 | ^http:\/\/apd-vlive\.apdcdn\.tc\.qq\.com\/vmind\.qqvideo\.tc\.qq\.com\/\w+ - reject 11 | ^http:\/\/apd-\w+\.v\.smtcdns\.com\/(defaultts|omts|vmind\.qqvideo)\.tc\.qq\.com\/\w+ - reject 12 | ^https?:\/\/vv\.video\.qq\.com\/(diff|get)vmind - reject 13 | ^https?:\/\/vv\.video\.qq\.com\/getvinfo - reject 14 | 15 | [MITM] 16 | hostname = %APPEND% vv.video.qq.com 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

联系我:

2 | 3 |

4 | home 5 | home 6 |

7 | 8 | ## Surge 最新免转换懒人配置 9 | 10 | 最新使用说明文档:[https://www.inextops.com/tools/sub/](https://www.inextops.com/tools/sub/) 11 | 12 | ## 更新 13 | 14 | - 2024-2-7 更新 15 | 16 | bm7的广告规则太多了,部分拉取失败,所以将广告屏蔽规则换成 [Adguard](https://github.com/AdguardTeam/AdGuardSDNSFilter) 17 | 18 | ```shell 19 | https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list 20 | https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list 21 | ``` 22 | 23 | - 2024-2-2 更新 24 | 25 | 规则顺序修正,新增DIRECT规则 26 | 27 | - 2024-01-28 更新 28 | 29 | 优化网络信息模块显示 30 | 31 | - 2024-01-26 更新 32 | 33 | 由于新加坡的媒体解锁的内容比较多,所以分离出一版将媒体指向新加坡节点 34 | 35 | ```shell 36 | https://raw.githubusercontent.com/chenyk1219/surge/master/MacAutoUpdateMedia.conf 37 | ``` 38 | 39 | ```shell 40 | https://raw.githubusercontent.com/chenyk1219/surge/master/iPhoneAutoUpdateMedia.conf 41 | ``` 42 | 43 | ```shell 44 | https://raw.githubusercontent.com/chenyk1219/surge/master/CHENYK_SURGE_MEDIA.ini 45 | ``` 46 | 47 | - 2024-01-25 更新 48 | 49 | 新增:ozan、iyzico土耳其支付域名列表,建议指向土耳其节点,如果有土耳其节点的话 50 | 51 | ```shell 52 | https://raw.githubusercontent.com/chenyk1219/surge/main/TRYpay.list 53 | ``` -------------------------------------------------------------------------------- /README.zh.md: -------------------------------------------------------------------------------- 1 | # Surge 2 | > 自用配置集合 3 | 4 | # 使用方法 5 | 6 | ```shell 7 | 8 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaIP.list 9 | ruleset=🎯 全球直连,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list 10 | ``` 11 | -------------------------------------------------------------------------------- /README_v1.md: -------------------------------------------------------------------------------- 1 | # Surge 2 | > 自用配置集合 3 | > 为了避免订阅暴露的风险,本仓库不涉及订阅的转换 4 | > 修改国内的域名和IP(每天定时自动更新release分支) 5 | > ```shell 6 | > https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list 7 | > 8 | > https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaIP.list 9 | >``` 10 | 11 | ### 1. 安装 12 | 13 | 下载本仓库 14 | 15 | ```shell 16 | git clone https://github.com/chenyk1219/surge.git 17 | ``` 18 | 19 | 打开surge配置文件夹 20 | 21 | 在`更多`--->`配置`--->`在Finder中找到配置` 22 | 23 | ![](./static/1.png) 24 | 25 | 将`surge.conf`拖放到文件夹里 26 | 27 | ![](./static/2.png) 28 | 29 | 在配置里双击`surge.conf`并应用 30 | 31 | ![](./static/6.png) 32 | 33 | 打开策略和规则,你就可以看到已经添加好的策略和规则 34 | 35 | ![](./static/3.png) 36 | 37 | ![](./static/4.png) 38 | 39 | ### 2. 配置代理 40 | 41 | 在策略里右击,选则`编辑策略组` 42 | 43 | ![](./static/7.png) 44 | 45 | 直接下一步 46 | 47 | ![](./static/8.png) 48 | 49 | 选则`同时包含外部策略`,将🪜的配置的URL(链接要带token:https://xxxxx/subscribe?token=xxxxxx) 粘贴到这里,下一步 50 | 51 | ![](./static/9.png) 52 | 53 | ![](./static/10.png) 54 | 55 | 然后取个名字就完成了 56 | 57 | ![](./static/11.png) 58 | 59 | 有多少个🪜就配置多少个 60 | 61 | ### 3. 鸣谢 62 | 63 | 本仓库引用的 CN IP 是[@Hackl0us](https://github.com/Hackl0us/GeoIP2-CN) 维护的GEOIP-CN 64 | 65 | 本仓库引用的 CN DOMAIN 是[@felixonmars](https://github.com/felixonmars/dnsmasq-china-list) 维护的dnsmasq-china-list 66 | 67 | -------------------------------------------------------------------------------- /Rules/TRYpay.list: -------------------------------------------------------------------------------- 1 | # OZAN PAYPAL 2 | DOMAIN-SUFFIX,ozan.com 3 | 4 | # IYZICO 5 | DOMAIN-SUFFIX,iyzipay.com -------------------------------------------------------------------------------- /TRYpay.list: -------------------------------------------------------------------------------- 1 | # OZAN PAYPAL 2 | DOMAIN-SUFFIX,ozan.com 3 | 4 | # IYZICO 5 | DOMAIN-SUFFIX,iyzipay.com -------------------------------------------------------------------------------- /iPhone.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | # ================ iOS和MacOS共同的 Surge 参数 ================ # 3 | # > 日志级别 verbose, info, notify, or warning 不建议在日常使用中启用详细,因为这会显著降低性能。 4 | loglevel = notify 5 | # > IPv6协议 启用完整的 IPv6 支持。具体来说,开启该选项后,访问域名时会查询该域名的AAAA记录。即使未启用此选项,也可以通过直接访问 IPv6 地址来访问 IPv6 站点。 6 | ipv6 = false 7 | # > 允许 IPv6 通过 Surge VIF。当您希望 Surge 处理连接到 IPv6 地址的原始 TCP 连接时很有用。 8 | # > off :切勿使用 IPv6 设置 Surge VIF 9 | # > auto :仅当本地网络具有有效的 IPv6 网络时,才使用 IPv6 设置 Surge VIF 10 | # > always :始终使用 IPv6 设置 Surge VIF 11 | ipv6-vif = false 12 | # > dns服务器 上游DNS服务器的IP地址 13 | dns-server = system, 223.6.6.6, 223.5.5.5, 119.29.29.29 14 | # doh-server = https://223.5.5.5/dns-query, https://1.12.12.12/dns-query, https://8.8.8.8/dns-query, https://1.1.1.1/dns-query 15 | # > 跳过代理 在 iOS 版本中,此选项强制与这些域/IP 范围的连接由 Surge VIF 而不是 Surge 代理处理。在 macOS 版本中,当启用“设置为系统代理”时,这些设置将应用于系统。此选项用于修复某些应用的兼容性问题。 16 | # > apple.com、*apple.com、192.168.2.* or 192.168.2.0/24 17 | # > 注意:如果输入 IP 地址或地址范围,则只有在使用该地址连接到该主机时才能绕过代理,而不能在通过解析为该地址的域名连接到主机时绕过代理。 18 | skip-proxy = localhost, *.local, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16 19 | # > 排除简单主机名 就像 skip-proxy 参数一样。此选项允许请求使用由 Surge VIF 而不是 Surge 代理处理的简单主机名(不带点)。 20 | # > mysql01、redis01 21 | exclude-simple-hostnames = true 22 | # > 外部控制器访问 此选项允许外部控制器控制 Surge,例如 Surge Dashboard (macOS) 和 Surge iOS 遥控器 (iOS)。例如:key@0.0.0.0:6166 23 | external-controller-access = mima1234@0.0.0.0:6166 24 | # > 使用 HTTPS 协议而不是 HTTP。必须先配置 MitM CA 证书。您需要在客户端设备上手动安装证书。 25 | # http-api-tls = 26 | # > 启用此功能后,您可以通过 Web 浏览器控制 Surge。 27 | http-api-web-dashboard = false 28 | # > 显示错误页面拒绝,如果请求是纯 HTTP 请求,则显示 REJECT 策略的错误网页。 29 | show-error-page-for-reject = true 30 | # > Surge VIF只能处理 TCP 和 UDP 协议。使用此选项可绕过特定 IP 范围,以允许所有流量通过。 31 | # > 注意:此选项仅适用于Surge VIF。Surge Proxy Server 处理的请求不受影响。合并 skip-proxy 并确保 tun-excluded-routes 特定 HTTP 流量绕过 Surge。 32 | # tun-excluded-routes = 33 | # > 默认情况下,Surge VIF 接口将自身声明为默认路由。但是,由于 Wi-Fi 接口的路由较小,因此某些流量可能无法通过浪涌 VIF 接口。使用此选项可添加较小的路由。 34 | # tun-included-routes = 35 | # > Internet 连接测试的 URL, 以及,DIRECT 策略的测试 URL 36 | internet-test-url = http://223.6.6.6 37 | # > 代理策略的默认测试 URL 38 | proxy-test-url = http://1.0.0.1/generate_204 39 | # > 连接测试超时(秒) 40 | test-timeout = 5 41 | # > 始终真实的 IP 此选项要求 Surge 在 Surge VIF 处理 DNS 问题时返回真实 IP 地址而不是虚假 IP 地址 DNS数据包将被转发到上游DNS服务器 此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 42 | # > 使用前缀 - 排除主机名 43 | # > 支持通配符 * 和 ? 44 | # > 使用后缀 :port 匹配其他端口,如果未提供端口号,则 Surge 将自动为该参数附加标准端口号,就像 force-http-engine-hosts 参数一样,如果仅配置了主机名,则仅对端口 80 有效。对于 MITM 功能,它仅对端口 443 有效。 45 | # > 使用后缀 :0 以匹配所有端口 46 | # > 使用 直接使用 IPv4/IPv6 地址(而不是域)匹配所有主机名 47 | # > -*icloud*, -*.mzstatic.com, -*.facebook.com, -*.instagram.com, -*.twitter.com, -*dropbox*, -*apple*, -*.amazonaws.com, -, * 48 | always-real-ip = *.test.com 49 | # > 劫持DNS,默认情况下,Surge 仅返回发送到 Surge DNS 地址 (198.18.0.2) 的 DNS 查询的虚假 IP 地址。发送到标准 DNS 的查询将被转发。某些设备或软件始终使用硬编码的 DNS 服务器。(例如,Google Speakers始终使用 8.8.8.8)。您可以使用此选项劫持查询以获取虚假地址。您可以使用 hijack-dns = *:53 劫持所有DNS查询 50 | hijack-dns = *:53 51 | # > 使 Surge 将 TCP 连接视为 HTTP 请求。Surge HTTP 引擎将处理请求,并且所有高级功能都将可用,例如捕获、重写和脚本编写。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 52 | # force-http-engine-hosts = 53 | # > 加密 DNS 跟随出站模式,默认情况下,加密的 DNS 查找使用直接出站。启用该选项将使 DOH 遵循出站模式设置和规则。 54 | encrypted-dns-follow-outbound-mode = true 55 | # > 加密的 DNS 服务器,加密的 DNS 服务器的 URL。如果配置了加密 DNS,则传统 DNS 将仅用于测试连接并解析加密 DNS URL 中的域。 56 | encrypted-dns-server = https://223.5.5.5/dns-query,quic://223.6.6.6:853,quic://223.5.5.5:853,https://223.6.6.6/dns-query,https://1.12.12.12/dns-query,https://120.53.53.53/dns-query 57 | # https://8.8.8.8/dns-query, https://1.1.1.1/dns-query 58 | # > 跳过加密的DNS服务器证书验证,这是不安全的。 59 | encrypted-dns-skip-cert-verification = false 60 | # > 使用本地主机代理,默认情况下,如果使用代理策略,则始终在远程服务器上执行 DNS 查找。启用此选项后,如果存在目标域的本地 DNS 映射结果,则 Surge 会使用 IP 地址而不是域来设置代理连接。 61 | use-local-host-item-for-proxy = false 62 | # > 要更新的 GeoIP 数据库的 URL 63 | geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb 64 | # > 禁用 GeoIP 数据库的自动更新 65 | disable-geoip-db-auto-update = false 66 | # > iOS 系统可能会执行 SVCB 记录 DNS 查找,而不是标准 A 记录查找。这会导致 Surge 无法返回虚拟 IP 地址。因此,默认情况下,禁止 SVCB 记录查找,以强制系统执行 A 记录查找。 67 | allow-dns-svcb = false 68 | # > UDP 流量与不支持 UDP 中继的策略匹配时的回退行为,可能的值: DIRECT 、 REJECT, 如果没有代理服务器支持 UDP 转发,可修改为「 direct 」或注释下条,但需注意同一目标主机名 TCP 请求与 UDP 请求的源地址不同所造成的隐私及安全风险。 69 | udp-policy-not-supported-behaviour = REJECT 70 | # > 代理的默认 UDP 测试参数, 例如: apple.com@8.8.8.8 71 | # proxy-test-udp = apple.com@8.8.8.8 72 | # > 当系统负载非常高且数据包处理延迟时,启用将优先处理 UDP 数据包。也称为游戏模式 73 | udp-priority = false 74 | # > Surge 将自动嗅探发送到端口 80 和 443 的 TCP 请求的协议,从而在优化性能的同时启用高级 HTTP/HTTPS 功能。但是,这可能会导致一些兼容性问题。如果遇到问题,可以在此处添加主机名,Surge 不会嗅探这些请求的协议。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 75 | always-raw-tcp-hosts = *.baidu.com 76 | # ================ 仅限 iOS 的 Surge 参数 ================ # 77 | # > 允许 wifi 访问,允许 Surge 代理服务从 LAN 中的其他设备访问。 78 | allow-wifi-access = false 79 | # > Surge HTTP 代理服务的端口号 80 | wifi-access-http-port = 6152 81 | # > Surge SOCKS5 代理服务的端口号 82 | wifi-access-socks5-port = 6153 83 | # > 要求对 Surge HTTP 代理服务进行身份验证。例如:用户名:密码 84 | wifi-access-http-auth = surge:mima1234 85 | # > 启用 Wi-Fi 助手 (在 Wi-Fi 网络不佳时尝试使用数据网络建立连接,请仅当使用不限量的数据流量时开启) 86 | wifi-assist = false 87 | # > 隐藏状态栏中的 VPN 图标 88 | hide-vpn-icon = false 89 | # > 当 Wi-Fi 网络较差时,不要设置与蜂窝数据的连接,而是始终同时设置与 Wi-Fi 和蜂窝数据的连接 此选项可以在 Wi-Fi 较差或 Wi-Fi 网络切换时显著改善网络体验 此功能将应用于所有 TCP 连接和 DNS 查找。仅当您拥有无限的蜂窝数据计划时才启用它 90 | all-hybrid = false 91 | # > 允许在“个人热点”打开时从其他设备访问 Surge 代理服务 92 | allow-hotspot-access = ture 93 | # > 包含所有网络,默认情况下,某些请求可能不会被 Surge 接管。例如,应用程序可以绑定到物理网络接口以绕过浪涌 VIF。启用“包括所有网络”选项,以确保所有请求都由 Surge 处理而不会泄漏。当您使用 Surge 作为防火墙时,此选项很有用。(需要 iOS 14.0 或以上版本),启用此选项可能会导致 AirDrop 和 Xcode 调试问题、通过 USB 的 Surge Dashboard 无法正常工作以及其他意外的副作用。请谨慎使用。 94 | include-all-networks = false 95 | # > 包含本地网络,启用此选项可使 Surge VIF 处理发送到 LAN 的请求。(需要 iOS 14.2 或更高版本)启用此选项可能会导致 AirDrop 和 Xcode 调试问题、通过 USB 的 Surge Dashboard 无法正常工作以及其他意外的副作用。请谨慎使用。必须与 include-all-networks=true 结合使用。 96 | include-local-networks = false 97 | # > 启用此选项可使 Surge VIF 处理 Apple 推送通知服务 (APNs) 的网络流量。必须与 include-all-networks=true 结合使用。 98 | include-apns = false 99 | # > 启用此选项可使 Surge VIF 处理蜂窝服务的 Internet 可路由网络流量。(VoLTE、Wi-Fi 通话、IMS、彩信、可视语音信箱等).请注意,某些蜂窝运营商会绕过互联网,将蜂窝网络服务流量直接路由到运营商网络。此类蜂窝服务流量始终被排除在隧道之外。必须与 include-all-networks=true 结合使用。 100 | include-cellular-services = false 101 | # > 兼容性模式,此选项用于控制 Surge iOS 的工作模式。 102 | # > 0:自动,在 5.8.0 之前的 Surge iOS 版本中,这相当于 1,从 5.8.0 开始,它相当于 3 103 | # > 1:代理接管 + VIF,在此模式下,代理接管的优先级高于 VIF 接管,提供最佳性能,但某些应用程序可能会检查代理设置并拒绝工作。 104 | # > 2:仅代理接管 105 | # > 3:VIF Takeover Only:最新版本的默认工作模式。 106 | # > 4:代理接管 + VIF,但代理使用 VIF 地址而不是环回地址。 107 | # > 5:代理接管+VIF,但VIF路由使用多个较小的路由进行接管,没有配置默认路由,可以用来绕过一些特殊问题。(例如,HomeKit 安防摄像头) 108 | compatibility-mode = 3 109 | 110 | [Proxy] 111 | #!include 112 | 113 | [Proxy Group] 114 | 🔰 节点选择 = select, ♻️ 自动选择, 🛃 手动切换, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇺🇸 美国节点, 🇨🇳 台湾节点, 🇰🇷 韩国节点, 🇸🇬 新加坡节点, 🌎 其他节点, 🎯 全球直连, ⛔️ 禁止访问 115 | ♻️ 自动选择 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 116 | 🛃 手动切换 = select, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 117 | 🇭🇰 香港节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:港|HK|hk|Hong Kong|HongKong|hongkong).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 118 | 🇯🇵 日本节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 119 | 🇺🇸 美国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 120 | 🇨🇳 台湾节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:台|新北|彰化|TW|Taiwan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 121 | 🇰🇷 韩国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:KR|Korea|KOR|首尔|韩|韓).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 122 | 🇸🇬 新加坡节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 123 | 🌎 其他节点 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore).)*$, interval=300, tolerance=50 124 | ⛔️ 禁止访问 = select, REJECT 125 | 🎯 全球直连 = select, DIRECT 126 | 127 | 128 | [Rule] 129 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list,🎯 全球直连,update-interval=86400 // 白名单 130 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list,🎯 全球直连,update-interval=86400 // 规则修正 131 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list,🎯 全球直连,update-interval=86400 // Lan网 132 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list,🎯 全球直连,update-interval=86400 // 私有网 133 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list,🎯 全球直连,update-interval=86400 // Apple 134 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list,⛔️ 禁止访问,update-interval=86400,no-resolve // AD广告 135 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list,⛔️ 禁止访问,update-interval=86400 // 防劫持 136 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list,⛔️ 禁止访问,update-interval=86400 // 禁用HTTP协议的DNS 137 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list,⛔️ 禁止访问,update-interval=86400 // 隐私保护 138 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list,🎯 全球直连,update-interval=86400 // 亚马逊中国 139 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list,🎯 全球直连,update-interval=86400 // Cloudflare中国 140 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list,🎯 全球直连,update-interval=86400 // 下载网站 141 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list,🎯 全球直连,update-interval=86400 // 谷歌中国 142 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list,🔰 节点选择,update-interval=86400 // Microsoft OneDrive 143 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list,🔰 节点选择,update-interval=86400 // Microsoft服务 144 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list,🔰 节点选择,update-interval=86400 // 亚马逊网站 145 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list,🔰 节点选择,update-interval=86400 // 亚马逊服务器 146 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list,🔰 节点选择,update-interval=86400 // Jetbrains 147 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list,🔰 节点选择,update-interval=86400 // Telegram 148 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,🔰 节点选择,update-interval=86400 // Twitter 149 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list,🔰 节点选择,update-interval=86400 // ChatGPT 150 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,🔰 节点选择,update-interval=86400 // Github 151 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list,🔰 节点选择,update-interval=86400 // Cloudflare 152 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,🔰 节点选择,update-interval=86400 // YouTube 153 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list,🔰 节点选择,update-interval=86400 // YouTube Music 154 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,🔰 节点选择,update-interval=86400 // Netflix 155 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,🔰 节点选择,update-interval=86400 // TikTok 156 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list,🔰 节点选择,update-interval=86400 // Disney 157 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // 国外媒体 158 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // GFW 159 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list,🎯 全球直连,update-interval=86400 // 中国公司IP 160 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list,🎯 全球直连,update-interval=86400 // 中国域名 161 | GEOIP,CN,🎯 全球直连 // 中国IP 162 | FINAL,🔰 节点选择 163 | 164 | [URL Rewrite] 165 | ^https?://(www.)?g.cn https://www.google.com 302 166 | ^https?://(www.)?google.cn https://www.google.com 302 167 | 168 | -------------------------------------------------------------------------------- /iPhoneAutoUpdate.conf: -------------------------------------------------------------------------------- 1 | #!MANAGED-CONFIG https://raw.githubusercontent.com/chenyk1219/surge/master/iPhoneAutoUpdate.conf interval=86400 strict=false 2 | 3 | [General] 4 | # ================ iOS和MacOS共同的 Surge 参数 ================ # 5 | # > 日志级别 verbose, info, notify, or warning 不建议在日常使用中启用详细,因为这会显著降低性能。 6 | loglevel = notify 7 | # > IPv6协议 启用完整的 IPv6 支持。具体来说,开启该选项后,访问域名时会查询该域名的AAAA记录。即使未启用此选项,也可以通过直接访问 IPv6 地址来访问 IPv6 站点。 8 | ipv6 = false 9 | # > 允许 IPv6 通过 Surge VIF。当您希望 Surge 处理连接到 IPv6 地址的原始 TCP 连接时很有用。 10 | # > off :切勿使用 IPv6 设置 Surge VIF 11 | # > auto :仅当本地网络具有有效的 IPv6 网络时,才使用 IPv6 设置 Surge VIF 12 | # > always :始终使用 IPv6 设置 Surge VIF 13 | ipv6-vif = false 14 | # > dns服务器 上游DNS服务器的IP地址 15 | dns-server = system, 223.5.5.5, 119.29.29.29, 1.1.1.1, 1.0.0.1, 8.8.8.8, 8.8.4.4, 9.9.9.9:995 16 | # > 跳过代理 在 iOS 版本中,此选项强制与这些域/IP 范围的连接由 Surge VIF 而不是 Surge 代理处理。在 macOS 版本中,当启用“设置为系统代理”时,这些设置将应用于系统。此选项用于修复某些应用的兼容性问题。 17 | # > apple.com、*apple.com、192.168.2.* or 192.168.2.0/24 18 | # > 注意:如果输入 IP 地址或地址范围,则只有在使用该地址连接到该主机时才能绕过代理,而不能在通过解析为该地址的域名连接到主机时绕过代理。 19 | skip-proxy = localhost, *.local, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16 20 | # > 排除简单主机名 就像 skip-proxy 参数一样。此选项允许请求使用由 Surge VIF 而不是 Surge 代理处理的简单主机名(不带点)。 21 | # > mysql01、redis01 22 | exclude-simple-hostnames = true 23 | # > 外部控制器访问 此选项允许外部控制器控制 Surge,例如 Surge Dashboard (macOS) 和 Surge iOS 遥控器 (iOS)。例如:key@0.0.0.0:6166 24 | external-controller-access = mima1234@0.0.0.0:6166 25 | # > 使用 HTTPS 协议而不是 HTTP。必须先配置 MitM CA 证书。您需要在客户端设备上手动安装证书。 26 | # http-api-tls = 27 | # > 启用此功能后,您可以通过 Web 浏览器控制 Surge。 28 | http-api-web-dashboard = false 29 | # > 显示错误页面拒绝,如果请求是纯 HTTP 请求,则显示 REJECT 策略的错误网页。 30 | show-error-page-for-reject = true 31 | # > Surge VIF只能处理 TCP 和 UDP 协议。使用此选项可绕过特定 IP 范围,以允许所有流量通过。 32 | # > 注意:此选项仅适用于Surge VIF。Surge Proxy Server 处理的请求不受影响。合并 skip-proxy 并确保 tun-excluded-routes 特定 HTTP 流量绕过 Surge。 33 | # tun-excluded-routes = 34 | # > 默认情况下,Surge VIF 接口将自身声明为默认路由。但是,由于 Wi-Fi 接口的路由较小,因此某些流量可能无法通过浪涌 VIF 接口。使用此选项可添加较小的路由。 35 | # tun-included-routes = 36 | # > Internet 连接测试的 URL, 以及,DIRECT 策略的测试 URL 37 | internet-test-url = http://connect.rom.miui.com/generate_204 38 | # > 代理策略的默认测试 URL 39 | proxy-test-url = http://1.0.0.1/generate_204 40 | # > 连接测试超时(秒) 41 | test-timeout = 5 42 | # > 始终真实的 IP 此选项要求 Surge 在 Surge VIF 处理 DNS 问题时返回真实 IP 地址而不是虚假 IP 地址 DNS数据包将被转发到上游DNS服务器 此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 43 | # > 使用前缀 - 排除主机名 44 | # > 支持通配符 * 和 ? 45 | # > 使用后缀 :port 匹配其他端口,如果未提供端口号,则 Surge 将自动为该参数附加标准端口号,就像 force-http-engine-hosts 参数一样,如果仅配置了主机名,则仅对端口 80 有效。对于 MITM 功能,它仅对端口 443 有效。 46 | # > 使用后缀 :0 以匹配所有端口 47 | # > 使用 直接使用 IPv4/IPv6 地址(而不是域)匹配所有主机名 48 | # > -*icloud*, -*.mzstatic.com, -*.facebook.com, -*.instagram.com, -*.twitter.com, -*dropbox*, -*apple*, -*.amazonaws.com, -, * 49 | always-real-ip = *.test.com 50 | # > 劫持DNS,默认情况下,Surge 仅返回发送到 Surge DNS 地址 (198.18.0.2) 的 DNS 查询的虚假 IP 地址。发送到标准 DNS 的查询将被转发。某些设备或软件始终使用硬编码的 DNS 服务器。(例如,Google Speakers始终使用 8.8.8.8)。您可以使用此选项劫持查询以获取虚假地址。您可以使用 hijack-dns = *:53 劫持所有DNS查询 51 | hijack-dns = *:53 52 | # > 使 Surge 将 TCP 连接视为 HTTP 请求。Surge HTTP 引擎将处理请求,并且所有高级功能都将可用,例如捕获、重写和脚本编写。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 53 | # force-http-engine-hosts = 54 | # > 加密 DNS 跟随出站模式,默认情况下,加密的 DNS 查找使用直接出站。启用该选项将使 DOH 遵循出站模式设置和规则。 55 | encrypted-dns-follow-outbound-mode = true 56 | # > 加密的 DNS 服务器,加密的 DNS 服务器的 URL。如果配置了加密 DNS,则传统 DNS 将仅用于测试连接并解析加密 DNS URL 中的域。 57 | encrypted-dns-server = https://223.5.5.5/dns-query,quic://223.6.6.6:853,quic://223.5.5.5:853,https://223.6.6.6/dns-query,https://1.12.12.12/dns-query,https://120.53.53.53/dns-query 58 | # , https://8.8.8.8/dns-query, https://1.1.1.1/dns-query 59 | # > 跳过加密的DNS服务器证书验证,这是不安全的。 60 | encrypted-dns-skip-cert-verification = false 61 | # > 使用本地主机代理,默认情况下,如果使用代理策略,则始终在远程服务器上执行 DNS 查找。启用此选项后,如果存在目标域的本地 DNS 映射结果,则 Surge 会使用 IP 地址而不是域来设置代理连接。 62 | use-local-host-item-for-proxy = false 63 | # > 要更新的 GeoIP 数据库的 URL 64 | geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb 65 | # > 禁用 GeoIP 数据库的自动更新 66 | disable-geoip-db-auto-update = false 67 | # > iOS 系统可能会执行 SVCB 记录 DNS 查找,而不是标准 A 记录查找。这会导致 Surge 无法返回虚拟 IP 地址。因此,默认情况下,禁止 SVCB 记录查找,以强制系统执行 A 记录查找。 68 | allow-dns-svcb = false 69 | # > UDP 流量与不支持 UDP 中继的策略匹配时的回退行为,可能的值: DIRECT 、 REJECT, 如果没有代理服务器支持 UDP 转发,可修改为「 direct 」或注释下条,但需注意同一目标主机名 TCP 请求与 UDP 请求的源地址不同所造成的隐私及安全风险。 70 | udp-policy-not-supported-behaviour = REJECT 71 | # > 代理的默认 UDP 测试参数, 例如: apple.com@8.8.8.8 72 | # proxy-test-udp = apple.com@8.8.8.8 73 | # > 当系统负载非常高且数据包处理延迟时,启用将优先处理 UDP 数据包。也称为游戏模式 74 | udp-priority = false 75 | # > Surge 将自动嗅探发送到端口 80 和 443 的 TCP 请求的协议,从而在优化性能的同时启用高级 HTTP/HTTPS 功能。但是,这可能会导致一些兼容性问题。如果遇到问题,可以在此处添加主机名,Surge 不会嗅探这些请求的协议。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 76 | always-raw-tcp-hosts = *.baidu.com 77 | # ================ 仅限 iOS 的 Surge 参数 ================ # 78 | # > 允许 wifi 访问,允许 Surge 代理服务从 LAN 中的其他设备访问。 79 | allow-wifi-access = false 80 | # > Surge HTTP 代理服务的端口号 81 | wifi-access-http-port = 6152 82 | # > Surge SOCKS5 代理服务的端口号 83 | wifi-access-socks5-port = 6153 84 | # > 要求对 Surge HTTP 代理服务进行身份验证。例如:用户名:密码 85 | wifi-access-http-auth = surge:mima1234 86 | # > 启用 Wi-Fi 助手 (在 Wi-Fi 网络不佳时尝试使用数据网络建立连接,请仅当使用不限量的数据流量时开启) 87 | wifi-assist = false 88 | # > 隐藏状态栏中的 VPN 图标 89 | hide-vpn-icon = false 90 | # > 当 Wi-Fi 网络较差时,不要设置与蜂窝数据的连接,而是始终同时设置与 Wi-Fi 和蜂窝数据的连接 此选项可以在 Wi-Fi 较差或 Wi-Fi 网络切换时显著改善网络体验 此功能将应用于所有 TCP 连接和 DNS 查找。仅当您拥有无限的蜂窝数据计划时才启用它 91 | all-hybrid = false 92 | # > 允许在“个人热点”打开时从其他设备访问 Surge 代理服务 93 | allow-hotspot-access = ture 94 | # > 包含所有网络,默认情况下,某些请求可能不会被 Surge 接管。例如,应用程序可以绑定到物理网络接口以绕过浪涌 VIF。启用“包括所有网络”选项,以确保所有请求都由 Surge 处理而不会泄漏。当您使用 Surge 作为防火墙时,此选项很有用。(需要 iOS 14.0 或以上版本),启用此选项可能会导致 AirDrop 和 Xcode 调试问题、通过 USB 的 Surge Dashboard 无法正常工作以及其他意外的副作用。请谨慎使用。 95 | include-all-networks = false 96 | # > 包含本地网络,启用此选项可使 Surge VIF 处理发送到 LAN 的请求。(需要 iOS 14.2 或更高版本)启用此选项可能会导致 AirDrop 和 Xcode 调试问题、通过 USB 的 Surge Dashboard 无法正常工作以及其他意外的副作用。请谨慎使用。必须与 include-all-networks=true 结合使用。 97 | include-local-networks = false 98 | # > 启用此选项可使 Surge VIF 处理 Apple 推送通知服务 (APNs) 的网络流量。必须与 include-all-networks=true 结合使用。 99 | include-apns = false 100 | # > 启用此选项可使 Surge VIF 处理蜂窝服务的 Internet 可路由网络流量。(VoLTE、Wi-Fi 通话、IMS、彩信、可视语音信箱等).请注意,某些蜂窝运营商会绕过互联网,将蜂窝网络服务流量直接路由到运营商网络。此类蜂窝服务流量始终被排除在隧道之外。必须与 include-all-networks=true 结合使用。 101 | include-cellular-services = false 102 | # > 兼容性模式,此选项用于控制 Surge iOS 的工作模式。 103 | # > 0:自动,在 5.8.0 之前的 Surge iOS 版本中,这相当于 1,从 5.8.0 开始,它相当于 3 104 | # > 1:代理接管 + VIF,在此模式下,代理接管的优先级高于 VIF 接管,提供最佳性能,但某些应用程序可能会检查代理设置并拒绝工作。 105 | # > 2:仅代理接管 106 | # > 3:VIF Takeover Only:最新版本的默认工作模式。 107 | # > 4:代理接管 + VIF,但代理使用 VIF 地址而不是环回地址。 108 | # > 5:代理接管+VIF,但VIF路由使用多个较小的路由进行接管,没有配置默认路由,可以用来绕过一些特殊问题。(例如,HomeKit 安防摄像头) 109 | compatibility-mode = 1 110 | 111 | [Proxy] 112 | 113 | 114 | [Proxy Group] 115 | 🔰 节点选择 = select, ♻️ 自动选择, 🛃 手动切换, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇺🇸 美国节点, 🇨🇳 台湾节点, 🇰🇷 韩国节点, 🇬🇧 英国节点, 🇸🇬 新加坡节点, 🇨🇦 加拿大节点, 🇩🇪 德国节点, 🇫🇷 法国节点, 🇮🇳 印度节点, 🌎 其他节点, 🎯 全球直连, ⛔️ 禁止访问 116 | ♻️ 自动选择 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 117 | 🛃 手动切换 = select, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 118 | 🇭🇰 香港节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:港|HK|hk|Hong Kong|HongKong|hongkong).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 119 | 🇯🇵 日本节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 120 | 🇺🇸 美国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 121 | 🇨🇳 台湾节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:台|新北|彰化|TW|Taiwan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 122 | 🇰🇷 韩国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:KR|Korea|KOR|首尔|韩|韓).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 123 | 🇬🇧 英国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:UK|英国).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 124 | 🇸🇬 新加坡节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 125 | 🇨🇦 加拿大节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:Canada|加拿大).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 126 | 🇩🇪 德国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:德国|🇩🇪|Germany).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 127 | 🇫🇷 法国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:法国|🇫🇷|France).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 128 | 🇮🇳 印度节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:印度|🇮🇳|India).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 129 | 🌎 其他节点 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore|英国|UK|Canada|加拿大|德国|🇩🇪|Germany|法国|🇫🇷|France|印度|🇮🇳|India).)*$, interval=300, tolerance=50 130 | ⛔️ 禁止访问 = select, REJECT 131 | 🎯 全球直连 = select, DIRECT 132 | 133 | 134 | [Rule] 135 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list,🎯 全球直连,update-interval=86400 // 白名单 136 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list,🎯 全球直连,update-interval=86400 // 规则修正 137 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list,🎯 全球直连,update-interval=86400 // Lan网 138 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list,🎯 全球直连,update-interval=86400 // 私有网 139 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list,🎯 全球直连,update-interval=86400 // Apple 140 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list,⛔️ 禁止访问,update-interval=86400,no-resolve // AD广告 141 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list,⛔️ 禁止访问,update-interval=86400 // 防劫持 142 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list,⛔️ 禁止访问,update-interval=86400 // 禁用HTTP协议的DNS 143 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list,⛔️ 禁止访问,update-interval=86400 // 隐私保护 144 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list,🎯 全球直连,update-interval=86400 // 亚马逊中国 145 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list,🎯 全球直连,update-interval=86400 // Cloudflare中国 146 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list,🎯 全球直连,update-interval=86400 // 下载网站 147 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list,🎯 全球直连,update-interval=86400 // 谷歌中国 148 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list,🔰 节点选择,update-interval=86400 // Microsoft OneDrive 149 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list,🔰 节点选择,update-interval=86400 // Microsoft服务 150 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list,🔰 节点选择,update-interval=86400 // 亚马逊网站 151 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list,🔰 节点选择,update-interval=86400 // 亚马逊服务器 152 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list,🔰 节点选择,update-interval=86400 // Jetbrains 153 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list,🔰 节点选择,update-interval=86400 // Telegram 154 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,🔰 节点选择,update-interval=86400 // Twitter 155 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list,🔰 节点选择,update-interval=86400 // ChatGPT 156 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,🔰 节点选择,update-interval=86400 // Github 157 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list,🔰 节点选择,update-interval=86400 // Cloudflare 158 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,🔰 节点选择,update-interval=86400 // YouTube 159 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list,🔰 节点选择,update-interval=86400 // YouTube Music 160 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,🔰 节点选择,update-interval=86400 // Netflix 161 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,🔰 节点选择,update-interval=86400 // TikTok 162 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list,🔰 节点选择,update-interval=86400 // Disney 163 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // 国外媒体 164 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // GFW 165 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list,🎯 全球直连,update-interval=86400 // 中国公司IP 166 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list,🎯 全球直连,update-interval=86400 // 中国域名 167 | GEOIP,CN,🎯 全球直连 // 中国IP 168 | FINAL,🔰 节点选择 169 | 170 | [URL Rewrite] 171 | ^https?://(www.)?g.cn https://www.google.com 302 172 | ^https?://(www.)?google.cn https://www.google.com 302 173 | 174 | -------------------------------------------------------------------------------- /iPhoneAutoUpdateAuto.conf: -------------------------------------------------------------------------------- 1 | #!MANAGED-CONFIG https://raw.githubusercontent.com/chenyk1219/surge/master/iPhoneAutoUpdateAuto.conf interval=86400 strict=false 2 | 3 | [General] 4 | # ================ iOS和MacOS共同的 Surge 参数 ================ # 5 | # > 日志级别 verbose, info, notify, or warning 不建议在日常使用中启用详细,因为这会显著降低性能。 6 | loglevel = notify 7 | # > IPv6协议 启用完整的 IPv6 支持。具体来说,开启该选项后,访问域名时会查询该域名的AAAA记录。即使未启用此选项,也可以通过直接访问 IPv6 地址来访问 IPv6 站点。 8 | ipv6 = false 9 | # > 允许 IPv6 通过 Surge VIF。当您希望 Surge 处理连接到 IPv6 地址的原始 TCP 连接时很有用。 10 | # > off :切勿使用 IPv6 设置 Surge VIF 11 | # > auto :仅当本地网络具有有效的 IPv6 网络时,才使用 IPv6 设置 Surge VIF 12 | # > always :始终使用 IPv6 设置 Surge VIF 13 | ipv6-vif = false 14 | # > dns服务器 上游DNS服务器的IP地址 15 | dns-server = system, 223.6.6.6, 223.5.5.5, 119.29.29.29 16 | # > 跳过代理 在 iOS 版本中,此选项强制与这些域/IP 范围的连接由 Surge VIF 而不是 Surge 代理处理。在 macOS 版本中,当启用“设置为系统代理”时,这些设置将应用于系统。此选项用于修复某些应用的兼容性问题。 17 | # > apple.com、*apple.com、192.168.2.* or 192.168.2.0/24 18 | # > 注意:如果输入 IP 地址或地址范围,则只有在使用该地址连接到该主机时才能绕过代理,而不能在通过解析为该地址的域名连接到主机时绕过代理。 19 | skip-proxy = localhost, *.local, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16 20 | # > 排除简单主机名 就像 skip-proxy 参数一样。此选项允许请求使用由 Surge VIF 而不是 Surge 代理处理的简单主机名(不带点)。 21 | # > mysql01、redis01 22 | exclude-simple-hostnames = true 23 | # > 外部控制器访问 此选项允许外部控制器控制 Surge,例如 Surge Dashboard (macOS) 和 Surge iOS 遥控器 (iOS)。例如:key@0.0.0.0:6166 24 | external-controller-access = mima1234@0.0.0.0:6166 25 | # > 使用 HTTPS 协议而不是 HTTP。必须先配置 MitM CA 证书。您需要在客户端设备上手动安装证书。 26 | # http-api-tls = 27 | # > 启用此功能后,您可以通过 Web 浏览器控制 Surge。 28 | http-api-web-dashboard = false 29 | # > 显示错误页面拒绝,如果请求是纯 HTTP 请求,则显示 REJECT 策略的错误网页。 30 | show-error-page-for-reject = true 31 | # > Surge VIF只能处理 TCP 和 UDP 协议。使用此选项可绕过特定 IP 范围,以允许所有流量通过。 32 | # > 注意:此选项仅适用于Surge VIF。Surge Proxy Server 处理的请求不受影响。合并 skip-proxy 并确保 tun-excluded-routes 特定 HTTP 流量绕过 Surge。 33 | # tun-excluded-routes = 34 | # > 默认情况下,Surge VIF 接口将自身声明为默认路由。但是,由于 Wi-Fi 接口的路由较小,因此某些流量可能无法通过浪涌 VIF 接口。使用此选项可添加较小的路由。 35 | # tun-included-routes = 36 | # > Internet 连接测试的 URL, 以及,DIRECT 策略的测试 URL 37 | internet-test-url = http://connect.rom.miui.com/generate_204 38 | # > 代理策略的默认测试 URL 39 | proxy-test-url = http://1.0.0.1/generate_204 40 | # > 连接测试超时(秒) 41 | test-timeout = 5 42 | # > 始终真实的 IP 此选项要求 Surge 在 Surge VIF 处理 DNS 问题时返回真实 IP 地址而不是虚假 IP 地址 DNS数据包将被转发到上游DNS服务器 此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 43 | # > 使用前缀 - 排除主机名 44 | # > 支持通配符 * 和 ? 45 | # > 使用后缀 :port 匹配其他端口,如果未提供端口号,则 Surge 将自动为该参数附加标准端口号,就像 force-http-engine-hosts 参数一样,如果仅配置了主机名,则仅对端口 80 有效。对于 MITM 功能,它仅对端口 443 有效。 46 | # > 使用后缀 :0 以匹配所有端口 47 | # > 使用 直接使用 IPv4/IPv6 地址(而不是域)匹配所有主机名 48 | # > -*icloud*, -*.mzstatic.com, -*.facebook.com, -*.instagram.com, -*.twitter.com, -*dropbox*, -*apple*, -*.amazonaws.com, -, * 49 | always-real-ip = *.test.com 50 | # > 劫持DNS,默认情况下,Surge 仅返回发送到 Surge DNS 地址 (198.18.0.2) 的 DNS 查询的虚假 IP 地址。发送到标准 DNS 的查询将被转发。某些设备或软件始终使用硬编码的 DNS 服务器。(例如,Google Speakers始终使用 8.8.8.8)。您可以使用此选项劫持查询以获取虚假地址。您可以使用 hijack-dns = *:53 劫持所有DNS查询 51 | hijack-dns = *:53 52 | # > 使 Surge 将 TCP 连接视为 HTTP 请求。Surge HTTP 引擎将处理请求,并且所有高级功能都将可用,例如捕获、重写和脚本编写。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 53 | # force-http-engine-hosts = 54 | # > 加密 DNS 跟随出站模式,默认情况下,加密的 DNS 查找使用直接出站。启用该选项将使 DOH 遵循出站模式设置和规则。 55 | encrypted-dns-follow-outbound-mode = true 56 | # > 加密的 DNS 服务器,加密的 DNS 服务器的 URL。如果配置了加密 DNS,则传统 DNS 将仅用于测试连接并解析加密 DNS URL 中的域。 57 | encrypted-dns-server = https://223.5.5.5/dns-query,quic://223.6.6.6:853,quic://223.5.5.5:853,https://223.6.6.6/dns-query,https://1.12.12.12/dns-query,https://120.53.53.53/dns-query 58 | # , https://8.8.8.8/dns-query, https://1.1.1.1/dns-query 59 | # > 跳过加密的DNS服务器证书验证,这是不安全的。 60 | encrypted-dns-skip-cert-verification = false 61 | # > 使用本地主机代理,默认情况下,如果使用代理策略,则始终在远程服务器上执行 DNS 查找。启用此选项后,如果存在目标域的本地 DNS 映射结果,则 Surge 会使用 IP 地址而不是域来设置代理连接。 62 | use-local-host-item-for-proxy = false 63 | # > 要更新的 GeoIP 数据库的 URL 64 | geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb 65 | # > 禁用 GeoIP 数据库的自动更新 66 | disable-geoip-db-auto-update = false 67 | # > iOS 系统可能会执行 SVCB 记录 DNS 查找,而不是标准 A 记录查找。这会导致 Surge 无法返回虚拟 IP 地址。因此,默认情况下,禁止 SVCB 记录查找,以强制系统执行 A 记录查找。 68 | allow-dns-svcb = false 69 | # > UDP 流量与不支持 UDP 中继的策略匹配时的回退行为,可能的值: DIRECT 、 REJECT, 如果没有代理服务器支持 UDP 转发,可修改为「 direct 」或注释下条,但需注意同一目标主机名 TCP 请求与 UDP 请求的源地址不同所造成的隐私及安全风险。 70 | udp-policy-not-supported-behaviour = REJECT 71 | # > 代理的默认 UDP 测试参数, 例如: apple.com@8.8.8.8 72 | # proxy-test-udp = apple.com@8.8.8.8 73 | # > 当系统负载非常高且数据包处理延迟时,启用将优先处理 UDP 数据包。也称为游戏模式 74 | udp-priority = false 75 | # > Surge 将自动嗅探发送到端口 80 和 443 的 TCP 请求的协议,从而在优化性能的同时启用高级 HTTP/HTTPS 功能。但是,这可能会导致一些兼容性问题。如果遇到问题,可以在此处添加主机名,Surge 不会嗅探这些请求的协议。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 76 | always-raw-tcp-hosts = *.baidu.com 77 | # ================ 仅限 iOS 的 Surge 参数 ================ # 78 | # > 允许 wifi 访问,允许 Surge 代理服务从 LAN 中的其他设备访问。 79 | allow-wifi-access = false 80 | # > Surge HTTP 代理服务的端口号 81 | wifi-access-http-port = 6152 82 | # > Surge SOCKS5 代理服务的端口号 83 | wifi-access-socks5-port = 6153 84 | # > 要求对 Surge HTTP 代理服务进行身份验证。例如:用户名:密码 85 | wifi-access-http-auth = surge:mima1234 86 | # > 启用 Wi-Fi 助手 (在 Wi-Fi 网络不佳时尝试使用数据网络建立连接,请仅当使用不限量的数据流量时开启) 87 | wifi-assist = false 88 | # > 隐藏状态栏中的 VPN 图标 89 | hide-vpn-icon = false 90 | # > 当 Wi-Fi 网络较差时,不要设置与蜂窝数据的连接,而是始终同时设置与 Wi-Fi 和蜂窝数据的连接 此选项可以在 Wi-Fi 较差或 Wi-Fi 网络切换时显著改善网络体验 此功能将应用于所有 TCP 连接和 DNS 查找。仅当您拥有无限的蜂窝数据计划时才启用它 91 | all-hybrid = false 92 | # > 允许在“个人热点”打开时从其他设备访问 Surge 代理服务 93 | allow-hotspot-access = ture 94 | # > 包含所有网络,默认情况下,某些请求可能不会被 Surge 接管。例如,应用程序可以绑定到物理网络接口以绕过浪涌 VIF。启用“包括所有网络”选项,以确保所有请求都由 Surge 处理而不会泄漏。当您使用 Surge 作为防火墙时,此选项很有用。(需要 iOS 14.0 或以上版本),启用此选项可能会导致 AirDrop 和 Xcode 调试问题、通过 USB 的 Surge Dashboard 无法正常工作以及其他意外的副作用。请谨慎使用。 95 | include-all-networks = false 96 | # > 包含本地网络,启用此选项可使 Surge VIF 处理发送到 LAN 的请求。(需要 iOS 14.2 或更高版本)启用此选项可能会导致 AirDrop 和 Xcode 调试问题、通过 USB 的 Surge Dashboard 无法正常工作以及其他意外的副作用。请谨慎使用。必须与 include-all-networks=true 结合使用。 97 | include-local-networks = false 98 | # > 启用此选项可使 Surge VIF 处理 Apple 推送通知服务 (APNs) 的网络流量。必须与 include-all-networks=true 结合使用。 99 | include-apns = false 100 | # > 启用此选项可使 Surge VIF 处理蜂窝服务的 Internet 可路由网络流量。(VoLTE、Wi-Fi 通话、IMS、彩信、可视语音信箱等).请注意,某些蜂窝运营商会绕过互联网,将蜂窝网络服务流量直接路由到运营商网络。此类蜂窝服务流量始终被排除在隧道之外。必须与 include-all-networks=true 结合使用。 101 | include-cellular-services = false 102 | # > 兼容性模式,此选项用于控制 Surge iOS 的工作模式。 103 | # > 0:自动,在 5.8.0 之前的 Surge iOS 版本中,这相当于 1,从 5.8.0 开始,它相当于 3 104 | # > 1:代理接管 + VIF,在此模式下,代理接管的优先级高于 VIF 接管,提供最佳性能,但某些应用程序可能会检查代理设置并拒绝工作。 105 | # > 2:仅代理接管 106 | # > 3:VIF Takeover Only:最新版本的默认工作模式。 107 | # > 4:代理接管 + VIF,但代理使用 VIF 地址而不是环回地址。 108 | # > 5:代理接管+VIF,但VIF路由使用多个较小的路由进行接管,没有配置默认路由,可以用来绕过一些特殊问题。(例如,HomeKit 安防摄像头) 109 | compatibility-mode = 1 110 | 111 | [Proxy] 112 | 113 | 114 | [Proxy Group] 115 | 🔰 节点选择 = select, ♻️ 自动选择, 🛃 手动切换, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇺🇸 美国节点, 🇨🇳 台湾节点, 🇰🇷 韩国节点, 🇬🇧 英国节点, 🇸🇬 新加坡节点, 🇨🇦 加拿大节点, 🇩🇪 德国节点, 🇫🇷 法国节点, 🇮🇳 印度节点, 🌎 其他节点, 🎯 全球直连, ⛔️ 禁止访问 116 | ♻️ 自动选择 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 117 | 🛃 手动切换 = select, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 118 | 🇭🇰 香港节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:港|HK|hk|Hong Kong|HongKong|hongkong).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 119 | 🇯🇵 日本节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 120 | 🇺🇸 美国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 121 | 🇨🇳 台湾节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:台|新北|彰化|TW|Taiwan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 122 | 🇰🇷 韩国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:KR|Korea|KOR|首尔|韩|韓).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 123 | 🇬🇧 英国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:UK|英国).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 124 | 🇸🇬 新加坡节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 125 | 🇨🇦 加拿大节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:Canada|加拿大).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 126 | 🇩🇪 德国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:德国|🇩🇪|Germany).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 127 | 🇫🇷 法国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:法国|🇫🇷|France).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 128 | 🇮🇳 印度节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:印度|🇮🇳|India).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 129 | 🌎 其他节点 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore|英国|UK|Canada|加拿大|德国|🇩🇪|Germany|法国|🇫🇷|France|印度|🇮🇳|India).)*$, interval=300, tolerance=50 130 | ⛔️ 禁止访问 = select, REJECT 131 | 🎯 全球直连 = select, DIRECT 132 | 133 | 134 | [Rule] 135 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list,🎯 全球直连,update-interval=86400 // 白名单 136 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list,🎯 全球直连,update-interval=86400 // 规则修正 137 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list,🎯 全球直连,update-interval=86400 // Lan网 138 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list,🎯 全球直连,update-interval=86400 // 私有网 139 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list,🎯 全球直连,update-interval=86400 // Apple 140 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list,⛔️ 禁止访问,update-interval=86400,no-resolve // AD广告 141 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list,⛔️ 禁止访问,update-interval=86400 // 防劫持 142 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list,⛔️ 禁止访问,update-interval=86400 // 禁用HTTP协议的DNS 143 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list,⛔️ 禁止访问,update-interval=86400 // 隐私保护 144 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list,🎯 全球直连,update-interval=86400 // 亚马逊中国 145 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list,🎯 全球直连,update-interval=86400 // Cloudflare中国 146 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list,🎯 全球直连,update-interval=86400 // 下载网站 147 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list,🎯 全球直连,update-interval=86400 // 谷歌中国 148 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list,🔰 节点选择,update-interval=86400 // Microsoft OneDrive 149 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list,🔰 节点选择,update-interval=86400 // Microsoft服务 150 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list,🔰 节点选择,update-interval=86400 // 亚马逊网站 151 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list,🔰 节点选择,update-interval=86400 // 亚马逊服务器 152 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list,🔰 节点选择,update-interval=86400 // Jetbrains 153 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list,🔰 节点选择,update-interval=86400 // Telegram 154 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,🔰 节点选择,update-interval=86400 // Twitter 155 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list,🔰 节点选择,update-interval=86400 // ChatGPT 156 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,🔰 节点选择,update-interval=86400 // Github 157 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list,🔰 节点选择,update-interval=86400 // Cloudflare 158 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,🔰 节点选择,update-interval=86400 // YouTube 159 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list,🔰 节点选择,update-interval=86400 // YouTube Music 160 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,🔰 节点选择,update-interval=86400 // Netflix 161 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,🔰 节点选择,update-interval=86400 // TikTok 162 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list,🔰 节点选择,update-interval=86400 // Disney 163 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // 国外媒体 164 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // GFW 165 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list,🎯 全球直连,update-interval=86400 // 中国公司IP 166 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list,🎯 全球直连,update-interval=86400 // 中国域名 167 | GEOIP,CN,🎯 全球直连 // 中国IP 168 | FINAL,🔰 节点选择 169 | 170 | [URL Rewrite] 171 | ^https?://(www.)?g.cn https://www.google.com 302 172 | ^https?://(www.)?google.cn https://www.google.com 302 173 | 174 | -------------------------------------------------------------------------------- /iPhoneAutoUpdateMedia.conf: -------------------------------------------------------------------------------- 1 | #!MANAGED-CONFIG https://raw.githubusercontent.com/chenyk1219/surge/master/iPhoneAutoUpdateMedia.conf interval=86400 strict=false 2 | 3 | [General] 4 | # ================ iOS和MacOS共同的 Surge 参数 ================ # 5 | # > 日志级别 verbose, info, notify, or warning 不建议在日常使用中启用详细,因为这会显著降低性能。 6 | loglevel = notify 7 | # > IPv6协议 启用完整的 IPv6 支持。具体来说,开启该选项后,访问域名时会查询该域名的AAAA记录。即使未启用此选项,也可以通过直接访问 IPv6 地址来访问 IPv6 站点。 8 | ipv6 = false 9 | # > 允许 IPv6 通过 Surge VIF。当您希望 Surge 处理连接到 IPv6 地址的原始 TCP 连接时很有用。 10 | # > off :切勿使用 IPv6 设置 Surge VIF 11 | # > auto :仅当本地网络具有有效的 IPv6 网络时,才使用 IPv6 设置 Surge VIF 12 | # > always :始终使用 IPv6 设置 Surge VIF 13 | ipv6-vif = false 14 | # > dns服务器 上游DNS服务器的IP地址 15 | dns-server = system, 223.6.6.6, 223.5.5.5, 119.29.29.29 16 | # > 跳过代理 在 iOS 版本中,此选项强制与这些域/IP 范围的连接由 Surge VIF 而不是 Surge 代理处理。在 macOS 版本中,当启用“设置为系统代理”时,这些设置将应用于系统。此选项用于修复某些应用的兼容性问题。 17 | # > apple.com、*apple.com、192.168.2.* or 192.168.2.0/24 18 | # > 注意:如果输入 IP 地址或地址范围,则只有在使用该地址连接到该主机时才能绕过代理,而不能在通过解析为该地址的域名连接到主机时绕过代理。 19 | skip-proxy = localhost, *.local, 0.0.0.0/8, 10.0.0.0/8, 17.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 192.0.0.0/24, 192.0.2.0/24, 192.168.0.0/16 20 | # > 排除简单主机名 就像 skip-proxy 参数一样。此选项允许请求使用由 Surge VIF 而不是 Surge 代理处理的简单主机名(不带点)。 21 | # > mysql01、redis01 22 | exclude-simple-hostnames = true 23 | # > 外部控制器访问 此选项允许外部控制器控制 Surge,例如 Surge Dashboard (macOS) 和 Surge iOS 遥控器 (iOS)。例如:key@0.0.0.0:6166 24 | external-controller-access = mima1234@0.0.0.0:6166 25 | # > 使用 HTTPS 协议而不是 HTTP。必须先配置 MitM CA 证书。您需要在客户端设备上手动安装证书。 26 | # http-api-tls = 27 | # > 启用此功能后,您可以通过 Web 浏览器控制 Surge。 28 | http-api-web-dashboard = false 29 | # > 显示错误页面拒绝,如果请求是纯 HTTP 请求,则显示 REJECT 策略的错误网页。 30 | show-error-page-for-reject = true 31 | # > Surge VIF只能处理 TCP 和 UDP 协议。使用此选项可绕过特定 IP 范围,以允许所有流量通过。 32 | # > 注意:此选项仅适用于Surge VIF。Surge Proxy Server 处理的请求不受影响。合并 skip-proxy 并确保 tun-excluded-routes 特定 HTTP 流量绕过 Surge。 33 | # tun-excluded-routes = 34 | # > 默认情况下,Surge VIF 接口将自身声明为默认路由。但是,由于 Wi-Fi 接口的路由较小,因此某些流量可能无法通过浪涌 VIF 接口。使用此选项可添加较小的路由。 35 | # tun-included-routes = 36 | # > Internet 连接测试的 URL, 以及,DIRECT 策略的测试 URL 37 | internet-test-url = http://connect.rom.miui.com/generate_204 38 | # > 代理策略的默认测试 URL 39 | proxy-test-url = http://1.0.0.1/generate_204 40 | # > 连接测试超时(秒) 41 | test-timeout = 5 42 | # > 始终真实的 IP 此选项要求 Surge 在 Surge VIF 处理 DNS 问题时返回真实 IP 地址而不是虚假 IP 地址 DNS数据包将被转发到上游DNS服务器 此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 43 | # > 使用前缀 - 排除主机名 44 | # > 支持通配符 * 和 ? 45 | # > 使用后缀 :port 匹配其他端口,如果未提供端口号,则 Surge 将自动为该参数附加标准端口号,就像 force-http-engine-hosts 参数一样,如果仅配置了主机名,则仅对端口 80 有效。对于 MITM 功能,它仅对端口 443 有效。 46 | # > 使用后缀 :0 以匹配所有端口 47 | # > 使用 直接使用 IPv4/IPv6 地址(而不是域)匹配所有主机名 48 | # > -*icloud*, -*.mzstatic.com, -*.facebook.com, -*.instagram.com, -*.twitter.com, -*dropbox*, -*apple*, -*.amazonaws.com, -, * 49 | always-real-ip = *.test.com 50 | # > 劫持DNS,默认情况下,Surge 仅返回发送到 Surge DNS 地址 (198.18.0.2) 的 DNS 查询的虚假 IP 地址。发送到标准 DNS 的查询将被转发。某些设备或软件始终使用硬编码的 DNS 服务器。(例如,Google Speakers始终使用 8.8.8.8)。您可以使用此选项劫持查询以获取虚假地址。您可以使用 hijack-dns = *:53 劫持所有DNS查询 51 | hijack-dns = *:53 52 | # > 使 Surge 将 TCP 连接视为 HTTP 请求。Surge HTTP 引擎将处理请求,并且所有高级功能都将可用,例如捕获、重写和脚本编写。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 53 | # force-http-engine-hosts = 54 | # > 加密 DNS 跟随出站模式,默认情况下,加密的 DNS 查找使用直接出站。启用该选项将使 DOH 遵循出站模式设置和规则。 55 | encrypted-dns-follow-outbound-mode = true 56 | # > 加密的 DNS 服务器,加密的 DNS 服务器的 URL。如果配置了加密 DNS,则传统 DNS 将仅用于测试连接并解析加密 DNS URL 中的域。 57 | encrypted-dns-server = https://223.5.5.5/dns-query,quic://223.6.6.6:853,quic://223.5.5.5:853,https://223.6.6.6/dns-query,https://1.12.12.12/dns-query,https://120.53.53.53/dns-query 58 | # , https://8.8.8.8/dns-query, https://1.1.1.1/dns-query 59 | # > 跳过加密的DNS服务器证书验证,这是不安全的。 60 | encrypted-dns-skip-cert-verification = false 61 | # > 使用本地主机代理,默认情况下,如果使用代理策略,则始终在远程服务器上执行 DNS 查找。启用此选项后,如果存在目标域的本地 DNS 映射结果,则 Surge 会使用 IP 地址而不是域来设置代理连接。 62 | use-local-host-item-for-proxy = false 63 | # > 要更新的 GeoIP 数据库的 URL 64 | geoip-maxmind-url = https://github.com/Hackl0us/GeoIP2-CN/raw/release/Country.mmdb 65 | # > 禁用 GeoIP 数据库的自动更新 66 | disable-geoip-db-auto-update = false 67 | # > iOS 系统可能会执行 SVCB 记录 DNS 查找,而不是标准 A 记录查找。这会导致 Surge 无法返回虚拟 IP 地址。因此,默认情况下,禁止 SVCB 记录查找,以强制系统执行 A 记录查找。 68 | allow-dns-svcb = false 69 | # > UDP 流量与不支持 UDP 中继的策略匹配时的回退行为,可能的值: DIRECT 、 REJECT, 如果没有代理服务器支持 UDP 转发,可修改为「 direct 」或注释下条,但需注意同一目标主机名 TCP 请求与 UDP 请求的源地址不同所造成的隐私及安全风险。 70 | udp-policy-not-supported-behaviour = REJECT 71 | # > 代理的默认 UDP 测试参数, 例如: apple.com@8.8.8.8 72 | # proxy-test-udp = apple.com@8.8.8.8 73 | # > 当系统负载非常高且数据包处理延迟时,启用将优先处理 UDP 数据包。也称为游戏模式 74 | udp-priority = false 75 | # > Surge 将自动嗅探发送到端口 80 和 443 的 TCP 请求的协议,从而在优化性能的同时启用高级 HTTP/HTTPS 功能。但是,这可能会导致一些兼容性问题。如果遇到问题,可以在此处添加主机名,Surge 不会嗅探这些请求的协议。此参数属于主机列表类型,详细规则请参见:https://manual.nssurge.com/others/host-list.html 76 | always-raw-tcp-hosts = *.baidu.com 77 | # ================ 仅限 iOS 的 Surge 参数 ================ # 78 | # > 允许 wifi 访问,允许 Surge 代理服务从 LAN 中的其他设备访问。 79 | allow-wifi-access = false 80 | # > Surge HTTP 代理服务的端口号 81 | wifi-access-http-port = 6152 82 | # > Surge SOCKS5 代理服务的端口号 83 | wifi-access-socks5-port = 6153 84 | # > 要求对 Surge HTTP 代理服务进行身份验证。例如:用户名:密码 85 | wifi-access-http-auth = surge:mima1234 86 | # > 启用 Wi-Fi 助手 (在 Wi-Fi 网络不佳时尝试使用数据网络建立连接,请仅当使用不限量的数据流量时开启) 87 | wifi-assist = false 88 | # > 隐藏状态栏中的 VPN 图标 89 | hide-vpn-icon = false 90 | # > 当 Wi-Fi 网络较差时,不要设置与蜂窝数据的连接,而是始终同时设置与 Wi-Fi 和蜂窝数据的连接 此选项可以在 Wi-Fi 较差或 Wi-Fi 网络切换时显著改善网络体验 此功能将应用于所有 TCP 连接和 DNS 查找。仅当您拥有无限的蜂窝数据计划时才启用它 91 | all-hybrid = false 92 | # > 允许在“个人热点”打开时从其他设备访问 Surge 代理服务 93 | allow-hotspot-access = ture 94 | # > 包含所有网络,默认情况下,某些请求可能不会被 Surge 接管。例如,应用程序可以绑定到物理网络接口以绕过浪涌 VIF。启用“包括所有网络”选项,以确保所有请求都由 Surge 处理而不会泄漏。当您使用 Surge 作为防火墙时,此选项很有用。(需要 iOS 14.0 或以上版本),启用此选项可能会导致 AirDrop 和 Xcode 调试问题、通过 USB 的 Surge Dashboard 无法正常工作以及其他意外的副作用。请谨慎使用。 95 | include-all-networks = false 96 | # > 包含本地网络,启用此选项可使 Surge VIF 处理发送到 LAN 的请求。(需要 iOS 14.2 或更高版本)启用此选项可能会导致 AirDrop 和 Xcode 调试问题、通过 USB 的 Surge Dashboard 无法正常工作以及其他意外的副作用。请谨慎使用。必须与 include-all-networks=true 结合使用。 97 | include-local-networks = false 98 | # > 启用此选项可使 Surge VIF 处理 Apple 推送通知服务 (APNs) 的网络流量。必须与 include-all-networks=true 结合使用。 99 | include-apns = false 100 | # > 启用此选项可使 Surge VIF 处理蜂窝服务的 Internet 可路由网络流量。(VoLTE、Wi-Fi 通话、IMS、彩信、可视语音信箱等).请注意,某些蜂窝运营商会绕过互联网,将蜂窝网络服务流量直接路由到运营商网络。此类蜂窝服务流量始终被排除在隧道之外。必须与 include-all-networks=true 结合使用。 101 | include-cellular-services = false 102 | # > 兼容性模式,此选项用于控制 Surge iOS 的工作模式。 103 | # > 0:自动,在 5.8.0 之前的 Surge iOS 版本中,这相当于 1,从 5.8.0 开始,它相当于 3 104 | # > 1:代理接管 + VIF,在此模式下,代理接管的优先级高于 VIF 接管,提供最佳性能,但某些应用程序可能会检查代理设置并拒绝工作。 105 | # > 2:仅代理接管 106 | # > 3:VIF Takeover Only:最新版本的默认工作模式。 107 | # > 4:代理接管 + VIF,但代理使用 VIF 地址而不是环回地址。 108 | # > 5:代理接管+VIF,但VIF路由使用多个较小的路由进行接管,没有配置默认路由,可以用来绕过一些特殊问题。(例如,HomeKit 安防摄像头) 109 | compatibility-mode = 1 110 | 111 | [Proxy] 112 | 113 | 114 | [Proxy Group] 115 | 🔰 节点选择 = select, ♻️ 自动选择, 🛃 手动切换, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇺🇸 美国节点, 🇨🇳 台湾节点, 🇰🇷 韩国节点, 🇬🇧 英国节点, 🇸🇬 新加坡节点, 🇨🇦 加拿大节点, 🇩🇪 德国节点, 🇫🇷 法国节点, 🇮🇳 印度节点, 🌎 其他节点, 🎯 全球直连, ⛔️ 禁止访问 116 | ♻️ 自动选择 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 117 | 🛃 手动切换 = select, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium).)*$ 118 | 🇭🇰 香港节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:港|HK|hk|Hong Kong|HongKong|hongkong).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 119 | 🇯🇵 日本节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 120 | 🇺🇸 美国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 121 | 🇨🇳 台湾节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:台|新北|彰化|TW|Taiwan).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 122 | 🇰🇷 韩国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:KR|Korea|KOR|首尔|韩|韓).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 123 | 🇬🇧 英国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:UK|英国).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 124 | 🇸🇬 新加坡节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:新加坡|坡|狮城|SG|Singapore).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 125 | 🇨🇦 加拿大节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:Canada|加拿大).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 126 | 🇩🇪 德国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:德国|🇩🇪|Germany).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 127 | 🇫🇷 法国节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:法国|🇫🇷|France).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 128 | 🇮🇳 印度节点 = url-test, include-all-proxies=1, policy-regex-filter=^(?!.*Premium).*(?:印度|🇮🇳|India).*$, url=http://1.0.0.1/generate_204, interval=300, tolerance=50 129 | 🌎 其他节点 = url-test, include-all-proxies=1, policy-regex-filter=^((?!佣金|官网|免翻|到期|流量|更新|点外|重置|免流|Direct|GB|Days|Date|Expire|Premium|港|HK|hk|Hong Kong|HongKong|hongkong|日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan|美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|台|新北|彰化|TW|Taiwan|KR|Korea|KOR|首尔|韩|韓|狮城|狮|新加坡|坡|SG|Singapore|英国|UK|Canada|加拿大|德国|🇩🇪|Germany|法国|🇫🇷|France|印度|🇮🇳|India).)*$, interval=300, tolerance=50 130 | ⛔️ 禁止访问 = select, REJECT 131 | 🎯 全球直连 = select, DIRECT 132 | 133 | 134 | [Rule] 135 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/Unblocking.list,🎯 全球直连,update-interval=86400 // 白名单 136 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list,🎯 全球直连,update-interval=86400 // 规则修正 137 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Lan/Lan.list,🎯 全球直连,update-interval=86400 // Lan网 138 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list,🎯 全球直连,update-interval=86400 // 私有网 139 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Apple/Apple_All_No_Resolve.list,🎯 全球直连,update-interval=86400 // Apple 140 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/adg.list,⛔️ 禁止访问,update-interval=86400,no-resolve // AD广告 141 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Hijacking/Hijacking.list,⛔️ 禁止访问,update-interval=86400 // 防劫持 142 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/BlockHttpDNS/BlockHttpDNS.list,⛔️ 禁止访问,update-interval=86400 // 禁用HTTP协议的DNS 143 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Privacy/Privacy_All_No_Resolve.list,⛔️ 禁止访问,update-interval=86400 // 隐私保护 144 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonCN/AmazonCN.list,🎯 全球直连,update-interval=86400 // 亚马逊中国 145 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflarecn/Cloudflarecn.list,🎯 全球直连,update-interval=86400 // Cloudflare中国 146 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Download/Download.list,🎯 全球直连,update-interval=86400 // 下载网站 147 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list,🎯 全球直连,update-interval=86400 // 谷歌中国 148 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/OneDrive/OneDrive.list,🔰 节点选择,update-interval=86400 // Microsoft OneDrive 149 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Microsoft/Microsoft.list,🔰 节点选择,update-interval=86400 // Microsoft服务 150 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Amazon/Amazon.list,🔰 节点选择,update-interval=86400 // 亚马逊网站 151 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/AmazonIP/AmazonIP.list,🔰 节点选择,update-interval=86400 // 亚马逊服务器 152 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Jetbrains/Jetbrains.list,🔰 节点选择,update-interval=86400 // Jetbrains 153 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/Telegram.list,🔰 节点选择,update-interval=86400 // Telegram 154 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Twitter/Twitter.list,🔰 节点选择,update-interval=86400 // Twitter 155 | RULE-SET,https://raw.githubusercontent.com/Coldvvater/Mononoke/master/Surge/Rules/AI.list,🔰 节点选择,update-interval=86400 // ChatGPT 156 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GitHub/GitHub.list,🔰 节点选择,update-interval=86400 // Github 157 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Cloudflare/Cloudflare.list,🔰 节点选择,update-interval=86400 // Cloudflare 158 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTube/YouTube.list,🔰 节点选择,update-interval=86400 // YouTube 159 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/YouTubeMusic/YouTubeMusic.list,🔰 节点选择,update-interval=86400 // YouTube Music 160 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Netflix/Netflix.list,🔰 节点选择,update-interval=86400 // Netflix 161 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/TikTok/TikTok.list,🔰 节点选择,update-interval=86400 // TikTok 162 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Disney/Disney.list,🔰 节点选择,update-interval=86400 // Disney 163 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/GlobalMedia/GlobalMedia_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // 国外媒体 164 | RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Proxy/Proxy_All_No_Resolve.list,🔰 节点选择,update-interval=86400 // GFW 165 | RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list,🎯 全球直连,update-interval=86400 // 中国公司IP 166 | RULE-SET,https://raw.githubusercontent.com/chenyk1219/surge/release/ChinaDomain.list,🎯 全球直连,update-interval=86400 // 中国域名 167 | GEOIP,CN,🎯 全球直连 // 中国IP 168 | FINAL,🔰 节点选择 169 | 170 | [URL Rewrite] 171 | ^https?://(www.)?g.cn https://www.google.com 302 172 | ^https?://(www.)?google.cn https://www.google.com 302 173 | 174 | -------------------------------------------------------------------------------- /iPhoneLocalEdit.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | #!include iPhoneAutoUpdate.conf 3 | 4 | [Proxy] 5 | #!include 6 | 7 | [Proxy Group] 8 | #!include iPhoneAutoUpdate.conf 9 | 10 | [Rule] 11 | #!include iPhoneAutoUpdate.conf 12 | 13 | [URL Rewrite] 14 | #!include iPhoneAutoUpdate.conf 15 | 16 | -------------------------------------------------------------------------------- /icon/4g.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icon/5g.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icon/wifi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /install.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | import datetime 4 | import requests 5 | import os 6 | 7 | 8 | # 获取中国域名 9 | def get_china_domain(): 10 | china_domain_list_url = 'https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf' 11 | 12 | china_domain_filename = os.path.join('dist', 'ChinaDomain.list') 13 | always_real_ip_filename = os.path.join('dist', 'RealIP.list') 14 | # china_domain_filename = 'ChinaDomain.list' 15 | 16 | china_domain_list = requests.request('GET', china_domain_list_url).text.split('\n') 17 | with open(china_domain_filename, 'wb') as file: 18 | for china_domain in china_domain_list: 19 | try: 20 | china_domain_rule = 'DOMAIN-SUFFIX,' + china_domain.split('/')[1] + '\n' 21 | file.write(china_domain_rule.encode()) 22 | except: 23 | continue 24 | 25 | with open(always_real_ip_filename, 'wb') as file: 26 | for china_domain in china_domain_list: 27 | try: 28 | china_domain_rule = china_domain.split('/')[1] + ',' 29 | file.write(china_domain_rule.encode()) 30 | except: 31 | continue 32 | 33 | 34 | # 获取中国IP 35 | def get_china_ip(): 36 | china_ip_list_url = 'https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/CN-ip-cidr.txt' 37 | china_ip_list_filename = os.path.join('dist', 'ChinaIP.list') 38 | # china_ip_list_filename = 'ChinaIP.list' 39 | 40 | china_ip_list = requests.request('GET', china_ip_list_url).text.split('\n') 41 | with open(china_ip_list_filename, 'wb') as file: 42 | for china_ip in china_ip_list: 43 | if china_ip: 44 | china_ip_rule = 'IP-CIDR,' + china_ip + ',no-resolve\n' 45 | file.write(china_ip_rule.encode()) 46 | continue 47 | 48 | 49 | # 获取规则修正 50 | def unbreak(): 51 | unbreak_filename = os.path.join('dist', 'UnBreak.list') 52 | unbreak_set = set() 53 | unbreak_url_list = ['https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Unbreak.list', 54 | 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list', 55 | 'https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Surge/Direct/Direct.list', 56 | 'https://raw.githubusercontent.com/Centralmatrix3/Matrix-io/master/Surge/Ruleset/Unbreak.list'] 57 | 58 | for unbreak_url in unbreak_url_list: 59 | unbreak_list = requests.request('GET', unbreak_url).text.split('\n') 60 | for unbreak in unbreak_list: 61 | if not unbreak.startswith('#'): 62 | unbreak_set.add(unbreak) if unbreak.find('/') == -1 else unbreak_set.add(unbreak.split('/')[0]) 63 | with open(unbreak_filename, 'wb') as file: 64 | for unbreak_url in unbreak_set: 65 | unbreak_url = unbreak_url + '\n' 66 | file.write(unbreak_url.encode()) 67 | 68 | 69 | def adg(): 70 | adg_url = 'https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt' 71 | adg_list = requests.request('GET', adg_url).text.split('\n') 72 | ad_filename = os.path.join('dist', 'adg.list') 73 | unblocking_filename = os.path.join('dist', 'Unblocking.list') 74 | ad_set = set() 75 | unblocking_set = set() 76 | for adg in adg_list: 77 | if adg and adg.startswith('||'): 78 | ad_set.add('DOMAIN-SUFFIX,' + adg.strip('||^')) 79 | if adg and adg.startswith('@@||'): 80 | unblocking_set.add('DOMAIN-SUFFIX,' + adg.strip('@@||^|')) 81 | if adg and adg.startswith('|') and not adg.startswith('||'): 82 | ad_set.add('DOMAIN,' + adg.strip('|^')) 83 | with open(ad_filename, 'wb') as file: 84 | for ad in ad_set: 85 | file.write(ad.encode()) 86 | file.write(b'\n') 87 | with open(unblocking_filename, 'wb') as file: 88 | for unblocking in unblocking_set: 89 | file.write(unblocking.encode()) 90 | file.write(b'\n') 91 | 92 | 93 | if __name__ == '__main__': 94 | if not os.path.exists("dist"): 95 | os.makedirs("dist") 96 | 97 | get_china_ip() 98 | get_china_domain() 99 | unbreak() 100 | adg() 101 | -------------------------------------------------------------------------------- /static/01.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/01.PNG -------------------------------------------------------------------------------- /static/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/1.png -------------------------------------------------------------------------------- /static/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/10.png -------------------------------------------------------------------------------- /static/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/11.png -------------------------------------------------------------------------------- /static/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/2.png -------------------------------------------------------------------------------- /static/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/3.png -------------------------------------------------------------------------------- /static/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/4.png -------------------------------------------------------------------------------- /static/4g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/4g.png -------------------------------------------------------------------------------- /static/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/5.png -------------------------------------------------------------------------------- /static/5g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/5g.png -------------------------------------------------------------------------------- /static/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/6.png -------------------------------------------------------------------------------- /static/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/7.png -------------------------------------------------------------------------------- /static/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/8.png -------------------------------------------------------------------------------- /static/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/9.png -------------------------------------------------------------------------------- /static/wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyk1219/surge/0e405e5b7f3b330691e68822626a2f49bf6d1216/static/wifi.png -------------------------------------------------------------------------------- /telegram_update.py: -------------------------------------------------------------------------------- 1 | import time 2 | import sys 3 | import contextlib 4 | from httpx import get, post 5 | 6 | token = str(sys.argv[1]) 7 | main = get( 8 | "https://api.github.com/repos/chenyk1219/surge/commits/main" 9 | ).json() 10 | text = ( 11 | ( 12 | ( 13 | ( 14 | "#更新日志 #surge懒人配置 #" 15 | + main["commit"]["author"]["name"].replace("_", "") 16 | + " \n\n🔨 [" 17 | + main["sha"][:7] 18 | ) 19 | + "](https://github.com/chenyk1219/surge/commits/" 20 | ) 21 | + main["sha"] 22 | ) 23 | + "): " 24 | ) + main["commit"]["message"] 25 | 26 | url = f"https://api.telegram.org/bot{token}/sendMessage" 27 | for cid in ["-1002045956568"]: 28 | push_content = { 29 | "chat_id": cid, 30 | "disable_web_page_preview": "True", 31 | "parse_mode": "markdown", 32 | "text": text, 33 | } 34 | with contextlib.suppress(Exception): 35 | main_req = post(url, data=push_content) 36 | time.sleep(1) 37 | print(main["sha"] + " ok!") 38 | --------------------------------------------------------------------------------