@7365admin1/core 3.23.0 → 3.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -182,8 +182,8 @@ flowchart TB
182
182
  flowchart LR
183
183
  VN[Developer / Backend<br/>Vietnam]
184
184
  VPN[Tailscale / Site VPN]
185
- Router[Philippines subnet route<br/>192.168.20.0/24]
186
- HID[HID Reader<br/>192.168.20.123:80]
185
+ Router[Site subnet route<br/>&lt;site-lan-cidr&gt;]
186
+ HID[HID Reader<br/>&lt;hid-reader-lan-ip&gt;:80]
187
187
  API[Deployed iService365 API]
188
188
 
189
189
  VN --> VPN
@@ -453,20 +453,45 @@ Support both because real deployment networks may differ by site.
453
453
 
454
454
  ## Network Notes
455
455
 
456
- The Philippines reader observed during testing:
456
+ The Philippines reader observed during early LAN testing:
457
457
 
458
458
  ```text
459
- IP: 192.168.20.123
460
- Netmask: 255.255.255.0
461
- Gateway: 192.168.20.1
459
+ IP: <hid-reader-lan-ip>
460
+ Netmask: <site-netmask>
461
+ Gateway: <site-gateway-ip>
462
462
  Web Port: 80
463
463
  ```
464
464
 
465
- Remote access from Vietnam requires routing into the Philippines LAN, for example:
465
+ Current OpenVPN lab topology:
466
466
 
467
- - Tailscale subnet route `192.168.20.0/24`
468
- - Site VPN
469
- - A deployed backend that has network access to the reader
467
+ ```text
468
+ OpenVPN server machine: <openvpn-server-lan-ip>
469
+ Router/gateway: <site-gateway-ip>
470
+ Public/DDNS endpoint: <ddns-hostname> -> <public-wan-ip>
471
+ Port forward: UDP 1194 -> <openvpn-server-lan-ip>:1194
472
+ HID Amico LAN IP: <hid-reader-lan-ip>
473
+ HID Amico VPN IP: <hid-reader-vpn-ip>
474
+ Backend reader baseUrl for remote access: http://<hid-reader-vpn-ip>
475
+ ```
476
+
477
+ OpenVPN server requirements:
478
+
479
+ - `client-to-client` must be enabled so external clients or backend services can reach the HID VPN client.
480
+ - Each client should use a unique certificate/common name. Reusing the same client profile will drop the previous session unless `duplicate-cn` is explicitly enabled.
481
+ - The Philippines router must keep DHCP reservation for the OpenVPN server machine and keep UDP `1194` forwarded to that reserved IP.
482
+ - DDNS should point to the current public WAN IP so client profiles do not need to change when the ISP IP changes.
483
+
484
+ Client profile guidance:
485
+
486
+ - HID Amico is on the same LAN as the OpenVPN server, so its `.ovpn` can use `remote <openvpn-server-lan-ip> 1194` if the router does not support NAT loopback.
487
+ - External clients and backend machines should use `remote <ddns-hostname> 1194`.
488
+ - iService365 should store the reader `baseUrl` as the stable VPN address, for example `http://<hid-reader-vpn-ip>`, not the LAN address.
489
+
490
+ Production recommendation:
491
+
492
+ - Prefer running the VPN client on the backend/server side so normal web users do not need VPN setup.
493
+ - Do not expose the reader LAN/VPN endpoint in frontend tables, detail dialogs, test dialogs, or edit dialogs.
494
+ - Add the endpoint only during reader creation or via a controlled backend/admin maintenance path.
470
495
 
471
496
  ## Security Notes
472
497
 
@@ -96,7 +96,7 @@ Body:
96
96
  "site": "{{siteId}}",
97
97
  "name": "Philippines HID Amico",
98
98
  "location": "Lobby",
99
- "baseUrl": "http://192.168.20.123",
99
+ "baseUrl": "http://<hid-reader-vpn-ip>",
100
100
  "username": "<hid username>",
101
101
  "password": "<hid password>",
102
102
  "deviceId": "PH-HID-01",
@@ -117,6 +117,8 @@ Notes:
117
117
  - `password` is encrypted before saving.
118
118
  - Response will not return the password.
119
119
  - Response includes `passwordSet`.
120
+ - `baseUrl` is required when creating a reader. In the current OpenVPN lab, use the HID VPN URL, for example `http://<hid-reader-vpn-ip>`.
121
+ - Normal frontend edit UI should not expose or update `baseUrl`. Treat endpoint changes as a controlled admin/backend maintenance action.
120
122
 
121
123
  ## 4. List Readers
122
124
 
@@ -549,7 +551,7 @@ Use:
549
551
  /api/access-management/hid/readers
550
552
  ```
551
553
 
552
- ### `ECONNREFUSED 127.0.0.1:5001`
554
+ ### `ECONNREFUSED localhost:<api-port>`
553
555
 
554
556
  API-core is not running on port `5001`, or Postman `base_url` is wrong.
555
557
 
@@ -75,6 +75,9 @@ POST /api/access-management/hid/readers/:readerId/sync
75
75
  Design notes:
76
76
 
77
77
  - Do not display saved password value.
78
+ - Do not display saved Base URL / endpoint in the reader table, reader detail, test connection modal, or edit reader modal.
79
+ - Add reader still requires Base URL / IP address because the backend needs a target endpoint for the hardware.
80
+ - Edit reader must omit `baseUrl` from the submitted payload so the saved endpoint cannot be viewed or accidentally changed from normal UI.
78
81
  - Display `passwordSet` as a simple status.
79
82
  - Allow disabling a reader without deleting it.
80
83
  - Show a clear status for connection test: success, failed, last tested.
@@ -352,7 +355,7 @@ Design notes:
352
355
  - HID must be able to reach the backend URL.
353
356
  - `localhost:5001` will not work from the HID reader.
354
357
  - For deployed usage, use the deployed API domain.
355
- - For private-network testing, use VPN/subnet routing.
358
+ - For private-network testing, use VPN/subnet routing. In the current OpenVPN lab, backend/client access should target the reader VPN URL, for example `http://<hid-reader-vpn-ip>`.
356
359
  - Callback is optional if the system relies on pull-based access logs.
357
360
 
358
361
  ## 7. Door / Relay Actions
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@7365admin1/core",
3
3
  "license": "MIT",
4
- "version": "3.23.0",
4
+ "version": "3.24.0",
5
5
  "author": "7365admin1",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",