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