Skip to content

Commit 1f57478

Browse files
committed
docs: updated README
1 parent 0e5b72b commit 1f57478

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed

README.md

+31-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
__A zero-config service mesh for local development__
44

5-
Stop trying to remember port numbers and create secure endpoints for all of your
5+
Stop trying to remember port numbers and create secure endpoints for your
66
services. Automatically updates your hosts file, generates TLS certificates,
77
(via
88
[mkcert](https://github.com/FiloSottile/mkcert)/[truststore](https://github.com/jittering/truststore)),
@@ -29,12 +29,15 @@ via homebrew (mac or linux):
2929
brew install jittering/kegs/vproxy
3030
```
3131

32-
or manually:
32+
or manually (macOS, linux, windows):
3333

34-
Download a [pre-built binary](https://github.com/jittering/vproxy/releases) or build it from source:
34+
- Download a [pre-built binary](https://github.com/jittering/vproxy/releases)
35+
- Install in proper location, e.g., `/usr/local/bin/` or `%SYSTEMROOT%\System32\`
36+
37+
or build it from source:
3538

3639
```sh
37-
go get github.com/jittering/vproxy/...
40+
go install github.com/jittering/vproxy/bin/vproxy@master
3841
```
3942

4043
### Initialize local root CA
@@ -47,15 +50,19 @@ vproxy caroot --create
4750

4851
## Usage
4952

53+
vproxy can run in two modes, depending on the use case: single-process for proxying a single service or with a standalone daemon for proxying more than one service.
54+
5055
vproxy consists of two processes: daemon and client.
5156

52-
* The __daemon__ serves as the primary host of the HTTP & HTTPS endpoints for
53-
your various applications.
54-
* The __client__ registers a service with the daemon and relays all access logs
57+
- The __daemon__ serves as the primary host of the HTTP & HTTPS endpoints for
58+
your applications.
59+
- The __client__ registers a service with the daemon and relays all access logs
5560
to the current terminal. It can also optionally run the service for you.
5661

5762
A single daemon is required per-host, while clients can be run multiple times.
5863

64+
In single-process mode, skip the daemon section.
65+
5966
### daemon
6067

6168
If installed via homebrew on macOS, running it as a service is easy:
@@ -88,9 +95,9 @@ $ vproxy connect --bind foo.local.com:5000
8895

8996
The daemon will automatically:
9097

91-
* Issue a TLS cert for `foo.local.com`
92-
* Add `foo.local.com` to your hosts file (e.g., /etc/hosts)
93-
* Add a reverse proxy vhost connecting `foo.local.com` to port 5000
98+
- Issue a TLS cert for `foo.local.com`
99+
- Add `foo.local.com` to your hosts file (e.g., /etc/hosts)
100+
- Add a reverse proxy vhost connecting `foo.local.com` to port 5000
94101

95102
You can even run the underlying service with one command, for ease of use:
96103

@@ -106,13 +113,25 @@ $ vproxy connect --bind foo.local.com:5000 -- flask run
106113
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
107114
```
108115

109-
Now visit https://foo.local.com/ to access your application originally running
116+
Now visit https://foo.local.com to access your application originally running
110117
on http://127.0.0.1:5000
111118

112119
When you stop the client process (i.e., by pressing `^C`), vproxy will deregister the vhost with the daemon and send a TERM signal to it's child process.
113120

121+
### Permissions
122+
123+
A couple of notes on permissions. The vproxy *daemon* must be run with elevated privileges for the following reasons:
124+
125+
- macOS or Linux: binding on privileged ports 80/443 and modifying `/etc/hosts`
126+
- Windows: `modifying %SYSTEMROOT%\System32\drivers\etc\hosts`
127+
- All: installing our local CA into the system trust stores (system prompt)
128+
129+
On mac or linux this means running as root (or via sudo).
130+
131+
On Windows this means running via an elevated command prompt.
132+
114133
## License
115134

116-
MIT, (c) 2021, Pixelcop Research, Inc.
135+
MIT, (c) 2022, Pixelcop Research, Inc.
117136

118137
Originally based on [simpleproxy](https://github.com/ybrs/simpleproxy) - MIT (c) 2016 aybars badur.

0 commit comments

Comments
 (0)