mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-08-18 16:00:57 +00:00
52bb26680a
Use AF_PACKET SOCK_DGRAM so Ethernet, TUN, and point-to-point interfaces expose the same IP payload to the BPF filter. Rebuild the synthetic Ethernet envelope expected by fake TCP on receive and strip it before transmitting through the cooked socket. Bind sockets to the selected IP protocol and reject non-initial IPv4 fragments before reading TCP ports. Preserve peer MAC addresses on Ethernet links. Add privileged TUN and veth tests for IPv4/IPv6 receive, send, tuple filtering, and fragment rejection, and enable them in Linux CI. Co-authored-by: KKRainbow <443152178@qq.com> Co-authored-by: Max Sum <4883681+Max-Sum@users.noreply.github.com>