Skip to content

Commit

Permalink
gluon-web-cellular: add auth option to GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biii committed Jul 6, 2024
1 parent b50007d commit 571b7e4
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package/gluon-core/luasrc/lib/gluon/upgrade/250-cellular
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ local function setup_ncm_qmi(devpath, control_type, delay)
local pincode = uci:get('gluon', 'cellular', 'pin')
local username = uci:get('gluon', 'cellular', 'username')
local password = uci:get('gluon', 'cellular', 'password')
local auth = uci:get('gluon', 'cellular', 'auth')

uci:section('network', 'interface', 'cellular', {
proto = control_type,
Expand All @@ -40,6 +41,7 @@ local function setup_ncm_qmi(devpath, control_type, delay)
set_or_delete('network', 'cellular', 'pincode', pincode)
set_or_delete('network', 'cellular', 'username', username)
set_or_delete('network', 'cellular', 'password', password)
set_or_delete('network', 'cellular', 'auth', auth)
set_or_delete('network', 'cellular', 'delay', delay)
end

Expand Down
21 changes: 21 additions & 0 deletions package/gluon-web-cellular/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,24 @@ msgstr ""
"Du kannst den Uplink über einen Mobilfunk Service aktivieren. Wenn du "
"dich dafür entscheidest, wird die VPN-Verbindung über das integrierte "
"Mobilfunk-Modem hergestellt."

msgid "auth"
msgstr "Authentication"

msgid "auth"
msgstr ""

msgid "none"
msgstr ""

msgid "pap"
msgstr ""

msgid "chap"
msgstr ""

msgid "both"
msgstr ""

msgid "roaming"
msgstr "Roaming"
18 changes: 18 additions & 0 deletions package/gluon-web-cellular/i18n/gluon-web-cellular.pot
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,21 @@ msgid ""
"You can enable uplink via cellular service. If you decide so, the VPN "
"connection is established using the integrated WWAN modem."
msgstr ""

msgid "auth"
msgstr ""

msgid "none"
msgstr ""

msgid "pap"
msgstr ""

msgid "chap"
msgstr ""

msgid "both"
msgstr ""

msgid "roaming"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ local password = s:option(Value, "password", translate("Password"))
password:depends(enabled, true)
password.default = uci:get('gluon', 'cellular', 'password')

local auth = s:option(ListValue, "auth", translate("auth"))
auth:depends(enabled, true)
auth:value("none", translate("none"))
auth:value("pap", translate("pap"))
auth:value("chap", translate("chap"))
auth:value("both", translate("both"))
auth:value("roaming", translate("roaming"))
auth.default = uci:get('gluon', 'cellular', 'auth') or "none"

function f:write()
local cellular_enabled = false
if enabled.data then
Expand All @@ -46,6 +55,7 @@ function f:write()
pin = pin.data,
username = username.data,
password = password.data,
auth = auth.data,
})

uci:commit('gluon')
Expand Down

0 comments on commit 571b7e4

Please sign in to comment.