Подпись хоста в подписке была Yali. Дашборд берёт её из метрик xray-checker, флаг Германии остаётся. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c2e5a4a6bd
commit
bcbb2564f1
2 files changed
+19
-2
No files matched your search
@@ -38,7 +38,7 @@ remnawave_selfsteal_domain: "yali.gunis.top"
|
||||
remnawave_xhttp_path: "/xhttp-yali"
|
||||
remnawave_profile_name: "DE-Yali"
|
||||
remnawave_inbound_tag: "Steal-Yali"
|
||||
remnawave_host_remark: "🇩🇪 Yali"
|
||||
remnawave_host_remark: "🇩🇪 ger-nod-02"
|
||||
remnawave_xray_template_name: "Except-RU"
|
||||
remnawave_api_token_name: "infra-automation"
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ profile_created=0
|
||||
node_created=0
|
||||
node_address_updated=0
|
||||
host_created=0
|
||||
host_remark_updated=0
|
||||
node_secret=""
|
||||
active_token="${RW_API_TOKEN:-}"
|
||||
|
||||
@@ -299,6 +300,20 @@ if [ -z "${host_uuid}" ]; then
|
||||
host_created=1
|
||||
fi
|
||||
|
||||
if [ "${host_created}" -eq 0 ]; then
|
||||
current_remark=$(printf '%s' "${hosts_json}" | jq -r --arg u "${host_uuid}" '
|
||||
(.response // []) | map(select(.uuid == $u)) | .[0].remark // empty')
|
||||
if [ "${current_remark}" != "${RW_HOST_REMARK}" ]; then
|
||||
host_remark=$(jq -n --arg u "${host_uuid}" --arg remark "${RW_HOST_REMARK}" '{uuid: $u, remark: $remark}')
|
||||
if ! api PATCH /hosts/ -d "${host_remark}" >/dev/null; then
|
||||
echo "WARN: не удалось обновить имя хоста ${RW_SELFSTEAL}" >&2
|
||||
else
|
||||
host_remark_updated=1
|
||||
echo "Имя хоста ${RW_SELFSTEAL}: ${RW_HOST_REMARK}" >&2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
users_changed=0
|
||||
|
||||
# Клиентский Xray JSON. Имя Except-RU: весь tcp/udp в proxy, RU/private/торренты и
|
||||
@@ -471,6 +486,7 @@ jq -n \
|
||||
--argjson node_created "${node_created}" \
|
||||
--argjson node_address_updated "${node_address_updated}" \
|
||||
--argjson host_created "${host_created}" \
|
||||
--argjson host_remark_updated "${host_remark_updated}" \
|
||||
--argjson users_changed "${users_changed}" \
|
||||
--argjson xray_saved "${xray_saved}" \
|
||||
'{
|
||||
@@ -485,7 +501,8 @@ jq -n \
|
||||
node_created: ($node_created == 1),
|
||||
node_address_updated: ($node_address_updated == 1),
|
||||
host_created: ($host_created == 1),
|
||||
host_remark_updated: ($host_remark_updated == 1),
|
||||
users_changed: ($users_changed == 1),
|
||||
xray_checker_url_saved: ($xray_saved == 1),
|
||||
changed: (($admin_created + $token_updated + $profile_created + $node_created + $node_address_updated + $host_created + $users_changed + $xray_saved) > 0)
|
||||
changed: (($admin_created + $token_updated + $profile_created + $node_created + $node_address_updated + $host_created + $host_remark_updated + $users_changed + $xray_saved) > 0)
|
||||
}'
|
||||
Reference in new issue
Block a user