/snif-tunl

A modular userspace IP tunnel interface

Primary LanguageCGNU General Public License v3.0GPL-3.0

/**************************************************************************
 *     _________
 *    /````````_\                  S N I F ~ e2e TLS trust for IoT
 *   /\     , / O\      ___
 *  | |     | \__|_____/  o\       e2e TLS SNI Forwarder
 *  | |     |  ``/`````\___/       e2e TLS CA Proxy
 *  | |     | . | <"""""""~~
 *  |  \___/ ``  \________/        https://snif.host
 *   \  '''  ``` /````````         (C) 2021 VESvault Corp
 *    \_________/                  Jim Zubov <jz@vesvault.com>
 *
 *
 * GNU General Public License v3
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 **************************************************************************/



A modular userspace IP tunnel interface.
Designed to handle local app-to-app SNIF traffic through a VPN interface on
iOS devices, but can be used as a general purpose tunnel.

Network layer: IPv4 (v4.c)
    IPv6 is not currently implemented, can be added as a separate AF module.
    IP fragmentation is not supported, can be added as a separate module.

Transport: TCP (tcp.c), UDP (udp.c)
    TCP retransmission is not implemented, can be added as a separate module.

TCP listening sockets (sock.c, mgr.c):
    Push mode accept using snifl_accept
    Push mode recv
    snifl_send()
    snifl_shutdown()

App proto: DNS over UDP (dns.c)
    Implements a local DNS resolver that always responds with an A record
    pointing to a predefined IPv4 address. Useful in the content of iOS VPN,
    where the system DNS resolver can be directed to the VPN for a particular
    domain name.

Demo:
    A simple HTTP responder over TUN/TAP on Linux.