feat: Per-client sessions, app blacklist, robustness rework

This commit is contained in:
2026-07-12 14:28:46 +07:00
parent 4674142f52
commit 7ea3354bf6
11 changed files with 688 additions and 230 deletions
+10 -5
View File
@@ -2,9 +2,6 @@ import type { ClaimedSocket, ProcessInfo, RelayPlatform } from './types'
const NOT_SUPPORTED = new Error('Platform not supported')
/**
* Placeholder for platforms without a real implementation yet.
*/
export class UnsupportedPlatform implements RelayPlatform {
readonly isSupported = false
@@ -28,11 +25,11 @@ export class UnsupportedPlatform implements RelayPlatform {
throw NOT_SUPPORTED
}
discoverAndClaim(): ClaimedSocket[] {
async discoverAndClaim(): Promise<ClaimedSocket[]> {
throw NOT_SUPPORTED
}
discoverNewSocket(): ClaimedSocket | null {
async discoverNewSocket(): Promise<ClaimedSocket | null> {
throw NOT_SUPPORTED
}
@@ -40,6 +37,14 @@ export class UnsupportedPlatform implements RelayPlatform {
throw NOT_SUPPORTED
}
discardClaimedSocket(): void {
throw NOT_SUPPORTED
}
async isSocketAlive(): Promise<boolean> {
return false
}
getInstanceProcess(): ProcessInfo | null {
return null
}