Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

适配 sing-box 1.11 新版配置 #88

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

w5khill
Copy link

@w5khill w5khill commented Dec 31, 2024

广告拦截分组被我删除了,新版应该做不到在分组里选择拒绝广告。我做成了 clash_mode 方式拦截广告。

@w5khill w5khill changed the title 适配 sing-box 1.11 版配置 适配 sing-box 1.11 新版配置 Dec 31, 2024
@7Sageer
Copy link
Owner

7Sageer commented Jan 10, 2025

我看到你提到了第一次下载规则集容易报错的问题,我尝试进行了一些修改:
创建了一个基于gh-proxy的代理进行下载
现在下载规则集应该通过 Cloudflare 代理后再经过 Github 下载,应该能缓解这个问题

@w5khill
Copy link
Author

w5khill commented Jan 10, 2025

也许应该将 "download_detour": "⚡ 自动选择"
改为 DIRECT ,我看到很多人用了 直链规则集的都是这样的写法

@7Sageer
Copy link
Owner

7Sageer commented Jan 11, 2025

确实可以改了,昨天忘记了

@hellodword
Copy link

这个看上游讨论吧,我觉得影响最大的就是 rule actions 了,会导致 selector 没有了 REJECT,可以用一些繁琐的办法达到类似效果

{
  "$schema": "https://gist.githubusercontent.com/artiga033/fea992d95ad44dc8d024b229223b1002/raw/83c676c1ec9f37af2bce0505da396b5444b30032/sing-box.schema.json",
  "inbounds": [
    { "type": "mixed", "listen": "0.0.0.0", "listen_port": 2080 },
    { "type": "socks", "listen": "127.0.0.1", "listen_port": 2081, "tag": "REJECT-in" }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "DIRECT"
    },
    { "type": "socks", "server": "127.0.0.1", "server_port": 2081, "tag": "REJECT" },
    {
      "type": "selector",
      "tag": "🚀 节点选择",
      "outbounds": ["REJECT", "DIRECT"]
    }
  ],
  "route": {
    "auto_detect_interface": true,
    "final": "🚀 节点选择",
    "rules": [
      {
        "inbound": ["REJECT-in"],
        "action": "reject"
      },
      {
        "action": "sniff"
      },
      {
        "protocol": "dns",
        "action": "hijack-dns"
      }
    ]
  },
  "experimental": {
    "clash_api": {
      "external_controller": "127.0.0.1:9090",
      "external_ui": "dashboard"
    }
  }
}

@w5khill
Copy link
Author

w5khill commented Feb 19, 2025

搞这么复杂有必要么…想 REJECT 的直接写死就好了,或者像我这里做成 clash mode,也相当于可选择了…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants