AUTH-2505 added aliases
This commit is contained in:
parent
83a1dc93d8
commit
8c870c19a6
|
@ -85,13 +85,13 @@ func Commands() []*cli.Command {
|
||||||
return []*cli.Command{
|
return []*cli.Command{
|
||||||
{
|
{
|
||||||
Name: "access",
|
Name: "access",
|
||||||
Category: "Access (BETA)",
|
Aliases: []string{"forward"},
|
||||||
|
Category: "Access",
|
||||||
Usage: "access <subcommand>",
|
Usage: "access <subcommand>",
|
||||||
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
|
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
|
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!
|
applications from the command line.`,
|
||||||
https://cfl.re/CLIAuthBeta`,
|
|
||||||
Subcommands: []*cli.Command{
|
Subcommands: []*cli.Command{
|
||||||
{
|
{
|
||||||
Name: "login",
|
Name: "login",
|
||||||
|
@ -133,13 +133,14 @@ func Commands() []*cli.Command {
|
||||||
{
|
{
|
||||||
Name: "ssh",
|
Name: "ssh",
|
||||||
Action: errorHandler(ssh),
|
Action: errorHandler(ssh),
|
||||||
Aliases: []string{"rdp", "tcp"},
|
Aliases: []string{"rdp", "tcp", "smb"},
|
||||||
Usage: "",
|
Usage: "",
|
||||||
ArgsUsage: "",
|
ArgsUsage: "",
|
||||||
Description: `The ssh subcommand sends data over a proxy to the Cloudflare edge.`,
|
Description: `The ssh subcommand sends data over a proxy to the Cloudflare edge.`,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: sshHostnameFlag,
|
Name: sshHostnameFlag,
|
||||||
|
Aliases: []string{"tunnel-host", "T"},
|
||||||
Usage: "specify the hostname of your application.",
|
Usage: "specify the hostname of your application.",
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
|
@ -148,6 +149,7 @@ func Commands() []*cli.Command {
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: sshURLFlag,
|
Name: sshURLFlag,
|
||||||
|
Aliases: []string{"listener", "L"},
|
||||||
Usage: "specify the host:port to forward data to Cloudflare edge.",
|
Usage: "specify the host:port to forward data to Cloudflare edge.",
|
||||||
},
|
},
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
|
|
|
@ -631,6 +631,8 @@ func hostnameFromURI(uri string) string {
|
||||||
return addPortIfMissing(u, 22)
|
return addPortIfMissing(u, 22)
|
||||||
case "rdp":
|
case "rdp":
|
||||||
return addPortIfMissing(u, 3389)
|
return addPortIfMissing(u, 3389)
|
||||||
|
case "smb":
|
||||||
|
return addPortIfMissing(u, 445)
|
||||||
case "tcp":
|
case "tcp":
|
||||||
return addPortIfMissing(u, 7864) // just a random port since there isn't a default in this case
|
return addPortIfMissing(u, 7864) // just a random port since there isn't a default in this case
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
supportedProtocols = []string{"http", "https", "rdp"}
|
supportedProtocols = []string{"http", "https", "rdp", "ssh", "smb", "tcp"}
|
||||||
validationTimeout = time.Duration(30 * time.Second)
|
validationTimeout = time.Duration(30 * time.Second)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,7 @@ func TestNewAccessValidatorErr(t *testing.T) {
|
||||||
|
|
||||||
urls := []string{
|
urls := []string{
|
||||||
"",
|
"",
|
||||||
"tcp://test.cloudflareaccess.com",
|
"ftp://test.cloudflareaccess.com",
|
||||||
"wss://cloudflarenone.com",
|
"wss://cloudflarenone.com",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue