Control

A DSL builder scope for TorOption.__ControlPort and TorOption.ControlPort. Because kmp-tor is built entirely around tor's control connection APIs, disable is made unavailable and the argument is always initialized with a value of auto.

If utilizing kmp-tor:runtime, TorOption.__ControlPort will always be added if not already present.

Properties

Link copied to clipboard
@JvmField
protected var argument: String

The argument string for this BuilderScope, the result of which is used as the LineItem.argument. Is initialized with whatever TorOption.default is.

Link copied to clipboard
@JvmField
val option: TorOption

The TorOption being configured for this BuilderScope.

Functions

Link copied to clipboard
open override fun auto(): BuilderScopePort.Control

Sets the argument to auto, indicating that tor should pick a port value for this TorOption.

Link copied to clipboard
protected open fun disable(): BuilderScopePort

Sets the argument to 0, indicating that tor will not utilize this TorOption.

Link copied to clipboard

Adds isolation flags to the TorSetting.LineItem.optionals of this builder result.

Link copied to clipboard

Adds socks flags to the TorSetting.LineItem.optionals of this builder result.

Link copied to clipboard

Adds unix flags to the TorSetting.LineItem.optionals of this builder result.

Link copied to clipboard
open override fun port(value: Port.Ephemeral): BuilderScopePort.Control

Sets the argument to the specified port.

Link copied to clipboard
open override fun reassignable(allow: Boolean): BuilderScopePort.Control

In the event a configured Port is unavailable on the host device, tor will fail to start.

Link copied to clipboard
open override fun unixSocket(value: File): BuilderScopePort.Control

For a TorOption which can be configured to use Unix Sockets, containing the attribute TorOption.Attribute.UNIX_SOCKET.