remove --basic-auth from 'zrok share private' (#770)

This commit is contained in:
Michael Quigley 2024-10-18 11:45:03 -04:00
parent 9b83157a9b
commit 4eefa83ae8
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -27,7 +27,6 @@ func init() {
} }
type sharePrivateCommand struct { type sharePrivateCommand struct {
basicAuth []string
backendMode string backendMode string
headless bool headless bool
insecure bool insecure bool
@ -43,7 +42,6 @@ func newSharePrivateCommand() *sharePrivateCommand {
Args: cobra.RangeArgs(0, 1), Args: cobra.RangeArgs(0, 1),
} }
command := &sharePrivateCommand{cmd: cmd} command := &sharePrivateCommand{cmd: cmd}
cmd.Flags().StringArrayVar(&command.basicAuth, "basic-auth", []string{}, "Basic authentication users (<username:password>,...")
cmd.Flags().StringVarP(&command.backendMode, "backend-mode", "b", "proxy", "The backend mode {proxy, web, tcpTunnel, udpTunnel, caddy, drive, socks, vpn}") cmd.Flags().StringVarP(&command.backendMode, "backend-mode", "b", "proxy", "The backend mode {proxy, web, tcpTunnel, udpTunnel, caddy, drive, socks, vpn}")
cmd.Flags().BoolVar(&command.headless, "headless", false, "Disable TUI and run headless") cmd.Flags().BoolVar(&command.headless, "headless", false, "Disable TUI and run headless")
cmd.Flags().BoolVar(&command.insecure, "insecure", false, "Enable insecure TLS certificate validation for <target>") cmd.Flags().BoolVar(&command.insecure, "insecure", false, "Enable insecure TLS certificate validation for <target>")
@ -145,7 +143,6 @@ func (cmd *sharePrivateCommand) run(_ *cobra.Command, args []string) {
req := &sdk.ShareRequest{ req := &sdk.ShareRequest{
BackendMode: sdk.BackendMode(cmd.backendMode), BackendMode: sdk.BackendMode(cmd.backendMode),
ShareMode: sdk.PrivateShareMode, ShareMode: sdk.PrivateShareMode,
BasicAuth: cmd.basicAuth,
Target: target, Target: target,
} }
if cmd.closed { if cmd.closed {