feat(network): integrate nmrs for VPN, airplane mode, and secret agent
Replace cosmic-settings-network-manager-subscription channel-based NetworkManager calls with direct nmrs API calls: - VPN list: nm.list_saved_connections() instead of hand-walking NetworkManagerSettings over D-Bus. - VPN connect/disconnect: nm.connect_vpn_by_uuid / disconnect_vpn_by_uuid. - Forget Wi-Fi: nm.forget(&ssid). - Wi-Fi radio toggle: nm.set_wireless_enabled. - Airplane mode: nm.set_airplane_mode, dropping cosmic-settings-airplane-mode-subscription. - Secret agent: nmrs::agent::SecretAgent registered per-popup, replacing nm-secret-agent-manager. VPN secrets are replied via responder.vpn_secrets(...); the applets own Authenticate flow still drives Wi-Fi password handoff and releases NM with NoSecrets.
This commit is contained in:
parent
65a9e142b5
commit
8d84396e57
3 changed files with 387 additions and 402 deletions
64
Cargo.lock
generated
64
Cargo.lock
generated
|
|
@ -1221,7 +1221,6 @@ dependencies = [
|
|||
"anyhow",
|
||||
"async-fn-stream",
|
||||
"cosmic-dbus-networkmanager",
|
||||
"cosmic-settings-airplane-mode-subscription",
|
||||
"cosmic-settings-network-manager-subscription",
|
||||
"futures",
|
||||
"futures-util",
|
||||
|
|
@ -1229,7 +1228,7 @@ dependencies = [
|
|||
"i18n-embed-fl",
|
||||
"indexmap 2.14.0",
|
||||
"libcosmic",
|
||||
"nm-secret-agent-manager",
|
||||
"nmrs",
|
||||
"rust-embed",
|
||||
"rustc-hash 2.1.2",
|
||||
"secure-string",
|
||||
|
|
@ -1576,18 +1575,6 @@ dependencies = [
|
|||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmic-settings-airplane-mode-subscription"
|
||||
version = "1.0.7"
|
||||
source = "git+https://github.com/pop-os/cosmic-settings#703a934b096b8681b1b8d16d8625118c8073151a"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"iced_futures",
|
||||
"log",
|
||||
"rustix 1.1.4",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmic-settings-config"
|
||||
version = "0.1.0"
|
||||
|
|
@ -2054,7 +2041,7 @@ dependencies = [
|
|||
"libc",
|
||||
"option-ext",
|
||||
"redox_users",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2252,7 +2239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2640,6 +2627,12 @@ version = "0.3.32"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
|
||||
|
||||
[[package]]
|
||||
name = "futures-timer"
|
||||
version = "3.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.32"
|
||||
|
|
@ -3894,7 +3887,7 @@ dependencies = [
|
|||
"portable-atomic",
|
||||
"portable-atomic-util",
|
||||
"serde_core",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4045,7 +4038,7 @@ version = "1.4.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a1886916523694cd6ea3d175f03a1e5010699a2a4cc13696d83d7bea1d80638"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4615,6 +4608,26 @@ dependencies = [
|
|||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nmrs"
|
||||
version = "3.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7e844f47ab7f54da2a16de939f5b52ad6c84b844be68e9338e3d32160ddcd68"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64",
|
||||
"bitflags 2.11.1",
|
||||
"futures",
|
||||
"futures-timer",
|
||||
"log",
|
||||
"serde",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"uuid",
|
||||
"zbus",
|
||||
"zvariant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "7.1.3"
|
||||
|
|
@ -4667,7 +4680,7 @@ version = "0.50.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5857,7 +5870,7 @@ dependencies = [
|
|||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys 0.12.1",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -6091,6 +6104,12 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1_smol"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d"
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.10.9"
|
||||
|
|
@ -6463,7 +6482,7 @@ dependencies = [
|
|||
"getrandom 0.4.2",
|
||||
"once_cell",
|
||||
"rustix 1.1.4",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -7026,6 +7045,7 @@ dependencies = [
|
|||
"getrandom 0.4.2",
|
||||
"js-sys",
|
||||
"serde_core",
|
||||
"sha1_smol",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
|
|
@ -7532,7 +7552,7 @@ version = "0.1.11"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
|
|
@ -26,16 +26,13 @@ tracing-log.workspace = true
|
|||
tracing-subscriber.workspace = true
|
||||
tracing.workspace = true
|
||||
zbus.workspace = true
|
||||
nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings/" }
|
||||
indexmap = "2.13.0"
|
||||
secure-string = "0.3.0"
|
||||
uuid = { version = "1.21.0", features = ["v4"] }
|
||||
nmrs = "3.0"
|
||||
|
||||
|
||||
|
||||
[dependencies.cosmic-settings-network-manager-subscription]
|
||||
git = "https://github.com/pop-os/cosmic-settings/"
|
||||
# path = "../../cosmic-settings/subscriptions/network-manager"
|
||||
|
||||
[dependencies.cosmic-settings-airplane-mode-subscription]
|
||||
git = "https://github.com/pop-os/cosmic-settings/"
|
||||
# path = "../../cosmic-settings/subscriptions/airplane-mode"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue