- Introduce pooled tunnel sessions (TunnelID/DataConnect) on client/server
- Proxy HTTP/HTTPS via raw HTTP over yamux streams; pipe TCP streams directly
- Move UI/stats into internal/shared; refactor CLI tunnel helpers; drop msgpack/hpack legacy
A new FlowControl frame type has been added for backpressure control between the client and server, and SafeFrame has been introduced.
Frame resource management has been encapsulated to ensure that frame data is correctly returned to the memory pool after use. The frame processing logic has also been optimized.
The way frame.Release() is called improves code security and maintainability.
feat(client): Implements queue pressure monitoring and flow control signal sending functions.
Add the `monitorQueuePressure` method to periodically check the length of the `dataFrameQueue`, and trigger an alarm when the queue usage exceeds a threshold.
Automatically send flow control commands to the server to pause or resume writing, preventing data backlog and connection interruptions caused by slow consumption speed.
feat(server): Supports receiving and responding to flow control requests from clients.
The `handleFlowControl` and `sendWithBackpressure` methods have been added to enable backpressure control of received data frames on the server side.
By blocking the sending process using a condition variable until the client releases the pause state, connection stability is ensured under high load.
refactor(client): Reduces redundant resource release operations during frame processing.
Use SafeFrame to manage frame lifecycles uniformly, replacing manual frame.Release() with defer sf.Close() in multiple frame handlers.
This avoids the risk of memory leaks caused by unreleased abnormal paths.
perf(client): Shorten the shutdown timeout to speed up resource reclamation.
The forced shutdown wait time in the tunnel runner and connector has been adjusted from 5 seconds and 3 seconds to 2 seconds to improve the program exit response speed.
- Adjust the delayed formatting function to prioritize checking if the delay is 0 to avoid displaying errors.
- When the delay is less than 1 millisecond, it is displayed in microseconds to improve the precision of the expression.
feat (constants): Shorten heart rate intervals and timeouts to improve response speed.
- Adjust HeartbeatInterval from 5 seconds to 2 seconds
- Adjust HeartbeatTimeout from 15 seconds to 6 seconds
- Improve the sensitivity of heartbeat detection between the client and the server
A new recovery package has been added, containing Recoverer and PanicMetrics, for capturing panics in goroutines.
It records stack trace information and provides statistical metrics. This mechanism is also integrated into the TCP connector and listener.
Enhance service stability and observability.
- Add runtime performance optimization configurations to main.go, including setting GOMAXPROCS, adjusting GC frequency, and memory limits.
- Implement a worker pool-based data frame processing mechanism in connector.go to improve processing capabilities under high concurrency.
- Adjust frame writer configuration to improve batch write efficiency and enable adaptive refresh strategy.
- Add callback handling support for write errors to enhance connection stability.
refactor(server): Introduce an adaptive buffer pool to optimize memory usage
- Add adaptive_buffer_pool.go to implement large and small buffer reuse, reducing memory allocation overhead.
- Apply buffer pool management for large/medium temporary buffers in proxy handlers and TCP connections.
- Change the HTTP response writer to a cached bufio.Writer to improve I/O performance.
- Optimize HTTP request reading logic and response sending process.
build(docker): Update mount paths and remove unused named volumes
- Modify the data directory mount method in docker-compose.release.yml. ./data:/app/data
- Remove the unnecessary drip-data named volume definition
test(script): Add performance testing and profiling scripts
- Add profile-test.sh script for automating stress testing and performance data collection
- Supports collecting pprof data such as CPU, stack traces, and coroutines and generating analysis reports
Redundant comments have been removed from the `WriteFrame` and heartbeat control methods, and logic for releasing unprocessed frames in the queue has been added to the `Close` method to ensure proper resource reclamation. Some unnecessary channel signal comments have also been removed, making the code more concise and clear.
Added the `--short` flag to the `version` command for printing version information without styles.
In this mode, only the version, Git commit hash, and build time in plain text format will be output, facilitating script parsing.
Optimized Windows process detection logic to improve runtime accuracy.
Removed redundant comments and simplified signal checking methods, making the code clearer and easier to maintain.
refactor(protocol): Replaced string matching of data frame types with enumeration types.
Unified the representation of data frame types in the protocol, using the `DataType` enumeration to improve performance and readability.
Introduced a pooled buffer mechanism to improve memory efficiency in high-load scenarios.
refactor(ui): Adjusted style definitions, removing hard-coded color values.
Removed fixed color settings from some lipgloss styles, providing flexibility for future theme customization.
``` docs(install): Improved the version extraction function in the installation script.
Added the `get_version_from_binary` function to enhance version identification capabilities, prioritizing plain mode output, ensuring accurate version number acquisition for the drip client or server across different terminal environments.
perf(tcp): Improved TCP processing performance and connection management capabilities.
Adjusted HTTP client transmission parameter configuration, increasing the maximum number of idle connections to accommodate higher concurrent requests.
Improved error handling logic, adding special checks for common cases such as closing network connections to avoid log pollution.
chore(writer): Expanded the FrameWriter queue length to improve batch write stability.
Increased the FrameWriter queue size from 1024 to 2048, and released pooled resources after flushing, better handling sudden traffic spikes and reducing memory usage fluctuations.
Added a heartbeatControl channel to support dynamic start/stop of the heartbeat function and optimized related resource management logic,
ensuring that the heartbeat ticker can be correctly stopped and rebuilt. Also adjusted the field initialization order to ensure concurrency safety.
fix(ui): Improved the tunnel connection status display style
Updated the URL line display content, added the "(forwarded link)" prompt text; adjusted the style layout of the local forwarding address and prompt information,
making the interface clearer and easier to read.
- Optimized terminal output style and configuration management using libraries such as `lipgloss` and `go-json`
- Introduced the `ui` package to unify the display logic of colors, tables, and prompts
- Updated the README document structure and installation script links to improve readability and internationalization support
- Improved the interaction flow and log display effects of the daemon startup and attach commands
- Fixed some command parameter parsing issues, improving program robustness and user onboarding experience