Skip to content

Commit

Permalink
Clash API, listener.
Browse files Browse the repository at this point in the history
  • Loading branch information
bia-pain-bache committed Oct 29, 2024
1 parent 59a50df commit e0ebd86
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4039,6 +4039,7 @@ function buildClashRoutingRules (proxySettings) {
}

let rules = [
`AND,((IN-NAME,mixed-in),(DST-PORT,53)),dns-out`,
`AND,((IP-CIDR,${localDNS}/32),(DST-PORT,53)),DIRECT`,
...geositeDirectRules,
...geoipDirectRules,
Expand Down Expand Up @@ -5303,23 +5304,37 @@ const singboxConfigTemp = {
clash_api: {
external_controller: "127.0.0.1:9090",
external_ui: "yacd",
external_ui_download_url: "https://github.com/MetaCubeX/Yacd-meta/archive/gh-pages.zip",
external_ui_download_url: "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip",
external_ui_download_detour: "direct",
default_mode: "rule"
}
}
};

const clashConfigTemp = {
"mixed-port": 7890,
"ipv6": true,
"allow-lan": true,
"mode": "rule",
"log-level": "info",
"keep-alive-interval": 30,
"unified-delay": false,
"external-controller": "127.0.0.1:9090",
"external-ui-url": "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip",
"external-ui": "ui",
"profile": {
"store-selected": true,
"store-fake-ip": true
},
"dns": {},
"listeners": [
{
"name": "mixed-in",
"type": "mixed",
"port": 7892,
"listen": "0.0.0.0",
"udp": true
}
],
"tun": {
"enable": true,
"stack": "mixed",
Expand Down Expand Up @@ -5349,7 +5364,12 @@ const clashConfigTemp = {
}
}
},
"proxies": [],
"proxies": [
{
"name": "dns-out",
"type": "dns"
}
],
"proxy-groups": [
{
"name": "✅ Selector",
Expand Down

0 comments on commit e0ebd86

Please sign in to comment.