forward abstract method

Future<TailscalePublishedService> forward({
  1. required int tailnetPort,
  2. required int localPort,
  3. String localAddress = '127.0.0.1',
  4. String path = '/',
  5. bool https = true,
})

Publishes http://[localAddress]:[localPort] inside the tailnet.

tailnetPort is the port on this node's MagicDNS name. https defaults to true, so the tailnet URL is https://<node>... and Tailscale terminates TLS before forwarding plaintext HTTP to the local service.

localAddress must be loopback (127.0.0.1, ::1, or localhost). This prevents accidentally publishing arbitrary LAN or metadata-service endpoints through the tailnet.

Implementation

Future<TailscalePublishedService> forward({
  required int tailnetPort,
  required int localPort,
  String localAddress = '127.0.0.1',
  String path = '/',
  bool https = true,
});