XTLS/Xray-core · error

outbound interface cannot be the TUN interface

Error message

outbound interface cannot be the TUN interface

What it means

Error "outbound interface cannot be the TUN interface" thrown in XTLS/Xray-core.

Source

Thrown at proxy/tun/tun_freebsd.go:160

func (t *FreeBSDTun) newEndpoint() (stack.LinkEndpoint, error) {
	return &LinkEndpoint{deviceMTU: t.mtu, device: t}, nil
}

func setinterface(network, address string, fd uintptr, iface *net.Interface) error {
	return nil
}

func findOutboundInterface(tunIndex int, fixedName string) (*net.Interface, error) {
	if fixedName == "" {
		return nil, errors.New("automatic outbound interface selection is not supported on this platform")
	}
	iface, err := net.InterfaceByName(fixedName)
	if err != nil {
		return nil, err
	}
	if iface.Index == tunIndex {
		return nil, errors.New("outbound interface cannot be the TUN interface")
	}
	return iface, nil
}

View on GitHub (pinned to 7d214f8b09)

When it happens

Trigger: Thrown at proxy/tun/tun_freebsd.go:160 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15). Data as JSON: /api/errors/492eed567d438f74. Report an issue: GitHub.