Features: - Per-Section MAC Exclusions: nft, generator_routes, section.js, i18n - Per-Section Routed DNS: connections, generator_routes, nft, validator, types.ts, section.js, state.uc, reload.uc - Boot Latency Sweep: ui.uc latency boot sweep with fixture dispatchers - WDTT provider: full backend (common, validator, runtime), sing-box outbound, diagnostics, component install, updater, i18n, section.js UI - OlcRTC provider: full backend (common, validator, runtime), sing-box outbound, diagnostics, component install, updater, i18n, section.js UI - WireGuard-over-TURN tunnel (WDTT) and TCP-over-WebRTC tunnel (OlcRTC) as sidecar processes with local SOCKS5, routed through sing-box outbound Bug fixes: - route.uc: restrict hijack-dns to local DNS inbounds only (dns-in, source-dns-in, dns-health-*) — fixes socket collision between sing-box and dnsmasq on port 53 via SO_REUSEADDR transparent write-back sockets - runtime.uc: add Port 53 socket collision diagnostic with auto-fix (sing-box restart to clear parasitic UNCONN sockets with Recv-Q) - runtime.uc: add dnsmasq dns_redirect check with auto-fix — disables firewall4 DNAT that causes TProxy to rewrite destination to router :53 - failover.uc: add wdtt/olcrtc to failover candidate actions - telegram.uc: show WDTT/OlcRTC installed status in /info Tests: 135/155 shell + 591/591 frontend
63 lines
2.5 KiB
TypeScript
63 lines
2.5 KiB
TypeScript
import type { StoreType } from '../services/store.service';
|
|
import type { Tachyon } from '../types';
|
|
|
|
export type UpdatesActionKey = keyof StoreType['updatesActions'];
|
|
|
|
const componentActionKeyMap: Record<string, UpdatesActionKey> = {
|
|
'tachyon:check_update': 'tachyonCheck',
|
|
'tachyon:install': 'tachyonInstall',
|
|
'tachyon:install_version': 'tachyonInstall',
|
|
'tachyon:reinstall': 'tachyonReinstall',
|
|
'tachyon:rollback': 'tachyonRollback',
|
|
'sing_box:check_update': 'singBoxCheck',
|
|
'sing_box:install': 'singBoxInstall',
|
|
'sing_box:install_version': 'singBoxInstall',
|
|
'sing_box:rollback': 'singBoxRollback',
|
|
'sing_box:install_extended': 'singBoxInstallExtended',
|
|
'sing_box:install_extended_compressed': 'singBoxInstallExtendedCompressed',
|
|
'sing_box:install_lx': 'singBoxInstallLx',
|
|
'sing_box:install_tiny': 'singBoxInstallTiny',
|
|
'sing_box:install_stable': 'singBoxInstallStable',
|
|
'zapret:check_update': 'zapretCheck',
|
|
'zapret:install': 'zapretInstall',
|
|
'zapret:install_version': 'zapretInstall',
|
|
'zapret:remove': 'zapretRemove',
|
|
'zapret:rollback': 'zapretRollback',
|
|
'zapret2:check_update': 'zapret2Check',
|
|
'zapret2:install': 'zapret2Install',
|
|
'zapret2:install_version': 'zapret2Install',
|
|
'zapret2:remove': 'zapret2Remove',
|
|
'zapret2:rollback': 'zapret2Rollback',
|
|
'byedpi:check_update': 'byedpiCheck',
|
|
'byedpi:install': 'byedpiInstall',
|
|
'byedpi:install_version': 'byedpiInstall',
|
|
'byedpi:remove': 'byedpiRemove',
|
|
'byedpi:rollback': 'byedpiRollback',
|
|
'wdtt:check_update': 'wdttCheck',
|
|
'wdtt:install': 'wdttInstall',
|
|
'wdtt:install_version': 'wdttInstall',
|
|
'wdtt:remove': 'wdttRemove',
|
|
'wdtt:rollback': 'wdttRollback',
|
|
'olcrtc:check_update': 'olcrtcCheck',
|
|
'olcrtc:install': 'olcrtcInstall',
|
|
'olcrtc:install_version': 'olcrtcInstall',
|
|
'olcrtc:remove': 'olcrtcRemove',
|
|
'olcrtc:rollback': 'olcrtcRollback',
|
|
'tailscale:check_update': 'tailscaleCheck',
|
|
'tailscale:install': 'tailscaleInstall',
|
|
'tailscale:install_version': 'tailscaleInstall',
|
|
'tailscale:remove': 'tailscaleRemove',
|
|
'tailscale:rollback': 'tailscaleRollback',
|
|
'direct_bypass:enable': 'directBypassEnable',
|
|
'direct_bypass:disable': 'directBypassDisable',
|
|
'torrserver_direct:enable': 'torrserverDirectEnable',
|
|
'torrserver_direct:disable': 'torrserverDirectDisable',
|
|
};
|
|
|
|
export function getComponentActionKey(
|
|
component: Tachyon.ComponentName,
|
|
action: Tachyon.ComponentAction,
|
|
): UpdatesActionKey | undefined {
|
|
return componentActionKeyMap[`${component}:${action}`];
|
|
}
|