Compare commits

...

6 Commits

Author SHA1 Message Date
itdoginfo
3ec6cc4d84 0.3.18 2025-02-24 18:07:15 +03:00
itdoginfo
3413af9f94 Merge pull request #51 from itdoginfo/fix/vpn-devices
feat: add section_id parameter to getNetworkInterfaces function
2025-02-24 17:42:30 +03:00
Ivan K
76b5ceae5c feat: add section_id parameter to getNetworkInterfaces function 2025-02-24 17:39:56 +03:00
itdoginfo
99ccd9fbb3 0.3.17 2025-02-24 16:42:35 +03:00
itdoginfo
b82c6eb718 Merge pull request #50 from itdoginfo/fix/many-sni-support
feat: update network interface loading in podkop.js
2025-02-24 16:24:53 +03:00
Ivan K
ccc87d9aa0 feat: update network interface loading in podkop.js 2025-02-24 16:23:05 +03:00
3 changed files with 13 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-podkop
PKG_VERSION:=0.3.16
PKG_VERSION:=0.3.18
PKG_RELEASE:=1
LUCI_TITLE:=LuCI podkop app

View File

@@ -41,10 +41,14 @@ function formatDiagnosticOutput(output) {
.replace(/\r/g, '\n');
}
function getNetworkInterfaces(o) {
function getNetworkInterfaces(o, section_id) {
const excludeInterfaces = ['br-lan', 'eth0', 'eth1', 'wan', 'phy0-ap0', 'phy1-ap0', 'pppoe-wan'];
return network.getDevices().then(devices => {
// Reset the options by creating a new keylist
o.keylist = [];
o.vallist = [];
devices.forEach(device => {
if (device.dev && device.dev.name) {
const deviceName = device.dev.name;
@@ -225,7 +229,11 @@ function createConfigSection(section, map, network) {
o = s.taboption('basic', form.ListValue, 'interface', _('Network Interface'), _('Select network interface for VPN connection'));
o.depends('mode', 'vpn');
o.ucisection = s.section;
getNetworkInterfaces(o);
o.load = function (section_id) {
return getNetworkInterfaces(this, section_id).then(() => {
return this.super('load', section_id);
});
};
o = s.taboption('basic', form.Flag, 'domain_list_enabled', _('Community Lists'));
o.default = '0';
@@ -1043,4 +1051,4 @@ return view.extend({
return map_promise;
}
});
});

View File

@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=podkop
PKG_VERSION:=0.3.16
PKG_VERSION:=0.3.18
PKG_RELEASE:=1
PKG_MAINTAINER:=ITDog <podkop@itdog.info>