Skip to content

Commit 2ceb1be

Browse files
authored
Merge pull request #242 from compscidr/docs/readme-videos-debugging
Add demo videos and Wireshark debugging section to README
2 parents c03a945 + 85da4a9 commit 2ceb1be

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ An anonymous proxy written in kotlin.
77
For a deeper architectural overview of how the modules and external libraries fit together,
88
see [docs/architecture.md](docs/architecture.md).
99

10+
## Demo videos
11+
12+
Two short clips of the Android sample app in action (click to play on YouTube):
13+
14+
| Android demo | Android demo with Wireshark |
15+
|:---:|:---:|
16+
| [![Android demo](https://img.youtube.com/vi/wlaYF5m-GBo/maxresdefault.jpg)](https://youtu.be/wlaYF5m-GBo) | [![Android demo with Wireshark](https://img.youtube.com/vi/zhUrEmBCZSM/maxresdefault.jpg)](https://youtu.be/zhUrEmBCZSM) |
17+
| The `android` module running as a VPN service and proxying traffic on a real device. | The same app with Wireshark attached to the in-app `PcapNgTcpServerPacketDumper`, watching packets go through the proxy live. |
18+
1019
## Modules
1120

1221
There are four modules in this project:
@@ -84,3 +93,41 @@ val response = kanonProxy.takeResponse()
8493
```
8594

8695
There are more examples of usage in the [tests](core/src/test/kotlin/com/jasonernst/kanonproxy).
96+
97+
## Debugging with Wireshark
98+
99+
Both the reference server/client and the Android sample app embed a
100+
[`PcapNgTcpServerPacketDumper`](https://github.com/compscidr/packetdumper) that can
101+
expose a live pcap-ng stream over TCP. Wireshark attaches to it directly, no PCAP
102+
files on disk:
103+
104+
```bash
105+
wireshark -k -i TCP@<host>:<port>
106+
```
107+
108+
`-k` starts capture immediately; `-i TCP@host:port` is Wireshark's pcap-ng-over-TCP
109+
source. The host and port depend on where the dumper is running:
110+
111+
- **`LinuxProxyClient`** — listens on `PcapNgTcpServerPacketDumper.DEFAULT_PORT`
112+
(`19000`) on localhost:
113+
```bash
114+
wireshark -k -i TCP@127.0.0.1:19000
115+
```
116+
117+
- **`ProxyServer.main`** — listens on `PcapNgTcpServerPacketDumper.DEFAULT_PORT + 1`
118+
(`19001`) on localhost, to avoid clashing with a co-located client:
119+
```bash
120+
wireshark -k -i TCP@127.0.0.1:19001
121+
```
122+
123+
- **Android sample app** — the dumper is *not* started with the VPN; you have to
124+
enable it from the app's UI (the Wireshark/pcap-server toggle, which calls
125+
`startPcapServer()`). Once enabled it listens on the phone's Wi-Fi interface, so
126+
`127.0.0.1` will not work from your computer. Use the **phone's Wi-Fi IP**, and
127+
make sure the phone and the computer running Wireshark are on the **same subnet**
128+
(and that no AP isolation / firewall blocks port `19000`):
129+
```bash
130+
wireshark -k -i TCP@<phone-wifi-ip>:19000 # e.g. TCP@192.168.1.42:19000
131+
```
132+
You can find the phone's Wi-Fi IP under Settings → About phone → Status, or
133+
inside the sample app's UI.

0 commit comments

Comments
 (0)