feat(ja4ebpf): add multi-interface TC, LPM_TRIE ignore_src, unit tests, and fix bugs
- Add multi-interface TC attachment (default "any" = all UP interfaces) - Add BPF LPM_TRIE map ignored_src for kernel-side CIDR filtering - Add userspace ignore_src filtering for SSL/accept4 path via net.IPNet.Contains() - Add AcceptCache for fd→SessionKey correlation with TTL and Close() - Add 5 test files covering writer, procutil, dispatcher, accept_cache, and cmd - Fix formatTCPOptions infinite loop on EOL (case 0 break→return) - Fix pseudoOrderToShort panic on empty slice (negative cap) - Fix AcceptCache goroutine leak (add done channel + Close()) - Update config.yml.example with interfaces, listen_ports, ignore_src - Rewrite docs/services/ja4ebpf.md (was massively stale: XDP, RingBuffer, etc.) - Fix stale XDP/RingBuffer references in docs/architecture.md, thesis, tls.go Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -48,7 +48,7 @@ func ParseClientHello(payload []byte) (*ClientHello, error) {
|
||||
recordVersion := binary.BigEndian.Uint16(payload[1:3])
|
||||
recordLength := int(binary.BigEndian.Uint16(payload[3:5]))
|
||||
|
||||
// Le XDP capture au maximum MAX_TLS_PAYLOAD (512) octets.
|
||||
// Le programme TC capture au maximum MAX_TLS_PAYLOAD (2048) octets.
|
||||
// Si la taille du record TLS dépasse les données disponibles, on travaille
|
||||
// avec ce qu'on a (le ClientHello est toujours en début de record).
|
||||
available := len(payload) - 5
|
||||
@ -69,7 +69,7 @@ func ParseClientHello(payload []byte) (*ClientHello, error) {
|
||||
|
||||
// Longueur du ClientHello (3 octets big-endian)
|
||||
chLen := int(uint32(hs[1])<<16 | uint32(hs[2])<<8 | uint32(hs[3]))
|
||||
// Tolérance à la troncature XDP : on travaille avec ce qu'on a
|
||||
// Tolérance à la troncature TC : on travaille avec ce qu'on a
|
||||
if chLen > len(hs)-4 {
|
||||
chLen = len(hs) - 4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user