mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-24 00:18:14 +03:00
feat: add support for outbound JSON configuration in sing-box
This commit is contained in:
@@ -53,23 +53,6 @@ function getNetworkInterfaces(o) {
|
||||
});
|
||||
}
|
||||
|
||||
function getNetworkInterfaces(o) {
|
||||
const excludeInterfaces = ['br-lan', 'eth0', 'eth1', 'wan', 'phy0-ap0', 'phy1-ap0', 'pppoe-wan'];
|
||||
|
||||
return network.getDevices().then(devices => {
|
||||
devices.forEach(device => {
|
||||
if (device.dev && device.dev.name) {
|
||||
const deviceName = device.dev.name;
|
||||
if (!excludeInterfaces.includes(deviceName) && !/^lan\d+$/.test(deviceName)) {
|
||||
o.value(deviceName, deviceName);
|
||||
}
|
||||
}
|
||||
});
|
||||
}).catch(error => {
|
||||
console.error('Failed to get network devices:', error);
|
||||
});
|
||||
}
|
||||
|
||||
// Общая функция для создания конфигурационных секций
|
||||
function createConfigSection(section, map, network) {
|
||||
const s = section;
|
||||
@@ -226,7 +209,6 @@ function createConfigSection(section, map, network) {
|
||||
o.depends('mode', 'vpn');
|
||||
o.ucisection = s.section;
|
||||
getNetworkInterfaces(o);
|
||||
getNetworkInterfaces(o);
|
||||
|
||||
o = s.taboption('basic', form.Flag, 'domain_list_enabled', _('Community Lists'));
|
||||
o.default = '0';
|
||||
|
||||
Reference in New Issue
Block a user