mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
added protocol settings page and openvpn settings page
This commit is contained in:
@@ -20,6 +20,7 @@ ListView {
|
||||
height: menuContent.contentItem.height
|
||||
|
||||
clip: true
|
||||
interactive: false
|
||||
|
||||
ButtonGroup {
|
||||
id: containersRadioButtonGroup
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../../Controls2"
|
||||
import "../../Controls2/TextTypes"
|
||||
import "../../Components"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
|
||||
spacing: 16
|
||||
|
||||
Header2TextType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: "OpenVpn"
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
headerText: qsTr("VPN Addresses Subnet")
|
||||
}
|
||||
|
||||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Network protocol")
|
||||
}
|
||||
|
||||
TransportProtoSelector {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
headerText: qsTr("Port")
|
||||
}
|
||||
|
||||
SwitcherType {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Auto-negotiate encryption")
|
||||
}
|
||||
|
||||
DropDownType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
}
|
||||
|
||||
DropDownType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
}
|
||||
|
||||
CheckBoxType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("TLS auth")
|
||||
}
|
||||
|
||||
CheckBoxType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Block DNS requests outside of VPN")
|
||||
}
|
||||
|
||||
SwitcherType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Additional configuration commands")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ ListView {
|
||||
height: root.contentItem.height
|
||||
|
||||
clip: true
|
||||
interactive: false
|
||||
|
||||
ButtonGroup {
|
||||
id: containersRadioButtonGroup
|
||||
@@ -89,8 +90,7 @@ ListView {
|
||||
|
||||
onClicked: {
|
||||
if (isInstalled) {
|
||||
// isDefault = true
|
||||
// root.currentIndex = index
|
||||
goToPage(PageEnum.PageSettingsServerProtocol)
|
||||
} else {
|
||||
ContainersModel.setCurrentlyInstalledContainerIndex(root.model.mapToSource(index))
|
||||
InstallController.setShouldCreateServer(false)
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property var rootWidth: root.width
|
||||
property int currentIndex
|
||||
|
||||
property alias mouseArea: transportProtoButtonMouseArea
|
||||
|
||||
implicitWidth: transportProtoButtonGroup.implicitWidth
|
||||
implicitHeight: transportProtoButtonGroup.implicitHeight
|
||||
|
||||
color: "#1C1D21"
|
||||
radius: 16
|
||||
|
||||
RowLayout {
|
||||
id: transportProtoButtonGroup
|
||||
|
||||
spacing: 0
|
||||
|
||||
HorizontalRadioButton {
|
||||
checked: root.currentIndex === 0
|
||||
|
||||
implicitWidth: (rootWidth - 32) / 2
|
||||
text: "UDP"
|
||||
|
||||
hoverEnabled: !transportProtoButtonMouseArea.enabled
|
||||
|
||||
onClicked: {
|
||||
root.currentIndex = 0
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalRadioButton {
|
||||
checked: root.currentIndex === 1
|
||||
|
||||
implicitWidth: (rootWidth - 32) / 2
|
||||
text: "TCP"
|
||||
|
||||
hoverEnabled: !transportProtoButtonMouseArea.enabled
|
||||
|
||||
onClicked: {
|
||||
root.currentIndex = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: transportProtoButtonMouseArea
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user