Native tunnel mode creates a real network interface (e.g., tun0 on Linux or usque on Windows) and injects traffic directly into the kernel's network stack. This is one of the fastest modes and supports Layer 3 (IP) traffic.
Requirements:
- Linux: Requires the
TUN device module (tun.ko) and iproute2. Usually requires sudo privileges. - Windows: Requires
wintun.dll to be present in the same directory as usque.exe. Usually requires administrative privileges.
Important: usque does not set system routes automatically. You must manually add routes to direct traffic through the tunnel interface.
Example (Linux):
To route all traffic through tun0 (assuming eth0 is your physical interface and 192.168.1.1 is your gateway):
- Route the tunnel endpoint (found in
config.json as endpoint_v4) through your physical interface:
sudo ip route add 162.159.198.1/32 via 192.168.1.1 dev eth0 - Add default routes for the tunnel:
sudo ip route add default dev tun0 && sudo ip -6 route add default dev tun0
$ sudo ./usque nativetun
# Testing the interface
$ ping -I tun0 1.1
$ curl --interface tun0 https://cloudflare.com/cdn-cgi/trace