Skip to main content

Module proxy

Module proxy 

Source
Expand description

Forwarding public requests down a device’s data connection.

One in-flight request owns one data connection for its lifetime. That is the whole reason this relay needs no stream multiplexer: with a connection per request there are no interleaved streams to demultiplex, so there is no framing format of our own to design, version, and defend. The cost — a pool of idle connections to keep refilled — is the same trade frp makes with pool_count, and it is bounded work rather than a protocol.

Structs§

ProxyRequest
Request metadata sent to the device ahead of the body.
ProxyResponse
Response metadata returned by the device ahead of the body.

Constants§

POOL_WAIT
How long a request waits for a free data connection before giving up.
REQUEST_TIMEOUT
How long a proxied request may take before the relay gives up on the device.

Functions§

is_forwardable
Whether a header may be forwarded across the relay boundary.
split_device_path
Strip the /d/<device-id> prefix, returning the device id and the remainder.