From 26c2b8f62e1a7fc7ad537c17c451975c1ba09263 Mon Sep 17 00:00:00 2001 From: rishabh-bector Date: Mon, 20 Aug 2018 15:55:17 -0500 Subject: [PATCH] Fixed name bug --- cmd/cloudflared/main.go | 6 +++--- cmd/rapid/rapid.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/cloudflared/main.go b/cmd/cloudflared/main.go index 9f78872d..696a5040 100644 --- a/cmd/cloudflared/main.go +++ b/cmd/cloudflared/main.go @@ -403,7 +403,7 @@ func main() { ArgsUsage: " ", // can't be the empty string or we get the default output }, { - Name: "rapid", + Name: "db", Action: func(c *cli.Context) error { tags := make(map[string]string) tags["hostname"] = c.String("hostname") @@ -436,11 +436,11 @@ func main() { } return nil }, - Usage: "Rapid is an SQL over HTTP reverse proxy", + Usage: "SQL Gateway is an SQL over HTTP reverse proxy", Flags: []cli.Flag{ &cli.BoolFlag{ Name: "db", - Value: false, + Value: true, Usage: "Enable the SQL Gateway Proxy", }, &cli.StringFlag{ diff --git a/cmd/rapid/rapid.go b/cmd/rapid/rapid.go index 26eafdf4..1710d7ca 100644 --- a/cmd/rapid/rapid.go +++ b/cmd/rapid/rapid.go @@ -49,9 +49,9 @@ type Proxy struct { func StartProxy(c *cli.Context, logger *logrus.Logger) error { proxy := NewProxy(c, logger) - logger.Infof("Starting Rapid SQL Proxy on port %s", c.String("port")) + logger.Infof("Starting Rapid SQL Proxy on port %s", strings.Split(c.String("url"), ":")[1]) - err := http.ListenAndServe(":"+c.String("port"), proxy.Router) + err := http.ListenAndServe(":"+strings.Split(c.String("url"), ":")[1], proxy.Router) if err != nil { return err }