4 ms·
As an aside, the tun/tap interface in Linux is a fantastic way to muck around with lower-level networking without getting into the kernel or hardware. Essential
by erjiang 13y ago
As an aside, the tun/tap interface in Linux is a fantastic way to muck around with lower-level networking without getting into the kernel or hardware. Essentially, it creates a virtual network interface, except instead of hardware, data goes to your userspace program. You can then just do a read() to grab packets and do whatever you want with them, using Python, Ruby, or anything other programming language.
I wrote a prototype proxy in Go that can split network traffic over two Internet connections using some hacked-together tun code[0] and everything happens in userspace.
[0] https://github.com/erjiang/tuntuntun https://github.com/erjiang/tuntuntun
- IbJacked 13y agoNeat project, I like the way I say tuntuntun in my head. Your abbreviation of "ttt" makes me think of Technojock's Turbo Toolkit... ya, I'm old :)
- noonespecial 13y agoOpenvpn is the king of all tun/tap applications. A gander at its code is a good way to get a serious look at implementing your own networking with tun/tap interfaces.
- matiasb 13y agoYeah, I'm trying to tunnel TCP packets over Facebook chat[0] (to get some free Internet when using "social media" mobile plans). [0] https://github.com/matiasinsaurralde/facebook-tunnel https://github.com/matiasinsaurralde/facebook-tunnel
- rahimnathwani 13y agoInteresting. Have you tried using a DNS tunnel? It would be similarly slow if it worked over your connection.
- matiasb 13y agoYes, both ICMP and DNS tunnels work on most of the mobile plans here (I'm from Paraguay, South America). We had an interesting experience with the Internet.org campaign, they signed an alliance with the biggest telco (Tigo - Telecel, Millicom International), so all the users are getting free Facebook access. This small project I'm trying to code involves a critique to the Internet.org campaign ("free Internet for poor countries"), Internet != Facebook.