feat(launcher): добавить скрипты GEO и blocking для MikroTik 7.22+
Docker / build (push) Failing after 27s

Пробы выполняются на роутере через /tool fetch и уходят в те же ingest API. Ежедневный запуск ставит scheduler, который каждый день заново качает .rsc со свежим токеном.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-08-25 17:47:04 +07:00
co-authored by Cursor
parent b03318800f
commit c844874b0a
13 changed files with 729 additions and 10 deletions
@@ -5,6 +5,7 @@ import {
CalendarClockIcon,
CopyIcon,
GlobeIcon,
RouterIcon,
ServerIcon,
ShieldAlertIcon,
} from 'lucide-react'
@@ -40,6 +41,8 @@ import {
CENSORCHECK_STATUS_LABELS,
LAUNCHER_CMD,
LAUNCHER_CMD_DAILY,
LAUNCHER_CMD_ROS,
LAUNCHER_CMD_ROS_DAILY,
formatCheckedAt,
type CensorcheckRunDto,
} from './types'
@@ -162,6 +165,22 @@ export function BlockingPage() {
<CalendarClockIcon data-icon="inline-start" />
Раз в день
</Button>
<Button
type="button"
variant="outline"
onClick={() => void copyText(LAUNCHER_CMD_ROS, 'Команда MikroTik скопирована')}
>
<RouterIcon data-icon="inline-start" />
MikroTik
</Button>
<Button
type="button"
variant="outline"
onClick={() => void copyText(LAUNCHER_CMD_ROS_DAILY, 'Команда MikroTik для ежедневного запуска скопирована')}
>
<RouterIcon data-icon="inline-start" />
MikroTik · день
</Button>
</>
)
@@ -169,7 +188,7 @@ export function BlockingPage() {
<PageShell>
<PageHeader
title="Статус блокировок"
description="Проверки DPI и геоблокировок с VPS через censorcheck."
description="Проверки DPI и геоблокировок с VPS или MikroTik 7.22+."
actions={copyLauncher}
/>
<KpiStatGrid
@@ -253,7 +272,7 @@ export function BlockingPage() {
onRetry={() => void currentQuery.refetch()}
empty={filtered.length === 0}
emptyTitle="Пока нет проверок"
emptyDescription={`На VPS выполните: ${LAUNCHER_CMD}`}
emptyDescription={`На VPS: ${LAUNCHER_CMD}. На MikroTik 7.22+: ${LAUNCHER_CMD_ROS}`}
emptyAction={copyLauncher}
skeleton={<TableSkeleton />}
>
@@ -290,7 +309,7 @@ export function BlockingPage() {
onRowClick={setSelected}
emptyState={{
title: 'История пуста',
description: `На VPS выполните: ${LAUNCHER_CMD}`,
description: `На VPS: ${LAUNCHER_CMD}. На MikroTik 7.22+: ${LAUNCHER_CMD_ROS}`,
action: copyLauncher,
}}
/>
@@ -58,6 +58,10 @@ export const CENSORCHECK_STATUS_LABELS: Record<string, string> = {
export const LAUNCHER_CMD = 'curl -fsSL https://vt.shnt.top/cc | bash'
export const LAUNCHER_CMD_DAILY = 'curl -fsSL https://vt.shnt.top/cc | bash -s -- --daily'
export const LAUNCHER_CMD_ROS =
'/tool fetch url="https://vt.shnt.top/cc.rsc" dst-path=vt-cc.rsc; /import file-name=vt-cc.rsc'
export const LAUNCHER_CMD_ROS_DAILY =
'/tool fetch url="https://vt.shnt.top/cc.rsc?daily=1" dst-path=vt-cc.rsc; /import file-name=vt-cc.rsc'
export function formatVpsResources(vcpu: number, ramGb: number, diskGb: number): string {
return `${vcpu} vCPU / ${ramGb} GB / ${diskGb} GB`
+22 -3
View File
@@ -5,6 +5,7 @@ import {
CopyIcon,
GlobeIcon,
MapPinIcon,
RouterIcon,
ServerIcon,
ShieldAlertIcon,
} from 'lucide-react'
@@ -45,6 +46,8 @@ import {
IPREGION_STATUS_LABELS,
LAUNCHER_CMD,
LAUNCHER_CMD_DAILY,
LAUNCHER_CMD_ROS,
LAUNCHER_CMD_ROS_DAILY,
formatCheckedAt,
type IpregionRunDto,
} from './types'
@@ -167,6 +170,22 @@ export function GeoPage() {
<CalendarClockIcon data-icon="inline-start" />
Раз в день
</Button>
<Button
type="button"
variant="outline"
onClick={() => void copyText(LAUNCHER_CMD_ROS, 'Команда MikroTik скопирована')}
>
<RouterIcon data-icon="inline-start" />
MikroTik
</Button>
<Button
type="button"
variant="outline"
onClick={() => void copyText(LAUNCHER_CMD_ROS_DAILY, 'Команда MikroTik для ежедневного запуска скопирована')}
>
<RouterIcon data-icon="inline-start" />
MikroTik · день
</Button>
</>
)
@@ -174,7 +193,7 @@ export function GeoPage() {
<PageShell>
<PageHeader
title="GeoIP"
description="Страны по GeoIP-сервисам с VPS через ipregion."
description="Страны по GeoIP-сервисам с VPS или MikroTik 7.22+."
actions={copyLauncher}
/>
<KpiStatGrid
@@ -258,7 +277,7 @@ export function GeoPage() {
onRetry={() => void currentQuery.refetch()}
empty={filtered.length === 0}
emptyTitle="Пока нет проверок"
emptyDescription={`На VPS выполните: ${LAUNCHER_CMD}`}
emptyDescription={`На VPS: ${LAUNCHER_CMD}. На MikroTik 7.22+: ${LAUNCHER_CMD_ROS}`}
emptyAction={copyLauncher}
skeleton={<TableSkeleton />}
>
@@ -295,7 +314,7 @@ export function GeoPage() {
onRowClick={setSelected}
emptyState={{
title: 'История пуста',
description: `На VPS выполните: ${LAUNCHER_CMD}`,
description: `На VPS: ${LAUNCHER_CMD}. На MikroTik 7.22+: ${LAUNCHER_CMD_ROS}`,
action: copyLauncher,
}}
/>
@@ -57,6 +57,10 @@ export const IPREGION_STATUS_LABELS: Record<string, string> = {
export const LAUNCHER_CMD = 'curl -fsSL https://vt.shnt.top/ic | bash'
export const LAUNCHER_CMD_DAILY = 'curl -fsSL https://vt.shnt.top/ic | bash -s -- --daily'
export const LAUNCHER_CMD_ROS =
'/tool fetch url="https://vt.shnt.top/ic.rsc" dst-path=vt-ic.rsc; /import file-name=vt-ic.rsc'
export const LAUNCHER_CMD_ROS_DAILY =
'/tool fetch url="https://vt.shnt.top/ic.rsc?daily=1" dst-path=vt-ic.rsc; /import file-name=vt-ic.rsc'
export function formatVpsResources(vcpu: number, ramGb: number, diskGb: number): string {
return `${vcpu} vCPU / ${ramGb} GB / ${diskGb} GB`
+1 -1
View File
@@ -16,7 +16,7 @@ export function PageHeader({ title, description, actions }: PageHeaderProps) {
<p className="text-muted-foreground text-sm">{description}</p>
) : null}
</div>
{actions ? <div className="flex items-center gap-2">{actions}</div> : null}
{actions ? <div className="flex flex-wrap items-center gap-2">{actions}</div> : null}
</div>
)
}