Package-level declarations

Types

Link copied to clipboard

Constants derived from Gedsh/InviZible tordnscrypt sources.

Link copied to clipboard
@Singleton
class InvizibleHelper @Inject constructor(context: Context)

Helper to integrate with InviZible Pro Tor SOCKS proxy.

Link copied to clipboard
Link copied to clipboard

Reads Orbot STATUS broadcasts and builds SOCKS endpoint config. Port is dynamic — never assume 9050 without querying Orbot.

Link copied to clipboard

Normalizes SOCKS endpoints so Tor clients on loopback behave consistently.

Link copied to clipboard
@Singleton
class ProxyManager @Inject constructor(context: Context, invizibleHelper: InvizibleHelper)
Link copied to clipboard
data class ProxyStatus(val config: ProxyConfig, val torProvider: TorProvider = config.torProvider, val orbotInstalled: Boolean = false, val orbotTorOn: Boolean = false, val orbotStatus: String? = null, val orbotRunning: Boolean = false, val invizibleInstalled: Boolean = false, val invizibleRunning: Boolean = false, val proxyHealthy: Boolean = false, val lastCheckLatencyMs: Long? = null, val lastError: String? = null)
Link copied to clipboard
sealed class SocksCheckResult
Link copied to clipboard

SOCKS reachability checks. Remote-DNS probes use InetSocketAddress.createUnresolved so the hostname is resolved by Tor, not on-device DNS.

Link copied to clipboard

Resolves the SOCKS endpoint reachable from this Android runtime.

Functions

Link copied to clipboard
fun evaluateNetworkAllowed(torRequired: Boolean, proxyHealthy: Boolean): Boolean

Fail-closed: outbound traffic is allowed only when the Tor/SOCKS proxy is healthy.