mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-20 02:00:55 +07:00
fix: reset defaultContainer to AWG when switching to auto mode
This commit is contained in:
@@ -743,6 +743,9 @@ void SubscriptionController::setCurrentProtocol(const QString &serverId, const Q
|
||||
auto apiV2 = m_serversRepository->apiV2Config(serverId);
|
||||
if (apiV2.has_value()) {
|
||||
apiV2->apiConfig.serviceProtocol = protocolName;
|
||||
if (protocolName.isEmpty()) {
|
||||
apiV2->defaultContainer = DockerContainer::Awg;
|
||||
}
|
||||
m_serversRepository->editServer(serverId, apiV2->toJson(),
|
||||
serverConfigUtils::configTypeFromJson(apiV2->toJson()));
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ PageType {
|
||||
enabled: !ConnectionController.isConnected || !ServersModel.isDefaultServerCurrentlyProcessed()
|
||||
|
||||
text: qsTr("Choose automatically")
|
||||
descriptionText: qsTr("AmneziaWG is used by default. If the connection is unstable, the app will switch to VLESS. It won't switch back automatically")
|
||||
descriptionText: qsTr("AmneziaWG is used by default. If the connection is unstable, the app will switch to VLESS. On the next launch, AmneziaWG will be tried again")
|
||||
|
||||
onClicked: function() {
|
||||
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
|
||||
|
||||
Reference in New Issue
Block a user