34 Commits

Author SHA1 Message Date
GL.iNet-Yongping.Xie f49525ee9c feat: add personal center with TOTP 2FA and trusted devices
- Personal Center page with profile editing and last-login info
- TOTP-based two-factor authentication with QR code setup
- 30-day trusted-device cookie to skip 2FA on familiar browsers
- Friendly browser/OS labels for the trusted device list

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2026-04-06 21:17:44 -07:00
GL.iNet-Yongping.Xie 0d1d2b0adf feat: add device online/offline status management
1. Add support for device online and offline status detection based on in-memory connections.
2. Enhance the device list to support updating and displaying device descriptions for easier management.

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2025-12-09 02:24:13 -08:00
GL.iNet-Yongping.Xie 1ab54dae68 feat: add token signature verification logic
1. Implemented token signature verification to ensure the integrity and
   authenticity of tokens before processing authentication requests.

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2025-11-12 18:51:34 -08:00
GL.iNet-Yongping.Xie a31607ad09 feat: add support for custom OIDC login flow
Added support for a customizable OIDC login flow. Verified successful authentication using Google as the OIDC provider.

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2025-11-12 01:54:04 -08:00
GL.iNet-Yongping.Xie b29ca0c117 doc: update Chinese and English README for LDAP login
1. Updated both Chinese and English README files to document LDAP login
   support.

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2025-09-30 04:12:49 -07:00
Jon Agramonte 5e16e10e9a feat: add optional LDAP authentication support
- Introduced LDAP authentication configuration options in the README and Docker Compose files.
- Updated API to handle dual authentication methods (LDAP and legacy).
- Implemented LDAP authentication logic in a new ldap.go file.
- Enhanced user login flow to support username and password for LDAP.
- Added error handling for authorization and authentication failures.
- Updated UI to include username input when LDAP is enabled and provide authentication options.
- Added localization for new authentication messages in English and Chinese.
2025-09-29 09:59:14 -04:00
ClanXie 480844bfbc feat: build rtty docker images
build rtty docker images

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2025-07-25 09:21:18 +00: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 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 87a8e877f2 feat: update cli to github.com/urfave/cli/v3
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2025-06-17 22:39:17 +08:00
Jianhui Zhao 8f2cf21dfb fix: Fix func GenUniqueID
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2025-06-17 22:39:17 +08:00
Jianhui Zhao 3f41e57b66 feat: update some go packages
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2025-06-16 18:30:29 +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 41723aca41 perf: Optimize HTTP session management
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2025-06-15 15:37:16 +08:00
Jianhui Zhao f80ae5c7eb feat: update all packages to latest
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2025-06-15 15:37:16 +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 391096e7ae feat: Update all golang dependencies.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2025-01-16 12:25:49 +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 187b9e36ad chore: update all go modules to latest
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-09-08 11:52:41 +00:00
Jianhui Zhao 1541bdc9e6 chore: use go 1.17
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-09-08 11:43:42 +00:00
Jianhui Zhao c857cc305b chore: rename go module to rttys
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-09-08 10:33:47 +00:00
dependabot[bot] d5067096e8 build(deps): bump github.com/gin-gonic/gin from 1.5.0 to 1.7.0 (#89)
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.5.0 to 1.7.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.5.0...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-29 13:45:19 +08: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 dd3fb3e9a7 feat: support user sign up
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-02-27 22:53:39 +08:00
Jianhui Zhao d3c4e05041 feat: use go:embed from go1.16
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-02-20 23:02:11 +08:00
Jianhui Zhao 31d7e0920a refactor
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2021-01-26 22:50:39 +08:00
Jianhui Zhao ac1c527237 web: use gin
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-03-13 00:24:56 +08:00
Jianhui Zhao f3ea08ee15 go mod: Update to go1.14
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-02-27 18:08:42 +08:00
Jianhui Zhao 71a1d5bd2c Use zerolog
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2020-02-12 11:39:45 +08:00
Jianhui Zhao 93a354f8be mod: update
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2019-11-02 22:16:20 +08:00
Jianhui Zhao b900169f52 Update mod
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2019-09-05 17:13:42 +08:00
Jianhui Zhao d75ef1bf32 Log to /var/log/rttys.log when stdout is a terminal
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2019-04-27 22:22:20 +08:00
Jianhui Zhao c9dc202e32 use go mod
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
2019-04-26 23:45:30 +08:00