NetworkGuard

@Singleton
class NetworkGuard @Inject constructor(proxyManager: ProxyManager)

Fail-closed gate for every network path in the app. No socket, HTTP client, or WebView may be created without first passing assertNetworkAllowed — this is the single choke point that enforces the "Tor-only, no clearnet fallback" guarantee described in docs/ARCHITECTURE.md.

Constructors

Link copied to clipboard
@Inject
constructor(proxyManager: ProxyManager)

Functions

Link copied to clipboard

Throws NetworkBlockedException if the Tor SOCKS proxy is not currently reachable.

Link copied to clipboard

Returns a plain Socket, but only after the killswitch check passes.