Skip to content

Commit e0ebd86

Browse files
Clash API, listener.
1 parent 59a50df commit e0ebd86

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/worker.js

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4039,6 +4039,7 @@ function buildClashRoutingRules (proxySettings) {
40394039
}
40404040

40414041
let rules = [
4042+
`AND,((IN-NAME,mixed-in),(DST-PORT,53)),dns-out`,
40424043
`AND,((IP-CIDR,${localDNS}/32),(DST-PORT,53)),DIRECT`,
40434044
...geositeDirectRules,
40444045
...geoipDirectRules,
@@ -5303,23 +5304,37 @@ const singboxConfigTemp = {
53035304
clash_api: {
53045305
external_controller: "127.0.0.1:9090",
53055306
external_ui: "yacd",
5306-
external_ui_download_url: "https://github.com/MetaCubeX/Yacd-meta/archive/gh-pages.zip",
5307+
external_ui_download_url: "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip",
53075308
external_ui_download_detour: "direct",
53085309
default_mode: "rule"
53095310
}
53105311
}
53115312
};
53125313

53135314
const clashConfigTemp = {
5314-
"mixed-port": 7890,
53155315
"ipv6": true,
53165316
"allow-lan": true,
53175317
"mode": "rule",
53185318
"log-level": "info",
53195319
"keep-alive-interval": 30,
53205320
"unified-delay": false,
53215321
"external-controller": "127.0.0.1:9090",
5322+
"external-ui-url": "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip",
5323+
"external-ui": "ui",
5324+
"profile": {
5325+
"store-selected": true,
5326+
"store-fake-ip": true
5327+
},
53225328
"dns": {},
5329+
"listeners": [
5330+
{
5331+
"name": "mixed-in",
5332+
"type": "mixed",
5333+
"port": 7892,
5334+
"listen": "0.0.0.0",
5335+
"udp": true
5336+
}
5337+
],
53235338
"tun": {
53245339
"enable": true,
53255340
"stack": "mixed",
@@ -5349,7 +5364,12 @@ const clashConfigTemp = {
53495364
}
53505365
}
53515366
},
5352-
"proxies": [],
5367+
"proxies": [
5368+
{
5369+
"name": "dns-out",
5370+
"type": "dns"
5371+
}
5372+
],
53535373
"proxy-groups": [
53545374
{
53555375
"name": "✅ Selector",

0 commit comments

Comments
 (0)