diff options
Diffstat (limited to 'applications/luci-app-travelmate/htdocs')
2 files changed, 25 insertions, 8 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 a8069135a0..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 @@ -321,11 +321,21 @@ return view.extend({ o = s.taboption('general', widgets.NetworkSelect, 'trm_vpnifacelist', _('Limit VPN processing'), _('Limit VPN processing to certain interfaces.')); o.depends('trm_vpn', '1'); - o.unspecified = true; o.multiple = true; 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; @@ -392,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 fcd98fa37f..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); + } } } } @@ -557,7 +566,6 @@ return view.extend({ o.ucisection = 'uplink'; o.ucioption = 'macaddr'; o.nocreate = false; - o.unspecified = true; o.rmempty = true; o.datatype = 'macaddr'; o.cfgvalue = function (section_id) { @@ -699,7 +707,6 @@ return view.extend({ } o = s.taboption('vpn', widgets.NetworkSelect, '_vpniface', _('VPN Interface'), _('The logical vpn network interface like \'wg0\'.')); - o.unspecified = false; o.nocreate = true; o.optional = true; o.modalonly = true; |