Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-01-24 19:16:16 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-01-24 19:16:16 +0300
commit2dec7f48f5857c86f85270952c7f1593d3bae77b (patch)
tree26542791f79910590d1aaecf95194dc0e311be59
parent04cf250a547bb64265d256e7d15af7cea5ecfa67 (diff)
bug fix - get client ips
-rw-r--r--web/html/xui/client_modal.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html
index ef4e14a1..8071e6b4 100644
--- a/web/html/xui/client_modal.html
+++ b/web/html/xui/client_modal.html
@@ -260,6 +260,23 @@
return generatedEmails;
},
+ async getDBClientIps(email) {
+ const msg = await HttpUtil.post(`/panel/inbound/clientIps/${email}`);
+ if (!msg.success) {
+ document.getElementById("clientIPs").value = msg.obj;
+ return;
+ }
+ let ips = msg.obj;
+ if (typeof ips === 'string' && ips.startsWith('[') && ips.endsWith(']')) {
+ try {
+ ips = JSON.parse(ips);
+ ips = Array.isArray(ips) ? ips.join("\n") : ips;
+ } catch (e) {
+ console.error('Error parsing JSON:', e);
+ }
+ }
+ document.getElementById("clientIPs").value = ips;
+ },
async clearDBClientIps(email) {
try {
const msg = await HttpUtil.post(`/panel/inbound/clearClientIps/${email}`);