Skip to content

Commit

Permalink
Updated parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
evg4b committed Aug 25, 2022
1 parent aeb1a3e commit d5929aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d5929aa

Please sign in to comment.