diff --git a/cmd/cloudflared/access/cmd.go b/cmd/cloudflared/access/cmd.go index d756d954..d1e3f854 100644 --- a/cmd/cloudflared/access/cmd.go +++ b/cmd/cloudflared/access/cmd.go @@ -85,13 +85,13 @@ func Commands() []*cli.Command { return []*cli.Command{ { Name: "access", - Category: "Access (BETA)", + Aliases: []string{"forward"}, + Category: "Access", Usage: "access ", - Description: `(BETA) Cloudflare Access protects internal resources by securing, authenticating and monitoring access + Description: `Cloudflare Access protects internal resources by securing, authenticating and monitoring access per-user and by application. With Cloudflare Access, only authenticated users with the required permissions are able to reach sensitive resources. The commands provided here allow you to interact with Access protected - applications from the command line. This feature is considered beta. Your feedback is greatly appreciated! - https://cfl.re/CLIAuthBeta`, + applications from the command line.`, Subcommands: []*cli.Command{ { Name: "login", @@ -133,22 +133,24 @@ func Commands() []*cli.Command { { Name: "ssh", Action: errorHandler(ssh), - Aliases: []string{"rdp", "tcp"}, + Aliases: []string{"rdp", "tcp", "smb"}, Usage: "", ArgsUsage: "", Description: `The ssh subcommand sends data over a proxy to the Cloudflare edge.`, Flags: []cli.Flag{ &cli.StringFlag{ - Name: sshHostnameFlag, - Usage: "specify the hostname of your application.", + Name: sshHostnameFlag, + Aliases: []string{"tunnel-host", "T"}, + Usage: "specify the hostname of your application.", }, &cli.StringFlag{ Name: sshDestinationFlag, Usage: "specify the destination address of your SSH server.", }, &cli.StringFlag{ - Name: sshURLFlag, - Usage: "specify the host:port to forward data to Cloudflare edge.", + Name: sshURLFlag, + Aliases: []string{"listener", "L"}, + Usage: "specify the host:port to forward data to Cloudflare edge.", }, &cli.StringSliceFlag{ Name: sshHeaderFlag, diff --git a/cmd/cloudflared/tunnel/cmd.go b/cmd/cloudflared/tunnel/cmd.go index d8d40248..aac5a235 100644 --- a/cmd/cloudflared/tunnel/cmd.go +++ b/cmd/cloudflared/tunnel/cmd.go @@ -631,6 +631,8 @@ func hostnameFromURI(uri string) string { return addPortIfMissing(u, 22) case "rdp": return addPortIfMissing(u, 3389) + case "smb": + return addPortIfMissing(u, 445) case "tcp": return addPortIfMissing(u, 7864) // just a random port since there isn't a default in this case } diff --git a/validation/validation.go b/validation/validation.go index 97233864..21ba940d 100644 --- a/validation/validation.go +++ b/validation/validation.go @@ -23,7 +23,7 @@ const ( ) var ( - supportedProtocols = []string{"http", "https", "rdp"} + supportedProtocols = []string{"http", "https", "rdp", "ssh", "smb", "tcp"} validationTimeout = time.Duration(30 * time.Second) ) diff --git a/validation/validation_test.go b/validation/validation_test.go index 866414ad..b6ae8bf4 100644 --- a/validation/validation_test.go +++ b/validation/validation_test.go @@ -308,7 +308,7 @@ func TestNewAccessValidatorErr(t *testing.T) { urls := []string{ "", - "tcp://test.cloudflareaccess.com", + "ftp://test.cloudflareaccess.com", "wss://cloudflarenone.com", }