LustroEndpoint

Where the debug server listens, and the token that a client sends to it, as Lustro.endpoint returns them.

A client sends the token as Authorization: Bearer <token>. The token gives full access to the app's data through the server: the captured traffic, and whatever the registered tabs show and change. Show it only in a debug build, and do not send it off the device.

Properties

Link copied to clipboard

The host that a client on the device, or a computer through adb forward, connects to: 127.0.0.1 when the server listens on all interfaces, and otherwise the address that DebugConfig.bindAddress gives.

Link copied to clipboard

The device's network addresses that a client on the same network, such as a computer on the same Wi-Fi, connects to: the IPv4 addresses, Wi-Fi first, or the IPv6 ones when the device has no IPv4 address. Empty when the server listens on loopback only, the default. With DebugConfig.bindAddress("0.0.0.0"), the addresses of the device's interfaces that are up, read on each Lustro.endpoint call; with another address, that address.

Link copied to clipboard

http://<address>:<port> for each of lanHosts.

Link copied to clipboard
val port: Int

The port the server listens on. It differs from DebugConfig.serverPort after a fallback bind.

Link copied to clipboard

The token that a client sends as Authorization: Bearer <token>. When DebugConfig.bindAddress is not loopback, it is a new one in each process of the app, so read it again after the app restarts.

Link copied to clipboard
val url: String

http://<host>:<port>, the base URL for a client on the device or through adb forward.

Functions

Link copied to clipboard
open override fun toString(): String

Leaves the token out, so that a log of the endpoint does not leak it.