Premium · Clash documentation

Feature: eBPF Redirect to TUN

Before sending traffic into TUN with eBPF redirect-to-tun on Linux, verify the interface and kernel dependencies. Then check for conflicts with tun.auto-route and Tailscaled and review the available fallback options.

  • eBPF
  • TUN
  • redirect-to-tun
  • auto-route
  • Tailscaled
Premium
On this page

Scope of this historical document

This document preserves historical instructions for original Clash / Clash Premium to help interpret older configurations. References to “Premium only”, unsupported features, or platform limits do not describe current Mihomo capabilities. Do not use them to overwrite your current client configuration or run permission-related commands.

For Mihomo, consult current Mihomo configuration documentation. For the graphical interface, installation, and permissions, follow the documentation for your specific client.

eBPF redirection to TUN intercepts all network traffic on a specified interface and redirects it to a TUN interface. This feature requires kernel support.

WARNING

This feature conflicts with tun.auto-route.

It generally performs better than tun.auto-redir and tun.auto-route, but is less mature than auto-route. Use it with caution.

Configuration

yaml
ebpf:
  redirect-to-tun:
    - eth0

Known issues

  • This feature conflicts with Tailscaled, so use tun.auto-route instead.