mirror of
https://github.com/itdoginfo/podkop.git
synced 2026-01-30 22:32:49 +03:00
feat: enable Clash API with YACD or online mode in podkop configuration
This commit is contained in:
@@ -1123,15 +1123,16 @@ sing_box_configure_experimental() {
|
||||
config_get cache_file "main" "cache_path" "/tmp/sing-box/cache.db"
|
||||
config=$(sing_box_cm_configure_cache_file "$config" true "$cache_file" true)
|
||||
|
||||
local yacd_enabled
|
||||
local yacd_enabled external_controller_ui
|
||||
config_get_bool yacd_enabled "main" "yacd" 0
|
||||
log "Configuring Clash API"
|
||||
if [ "$yacd_enabled" -eq 1 ]; then
|
||||
log "Configuring Clash API (yacd)"
|
||||
local external_controller="0.0.0.0:9090"
|
||||
log "YACD is enabled, enabling Clash API with downloadable YACD" "debug"
|
||||
local external_controller_ui="ui"
|
||||
config=$(sing_box_cm_configure_clash_api "$config" "$external_controller" "$external_controller_ui")
|
||||
config=$(sing_box_cm_configure_clash_api "$config" "$SB_CLASH_API_CONTROLLER" "$external_controller_ui")
|
||||
else
|
||||
log "Clash API (yacd) is disabled, skipping configuration."
|
||||
log "YACD is disabled, enabling Clash API in online mode" "debug"
|
||||
config=$(sing_box_cm_configure_clash_api "$config" "$SB_CLASH_API_CONTROLLER")
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ SB_DIRECT_OUTBOUND_TAG="direct-out"
|
||||
SB_MAIN_OUTBOUND_TAG="main-out"
|
||||
# Route
|
||||
SB_REJECT_RULE_TAG="reject-rule-tag"
|
||||
# Experimental
|
||||
SB_CLASH_API_CONTROLLER="0.0.0.0:9090"
|
||||
|
||||
## Lists
|
||||
GITHUB_RAW_URL="https://raw.githubusercontent.com/itdoginfo/allow-domains/main"
|
||||
|
||||
Reference in New Issue
Block a user