chore(init.d/podkop): remove unused cache file path and constant
This commit is contained in:
@@ -37,7 +37,6 @@ SUBNETS_META="${GITHUB_RAW_URL}/Subnets/IPv4/meta.lst"
|
|||||||
SUBNETS_DISCORD="${GITHUB_RAW_URL}/Subnets/IPv4/discord.lst"
|
SUBNETS_DISCORD="${GITHUB_RAW_URL}/Subnets/IPv4/discord.lst"
|
||||||
SUBNETS_TELERAM="${GITHUB_RAW_URL}/Subnets/IPv4/telegram.lst"
|
SUBNETS_TELERAM="${GITHUB_RAW_URL}/Subnets/IPv4/telegram.lst"
|
||||||
SING_BOX_CONFIG="/etc/sing-box/config.json"
|
SING_BOX_CONFIG="/etc/sing-box/config.json"
|
||||||
CACHE_FILE_PATH="/tmp/cache.db"
|
|
||||||
FAKEIP="198.18.0.0/15"
|
FAKEIP="198.18.0.0/15"
|
||||||
VALID_SERVICES="russia_inside russia_outside ukraine_inside geoblock block porn news anime youtube discord meta twitter hdrezka tiktok telegram"
|
VALID_SERVICES="russia_inside russia_outside ukraine_inside geoblock block porn news anime youtube discord meta twitter hdrezka tiktok telegram"
|
||||||
DNS_RESOLVERS="1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 9.9.9.9 9.9.9.11 94.140.14.14 94.140.15.15 208.67.220.220 208.67.222.222 77.88.8.1 77.88.8.8"
|
DNS_RESOLVERS="1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 9.9.9.9 9.9.9.11 94.140.14.14 94.140.15.15 208.67.220.220 208.67.222.222 77.88.8.1 77.88.8.8"
|
||||||
@@ -761,25 +760,17 @@ sing_box_dns_rule_fakeip_section() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sing_box_cache_file() {
|
sing_box_cache_file() {
|
||||||
local cache_path
|
|
||||||
|
|
||||||
config_get cache_file "main" "cache_file" "/tmp/cache.db"
|
config_get cache_file "main" "cache_file" "/tmp/cache.db"
|
||||||
|
|
||||||
if [ "$cache_file" = "custom" ]; then
|
|
||||||
config_get cache_path "main" "custom_cache_path"
|
|
||||||
else
|
|
||||||
cache_path="$cache_file"
|
|
||||||
fi
|
|
||||||
|
|
||||||
log "Configure sing-box cache.db path"
|
log "Configure sing-box cache.db path"
|
||||||
|
|
||||||
jq \
|
jq \
|
||||||
--arg CACHE_FILE_PATH "$cache_path" \
|
--arg cache_file "$cache_file" \
|
||||||
'.experimental = {
|
'.experimental = {
|
||||||
"cache_file": {
|
"cache_file": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"store_fakeip": true,
|
"store_fakeip": true,
|
||||||
"path": $CACHE_FILE_PATH
|
"path": $cache_file
|
||||||
}
|
}
|
||||||
}' $SING_BOX_CONFIG >/tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json $SING_BOX_CONFIG
|
}' $SING_BOX_CONFIG >/tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json $SING_BOX_CONFIG
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user