Skip to content

Releases: zhaojh329/rtty

v9.0.4

04 Dec 06:46

Choose a tag to compare

Overview

This release addresses a critical stability issue in the HTTP proxy functionality and improves build system compatibility.

Changes

Bug Fixes

Fixed use-after-free in HTTP connection handling

Issue: A race condition could occur during the HTTP connection establishment phase. If a connection object was freed while an asynchronous connection attempt was in progress, the callback on_connected might access invalid memory, leading to a crash (segmentation fault) or assertion failure in the event loop.

Solution:

  • Introduced a connection state flag (HTTP_CON_FLAG_CONNECTING) to track pending connections.
  • Implemented a deferred deletion mechanism. If a connection is freed while connecting, the actual cleanup is postponed until the connection attempt completes (success or failure), ensuring the event loop watchers are safely stopped.

Improvements

Refactored HTTP connection flags

Change: Replaced the boolean https field in the http_connection structure with a bitmask flags.
Benefit: This change improves code extensibility, allowing for more connection states (like the new connecting state) to be managed efficiently within a single field without increasing memory usage.

Build System

Fix compilation with newer CMake

Change: Updated the minimum required CMake version in CMakeLists.txt.
Reason: Newer versions of CMake have deprecated or removed support for very old CMake versions (< 3.5). This ensures the project builds correctly in modern development environments.

Full Changelog: v9.0.3...v9.0.4


概述

本次发布修复了 HTTP 代理功能中的一个严重稳定性问题,并改进了构建系统的兼容性。

变更内容

错误修复

修复 HTTP 连接处理中的 Use-After-Free 问题

问题描述: 在 HTTP 连接建立阶段可能发生竞态条件。如果在异步连接尝试进行时释放了连接对象,on_connected 回调函数可能会访问无效内存,导致程序崩溃(段错误)或触发事件循环的断言失败。

解决方案:

  • 引入了连接状态标志 (HTTP_CON_FLAG_CONNECTING) 来追踪挂起的连接。
  • 实现了延迟删除机制。如果连接在建立过程中被释放,实际的清理工作会推迟到连接尝试完成(成功或失败)后进行,从而确保能够安全地停止事件循环观察者。

改进

重构 HTTP 连接标志

变更:http_connection 结构体中的 https 布尔字段替换为位掩码 flags
收益: 此更改提高了代码的可扩展性,允许在不增加内存使用的情况下,在一个字段内高效地管理更多的连接状态(如新增的连接中状态)。

构建系统

修复在较新 CMake 版本下的编译问题

变更: 更新了 CMakeLists.txt 中所需的最低 CMake 版本。
原因: 较新版本的 CMake 已经弃用或移除了对非常旧的 CMake 版本(< 3.5)的支持。此更新确保项目能在现代开发环境中正确构建。

完整变更记录: v9.0.3...v9.0.4

v9.0.3

31 Oct 01:41

Choose a tag to compare

Bug Fixes

Fixed auto-reconnect when domain name resolution fails

Issue: When the rtty client encountered a domain name resolution failure (DNS lookup failure), it would not properly trigger the auto-reconnect mechanism. This caused the client to fail permanently instead of retrying the connection.


错误修复

修复域名解析失败时的自动重连功能

问题描述: 当 rtty 客户端遇到域名解析失败(DNS 查询失败)时,无法正确触发自动重连机制。这导致客户端永久性失败,而不是重试连接。

v9.0.2

17 Aug 13:45

Choose a tag to compare

Improvements & Bug Fixes

  • The remote command response is now limited to a maximum of 65536 bytes to prevent buffer overflows and improve stability.
  • Improved HTTP connection termination: now uses zero-length notifications for more reliable and graceful shutdown of HTTP proxy connections.

Full Changelog: v9.0.1...v9.0.2


改进与修复

  • 远程命令响应长度现已限制为最大65536字节,防止缓冲区溢出并提升系统稳定性。
  • 优化HTTP连接关闭流程:采用零长度通知机制,使HTTP代理连接的关闭更加可靠和优雅。

完整变更记录: v9.0.1...v9.0.2

v9.0.1

22 Jul 13:32

Choose a tag to compare

Security Fixes

  • fix #139: Security issue resolved.
  • fix #140: Security issue resolved.

