mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-22 16:42:09 +00:00
parent
b9353a6b02
commit
a04c1072c8
@ -41,8 +41,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "git@github.com:passepartoutvpn/passepartoutkit-source",
|
||||
"state" : {
|
||||
"revision" : "234a709bfd18f5b31fdf0b44f0f09c84f9c76581",
|
||||
"version" : "0.13.0"
|
||||
"revision" : "a08e04fccde51d92d5bed3fbe1880c4225f18618"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -64,8 +64,8 @@ let package = Package(
|
||||
)
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", from: "0.13.0"),
|
||||
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "406712a60faf8208a15c4ffaf286b1c71df7c6d2"),
|
||||
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", from: "0.13.0"),
|
||||
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source", revision: "a08e04fccde51d92d5bed3fbe1880c4225f18618"),
|
||||
// .package(path: "../../passepartoutkit-source"),
|
||||
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", from: "0.13.0"),
|
||||
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit-source-openvpn-openssl", revision: "031863a1cd683962a7dfe68e20b91fa820a1ecce"),
|
||||
|
@ -124,7 +124,8 @@ private extension OnDemandView {
|
||||
Group {
|
||||
if Utils.hasCellularData() {
|
||||
Toggle(Strings.Modules.OnDemand.mobile, isOn: draft.withMobileNetwork)
|
||||
} else if Utils.hasEthernet() {
|
||||
}
|
||||
if Utils.hasEthernet() {
|
||||
Toggle(Strings.Modules.OnDemand.ethernet, isOn: draft.withEthernetNetwork)
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ extension Utils {
|
||||
true
|
||||
}
|
||||
#else
|
||||
// TODO: ###, move this check to kit, and try something similar for Ethernet
|
||||
public static func hasCellularData() -> Bool {
|
||||
var addrs: UnsafeMutablePointer<ifaddrs>?
|
||||
guard getifaddrs(&addrs) == 0 else {
|
||||
@ -57,11 +58,7 @@ extension Utils {
|
||||
#endif
|
||||
|
||||
public static func hasEthernet() -> Bool {
|
||||
#if os(macOS)
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
}
|
||||
|
||||
public static func currentWifiSSID() async -> String? {
|
||||
|
Loading…
Reference in New Issue
Block a user