SimpleRT icon indicating copy to clipboard operation
SimpleRT copied to clipboard

Drop tun/tap requirement?

Open donaldsycamore opened this issue 9 years ago • 4 comments

Have you considered using the "fake network" code from VDE ( http://wiki.v2.cs.unibo.it/wiki/index.php?title=VDE_Basic_Networking#Slirp:_a_virtual_NAT_router_as_a_process ) as an alternative to requiring TUN/TAP?

donaldsycamore avatar Jul 31 '16 22:07 donaldsycamore

Don't even knew about this feature) Seems interesting. I'll research. Thanks for respond.

vvviperrr avatar Jul 31 '16 22:07 vvviperrr

The long history is that back in dial-up days when some people paid for "dial in to a unix shell", SLIRP was a program you could run that spoke SLIP (forerunner to PPP) via stdin/stdout, and translated everything into BSD socket calls. A bit like a userspace transparent proxy. You send it your network traffic, it terminates the TCP sessions, opens equivalent connections with a socket call and copies bytes between the two.

VDE (and QEMU) have both used this to provide a fake network connection to virtual machines -- in their versions, there's a DHCP server in the Slirp process too. This is what lets you run a VM with network access as non-root.

donaldsycamore avatar Jul 31 '16 22:07 donaldsycamore

i see, a bit like lwip project

vvviperrr avatar Jul 31 '16 22:07 vvviperrr

What's wrong with TUN? We need to be root to create the TUN device but AFAIU it's neeeded to open the USB device anyway.

randomstuff avatar Aug 02 '16 10:08 randomstuff