Tor

sealed class Tor : ResourceLoader(source)

Model for loading tor resources.

API design is such that only 1 Tor loader can be instantiated. Any attempts to instantiate a second will result in the return of the first one that was created. This is to inhibit any attempts to switch between Exec and NoExec during runtime, as well as ensure resources are only extracted to a single location.

See also

Inheritors

Types

Link copied to clipboard
abstract class Exec : ResourceLoader.Tor

Model for running tor as an executable within a child process.

Link copied to clipboard
abstract class NoExec : ResourceLoader.Tor

Model for running tor within your application's memory space.

Properties

Link copied to clipboard
@JvmField
val resourceDir: File

The absolute path to the directory for which resources will be extracted.

Functions

Link copied to clipboard
open fun extract(): GeoipFiles

Extract tor's geoip & geoip6 files from application resources to resourceDir.