Flags Builder Unix
class FlagsBuilderUnix
Configure the desired TorOption with Unix Flags, as described in tor-man#OtherSocksPortFlags and tor-man#ControlPort.
Configurability is as follows:
null: no action (the default).true: add the flag if not present.false: remove the flag if present.
e.g.
val setting = TorOption.__SocksPort.asSetting {
try {
unixSocket("/path/to/my/socks.sock".toFile())
} catch(_: UnsupportedOperationException) {
// unix flags will not be applied in this case.
auto()
}
flagsUnix {
GroupWritable = true
WorldWritable = true
}
flagsUnix {
// Remove what was just added
WorldWritable = false
}
}
// IF unixSocket is supported
println(setting.items.first().argument)
println(setting.items.first().optionals)
// unix:"/path/to/my/socks.sock"
// [GroupWritable]
// IF unixSocket is not supported
println(setting.items.first().argument)
println(setting.items.first().optionals)
// auto
// []Content copied to clipboard
See also
Builder Scope Port. flagsUnix
Properties
Link copied to clipboard
Link copied to clipboard
Only applicable for Control.flagsUnix, otherwise is ignored if configured.
Link copied to clipboard