Connect to enterprise (802.1X) Wi-Fi networks from the network panel

This commit is contained in:
Hugo Sibony
2026-07-21 22:40:18 +09:00
parent 0526ebefcc
commit 840832cfde
2 changed files with 68 additions and 11 deletions
+9
View File
@@ -232,6 +232,14 @@ function isProtected(security, openSecurity) {
return security !== openSecurity
}
var enterpriseConnectScript =
"u=$(uuidgen);" +
" nmcli connection add type wifi con-name \"$1\" ssid \"$1\" connection.uuid \"$u\"" +
" wifi-sec.key-mgmt wpa-eap 802-1x.eap peap 802-1x.phase2-auth mschapv2" +
" 802-1x.identity \"$2\" 802-1x.password \"$3\" 802-1x.auth-timeout 8" +
" && nmcli connection up uuid \"$u\"" +
" || { nmcli connection delete uuid \"$u\" >/dev/null 2>&1; false; }"
function networkFailureReason(reason, reasons) {
var r = reasons || {}
if (reason === r.NoSecrets) return "Passphrase required"
@@ -263,6 +271,7 @@ if (typeof module !== "undefined") {
sortWifiRows: sortWifiRows,
wifiSectionTitle: wifiSectionTitle,
isProtected: isProtected,
enterpriseConnectScript: enterpriseConnectScript,
networkFailureReason: networkFailureReason
}
}