{"record":{"id":"8cc61929d09ac3a6","repo":"XTLS/Xray-core","slug":"outbound-interface-cannot-be-the-tun-interface","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_android.go","lineNumber":94,"sourceCode":"\t\tMTU:               t.options.MTU,\n\t\tRXChecksumOffload: true,\n\t})\n}\n\nfunc setinterface(network, address string, fd uintptr, iface *net.Interface) error {\n\treturn unix.BindToDevice(int(fd), iface.Name)\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":76,"sourceCodeEnd":98,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/proxy/tun/tun_android.go#L76-L98","documentation":"Error \"outbound interface cannot be the TUN interface\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at proxy/tun/tun_android.go:94 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-15T22:17:37.221Z"}