mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-31 21:59:17 +03:00
fix: Mask urltest_proxy_links in config output
This commit is contained in:
@@ -1752,15 +1752,14 @@ show_sing_box_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
show_config() {
|
show_config() {
|
||||||
if [ ! -f /etc/config/podkop ]; then
|
if [ ! -f "$PODKOP_CONFIG" ]; then
|
||||||
nolog "Configuration file not found"
|
nolog "Configuration file not found"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmp_config=$(mktemp)
|
tmp_config=$(mktemp)
|
||||||
|
|
||||||
cat /etc/config/podkop | sed \
|
sed -e 's/\(option proxy_string\).*/\1 '\''MASKED'\''/g' \
|
||||||
-e 's/\(option proxy_string\).*/\1 '\''MASKED'\''/g' \
|
|
||||||
-e 's/\(option outbound_json\).*/\1 '\''MASKED'\''/g' \
|
-e 's/\(option outbound_json\).*/\1 '\''MASKED'\''/g' \
|
||||||
-e 's/\(option second_proxy_string\).*/\1 '\''MASKED'\''/g' \
|
-e 's/\(option second_proxy_string\).*/\1 '\''MASKED'\''/g' \
|
||||||
-e 's/\(option second_outbound_json\).*/\1 '\''MASKED'\''/g' \
|
-e 's/\(option second_outbound_json\).*/\1 '\''MASKED'\''/g' \
|
||||||
@@ -1769,8 +1768,9 @@ show_config() {
|
|||||||
-e 's/\(pbk=[^&]*\)/pbk=MASKED/g' \
|
-e 's/\(pbk=[^&]*\)/pbk=MASKED/g' \
|
||||||
-e 's/\(sid=[^&]*\)/sid=MASKED/g' \
|
-e 's/\(sid=[^&]*\)/sid=MASKED/g' \
|
||||||
-e 's/\(option dns_server '\''[^'\'']*\.dns\.nextdns\.io'\''\)/option dns_server '\''MASKED.dns.nextdns.io'\''/g' \
|
-e 's/\(option dns_server '\''[^'\'']*\.dns\.nextdns\.io'\''\)/option dns_server '\''MASKED.dns.nextdns.io'\''/g' \
|
||||||
-e "s|\(option dns_server 'dns\.nextdns\.io\)/[^']*|\1/MASKED|"
|
-e "s|\(option dns_server 'dns\.nextdns\.io\)/[^']*|\1/MASKED|" \
|
||||||
> "$tmp_config"
|
-e 's/\(list urltest_proxy_links\).*/\1 '\''MASKED'\''/g' \
|
||||||
|
"$PODKOP_CONFIG" > "$tmp_config"
|
||||||
|
|
||||||
cat "$tmp_config"
|
cat "$tmp_config"
|
||||||
rm -f "$tmp_config"
|
rm -f "$tmp_config"
|
||||||
|
|||||||
Reference in New Issue
Block a user