linux - Multi-threaded VPN application - multiple tun/tap interfaces, or? -
i'm developing linux based vpn application. application establishing customized tls based connections multiple destinations. client machines routing traffic linux box running vpn application.
i intend use tun/tap device grab traffic. have substantial load, intent use multi-threaded approach, multiple worker threads handling vpn connections different locations.
my question regarding tun interface side of things. more efficient (or possible), have each worker thread allocate tun interface, use kernel route table route appropriate traffic each tun interface?
or... use master worker thread, pull packets off single tun interface, , distribute packets each worker thread sent off appropriate vpn?
i think second approach lead bottleneck, simpler use multiple interfaces regarding setup.
the first approach, however, avoids passing messages between master thread worker thread, , routing source tun interface automatic.
suggestions?
Comments
Post a Comment