update to xray-core 1.8.0, remove xtls support

This commit is contained in:
yuzuki999
2023-03-23 09:08:01 +08:00
parent 5a95dac587
commit afbf67d5b4
8 changed files with 165 additions and 154 deletions

View File

@@ -66,27 +66,16 @@ func buildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s
}
// Set TLS and XTLS settings
if nodeInfo.EnableTls && config.CertConfig.CertMode != "none" {
inbound.StreamSetting.Security = nodeInfo.TLSType
inbound.StreamSetting.Security = "tls"
certFile, keyFile, err := getCertFile(config.CertConfig)
if err != nil {
return nil, err
}
if nodeInfo.TLSType == "tls" {
tlsSettings := &coreConf.TLSConfig{
RejectUnknownSNI: config.CertConfig.RejectUnknownSni,
}
tlsSettings.Certs = append(tlsSettings.Certs, &coreConf.TLSCertConfig{CertFile: certFile, KeyFile: keyFile, OcspStapling: 3600})
inbound.StreamSetting.TLSSettings = tlsSettings
} else if nodeInfo.TLSType == "xtls" {
xtlsSettings := &coreConf.XTLSConfig{
RejectUnknownSNI: config.CertConfig.RejectUnknownSni,
}
xtlsSettings.Certs = append(xtlsSettings.Certs, &coreConf.XTLSCertConfig{
CertFile: certFile,
KeyFile: keyFile,
OcspStapling: 3600})
inbound.StreamSetting.XTLSSettings = xtlsSettings
tlsSettings := &coreConf.TLSConfig{
RejectUnknownSNI: config.CertConfig.RejectUnknownSni,
}
tlsSettings.Certs = append(tlsSettings.Certs, &coreConf.TLSCertConfig{CertFile: certFile, KeyFile: keyFile, OcspStapling: 3600})
inbound.StreamSetting.TLSSettings = tlsSettings
}
// Support ProxyProtocol for any transport protocol
if *inbound.StreamSetting.Network != "tcp" &&