AddressMapping
Holder for address mapping requests.
e.g.
val results = runtime.executeAsync(
TorCmd.MapAddress(
"torproject.org".mappingToAnyHost(),
"torproject.org".mappingToAnyHostIPv4(),
"torproject.org".mappingToAnyHostIPv6(),
)
)
val unmappings = results.map { result ->
println(result)
result.toUnmapping()
}
// AddressMapping.Result: [
// from: wsvidzeicnyrlruo.virtual
// to: torproject.org
// isUnmapping: false
// ]
// AddressMapping.Result: [
// from: 127.240.73.168
// to: torproject.org
// isUnmapping: false
// ]
// AddressMapping.Result: [
// from: [fe85:2bcd:7057:b3f9:ffb2:be48:1e7b:884]
// to: torproject.org
// isUnmapping: false
// ]
runtime.executeAsync(
TorCmd.Info.Get("address-mappings/control")
).let { mappings -> println(mappings.values.first()) }
// wsvidzeicnyrlruo.virtual torproject.org NEVER
// 127.240.73.168 torproject.org NEVER
// [fe85:2bcd:7057:b3f9:ffb2:be48:1e7b:884] torproject.org NEVER
runtime.executeAsync(TorCmd.MapAddress(unmappings))
runtime.executeAsync(
TorCmd.Info.Get("address-mappings/control")
).let { mappings -> println(mappings) }
// {address-mappings/control=}
Content copied to clipboard