Improvements & Bug Fixes

  • Increase upload file buffer size from 16KB to 63KB for better file transfer performance.
  • Correct typo in error message ("No such filen" → "No such file").
  • Separate file message and file control types for clearer code structure.
  • Simplify file context struct, remove redundant fields.
  • Improve TTY timeout mechanism with ev_timer_again.
  • CI: do not build on release.

Upgrade Notice

This release contains important security and stability fixes. Upgrade is strongly recommended.

Full Changelog: v9.0.0...v9.0.1


安全修复

  • 修复 #139:安全问题已修复。
  • 修复 #140:安全问题已修复。

改进与修复

  • 文件上传缓冲区由16KB提升至63KB,提升大文件传输性能。
  • 修正错误提示中的拼写错误("No such filen" → "No such file")。
  • 文件传输消息类型与控制类型分离,代码结构更清晰。
  • 简化文件传输上下文结构,移除冗余字段。
  • TTY超时机制优化,采用ev_timer_again简化处理。
  • CI流程优化:发布时不再自动构建。

升级提示

本次升级包含重要的安全与稳定性修复,强烈建议所有用户升级。

完整变更记录: v9.0.0...v9.0.1

v9.0.0

07 Jul 01:16

Choose a tag to compare

🎉 Major New Features

Device Grouping Support

  • NEW: Added support for device grouping with new -g/--group option
  • Allows organizing devices into logical groups for better management
  • Groups are included in device registration messages
  • Enables better device organization and filtering capabilities

Configurable Heartbeat Interval

  • NEW: Added ability to configure heartbeat interval using command line option
  • Default heartbeat interval changed to 30 seconds (optimized from previous default)
  • Maximum heartbeat interval limited to 255 seconds for safety
  • Breaking Change: Communication protocol version upgraded to v5

🔧 Performance Improvements

Network and Communication

  • Optimized: Heartbeat processing logic for better efficiency
  • Optimized: Heartbeat response processing mechanism
  • Improved: Reconnection operation handling
  • Enhanced: HTTP proxy read buffer size increased to 63KB for better throughput

Code Quality and Safety

  • Improved: Short options safety with compile-time concatenation
  • Refactored: Message encoding now uses TLV (Type-Length-Value) format
  • Enhanced: Device ID validation with immediate parsing-time checks
  • Simplified: ID and group validation logic

🐛 Bug Fixes

  • Fixed: Issue #132 - Critical bug fix in command processing
  • Improved: Device ID validation rules and help descriptions
  • Enhanced: Argument validation with earlier checking

🔄 Refactoring and Architecture

Protocol Changes

  • Breaking Change: Communication protocol upgraded to version 5
  • Refactored: Messages now encoded using TLV format for better extensibility
  • Simplified: Password no longer required for execute command operations

Code Organization

  • Updated: SSL submodule to latest version
  • Enhanced: Debug logging capabilities
  • Improved: Default log level set to INFO for better debugging experience

⚠️ Breaking Changes

  1. Communication Protocol: Protocol version upgraded to v5

    • Existing rtty servers may need updates to support new clients
    • New heartbeat interval feature requires protocol v5
  2. Default Settings:

    • Default heartbeat interval changed to 30 seconds
    • Default log level changed to INFO

🚀 Upgrade Guide

  1. If using custom heartbeat settings, review the new -i option
  2. Consider using the new device grouping feature with -g option
  3. Update server-side rttys to support protocol v5
  4. Review log output as default level is now INFO

Full Changelog: v8.1.5...v9.0.0

This release represents significant improvements in device management, performance optimization, and protocol enhancements. Users are encouraged to upgrade for better functionality and performance.

v8.1.5

22 May 07:05

Choose a tag to compare

Features

Bug Fixes

v8.1.4

14 May 10:42

Choose a tag to compare

Features

Bug Fixes

Continuous Integration

v8.1.3

22 Nov 07:58

Choose a tag to compare

Features

Bug Fixes

Performance Improvements

v8.1.2

04 May 12:29

Choose a tag to compare

Features

Bug Fixes

  • Add compatibility with Mbed TLS 3.0.0 (Jianhui Zhao)
  • Support POSIX basename() from musl libc (#123) (Hauke Mehrtens) #123

v8.1.1

20 Feb 12:49

Choose a tag to compare

Features

  • support ip6 address (#111) (leen)