VpnNetworkCallback

Functions

Link copied to clipboard
abstract fun isAddressBlocked(addressRR: AddressRR): Boolean

Called by the VPN network to know if a particular IP address is blocked or not. This can be combined with the onDnsResolved callback, to get the hostname of the addressRR and then decide whether that hostname should be blocked or not

Link copied to clipboard
abstract fun isDomainBlocked(domainRR: DomainRR): Boolean

Called by the VPN network to know if a domain is blocked or not. This is used to perform DNS-base tracker blocking

Link copied to clipboard
abstract fun onDnsResolved(dnsRR: DnsRR)

Called when the VPN network detects a DNS resource is resolved

Link copied to clipboard
abstract fun onError(errorCode: Int, message: String)

Called when the VPN network stops upon error.

Link copied to clipboard
abstract fun onExit(reason: String)

Called when the VPN network exists unexpectedly.

Link copied to clipboard
open fun reportTLSParsingError(errorCode: Int)

Called by the VPN network to report an error parsing TLS packets. The implementation of this method should just log the issue and continue