mirror of
https://github.com/lucheng0127/virtuallan.git
synced 2025-09-26 20:51:11 +08:00

For MacOS, it only support tun. If use tun than tap, server should recode ip of each endpoint. And parse ipv4 header from net connection, and forword packet according to ipv4 header dst ip. If dst ip included by vpn cidr cheack the endpoint and forward to it. If dst ip included by vpn cidr but no recode of endpoint, drop it do nothing. If dst ip not included by vpn cidr, send it to server tun interface, it will forword by server according to routes and iptables rules.