Also consolidates variable and header naming and amends the
CLI behavior
* multiple app-caps have to be specified as comma-separated
list
* simple regex-based validation of app capability names is
carried out during flag parsing
Signed-off-by: Gesa Stupperich <gesa@tailscale.com>
fs.UintVar(&e.https,"https",0,"Expose an HTTPS server at the specified port (default mode)")
ifsubcmd==serve{
fs.UintVar(&e.http,"http",0,"Expose an HTTP server at the specified port")
fs.Var(&acceptAppCapsFlag{Value:&e.acceptAppCaps},"accept-app-caps","App capability to forward to the server (can be specified multiple times)")
fs.Var(&acceptAppCapsFlag{Value:&e.acceptAppCaps},"accept-app-caps","App capabilities to forward to the server (specify multiple capabilities with a comma-separated list)")
}
fs.UintVar(&e.tcp,"tcp",0,"Expose a TCP forwarder to forward raw TCP packets at the specified port")
fs.UintVar(&e.tlsTerminatedTCP,"tls-terminated-tcp",0,"Expose a TCP forwarder to forward TLS-terminated TCP packets at the specified port")