diff options
author | Dirk Brenken <dev@brenken.org> | 2023-10-24 17:33:37 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2023-10-24 17:33:37 +0200 |
commit | 425bcfcb5285a1e1d3bea2680afbc21030dfd23e (patch) | |
tree | f32c32950faafa7a73405a2feb59465601e8df58 /applications/luci-app-travelmate/htdocs/luci-static/resources | |
parent | 30a8a0dae7039556bbe04862f249eb49380a953b (diff) |
luci-app-travelmate: sync with travelmate 2.1.1
Signed-off-by: Dirk Brenken dev@brenken.org
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-travelmate/htdocs/luci-static/resources')
2 files changed, 25 insertions, 5 deletions
diff --git a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js index 7de69e07a4..6eab177982 100644 --- a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js +++ b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js @@ -325,6 +325,17 @@ return view.extend({ o.nocreate = true; o.rmempty = true; + o = s.taboption('general', form.Value, 'trm_stdvpnservice', _('Standard VPN Service'), _('Standard VPN service which will be automatically added to new STA profiles.')); + o.depends('trm_vpn', '1'); + o.value('wireguard'); + o.value('openvpn'); + o.rmempty = true; + + o = s.taboption('general', widgets.NetworkSelect, 'trm_stdvpniface', _('Standard VPN interface'), _('Standard VPN interface which will be automatically added to new STA profiles.')); + o.depends('trm_vpn', '1'); + o.nocreate = true; + o.rmempty = true; + o = s.taboption('general', form.Flag, 'trm_netcheck', _('Net Error Check'), _('Treat missing internet availability as an error.')); o.depends('trm_captive', '1'); o.default = 0; @@ -391,11 +402,11 @@ return view.extend({ o.rmempty = true; o = s.taboption('additional', form.ListValue, 'trm_useragent', _('User Agent'), _('The selected user agent will be used for connectivity- and captive portal checks.')); - o.value('Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0', 'Firefox (default)'); - o.value('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36', 'Chromium'); - o.value('Mozilla/5.0 (Macintosh; Intel Mac OS X 11_5_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15', 'Safari'); - o.value('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 Edg/92.0.902.55', 'Edge'); - o.value('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 OPR/77.0.4054.277', 'Opera'); + o.value('Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0', 'Firefox (default)'); + o.value('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36', 'Chromium'); + o.value('Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36', 'Safari'); + o.value('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 Edg/118.0.2088.61', 'Edge'); + o.value('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 OPR/103.0.0.0', 'Opera'); o.optional = true; o.rmempty = true; diff --git a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js index 00ff71c8de..0fa5169f5b 100644 --- a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js +++ b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js @@ -70,6 +70,7 @@ function handleSectionsAdd(iface) { w_sections = uci.sections('wireless', 'wifi-iface'); t_sections = uci.sections('travelmate', 'uplink'); + for (var i = 0; i < w_sections.length; i++) { if (w_sections[i].mode !== 'sta' || w_sections[i].network !== iface) { continue; @@ -82,13 +83,21 @@ function handleSectionsAdd(iface) { } } if (match === false) { + var vpn_stdservice = uci.get('travelmate', 'global', 'trm_stdvpnservice'); + var vpn_stdiface = uci.get('travelmate', 'global', 'trm_stdvpniface'); var sid = uci.add('travelmate', 'uplink'); + uci.set('travelmate', sid, 'enabled', '1'); uci.set('travelmate', sid, 'device', w_sections[i].device); uci.set('travelmate', sid, 'ssid', w_sections[i].ssid); uci.set('travelmate', sid, 'bssid', w_sections[i].bssid); uci.set('travelmate', sid, 'con_start_expiry', '0'); uci.set('travelmate', sid, 'con_end_expiry', '0'); + if (vpn_stdservice && vpn_stdiface) { + uci.set('travelmate', sid, 'vpn', '1'); + uci.set('travelmate', sid, 'vpnservice', vpn_stdservice); + uci.set('travelmate', sid, 'vpniface', vpn_stdiface); + } } } } |