{"record":{"id":"4f202b2fddedd090","repo":"XTLS/Xray-core","slug":"outbound-interface-cannot-be-the-tun-interface-4f202b","errorCode":null,"errorMessage":"outbound interface cannot be the TUN interface","messagePattern":"outbound interface cannot be the TUN interface","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/tun/tun_default.go","lineNumber":55,"sourceCode":"\nfunc (t *DefaultTun) newEndpoint() (stack.LinkEndpoint, error) {\n\treturn nil, errors.New(\"Tun is not supported on your platform\")\n}\n\nfunc setinterface(string, string, uintptr, *net.Interface) error {\n\treturn errors.New(\"Tun is not supported on your platform\")\n}\n\nfunc findOutboundInterface(tunIndex int, fixedName string) (*net.Interface, error) {\n\tif fixedName == \"\" {\n\t\treturn nil, errors.New(\"automatic outbound interface selection is not supported on this platform\")\n\t}\n\tiface, err := net.InterfaceByName(fixedName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif iface.Index == tunIndex {\n\t\treturn nil, errors.New(\"outbound interface cannot be the TUN interface\")\n\t}\n\treturn iface, nil\n}\n","sourceCodeStart":37,"sourceCodeEnd":59,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/proxy/tun/tun_default.go#L37-L59","documentation":"Error \"outbound interface cannot be the TUN interface\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at proxy/tun/tun_default.go:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}