Fix a tunnel crash during DNS resolution

This commit is contained in:
Davide 2024-12-02 18:59:18 +01:00
parent d6ebf4bc18
commit 7611f6f7d2
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
3 changed files with 5 additions and 3 deletions

View File

@ -41,7 +41,7 @@
"kind" : "remoteSourceControl",
"location" : "git@github.com:passepartoutvpn/passepartoutkit-source",
"state" : {
"revision" : "2a2268bb7c6d49586fb403cb50d19de42b323bbb"
"revision" : "cdc7a637ddebdda3dda5c4c4ccd58055eb2ee5d8"
}
},
{

View File

@ -52,7 +52,7 @@ let package = Package(
],
dependencies: [
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", from: "0.12.0"),
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "2a2268bb7c6d49586fb403cb50d19de42b323bbb"),
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "cdc7a637ddebdda3dda5c4c4ccd58055eb2ee5d8"),
// .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"),

View File

@ -38,7 +38,9 @@ extension Registry {
allImplementations: [
OpenVPNModule.Implementation(
prng: SecureRandom(),
dns: CFDNSResolver(),
dns: SimpleDNSResolver {
CFDNSStrategy(hostname: $0)
},
importer: StandardOpenVPNParser(decrypter: OSSLTLSBox()),
sessionBlock: { _, module in
guard let configuration = module.configuration else {