- RebreakProtectionModule: reconcileVpn, Samsung overlay guide, openPowerDialog, armTamperLock preconditions (VPN+a11y required), openAccessibilitySettings fallback chain - RebreakVpnService: onRevoke auto-recover, blocklist self-heal on empty start, ACTION_RESTART für hard-reload nach blocklist-Änderung - VpnBootReceiver (neu): startet VPN nach Geräte-Neustart wenn filter_enabled=true - Strings: DE/EN/FR/AR a11y-Guide, Overlay-Permission, Hint-Steps - RebreakProtectionModule.ts: reconcileVpn, armTamperLock, disarmTamperLock, openPowerDialog, openAccessibilitySettings, dismissAccessibilityHint exports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
103 lines
2.4 KiB
TypeScript
103 lines
2.4 KiB
TypeScript
/**
|
|
* Web-Stub. Ergibt im Browser keinen funktionalen Schutz — der Filter ist
|
|
* inhärent device-bound. Verhindert nur dass Imports auf Web crashen.
|
|
*/
|
|
import { registerWebModule, NativeModule } from 'expo';
|
|
|
|
import type {
|
|
ActivateResult,
|
|
DeviceLayers,
|
|
DisableResult,
|
|
HealthProbeResult,
|
|
RebreakProtectionEvents,
|
|
SyncBlocklistResult,
|
|
} from './RebreakProtection.types';
|
|
|
|
class RebreakProtectionModuleWeb extends NativeModule<RebreakProtectionEvents> {
|
|
async activate(): Promise<ActivateResult> {
|
|
return { allLayersOn: false, missingLayers: [] };
|
|
}
|
|
|
|
async disable(): Promise<DisableResult> {
|
|
return { allLayersOff: true };
|
|
}
|
|
|
|
async getDeviceState(): Promise<DeviceLayers> {
|
|
return { blocklistCount: 0, blocklistLastSyncAt: null };
|
|
}
|
|
|
|
// iOS Layer 2 — webContent-Filter. Auf Web inhärent ohne Funktion.
|
|
async applyWebContentFilter() {
|
|
return { enabled: false, appliedCount: 0, region: '', error: 'web_stub' };
|
|
}
|
|
|
|
async clearWebContentFilter() {
|
|
return { cleared: false, error: 'web_stub' };
|
|
}
|
|
|
|
async syncWebContentDomains() {
|
|
return { updated: false };
|
|
}
|
|
|
|
async syncBlocklist(): Promise<SyncBlocklistResult> {
|
|
return { updated: false, count: 0 };
|
|
}
|
|
|
|
async runHealthProbe(): Promise<HealthProbeResult> {
|
|
return {
|
|
outcome: 'offline',
|
|
reason: 'web_stub',
|
|
durationMs: 0,
|
|
target: '',
|
|
};
|
|
}
|
|
|
|
async openSystemSettings(): Promise<void> {
|
|
// no-op
|
|
}
|
|
|
|
// Android-only stubs (Web nutzt keinen davon, aber Type-Compat).
|
|
async isAccessibilityEnabled() {
|
|
return { enabled: false };
|
|
}
|
|
async openAccessibilitySettings() {
|
|
return { opened: false };
|
|
}
|
|
async dismissAccessibilityHint() {
|
|
// no-op
|
|
}
|
|
async openPowerDialog() {
|
|
return { opened: false };
|
|
}
|
|
async armTamperLock() {
|
|
return { armed: false };
|
|
}
|
|
async disarmTamperLock() {
|
|
return { armed: false };
|
|
}
|
|
async getProtectionStatus() {
|
|
return {
|
|
vpnEnabled: false,
|
|
accessibilityEnabled: false,
|
|
blocklistCount: 0,
|
|
tamperArmed: false,
|
|
};
|
|
}
|
|
async reconcileVpn() {
|
|
return { restarted: false };
|
|
}
|
|
async reconcileUrlFilter() {
|
|
return { recreated: false };
|
|
}
|
|
|
|
async probeContentFilter() {
|
|
return { enabled: false, error: 'web_stub' };
|
|
}
|
|
|
|
async isNeFilterActive() {
|
|
return { enabled: false };
|
|
}
|
|
}
|
|
|
|
export default registerWebModule(RebreakProtectionModuleWeb, 'RebreakProtection');
|