Add clash.external_controller option in config file (#772)

This commit is contained in:
ak1ra 2024-08-27 17:33:17 +08:00 committed by GitHub
parent 0c11565cc9
commit 3f2281e284
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 3 deletions

View File

@ -5,7 +5,7 @@ socks-port: {{ default(global.clash.socks_port, "7891") }}
allow-lan: {{ default(global.clash.allow_lan, "true") }} allow-lan: {{ default(global.clash.allow_lan, "true") }}
mode: Rule mode: Rule
log-level: {{ default(global.clash.log_level, "info") }} log-level: {{ default(global.clash.log_level, "info") }}
external-controller: :9090 external-controller: {{ default(global.clash.external_controller, "127.0.0.1:9090") }}
{% if default(request.clash.dns, "") == "1" %} {% if default(request.clash.dns, "") == "1" %}
dns: dns:
enable: true enable: true
@ -384,7 +384,7 @@ enhanced-mode-by-rule = true
"store_fakeip": true "store_fakeip": true
}, },
"clash_api": { "clash_api": {
"external_controller": "127.0.0.1:9090", "external_controller": "{{ default(global.clash.external_controller, "127.0.0.1:9090") }}",
"external_ui": "dashboard" "external_ui": "dashboard"
} }
} }

View File

@ -233,6 +233,7 @@ clash.http_port=7890
clash.socks_port=7891 clash.socks_port=7891
clash.allow_lan=true clash.allow_lan=true
clash.log_level=info clash.log_level=info
clash.external_controller=127.0.0.1:9090
singbox.allow_lan=true singbox.allow_lan=true
singbox.mixed_port=2080 singbox.mixed_port=2080

View File

@ -244,6 +244,10 @@ value = "true"
key = "clash.log_level" key = "clash.log_level"
value = "info" value = "info"
[[template.globals]]
key = "clash.external_controller"
value = "127.0.0.1:9090"
[[template.globals]] [[template.globals]]
key = "singbox.allow_lan" key = "singbox.allow_lan"
value = "true" value = "true"

View File

@ -109,6 +109,7 @@ template:
- {key: clash.socks_port, value: 7891} - {key: clash.socks_port, value: 7891}
- {key: clash.allow_lan, value: true} - {key: clash.allow_lan, value: true}
- {key: clash.log_level, value: info} - {key: clash.log_level, value: info}
- {key: clash.external_controller, value: '127.0.0.1:9090'}
- {key: singbox.allow_lan, value: true} - {key: singbox.allow_lan, value: true}
- {key: singbox.mixed_port, value: 2080} - {key: singbox.mixed_port, value: 2080}