You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, you can install it using `go install` command (requires Go [1.24](https://go.dev/doc/install) or later):
@@ -139,10 +143,10 @@ Options:
139
143
Address of transparent proxy server (no HTTP)
140
144
-U string
141
145
User for HTTP proxy (basic auth). This flag invokes prompt for password (not echoed to terminal)
146
+
-body
147
+
Collect request and response body for HTTP sniffing
142
148
-c string
143
149
Path to certificate PEM encoded file
144
-
-color
145
-
Enable colored output forlogsin stdout (no effect if log file provided or -j flag specified)
146
150
-d Show logs in DEBUG mode
147
151
-f string
148
152
Path to server configuration file in YAML format
@@ -153,6 +157,8 @@ Options:
153
157
Address of HTTP proxy server (default "127.0.0.1:8080")
154
158
-logfile string
155
159
Log file path (Default: stdout)
160
+
-nocolor
161
+
Disable colored output for logs (no effect if -j flag specified)
156
162
-s string
157
163
Address of SOCKS5 proxy server (default "127.0.0.1:1080")
158
164
-sniff
@@ -430,6 +436,8 @@ ip link del veth1
430
436
431
437
`GoHPTS` proxy allows one to capture and monitor traffic that goes through the service. This procces is known as `traffic sniffing`, `packet sniffing` or just `sniffing`. In particular, proxy tries to identify whether it is a plain text (HTTP) or TLS traffic, and after identification is done, it parses request/response metadata and writes it to the file or console. In the case of `GoHTPS` proxy a parsed metadata looks like the following (TLS Handshake):
432
438
439
+
### JSON format
440
+
433
441
```json
434
442
[
435
443
{
@@ -551,16 +559,36 @@ And HTTP request with curl:
551
559
Usage as simple as specifying `-sniff` flag along with regular flags
552
560
553
561
```shell
554
-
gohpts -d -t 8888 -M redirect -sniff
562
+
gohpts -d -t 8888 -M redirect -sniff -j
555
563
```
556
564
557
565
You can also specify a file to which write sniffed traffic:
558
566
559
567
```shell
560
-
gohpts -d -sniff -snifflog ~/sniff.log
568
+
gohpts -sniff -snifflog ~/sniff.log -j
569
+
```
570
+
571
+
### Colored format
572
+
573
+
You can see the example of colored output in the picture at the very top. In this mode, `GoHPTS` tries to highlight import information such as TLS Handshake, HTTP metadata, something that looks line login/passwords or different types of auth and secret tokens. The output is limited comparing to JSON but way easier to read for humans.
574
+
575
+
To run `GoHPTS` in this mode you use the following flags:
576
+
577
+
```shell
578
+
gohpts -sniff -body
561
579
```
562
580
563
-
Please note that fornow sniffing only visible with `-d` flag, it may changein the future.
0 commit comments