Skip to content

Commit 1a8c26f

Browse files
committed
change flag prefix and add a note on installation from source
1 parent 75958e1 commit 1a8c26f

File tree

1 file changed

+28
-18
lines changed

1 file changed

+28
-18
lines changed

README.md

+28-18
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,20 @@ If you'd rather not accept free candy from this van you can also grab a release
1818
from our [releases page](https://github.com/malfunkt/hyperfox/releases) and
1919
install it manually.
2020

21+
### Building `hyperfox` from source
22+
23+
In order to build `hyperfox` from source you'll need Go and a C compiler:
24+
25+
Use `go install` to build and install `hyperfox`:
26+
27+
```
28+
go install github.com/malfunkt/hyperfox
29+
```
30+
2131
## How does it work?
2232

2333
Hyperfox creates a transparent HTTP proxy server and binds it to port 1080/TCP
24-
on localhost (`--addr 127.0.0.1 --http 1080`). The proxy server reads plaintext
34+
on localhost (`-addr 127.0.0.1 -http 1080`). The proxy server reads plaintext
2535
HTTP requests and redirects them to the target destination (the `Host` header
2636
is used to identify the destination), when the target destination replies,
2737
Hyperfox intercepts the response and forwards it to the original client.
@@ -30,7 +40,7 @@ All HTTP communications between origin and destination are intercepted by
3040
Hyperfox and recorded on a SQLite database that is created automatically.
3141
Everytime Hyperfox starts, a new database is created (e.g.:
3242
`hyperfox-00123.db`). You can change this behaviour by explicitly providing a
33-
database name (e.g.: `--db traffic-log.db`).
43+
database name (e.g.: `-db traffic-log.db`).
3444

3545
### Usage
3646

@@ -54,22 +64,22 @@ you should be able to see a log for the page you requested in Hyperfox's output:
5464
127.0.0.1:44254 - - [11/Apr/2020:19:19:48 -0500] "GET http://example.com/ HTTP/1.1" 200 -1
5565
```
5666

57-
### User interface (`--ui`)
67+
### User interface (`-ui`)
5868

5969
![hyperfox-ui](https://user-images.githubusercontent.com/385670/79090465-6e7eb300-7d0f-11ea-8fc6-df1e6da8a12e.png)
6070

61-
Use the `--ui` parameter to enable Hyperfox UI wich will open in a new browser
71+
Use the `-ui` parameter to enable Hyperfox UI wich will open in a new browser
6272
window:
6373

6474
```
65-
hyperfox --db records.db --ui
75+
hyperfox -db records.db -ui
6676
```
6777

6878
The above command creates a web server that binds to `127.0.0.1:1984`. If you'd
69-
like to change the bind address or port use the `--ui-addr` switch:
79+
like to change the bind address or port use the `-ui-addr` switch:
7080

7181
```
72-
hyperfox --db records.db --ui --ui-addr 127.0.0.1:3000
82+
hyperfox -db records.db -ui -ui-addr 127.0.0.1:3000
7383
```
7484

7585
Changing the UI server address is specially useful when Hyperfox is running on
@@ -84,14 +94,14 @@ might not be adecuate.
8494

8595
#### Run Hyperfox UI on your mobile device
8696

87-
When the `--ui-addr`parameter is different from `127.0.0.1` Hyperfox will
97+
When the `-ui-addr`parameter is different from `127.0.0.1` Hyperfox will
8898
output a QR code to make it easier to connect from mobile devices:
8999

90100
```
91-
hyperfox --db records.db --ui --ui-addr 192.168.1.23:1984
101+
hyperfox -db records.db -ui -ui-addr 192.168.1.23:1984
92102
```
93103

94-
### SSL/TLS mode (`--ca-cert` & `--ca-key`)
104+
### SSL/TLS mode (`-ca-cert` & `-ca-key`)
95105

96106
SSL/TLS connections are secure end to end and protected from eavesdropping.
97107
Hyperfox won't be able to see anything happening between a client and a secure
@@ -119,11 +129,11 @@ device:
119129

120130
![Hyperfox root CA certificate](https://chart.googleapis.com/chart?cht=qr&choe=UTF-8&chs=220x220&chl=https://static.hyperfox.org/rootCA.crt)
121131

122-
Use the `--ca-cert` and `--ca-key` flags to provide Hyperfox with the root CA
132+
Use the `-ca-cert` and `-ca-key` flags to provide Hyperfox with the root CA
123133
certificate and key you'd like to use:
124134

125135
```
126-
hyperfox --ca-cert rootCA.crt --ca-key rootCA.key
136+
hyperfox -ca-cert rootCA.crt -ca-key rootCA.key
127137
```
128138

129139
the above command creates a special server and binds it to `127.0.0.1:10443`,
@@ -135,20 +145,20 @@ this certificate is signed with the providede root CA key.
135145

136146
#### TLS interception example
137147

138-
Launch Hyperfox with appropriate TLS parameters and `--http 443` (port 443
148+
Launch Hyperfox with appropriate TLS parameters and `-http 443` (port 443
139149
requires admin privileges).
140150

141151
```
142-
sudo hyperfox --ca-cert ./ca/rootCA.crt --ca-key ./ca/rootCA.key --https 443
152+
sudo hyperfox -ca-cert ./ca/rootCA.crt -ca-key ./ca/rootCA.key -https 443
143153
```
144154

145-
Use cURL to build a HTTPs request to example.com: the `--resolve` option tells
155+
Use cURL to build a HTTPs request to example.com: the `-resolve` option tells
146156
cURL to skip DNS verification and use `127.0.0.1` as if it were the legitimate
147157
address for `example.com`, while the `-k` parameter tells cURL to accept any
148158
TLS certificate.
149159

150160
```
151-
curl -k --resolve example.com:443:127.0.0.1 https://example.com
161+
curl -k -resolve example.com:443:127.0.0.1 https://example.com
152162
```
153163

154164
you should be able to see a log for the page you requested in Hyperfox's output:
@@ -169,11 +179,11 @@ example.com 127.0.0.1
169179

170180
Run Hyperfox with the options you'd like, just remember that you should use
171181
ports 80 for HTTP and 443 for HTTPS, and that requires admin privileges. In
172-
addition to `--http` and `--https` use the `--dns` parameter with a valid DNS
182+
addition to `-http` and `-https` use the `-dns` parameter with a valid DNS
173183
resolver:
174184

175185
```
176-
sudo hyperfox --ui --http 80 --dns 8.8.8.8
186+
sudo hyperfox -ui -http 80 -dns 8.8.8.8
177187
```
178188

179189
that will make Hyperfox skip the OS DNS resolver and use an alternative one

0 commit comments

Comments
 (0)