{"record":{"id":"fff65ea3963e340d","repo":"XTLS/Xray-core","slug":"vless-without-tls-or-other-encryption-is-prohibite","errorCode":null,"errorMessage":"vless without TLS or other encryption is prohibited unless the server address is a private IP or domain","messagePattern":"vless without TLS or other encryption is prohibited unless the server address is a private IP or domain","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/xray.go","lineNumber":255,"sourceCode":"\t}\n\tif address.Family().IsIP() {\n\t\treturn !geodata.GetPrivateIPMatcher().Match(address.IP())\n\t}\n\tdomain := strings.TrimSuffix(strings.ToLower(address.Domain()), \".\")\n\treturn !geodata.GetPrivateDomainMatcher().MatchAny(domain)\n}\n\nfunc validateOutboundTransportSecurity(rawConfig interface{}, senderSettings *proxyman.SenderConfig) error {\n\tif senderSettings.StreamSettings != nil && senderSettings.StreamSettings.GetSecurityType() != \"\" {\n\t\treturn nil\n\t}\n\n\tif vlessCfg, ok := rawConfig.(*VLessOutboundConfig); ok {\n\t\tif vlessCfg.Encryption != \"\" && vlessCfg.Encryption != \"none\" {\n\t\t\treturn nil\n\t\t}\n\t\tif requiresTransportSecurity(vlessCfg.Address) {\n\t\t\treturn errors.New(\"vless without TLS or other encryption is prohibited unless the server address is a private IP or domain\")\n\t\t}\n\t}\n\n\tif tjCfg, ok := rawConfig.(*TrojanClientConfig); ok {\n\t\tif requiresTransportSecurity(tjCfg.Address) {\n\t\t\treturn errors.New(\"trojan without TLS is prohibited unless the server address is a private IP or domain\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// Build implements Buildable.\nfunc (c *OutboundDetourConfig) Build() (*core.OutboundHandlerConfig, error) {\n\tsenderSettings := &proxyman.SenderConfig{}\n\tswitch strings.ToLower(c.TargetStrategy) {\n\tcase \"asis\", \"\":\n\t\tsenderSettings.TargetStrategy = internet.DomainStrategy_AS_IS","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/xray.go#L237-L273","documentation":"Error \"vless without TLS or other encryption is prohibited unless the server address is a private IP or domain\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at infra/conf/xray.go:255 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"}