Commit Graph

39 Commits

Author SHA1 Message Date
Patricio Whittingslow 7b17218f26 add http/httphi 2026-07-25 19:14:43 -03:00
Patricio Whittingslow 347cef9ba5 README: update binary benchmark table 2026-07-17 12:03:28 -03:00
Marvin Drees 3c1f0e0281 Handle IA_NA/IA_PD requests and config options in DHCPv6 (#147)
* feat(dhcpv6): handle IA_NA/IA_PD requests and config options

Adds the DHCPv6 client request exchange with IA_NA/IA_PD handling,
reconfigure-renew (RFC 8415), DNS server and domain search options
(RFC 3646) and NTP server suboptions (RFC 5908).

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* fix(dhcpv6): bound server-supplied option counts to prevent OOM

A DHCPv6 server may place arbitrarily many DNS servers, search domains,
NTP entries and delegated prefixes in a single message (RFC 8415). The
client appended every entry into growable slices with no upper bound, so
a malicious or misconfigured server could drive unbounded allocation.

Add a configurable Limits to RequestConfig (with safe defaults) capping
each repeated option. The backing arrays are sized to their caps once in
BeginRequest and reused across resets, so parsing a server message now
performs no allocation and stored entries stay bounded.

Add tests asserting the caps are enforced against a flooded Reply and that
option parsing is allocation-free after BeginRequest.

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

---------

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
2026-07-09 14:12:30 -03:00
Marvin Drees a0a5336108 Add xcurl port and debug flag (#129)
* feat: add xcurl port and debug flag

Update the docs and add new flags to xcurl to aid debugging under an OS
like Linux.

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

* drop debugtcp flag from xcurl again

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>

---------

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
2026-06-22 18:32:50 -03:00
Marvin Drees e0ef681085 feat: add RFC 3927 support (#114)
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
2026-06-18 10:21:25 -03:00
Pat Whittingslow bef2137bad add zero os docs (#126)
* add zero os docs

* mention scheduling
2026-06-18 10:08:49 -03:00
Pat Whittingslow 60098ad8d0 More IPv6 support and race condition fixes (#123)
* changes in preparation of wireguard impl

* suggestions by @MDr164
2026-06-17 15:10:25 -03:00
Marvin Drees 5f8ca45859 feat(x/nts): add NTS support (#88)
Implement NTS (RFC 8915) with KERecord zero-copy frame, PerformKE
(TLS 1.3 + ExportKeyingMaterial), DeriveKeys, and Client state
machine implementing lneto.StackNode. Client handles cookie pool
management, auth body codec with nonce/ciphertext, and two-exchange
NTP flow with UniqueID verification and AEAD authentication.

Add NTS Server wrapping ntp.Server with AEAD verification/sealing,
and HandleKE for server-side NTS Key Exchange over TLS 1.3.

Use internal.LogAttrs for non-allocating structured logging
throughout the NTS client, matching existing conventions.

Generated with LLM assistance.

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
2026-06-15 11:42:10 -03:00
Marvin Drees 856ac373d5 docs: update README to aid Linux debugging (#122)
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
2026-06-15 11:02:49 -03:00
Pat Whittingslow 9fcb7e9b52 Add udp.PacketConn (#112)
* update README table and begin planning udp.PacketConn

* first attempt at packetconn implementation

* add udp.PacketConn to StackAsync and implement SocketNetip iface

* add tests for PacketConn
2026-05-14 12:48:07 -03:00
Pat Whittingslow a2970b923d add ipv6 to xnet.StackAsync (#107)
* add ipv6 to xnet.StackAsync

* dns improvements

* improve DNS workings of StackAsync

* add tentative ICMPv6

* work on prefixes and fix some small bugs, plan UDP/TCP6

* fix bugs in StackAsync and ipv4.Prefix.Contains

* update arpsubtable

* completely remove legacy internet.StackIP for StackIPv4/v6

* ipv4/ipv6 tcp/udp

* add TCP6/UDP6 dialing APIs

* add xnet.Stack6 interface

* more ipv6 integration into StackAsync; various tweaks to lneto and documentation+TODOs

* add stack6 tests

* replace netip.Prefix with ipv4.Prefix where it makes sense
2026-05-13 15:31:18 -03:00
Marvin Drees a430f6c40a remove trailing whitespaces and add support matrix (#102)
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
2026-04-27 13:52:22 -03:00
Pat Whittingslow 363bec6793 fixes for CI (#90) 2026-04-17 15:58:55 -03:00
Patricio Whittingslow 6d0ffcf0ad add extra info to README 2026-04-17 15:42:21 -03:00
Patricio Whittingslow c020795303 add gvisor-mwe and add binary sizes to README 2026-04-17 15:41:17 -03:00
jwetzell 191b8ee4cc fix typo in espradio link (#76) 2026-04-13 17:49:31 -03:00
Patricio Whittingslow 41dffbb074 README update 2026-04-10 16:56:18 -03:00
Patricio Whittingslow 8807272494 documentation improvements to internal/slices.go and README 2026-04-10 12:16:21 -03:00
Patricio Whittingslow abb114fc31 add berkeley minimal working example of lneto 2026-03-25 19:27:04 -03:00
Pat Whittingslow de2e756628 HTTP bugfixes and tests + LLM Policy (#54)
* claude: add http tests+bugfix for parsing first line; incomplete line handling; detect Connection:close

* add more http tests
2026-03-14 20:10:08 -03:00
Patricio Whittingslow fae4552ddb add IP/TCP/HTTP fuzzing and fixes to panics found 2026-02-12 16:25:48 -03:00
Patricio Whittingslow 93ba512671 fix tinygo benchmark to optimize for performance 2026-01-13 11:31:13 -03:00
Patricio Whittingslow df1242ef0e add benchmarks to readme 2026-01-13 11:21:36 -03:00
soypat be194ad7ea remove old examples and update readme 2026-01-08 12:52:51 -03:00
Pat Whittingslow f8166aea05 Fix slow exchanges on linux by adding polling and other improvements (#14)
* add prints to investigate slowness

* add loop sleep for blocking Stack

* add connection close http attribute and detect end of HTML page

* add timeout to bridge read

* examples/xnet: add ntp timestamp to prints and show output in readme

* add polling to http tap interface

* more digits in ntp format

* prevent crashes on non-8 timestamp
2026-01-01 09:35:35 -03:00
Patricio Whittingslow 1554b89a08 StackNode refactor: add offsetToIP argument to Encapsulate 2025-12-19 00:38:28 -03:00
soypat c2995383da add x/xnet experimental package 2025-08-03 11:30:51 -03:00
soypat 9bd906326e solve #4 by adding features and use cases to README 2025-07-19 17:52:42 -03:00
soypat 5cea9727f0 standardise rng for dhcp example 2025-07-01 00:29:11 -03:00
soypat dcc7a95e62 huge tap/bridge overhaul; udp node; dhcp node; DHCP example 2025-06-15 18:01:04 -03:00
soypat 589c9d3013 update README with pcap and fix innaccuracies 2025-06-04 00:14:27 -03:00
soypat c3f0c218f7 add httpraw to readme 2025-05-25 17:01:31 -03:00
soypat e6496d2b07 add readme docs on how to develop 2025-05-14 18:31:08 -03:00
soypat d996040d92 add stringer methods 2025-02-20 23:41:27 -03:00
soypat 0290940e1b fix README 2025-01-14 08:48:18 -03:00
soypat 9abf0c11b9 restructure package, rename module/repo 2025-01-07 11:34:35 -03:00
soypat 8c3492b54b add IPv6, tcp packet, validation, IPProto 2024-12-24 14:02:25 -03:00
soypat 4ea0a782cf first commit 2024-12-23 18:56:52 -03:00
Patricio Whittingslow 53f3296e99 Initial commit 2024-12-23 18:37:48 -03:00