Jianhui Zhao
c90e14a1ac
Reintroduce TLS support for device listener
...
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 >
2025-08-01 13:13:17 +08:00
Jianhui Zhao
d2320dce67
refine user hook URL control for specific API endpoints
...
Move user hook validation to individual endpoints (/connect, /cmd, /web).
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-07-16 20:35:04 +08:00
Jianhui Zhao
a50f99baf8
Improve configuration file documentation and clarity
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-07-14 18:07:04 +08:00
Jianhui Zhao
6c36d6d1c8
Add user hook URL support for API access validation
...
- 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 >
2025-07-14 18:06:58 +08:00
Jianhui Zhao
a0bfc21d11
Refactor the message distribution process
...
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 >
2025-07-07 12:21:36 +08:00
Jianhui Zhao
ff6cbda736
remove unused conf dev-auth-url in rttys.conf
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-07-04 17:17:03 +08:00
Jianhui Zhao
efb4c8a539
Remove built-in TLS support in favor of Nginx termination
...
This commit eliminates the native TLS implementation from rttys.
Going forward, TLS termination will be handled exclusively by
Nginx reverse proxy. Key changes include:
1. Removed all TLS-related configuration options
2. Deleted certificate handling and encryption logic
3. Simplified network stack to plain TCP only
4. Updated documentation to reflect new architecture
Rationale:
- Delegates TLS to specialized reverse proxy (Nginx)
- Improves security through separation of concerns
- Reduces attack surface of rttys core service
- Enables centralized certificate management
- Facilitates future scalability with proxy layer
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-26 15:07:01 +08:00
Jianhui Zhao
a23267dd53
feat: Add option allow-origins
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-15 15:37:16 +08:00
Jianhui Zhao
079c601ea5
refactor: Replace dev-auth-url with dev-hook-url
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-15 15:37:16 +08:00
Jianhui Zhao
ab87db1f7d
refactor: Remove device white list support
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-11 10:37:11 +08:00
Jianhui Zhao
b1e592f1fa
refactor: Remove database support
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-11 09:54:35 +08:00
Jianhui Zhao
6e896cac2b
refactor: Remove multi user support
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-11 09:37:53 +08:00
Jianhui Zhao
a272ad4e80
feat: add support set http-proxy-redir-domain
...
Used for set cookie via nginx proxy.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2024-12-16 11:15:40 +08:00
Jianhui Zhao
41d902dd67
perf: Set the default value of local-auth to true
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2024-12-13 15:16:47 +08:00
Jianhui Zhao
7c760bd057
feat: Add support use own device authentication server
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2024-12-13 11:29:41 +08:00
Fu Jianrong
64cb5a494b
feat: Add functionality to disable new sign up in config file ( #164 )
2024-11-22 13:03:41 +08:00
Fu Jianrong
b7a8f0b831
Separate SSL Configurations for Device and User ( #163 )
...
* feat: Separate SSL configurations for device and web UI
* config: Add configuration template
for web UI SSL
* fix: parse bool
* fix: fix compatibility with old configuration files
* config: update template
2024-11-22 09:14:20 +08:00
Jianhui Zhao
978d87ebc1
feat: support build statically
...
Use `modernc.org/sqlite` implemented in pure go,
so we can building with `CGO_ENABLED=0`.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2022-05-03 00:26:34 +08:00
Jianhui Zhao
e26337f3ea
chore: improve code
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-16 11:53:15 +00:00
Jianhui Zhao
a58a798090
chore: database source default to "sqlite3://rttys.db"
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-15 14:24:47 +00:00
Jianhui Zhao
c4a64067b6
chore: change config comment
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-08 09:36:07 +00:00
jiajian0611
9527ae775c
Adjust the database configuration format of the configuration file to support the selection of MySQL and SQLite3. ( #88 )
...
Signed-off-by: zhou_jiajian <zhou_0611@163.com >
2021-07-29 13:44:01 +08:00
Jianhui Zhao
2124254952
database: use mysql
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-05-02 17:29:37 +08:00
Jianhui Zhao
5ba6a85222
fix: Sample configuration
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-04-27 22:39:24 +08:00
Jianhui Zhao
50126dd78e
feat: auto select an available port for web proxy
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-04-27 22:35:18 +08:00
Jianhui Zhao
2a08cb5a8f
feat: store font size in database
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-02-28 20:30:43 +08:00
Jianhui Zhao
dd3fb3e9a7
feat: support user sign up
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-02-27 22:53:39 +08:00
Jianhui Zhao
5cf85fa4a2
Make the url of web redirect configurable
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-01-17 15:45:02 +08:00
Jianhui Zhao
b159aac0e4
Update rttys.conf
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-01-17 15:25:08 +08:00
Jianhui Zhao
19efd505e2
Support connect devices with no web login required
...
Example:
http://localhost:5913/connect/rtty1
http://localhost:5913/connect/rtty2
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2020-03-17 23:23:04 +08:00
Jianhui Zhao
89e703c554
fontsize: Support staging on server
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2020-02-19 23:23:22 +08:00
Jianhui Zhao
c2decf6ec8
Drop the pwauth
...
Real Cross-Platform.
Avoid exposing system usernames and passwords.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2020-02-10 19:56:39 +08:00
Jianhui Zhao
0c20b5340c
Make the variable names more understand
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2020-02-10 18:24:30 +08:00
Jianhui Zhao
0846fceb99
Do not use websocket for device
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2020-01-30 22:14:34 +08:00
zusicheng
4a3e22b1a7
Support configuring the base URL
2019-10-14 19:32:28 +08:00
Jianhui Zhao
23c0cfc54d
rttys.conf: converter text file format from DOS to Unix
...
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com >
2019-04-27 22:23:42 +08:00
Jianhui Zhao
ee2fd7ea18
Support device authentication
...
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com >
2019-04-25 00:20:06 +08:00
Jianhui Zhao
f26078c121
Code refactoring
...
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com >
2019-01-20 13:55:16 +08:00
Jianhui Zhao
fc4a14c529
Support config file
...
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com >
2019-01-06 00:30:43 +08:00