Commit Graph
26 Commits
Author SHA1 Message Date
Laurence Jones 5977667291 Merge branch 'fosrl:main' into optimize-reverse-nat-lookup 2026-02-22 12:09:01 +00:00
Owen 31d52ad3ff Quiet up HandleIncomingPacket 2025-12-23 10:29:15 -05:00
Owen 5c94789d9a Quiet up logs 2025-12-22 14:31:44 -05:00
Owen 3783a12055 Add fallback to non privileged ping 2025-12-16 17:05:36 -05:00
Owen a9b84c8c09 Disabling icmp ping 2025-12-16 16:30:14 -05:00
Owen 5c5ef4c7e6 Merge branch 'dev' into icmp2 2025-12-16 13:48:00 -05:00
Owen 6e9249e664 Add disable icmp 2025-12-16 13:47:45 -05:00
Owen 55be2a52a5 Handle reply correctly 2025-12-16 12:23:12 -05:00
Owen 058330d41b Icmp2 2025-12-16 12:05:59 -05:00
Laurence 1cf75b00ff perf: optimize reverse NAT lookup with O(1) map instead of O(n) iteration
Replace O(n) linear search through NAT table with O(1) reverse lookup map
for reply packet NAT translation.

Changes:
- Add reverseConnKey type for reverse NAT lookups
- Add reverseNatTable map to ProxyHandler for O(1) lookups
- Populate both forward and reverse maps when creating NAT entries
- Replace iteration-based reverse lookup with direct map access

Performance:
- O(n) → O(1) complexity for reverse NAT lookups
- Eliminates lock-held iteration on every reply packet
- Removes string comparisons from hot path
- Expected 10-50x improvement for reverse NAT lookups

This addresses Critical #1 from performance analysis where reply path
was walking the entire NAT table to find original mapping.
2025-12-16 08:16:37 +00:00
Owen 004bb9b12d Allow proto restriction 2025-12-15 18:37:34 -05:00
Owen 72a9e111dc Localhost working - is this the best way to do it? 2025-12-05 16:33:43 -05:00
Owen 4dbf200cca Change DNS lookup to conntrack 2025-12-04 20:13:48 -05:00
Owen 5dd5a56379 Add caching to the dns requests - is this good enough? 2025-12-03 22:00:23 -05:00
Owen 8c4d6e2e0a Working on more hp 2025-12-03 20:49:46 -05:00
Owen bb95d10e86 Rewriting desitnation works 2025-11-26 14:28:51 -05:00
Owen da04746781 Add rewriteTo 2025-11-25 11:29:41 -05:00
Owen 025c94e586 Export wireguard logger 2025-11-18 14:53:12 -05:00
Owen dbbea6b34c Shift things around - remove native 2025-11-17 13:39:32 -05:00
Owen 491180c6a1 Remove proxy manager and break out subnet proxy 2025-11-15 21:46:32 -05:00
Owen 972c9a9760 UDP WORKING! 2025-11-14 15:30:26 -05:00
Owen 8f7ee2a8dc TCP WORKING! 2025-11-14 15:23:20 -05:00
Owen a737c3e8de REmove readme 2025-11-10 21:37:03 -05:00
Owen 1ba10c1b68 Experiment 2025-11-10 21:33:31 -05:00
Owen 2c8755f346 Using 2 nics not working 2025-11-05 21:46:29 -08:00
Owen 348cac66c8 Bring in netstack locally 2025-11-05 13:39:54 -08:00