preserve client IP visibility
Previously, TLS termination was moved to nginx for better separation of concerns.
However, this introduced an issue with the new device IP display feature:
- With nginx reverse proxying, all device connections appear to originate from 127.0.0.1
- The actual device IP addresses were masked by the proxy layer
- This prevented accurate IP-based device identification and reporting
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
- Forward all original HTTP headers plus custom rttys headers:
- X-Rttys-Hook: true
- X-Original-Method: original request method
- X-Original-URL: original request URL
- Hook must return HTTP 200 to allow API access.
This enables external services to validate and control user API access
by receiving the complete original request context through HTTP hooks.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
To solve a major problem: when there are many devices connected,
the broker will blocked in processing messages.
By the way, I've rewritten and reorganized the entire code architecture,
improved performance.
Some new features has been added:
* support device grouping.
* support show device's IP address.
Change-Id: I250e18091be7fd42028c82767b6edef50b3f6d8f
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>