mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
For the openvpn-cloak container, the choice of the transport protocol in the openvpn settings is blocked
This commit is contained in:
@@ -51,9 +51,15 @@ void OpenVpnLogic::updateProtocolPage(const QJsonObject &openvpnConfig, DockerCo
|
||||
set_lineEditSubnetText(openvpnConfig.value(config_key::subnet_address).
|
||||
toString(protocols::openvpn::defaultSubnetAddress));
|
||||
|
||||
QString trasnsport = openvpnConfig.value(config_key::transport_proto).
|
||||
toString(protocols::openvpn::defaultTransportProto);
|
||||
|
||||
QString trasnsport;
|
||||
if (container == DockerContainer::ShadowSocks || container == DockerContainer::Cloak) {
|
||||
trasnsport = "tcp";
|
||||
set_radioButtonUdpEnabled(false);
|
||||
set_radioButtonTcpEnabled(false);
|
||||
} else {
|
||||
trasnsport = openvpnConfig.value(config_key::transport_proto).
|
||||
toString(protocols::openvpn::defaultTransportProto);
|
||||
}
|
||||
set_radioButtonUdpChecked(trasnsport == protocols::openvpn::defaultTransportProto);
|
||||
set_radioButtonTcpChecked(trasnsport != protocols::openvpn::defaultTransportProto);
|
||||
|
||||
@@ -80,12 +86,6 @@ void OpenVpnLogic::updateProtocolPage(const QJsonObject &openvpnConfig, DockerCo
|
||||
toString(protocols::openvpn::defaultAdditionalServerConfig);
|
||||
set_textAreaAdditionalServerConfig(additionalServerConfig);
|
||||
|
||||
if (container == DockerContainer::ShadowSocks) {
|
||||
set_radioButtonUdpEnabled(false);
|
||||
set_radioButtonTcpEnabled(false);
|
||||
set_radioButtonTcpChecked(true);
|
||||
}
|
||||
|
||||
set_lineEditPortText(openvpnConfig.value(config_key::port).
|
||||
toString(protocols::openvpn::defaultPort));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user