Allow creation of OpenVPN provider module (#755)
Behind paywall as per #712 Fixes #712
This commit is contained in:
parent
bf3c50c348
commit
5fcb710d5e
|
@ -41,7 +41,7 @@
|
|||
"kind" : "remoteSourceControl",
|
||||
"location" : "git@github.com:passepartoutvpn/passepartoutkit-source",
|
||||
"state" : {
|
||||
"revision" : "a0cb540f739c58d04756d15b9a7bb21fae52c95f"
|
||||
"revision" : "4fffdbde18ddaa5ab0fdfa9ee417a0f5015f59c6"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ let package = Package(
|
|||
],
|
||||
dependencies: [
|
||||
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", from: "0.9.0"),
|
||||
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "a0cb540f739c58d04756d15b9a7bb21fae52c95f"),
|
||||
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "4fffdbde18ddaa5ab0fdfa9ee417a0f5015f59c6"),
|
||||
// .package(path: "../../../passepartoutkit-source"),
|
||||
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", from: "0.9.1"),
|
||||
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", revision: "031863a1cd683962a7dfe68e20b91fa820a1ecce"),
|
||||
|
|
|
@ -115,7 +115,6 @@ private extension AppContext {
|
|||
try await tunnel.disconnect()
|
||||
return
|
||||
}
|
||||
// FIXME: #379, reconnect in some scenarios, e.g. changing provider server
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,8 @@ extension ProfileEditor {
|
|||
.allCases
|
||||
.filter {
|
||||
// TODO: #657, hide manual OpenVPN/WireGuard until editable
|
||||
$0 != .openVPN && $0 != .wireGuard
|
||||
// $0 != .openVPN && $0 != .wireGuard
|
||||
$0 != .wireGuard
|
||||
}
|
||||
.filter {
|
||||
!moduleTypes.contains($0)
|
||||
|
|
|
@ -69,7 +69,7 @@ private extension OpenVPNView {
|
|||
|
||||
@ViewBuilder
|
||||
var contentView: some View {
|
||||
if isServerPushed {
|
||||
if isServerPushed || draft.wrappedValue.configurationBuilder != nil {
|
||||
manualView
|
||||
} else {
|
||||
manualView
|
||||
|
@ -81,7 +81,7 @@ private extension OpenVPNView {
|
|||
VPNProviderContentModifier(
|
||||
providerId: providerId,
|
||||
selectedEntity: providerEntity,
|
||||
isRequired: draft.wrappedValue.configurationBuilder == nil,
|
||||
isRequired: true,
|
||||
entityDestination: Subroute.providerServer,
|
||||
providerRows: {
|
||||
moduleGroup(for: providerAccountRows)
|
||||
|
|
|
@ -112,7 +112,10 @@ private extension ProfileCoordinator {
|
|||
case .ip:
|
||||
paywallReason = iapManager.paywallReason(forFeature: .routing)
|
||||
|
||||
case .onDemand, .openVPN, .wireGuard:
|
||||
case .openVPN, .wireGuard:
|
||||
paywallReason = iapManager.paywallReason(forFeature: .providers)
|
||||
|
||||
case .onDemand:
|
||||
break
|
||||
}
|
||||
guard paywallReason == nil else {
|
||||
|
|
|
@ -78,8 +78,10 @@ extension ProfileEditorTests {
|
|||
XCTAssertFalse(moduleTypes.contains(.ip))
|
||||
XCTAssertTrue(moduleTypes.contains(.onDemand))
|
||||
|
||||
// provider only
|
||||
XCTAssertTrue(moduleTypes.contains(.openVPN))
|
||||
|
||||
// until editable
|
||||
XCTAssertFalse(moduleTypes.contains(.openVPN))
|
||||
XCTAssertFalse(moduleTypes.contains(.wireGuard))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue