From d5929aa778e369da7082467558628d5f672516cc Mon Sep 17 00:00:00 2001 From: Evgeny Abramovich Date: Thu, 25 Aug 2022 18:11:38 +0300 Subject: [PATCH] Updated parameters --- README.md | 10 +++++++--- main.go | 12 ++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d89cdfc3..b5aff7bc 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,13 @@ If you are a Windows user, substitute the $HOME environment variable above with ## Parameters -* `--port` - Local HTTP linthing port. -* `--target` - Url with protocol for to the resource to be proxyed. -* `--source` - Url with protocol for to the resource from which proxying will take place. +* `--source` - Local host with protocol for to the resource from which proxying will take place. +* `--target` - Target host with protocol for to the resource to be proxyed. +* `--http-port` - Local HTTP linthing port. +* `--https-port` - Local HTTPS linthing port. +* `--cert-file` - Path to HTTPS certificate file. +* `--key-file` - Path to matching for certificate private key. + ## How it works diff --git a/main.go b/main.go index 908639e8..b66f95e5 100644 --- a/main.go +++ b/main.go @@ -26,12 +26,12 @@ const ( ) func main() { - target := flag.String("target", "https://github.com", "Real target url (include https://)") - source := flag.String("source", "//localhost", "Local source url (include http://)") - httpPort := flag.Int("port", defaultHTTPPort, "Local listening port (3000 by default)") - httpsPort := flag.Int("https-port", defaultHTTPSPort, "Local listening port (443 by default)") - certFile := flag.String("cert-file", "", "Local listening port (443 by default)") - keyFile := flag.String("key-file", "", "Local listening port (443 by default)") + target := flag.String("target", "https://github.com", "Target host with protocol for to the resource to be proxyed") + source := flag.String("source", "//localhost", "Local host with protocol for to the resource from which proxying will take place") // nolint: lll + httpPort := flag.Int("http-port", defaultHTTPPort, "Local HTTP listening port") + httpsPort := flag.Int("https-port", defaultHTTPSPort, "Local HTTPS listening port") + certFile := flag.String("cert-file", "", "Path to HTTPS certificate file") + keyFile := flag.String("key-file", "", "Path to matching for certificate private key") ctx := context.Background() ctx, cancel := signal.NotifyContext(