From 19096b36e3f6ad6c298b889ea97aa53f9c218ee5 Mon Sep 17 00:00:00 2001 From: oxpoe Date: Fri, 6 Nov 2026 11:11:19 +0700 Subject: [PATCH] fix(acs): dukung virtual parameters GenieACS Pro - pppoeIP/pppIP/WanIP/IPTR069, pppoeUsername2/PPPoEUser, WlanSSID - lookup PPPoE & tampilan IP/username lebih akurat - versi 0.6.12 --- CHANGELOG.md | 6 ++++++ README.md | 2 +- package.json | 2 +- routes/acsPortal.js | 9 +++++++++ services/customerDeviceService.js | 5 +++++ version.txt | 2 +- 6 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7a60f9..0e7d1c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Format mengikuti [Keep a Changelog](https://keepachangelog.com/) dan [Semantic Versioning](https://semver.org/). +## [0.6.12] — 2026-11-06 — "acs-virtual" + +### Diperbaiki +- Ekstraksi **GenieACS Pro** memakai virtual parameters: `pppoeIP`, `pppIP`, `WanIP`, `IPTR069`, `pppoeUsername2`, `PPPoEUser`, `WlanSSID`. +- Lookup perangkat via PPPoE mencakup variabel virtual tersebut, sehingga IP/username lebih cepat dan akurat tampil di tabel ACS. + ## [0.6.11] — 2026-11-06 — "acs-wifi-modal" ### Ditambahkan diff --git a/README.md b/README.md index 1427193..d1c4e09 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@

Lisensi: ISC - Versi 0.6.11 (acs-wifi-modal) + Versi 0.6.12 (acs-virtual) Node.js >= 20 Docker Demo diff --git a/package.json b/package.json index c54230e..091468f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "open-isp", - "version": "0.6.11", + "version": "0.6.12", "description": "OPEN-ISP \u2014 sistem billing & manajemen ISP open-source (PWA pelanggan, multi-OLT, RADIUS, WhatsApp, QRIS)", "main": "app-customer.js", "scripts": { diff --git a/routes/acsPortal.js b/routes/acsPortal.js index 4a4a9e7..80668b9 100644 --- a/routes/acsPortal.js +++ b/routes/acsPortal.js @@ -492,6 +492,11 @@ function getDeviceParameterValue(device, keys, filterFn) { } function extractPppoeIp(d) { + // Virtual parameters GenieACS (lebih cepat & akurat bila tersedia) + for (const k of ['VirtualParameters.pppoeIP', 'VirtualParameters.pppIP', 'VirtualParameters.WanIP', 'VirtualParameters.IPTR069', 'VirtualParameters.pppoe_ip']) { + const val = getNestedValue(d, k); + if (val && typeof val === 'string' && val.trim() && val !== '-' && val !== '0.0.0.0' && val !== 'N/A') return val.trim(); + } const ip = getDeviceParameterValue(d, PPPOE_IP_KEYS, (matchedPath, value, device) => { if (!value || value === '0.0.0.0' || value === '-') return false; @@ -511,6 +516,10 @@ function extractPppoeIp(d) { } function extractPppoeUser(d) { + for (const k of ['VirtualParameters.pppoeUsername2', 'VirtualParameters.pppoeUsername', 'VirtualParameters.pppUsername', 'VirtualParameters.PPPoEUser', 'VirtualParameters.pppoe_username', 'VirtualParameters.username']) { + const val = getNestedValue(d, k); + if (val && typeof val === 'string' && val.trim() && val !== '-' && val !== 'N/A') return val.trim(); + } const user = getDeviceParameterValue(d, PPPOE_USER_KEYS, (matchedPath, value, device) => { if (!value || value === '-') return false; // Abaikan nilai generik yang bukan user PPPoE pelanggan diff --git a/services/customerDeviceService.js b/services/customerDeviceService.js index 1c86acb..9020ae5 100644 --- a/services/customerDeviceService.js +++ b/services/customerDeviceService.js @@ -160,6 +160,7 @@ const parameterPaths = { 'Device.DeviceInfo.SoftwareVersion' ], ssid: [ + 'VirtualParameters.WlanSSID', 'InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID', 'Device.WiFi.SSID.1.SSID', 'Device.WiFi.SSID.2.SSID' @@ -194,6 +195,8 @@ const parameterPaths = { pppoeIP: [ 'VirtualParameters.pppoeIP', 'VirtualParameters.pppIP', + 'VirtualParameters.WanIP', + 'VirtualParameters.IPTR069', 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ExternalIPAddress', 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress', 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.ExternalIPAddress', @@ -204,8 +207,10 @@ const parameterPaths = { 'Device.IP.Interface.1.IPv4Address.1.IPAddress' ], pppUsername: [ + 'VirtualParameters.pppoeUsername2', 'VirtualParameters.pppoeUsername', 'VirtualParameters.pppUsername', + 'VirtualParameters.PPPoEUser', 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username', 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.2.Username', 'InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.3.Username', diff --git a/version.txt b/version.txt index 8f1a869..e9acb99 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.6.11 \ No newline at end of file +0.6.12 \ No newline at end of file