secubox-openwrt/package/secubox/luci-app-exposure/htdocs/luci-static/resources/exposure/api.js
CyberMind-FR 4c8799d520 feat(exposure): KISS redesign with enriched service names and vhost integration
Collapse 4-tab UI into single-table view. Enrich scan with real names
from uhttpd UCI, streamlit UCI, docker containers, glances and Lyrion.
Add vhost_list RPCD method to show HAProxy domains and uhttpd instances.
Fix RPC expect unwrapping, trim CSS from 870 to 178 lines.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:15:04 +01:00

67 lines
1.4 KiB
JavaScript

'use strict';
'require baseclass';
'require rpc';
var callScan = rpc.declare({
object: 'luci.exposure',
method: 'scan',
expect: {}
});
var callTorList = rpc.declare({
object: 'luci.exposure',
method: 'tor_list',
expect: {}
});
var callSslList = rpc.declare({
object: 'luci.exposure',
method: 'ssl_list',
expect: {}
});
var callTorAdd = rpc.declare({
object: 'luci.exposure',
method: 'tor_add',
params: ['service', 'local_port', 'onion_port'],
expect: {}
});
var callTorRemove = rpc.declare({
object: 'luci.exposure',
method: 'tor_remove',
params: ['service'],
expect: {}
});
var callSslAdd = rpc.declare({
object: 'luci.exposure',
method: 'ssl_add',
params: ['service', 'domain', 'local_port'],
expect: {}
});
var callSslRemove = rpc.declare({
object: 'luci.exposure',
method: 'ssl_remove',
params: ['service'],
expect: {}
});
var callVhostList = rpc.declare({
object: 'luci.exposure',
method: 'vhost_list',
expect: {}
});
return baseclass.extend({
scan: function() { return callScan(); },
torList: function() { return callTorList(); },
sslList: function() { return callSslList(); },
vhostList: function() { return callVhostList(); },
torAdd: function(s, l, o) { return callTorAdd(s, l, o); },
torRemove: function(s) { return callTorRemove(s); },
sslAdd: function(s, d, p) { return callSslAdd(s, d, p); },
sslRemove: function(s) { return callSslRemove(s); }
});