Skip to content

Add onboarding architecture doc for knet/icmp interaction#241

Merged
compscidr merged 9 commits intomainfrom
docs/architecture-knet-icmp
Apr 29, 2026
Merged

Add onboarding architecture doc for knet/icmp interaction#241
compscidr merged 9 commits intomainfrom
docs/architecture-knet-icmp

Conversation

@compscidr
Copy link
Copy Markdown
Owner

Summary

  • Adds docs/architecture.md aimed at new contributors onboarding to the repo
  • Includes a data-flow diagram showing one packet round-trip across client/, server/, and core/
  • Calls out which library (knet vs icmp) owns which responsibility, and where each is wired in (KAnonProxy constructor, ProxyServer, ProxyClient, Session.handleExceptionOnRemoteChannel)

Test plan

  • Render docs/architecture.md on GitHub and confirm the ASCII diagram and table display correctly
  • Sanity-check the described touchpoints still match the code (KAnonProxy.kt, ProxyServer.kt, ProxyClient.kt, Session.kt)

🤖 Generated with Claude Code

Documents how the knet (packet parsing/serialization) and icmp (raw
socket pings + ICMP packet types) libraries fit into the four kanonproxy
modules, with a data-flow diagram and a per-module touchpoint summary
to help new contributors orient themselves.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 29, 2026 16:53
The README previously claimed there were four modules but only described
core. Expanded the Modules section to cover server, client, and android
with their entry points, and fixed the broken tests link (the path was
missing the core/ module prefix).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an onboarding-focused architecture document describing how knet parsing/serialization and the icmp library’s ping functionality are integrated across client/, server/, core/, and android.

Changes:

  • Added docs/architecture.md with a packet round-trip ASCII flow diagram across modules.
  • Documented responsibility boundaries between knet (packet structures/serialization) and icmp (platform ICMP echo emission).
  • Listed key wiring/touchpoints (e.g., KAnonProxy, ProxyServer, ProxyClient, Session.handleExceptionOnRemoteChannel).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/architecture.md
Comment thread docs/architecture.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.44%. Comparing base (c2ff959) to head (16f6974).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #241      +/-   ##
============================================
+ Coverage     60.38%   61.44%   +1.06%     
- Complexity      226      231       +5     
============================================
  Files            15       15              
  Lines          2070     2070              
  Branches        315      315              
============================================
+ Hits           1250     1272      +22     
+ Misses          643      626      -17     
+ Partials        177      172       -5     
Flag Coverage Δ
libunittests 61.44% <ø> (+1.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The previous wording implied only ICMP involved outbound sockets, which
is wrong - kanonproxy opens TCP and UDP sockets itself. Reworded to make
clear that ICMP is the exception because it needs privileged raw-socket
access, which is delegated to the icmp library.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a simpler top-level view showing the relationship between the
three repos (knet, icmp, kanonproxy) before the detailed per-module
data-flow diagram, so readers can orient themselves at a glance before
diving into the packet path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds packetdumper as a third external repo alongside knet and icmp in
the high-level diagram, threads its dumpBuffer hooks through the data-
flow diagram for client/ and server/, adds three rows to the library
responsibility table, and notes its wiring in ProxyServer / ProxyClient
/ KAnonVpnService.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GitHub renders Mermaid blocks natively, so the high-level repo diagram
and the per-module data-flow diagram now display as proper graphs
instead of monospace ASCII art. Content is preserved (libraries, types
they expose, dumpBuffer hooks, ICMP delegation, error path through
knet:IcmpFactory).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous pastel fills (#eef, #efe) rendered with washed-out gray
text on GitHub's dark theme, making nodes hard to read. Replaced with
saturated fills (blue for libs/internal nodes, green for kanonproxy
modules, orange for external lib endpoints, gray for I/O endpoints)
and explicit white text via the color: attribute, which works
identically in both light and dark theme.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Puts kanonproxy at the top and reverses the arrows so they read
"kanonproxy uses X", which matches the actual dependency direction.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Restructures the per-module Mermaid diagram so core sits at the top
and server / client sit side-by-side beneath it (wrapped in an
invisible LR subgraph to force horizontal pairing). Edge directions
were flipped accordingly to push core to the top rank in dagre layout;
added a note that arrow direction here describes layout, not data
flow (every edge is bidirectional in practice).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@compscidr compscidr merged commit c03a945 into main Apr 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants