GL.iNet-Yongping.Xie
afd4b19981
fix: prevent nil pointer dereference
...
Fix a nil pointer dereference issue to avoid unexpected crashes.
Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com >
2025-12-09 23:59:41 -08:00
GL.iNet-Yongping.Xie
5f8d8f50ca
fix: preserve device description on reconnect
...
Fix an issue where the device description was unintentionally reset
when a device came online and updated its metadata.
Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com >
2025-12-09 23:32:04 -08:00
GL.iNet-Yongping.Xie
96aa0be17d
fix: preserve device description on reconnect
...
Fix an issue where the device description was unintentionally reset
when a device came online and updated its metadata.
Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com >
2025-12-09 23:25:53 -08: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
16a3e2df10
feat: Supported IP access with domain
...
Supported IP access with domain
Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com >
2025-08-05 23:35:00 -07: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
ClanXie
897bf4d4c9
feat: Add selfhost feature for KVM production
...
Add selfhost feature for KVM production
Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com >
2025-07-23 07:21:07 +00:00
Jianhui Zhao
3842518da9
optimize the terminal login process via websocket close messages.
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-07-16 17:04:49 +08:00
Jianhui Zhao
17599404f8
Add devid into the response of command execution #119
...
```
{"devid":"test","err":1,"msg":"operation not permitted"}
```
```
{"code":0,"devid":"test","stderr":"","stdout":"SGVsbG8sIFJ0dHkK"}
```
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-07-16 17:03:42 +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
a68aa3c921
add support log panic while running in daemon mode.
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-27 16:52:22 +08:00
Jianhui Zhao
6749ca9e46
fix memleak in httpProxyCons
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-26 18:34:34 +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
9a4d81ba71
close device if invalid msg type received.
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-20 16:12:13 +08:00
Jianhui Zhao
84707378e0
perf: improve device heartbeat
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-16 16:03:16 +08:00
Jianhui Zhao
c7592da63f
fix: Ensure the client is only close once
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-16 15:35:46 +08:00
Jianhui Zhao
5cca249873
fix: stop timer while handle register for device
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-16 14:58:55 +08:00
Jianhui Zhao
8644fff049
perf: Optimize the device registration process.
...
Put most of the registration work into the device's
goroutine for processing.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-15 15:37:16 +08:00
Jianhui Zhao
166ef7e991
refactor: parse device messages using TLV.
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-15 15:37:16 +08:00
Jianhui Zhao
0bfce6163a
fix: Fix device message length validation.
...
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
72ef7ee190
feat: add support use heartbeat interval from rtty client.
...
Change-Id: Ia86c1f87e8a72d49df960d3f4bc3d88a1ec7ee44
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-10 16:46:10 +08:00
Jianhui Zhao
a6a9f5934c
chore: more debug log
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-10 10:59:38 +08:00
Jianhui Zhao
b6cbf55760
fix: Fix the device heartbeat detection mechanism
...
Abnormal logs appear in some environments.
```
Inactive device in long time
```
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-06-05 14:47:45 +08:00
Jianhui Zhao
9dfc856b74
fix: Fix potential panic issue
...
```
2025-04-24T06:59:56Z |INFO| New session: 81ee1ed4d12c3048620fbb2168c08257
2025-04-24T07:00:10Z |INFO| Delete session: 81ee1ed4d12c3048620fbb2168c08257
2025-04-24T07:00:17Z |INFO| New session: 427ce01b7f47a7ee8192cefdfa291c8f
2025-04-24T07:00:57Z |INFO| Delete session: 427ce01b7f47a7ee8192cefdfa291c8f
2025-04-24T07:01:55Z |INFO| New session: ffbfd5c596195c2bd43b8c0b6dc3d135
2025-04-24T07:01:57Z |ERRO| websocket: close sent
panic: send on closed channel
goroutine 33 [running]:
main.(*user).WriteMsg(0xc00037e680, 0x2, {0xc000188d10, 0xc, 0xc})
/home/runner/work/rttys/rttys/user.go:52 +0x8b
main.(*broker).run(0xc00035a000)
/home/runner/work/rttys/rttys/broker.go:227 +0xf34
created by main.runRttys in goroutine 1
/home/runner/work/rttys/rttys/main.go:86 +0x595
```
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-04-25 16:03:56 +08:00
Jianhui Zhao
0e4c8acbe0
chore: add more debug log
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2025-01-16 17:07:08 +08:00
Jianhui Zhao
7dd174d096
fix: Fix panic: send on closed channel
...
```
device broker
------------------------------------------------------
dev.br.register <- dev
dev.br.unregister <- dev
handle unregister
c.Close()
handle register
c.WriteMsg(msgTypeRegister, append([]byte{err}, msg...))
dev.send <- append(b, data...)
```
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2024-11-23 20:14:15 +08:00
Jianhui Zhao
b748584696
perf: use os.ReadFile instead of ioutil.ReadFile
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2024-11-22 14:50:29 +08:00
Jianhui Zhao
1193295869
chore: improve variable name
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2022-09-25 16:25:41 +08:00
Jianhui Zhao
87ac722304
fix: panic: send on closed channel
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2022-04-12 17:25:37 +08:00
docooler
4a55679095
perf: force use tls 1.1 #99
2021-12-22 17:12:01 +08:00
Jianhui Zhao
43ed146e44
fix: deadlock caused by sending keepalive frame
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-12-15 08:23:08 +00:00
Jianhui Zhao
0e7632d113
perf: verify message length for msgTypeRegister
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-10-12 06:12:55 +00:00
Jianhui Zhao
79f88f5671
chore: remove redundant code
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-10-12 04:14:21 +00:00
Jianhui Zhao
cc5e8b7896
fix: panic: send on closed channel
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-22 11:58:41 +00:00
Jianhui Zhao
de28788e42
fix: panic: send on closed channel
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-22 05:47:30 +00:00
Jianhui Zhao
342bd9d37e
chore: improve code
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-20 00:00:09 +08:00
Jianhui Zhao
9141dd3ab3
perf: Write file data to local while transferring
...
Before, the download was started after all file data were sent from the device to the browser.
Now, the download starts when the file data begins to transfer.
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-19 03:27:32 +08:00
Jianhui Zhao
6f4b25159c
perf: Use flow control
...
For more details please refer to: https://xtermjs.org/docs/guides/flowcontrol/
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-17 01:39:37 +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
59b1d337da
refactor: Match the protocol version between rtty and rttys
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-15 08:31:47 +00:00
Jianhui Zhao
fa2cbd14b1
refactor: change the login process to improve stability
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-15 06:46:54 +00:00
Jianhui Zhao
f7813ce574
perf: improve write message to device
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-09 15:13:23 +00:00
Jianhui Zhao
2fc4c7796b
chore: improve code
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-08 12:26:20 +00:00
Jianhui Zhao
a0c4f76dcb
perf: disconnect early when an invalid message was received
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-09-08 10:11:58 +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
0c86278ce0
perf: Clarer logs
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-05-24 23:40:57 +08:00
Jianhui Zhao
7c6ec42d66
fix: previous device was removed due to a ID conflict
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-05-23 19:28:41 +08:00
Jianhui Zhao
7bc0542dea
feat: device management
...
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-05-02 19:01:46 +08:00
Jianhui Zhao
d12669a5e1
other: Optimize command line parameter name
...
ssl-devs -> ssl-cacert
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com >
2021-02-19 17:16:45 +08:00