Documentation ¶
Overview ¶
packetforward provides a mechanism for forwarding IP packets from a client to a NAT server, which in turn proxies them to their final destination.
- Clients are uniquely identified by a random UUID. - Clients connect to the server using a configurable dial function. - In the event of a disconnect, clients can reconnect with the same client ID - Interrupted and resumed client connections do not disconnect the clients' TCP connections to the origin - Currently, packetforward supports only TCP and UDP
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Client ¶
Client creates a new packetforward client and returns a WriteCloser. Consumers of packetforward should write whole IP packets to this WriteCloser. The packetforward client will write response packets to the specified downstream Writer. idleTimeout specifies a timeout for idle clients. When the client to server connection remains idle for longer than idleTimeout, it is automatically closed. dialServer configures how to connect to the packetforward server. When packetforwarding is no longer needed, consumers should Close the returned WriteCloser to clean up any outstanding resources.