f8650bb15161f6c5d019b6cb9751281c4a156888
[webi-installers/.git] / gprox / README.md
1 ---
2 title: gprox
3 homepage: https://github.com/creedasaurus/gprox
4 tagline: |
5   gprox: a simple local ssl proxy for development
6 ---
7
8 ### Updating `gprox`
9
10 `webi gprox`
11
12 ## Cheat Sheet
13
14 `gprox` was built to be a no-dependency development tool for simply proxying HTTPS traffic to a local HTTP endpoint. It was written as a port of [local-ssl-proxy](https://github.com/cameronhunter/local-ssl-proxy), a perfectly good NodeJS app for the same purpose. But the benefit is that you can install `gprox` very simply from `webi` or `go` (if you must), and you dont have to worry at all about NodeJS versions, etc! Plus there isn't any elevated access given to an interpreter you dont know much about if you're using `webi`.
15
16 The fastest way to get started is just by running:
17
18 ```bash
19 gprox
20 # example output
21 # 9:12PM INF Running proxy! from=https://localhost:9001 to=http://localhost:9000
22 ```
23 And you're off to the races!
24
25 That is... if you're app happens to be running on port `9000`. If not, no worries! Simply pass the target port option `-t, --target` and specify the port your app _is_ running on.
26
27 ```bash
28 gprox -t 8080
29 ```
30
31 Feeling like you should save this magic built-in cert so you can inspect it for anything?
32 ```bash
33 gprox --dropcert
34 ```
35
36 Want to use your own cert/key?
37 ```bash
38 gprox -c testcert.crt -k testkey.key
39 ```
40
41 And for anything else, just use the `-h, --help` flag to get a little more information or refer to the [README](https://github.com/creedasaurus/gprox/blob/main/README.md):
42
43 ```
44 ❯ gprox --help
45 Usage:
46   gprox [OPTIONS]
47
48 Application Options:
49   -n, --hostname=  The hostname to be used for the local proxy (default: localhost)
50   -s, --source=    The source port that you will hit to go through the proxy (default: 9001)
51   -t, --target=    The port you are targeting (default: 9000)
52   -c, --cert=      Path to a .cert file
53   -k, --key=       Path to a .key file
54   -o, --config=
55   -d, --dropcerts  Save the built-in cert/key files to disk
56       --version
57
58 Help Options:
59   -h, --help       Show this help message
60 ```