Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gluon-web-cellular: add auth option to GUI #3307

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
15 changes: 15 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,18 @@ 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 "Authentication"
msgstr "Authentifizierung"

msgid "None"
msgstr "Keine"

msgid "PAP"
msgstr ""

msgid "CHAP"
msgstr ""

msgid "Both"
msgstr "Beide"
15 changes: 15 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,18 @@ msgid ""
"You can enable uplink via cellular service. If you decide so, the VPN "
"connection is established using the integrated WWAN modem."
msgstr ""

msgid "Authentication"
msgstr ""

msgid "None"
msgstr ""

msgid "PAP"
msgstr ""

msgid "CHAP"
msgstr ""

msgid "Both"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ 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("Authentication"))
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.default = uci:get('gluon', 'cellular', 'auth') or "none"

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

uci:commit('gluon')
Expand Down