mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-20 02:00:55 +07:00
(6) fixed xtls-rprx-vision→empty
This commit is contained in:
@@ -244,11 +244,7 @@ ErrorCode XrayConfigurator::applyServerSettingsToRemote(const ServerCredentials
|
|||||||
<< "container=" << static_cast<int>(container) << "host=" << credentials.hostName
|
<< "container=" << static_cast<int>(container) << "host=" << credentials.hostName
|
||||||
<< "transport=" << srv.transport << "security=" << srv.security << "port=" << srv.port
|
<< "transport=" << srv.transport << "security=" << srv.security << "port=" << srv.port
|
||||||
<< "appendClient=" << appendNewClient;
|
<< "appendClient=" << appendNewClient;
|
||||||
QString flowValue = srv.flow;
|
const QString flowValue = srv.flow;
|
||||||
if (flowValue.isEmpty() && srv.security == QLatin1String("reality")) {
|
|
||||||
flowValue = QStringLiteral("xtls-rprx-vision");
|
|
||||||
}
|
|
||||||
|
|
||||||
QString realityPublicKey;
|
QString realityPublicKey;
|
||||||
QString realityShortId;
|
QString realityShortId;
|
||||||
if (srv.security == QLatin1String("reality")) {
|
if (srv.security == QLatin1String("reality")) {
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ void XrayConfigModel::updateModel(amnezia::DockerContainer container, const amne
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!m_protocolConfig.serverConfig.isThirdPartyConfig) {
|
if (!m_protocolConfig.serverConfig.isThirdPartyConfig) {
|
||||||
applyDefaultsToServerConfig(m_protocolConfig.serverConfig);
|
applyDefaultsToServerConfig(m_protocolConfig.serverConfig, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_originalProtocolConfig = m_protocolConfig;
|
m_originalProtocolConfig = m_protocolConfig;
|
||||||
@@ -283,7 +283,7 @@ void XrayConfigModel::updateModel(amnezia::DockerContainer container, const amne
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void XrayConfigModel::applyDefaultsToServerConfig(amnezia::XrayServerConfig &config)
|
void XrayConfigModel::applyDefaultsToServerConfig(amnezia::XrayServerConfig &config, bool fillFlowDefault)
|
||||||
{
|
{
|
||||||
if (config.port.isEmpty()) {
|
if (config.port.isEmpty()) {
|
||||||
config.port = protocols::xray::defaultPort;
|
config.port = protocols::xray::defaultPort;
|
||||||
@@ -306,7 +306,7 @@ void XrayConfigModel::applyDefaultsToServerConfig(amnezia::XrayServerConfig &con
|
|||||||
config.security = protocols::xray::defaultSecurity;
|
config.security = protocols::xray::defaultSecurity;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.flow.isEmpty()) {
|
if (fillFlowDefault && config.flow.isEmpty()) {
|
||||||
config.flow = protocols::xray::defaultFlow;
|
config.flow = protocols::xray::defaultFlow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ private:
|
|||||||
amnezia::XrayProtocolConfig m_protocolConfig;
|
amnezia::XrayProtocolConfig m_protocolConfig;
|
||||||
amnezia::XrayProtocolConfig m_originalProtocolConfig;
|
amnezia::XrayProtocolConfig m_originalProtocolConfig;
|
||||||
|
|
||||||
void applyDefaultsToServerConfig(amnezia::XrayServerConfig& config);
|
void applyDefaultsToServerConfig(amnezia::XrayServerConfig& config, bool fillFlowDefault = true);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // XRAYCONFIGMODEL_H
|
#endif // XRAYCONFIGMODEL_H
|
||||||
|
|||||||
Reference in New Issue
Block a user