Commit Graph

32 Commits

Author SHA1 Message Date
Gouryella
1a5ffce15c refactor(buffer): Optimizes TCP and HTTP streaming request processing using a buffer pool.
Replaces the fixed-size buffers in `FrameHandler` and `Handler` with dynamic buffers obtained from the buffer pool,

to reduce memory allocation and improve performance. Also updates the logo path in the README to match the new resource directory structure.
2025-12-08 12:53:56 +08:00
Gouryella
7283180e6a perf(client): Optimize client performance and introduce a data frame processing worker pool
- 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
v0.4.0-alpha
2025-12-08 12:24:42 +08:00
Gouryella
9e8b3b001d build(github): update sigstore version v0.3.2 2025-12-07 13:54:23 +08:00
Gouryella
492ed3da9c Merge pull request #5 from Gouryella/fix/stop-laggy-stream
feat(client): Implements a response cancellation mechanism to improve…
2025-12-07 13:51:26 +08:00
Gouryella
faa53400f5 feat(docker): Refactored the Docker build and release process and added support for image signing. 2025-12-07 11:21:21 +08:00
Gouryella
0fee9569d2 ci(docker): Removes Docker Hub login and image push configuration
The Docker Hub login step and image push configuration have been removed from the GitHub Actions workflow,

retaining only the push logic for the GitHub Container Registry. This simplifies the CI process and avoids

unnecessary Docker Hub-related operations.
2025-12-07 00:14:33 +08:00
Gouryella
b5629a1cf7 docs(readme): Updated badge display to use div tags
Replaced the original `<p>` tags with `<div>` tags for better alignment and layout control,

while maintaining content centering. This change applies to the README.md and README_CN.md files.
2025-12-06 23:59:58 +08:00
Gouryella
bbef7efb5e feat(client): Implements a response cancellation mechanism to improve resource management
Added support for HTTP response context cancellation, including logic for registering, triggering, and cleaning up cancellation functions.

Introduced a responseCancels mapping and corresponding synchronization lock in FrameHandler to track and control the request lifecycle.

When the data frame type is closed, actively called cancelResponse to release related resources.

Simultaneously, during the response body reading process, identified context cancellation or timeout errors and prematurely terminated the processing flow to avoid invalid operations.
v0.3.2-alpha
2025-12-06 23:58:31 +08:00
Gouryella
47ac5c7c22 Merge pull request #4 from Gouryella/fix/windows-daemon
Fix/windows daemon
v0.3.1
2025-12-06 23:23:11 +08:00
Gouryella
133a3892af fix: smooth table layout for Windows CLI 2025-12-06 23:04:49 +08:00
Gouryella
dface89e78 Documents (Readme): Updated installation instructions and merged client and server installation scripts
- Changed the previous separate client and server installation method to a unified entry point, distinguished by the `--client` or `--server` parameters.
- Provided examples of non-interactive installation commands.

- Synchronized the installation guidance in the English and Chinese README documents.

- Removed the separate `install-server.sh` script content display, as it has been integrated into the new `install.sh` script.
2025-12-06 22:18:35 +08:00
Gouryella
522c092d8d feat(install-scripts): Enhanced installation script functionality and added uninstallation support
- Added panel printing functions (print_panel, print_subheader) to install-server.sh and install.sh,

for improved interface display.

- Introduced the ensure_command_access function to automatically link the drip command to system paths (e.g., /usr/local/bin),

improving command availability.

- Added complete uninstallation logic: Added uninstall.sh script, supporting client-side, server-side, or both uninstallation.

- install.sh supports triggering the uninstallation process with the --uninstall parameter and enhanced PATH cleanup mechanism.

- Unified multilingual prompts and optimized user experience.
2025-12-06 13:27:34 +08:00
Gouryella
bec13a9e51 feat(install.sh): Refactored message handling functions for compatibility with bash 3.2 and zsh
The original method of storing multilingual messages using associative arrays was replaced with the functions `msg_en` and `msg_zh`,

to provide better shell compatibility. The `prompt_input` function was also introduced to unify user input logic,

improving stability and maintainability across different shell environments.
2025-12-06 12:34:01 +08:00
Gouryella
eb0b36164b Translate comments in nginx configuration file 2025-12-06 03:26:25 +08:00
Gouryella
eee2d570f1 Add TLSv1.3 support to proxy configuration 2025-12-06 03:25:16 +08:00
Gouryella
c67cba6625 feat (client): Added system dependencies and optimized Windows process check logic
- Explicitly included golang.org/x/sys v0.38.0 in go.mod and removed indirect references

- Optimized process liveness detection logic on Windows platforms using the golang.org/x/sys/windows package

- Used OpenProcess and GetExitCodeProcess instead of Signal detection methods to improve accuracy

- Updated command-line output and added an ASCII banner to improve user experience

- Added blank lines to the github.com/spf13/cobra package to standardize import format
2025-12-05 23:43:15 +08:00
Gouryella
531c5fcbec Merge pull request #3 from Gouryella/feat/major-performance-improvements
feat: Add HTTP streaming, compression support, and Docker deployment
v0.3.0
2025-12-05 22:21:46 +08:00
Gouryella
1e477879c5 feat(proxy): Adds last activity time tracking for streaming responses
Adds a `lastActivityAt` field to the `streamingResponseEntry` structure to record the last active time of the streaming response.

Updates this timestamp when creating the streaming response, sending headers, and sending data blocks.

Modifies the logic for cleaning up timeout channels, using the last activity time instead of the creation time to determine if a timeout has occurred, improving accuracy in long-connection scenarios.
2025-12-05 22:20:04 +08:00
Gouryella
aead68bb62 feat: Add HTTP streaming, compression support, and Docker deployment
enhancements

  - Add adaptive HTTP response handling with automatic streaming for large
  responses (>1MB)
  - Implement zero-copy streaming using buffer pools for better performance
  - Add compression module for reduced bandwidth usage
  - Add GitHub Container Registry workflow for automated Docker builds
  - Add production-optimized Dockerfile and docker-compose configuration
  - Simplify background mode with -d flag and improved daemon management
  - Update documentation with new command syntax and deployment guides
  - Clean up unused code and improve error handling
  - Fix lipgloss style usage (remove unnecessary .Copy() calls)
2025-12-05 22:09:07 +08:00
Gouryella
b538397a00 Merge pull request #2 from Gouryella/perf/adaptive-pool-and-binary-protocol
perf: Implement adaptive buffer pool management and optimize binary protocol
v0.2.0
2025-12-03 18:33:05 +08:00
Gouryella
8086657b7a refactor(writer): Optimizes the FrameWriter write logic and cleans up irrelevant comments.
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.
2025-12-03 18:32:38 +08:00
Gouryella
35e6c86e1f feat(client): Added the --short option to the version command to support plain text output.
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.
2025-12-03 18:11:37 +08:00
Gouryella
bb5ed1739e docs(readme): Updated the structure and content of the English and Chinese README documents
- Unified logo size and optimized layout using HTML tags

- Replaced headings with semantic tags `<h1>` and `<h3>`

- Reorganized the document structure to enhance readability and visual appeal

- Optimized Chinese descriptions for a more natural and fluent style

- Adjusted the installation, usage instructions, and architecture diagram descriptions

- Standardized the display of command-line options and parameters
2025-12-03 11:09:06 +08:00
Gouryella
729911d2cf Merge pull request #1 from Gouryella/perf/improve-flow
perf (client): Refactored the command-line interface and enhanced use…
v0.1.1
2025-12-03 10:53:30 +08:00
Gouryella
0aa438e202 feat(protocol): Enhanced the heartbeat control mechanism of the frame writer
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.
2025-12-03 10:52:53 +08:00
Gouryella
fbd910b3a2 Improve client config validation 2025-12-03 10:28:57 +08:00
Gouryella
dd54e79ad7 perf (client): Refactored the command-line interface and enhanced user experience
- 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
2025-12-03 10:18:52 +08:00
Gouryella
37d1c4e005 ci(release): Optimizes the way Git commit information is retrieved in the build workflow.
The previous method of obtaining commit hashes via `git rev-parse` has been changed to directly using the `github.sha` variable provided by GitHub Actions,

and the first 10 characters are truncated as the short version commit hash.

Unnecessary `fetch-depth` configuration has also been removed.
v0.1.0
2025-12-02 16:55:30 +08:00
Gouryella
8aee33a53a build(workflow): Injects version, commit hash, and build time information into the build command.
In GitHub Actions' release workflow, the `ldflags` parameter has been added to the build command for each platform,

to inject the application version number, Git commit hash, and build time. This facilitates subsequent debugging and release tracking.
2025-12-02 16:53:43 +08:00
Gouryella
e0e33c3323 feat(install-scripts): Updated installation scripts to fetch the latest version from GitHub and fixed download links.
Updated client and server installation scripts to automatically fetch the latest release via the GitHub API and corrected binary download addresses. Removed the old "latest" version logic to ensure explicit version tags are always used for downloads.

fix(readme): Fixed installation commands and license information in the README.

Corrected the installation script link pointing to an incorrect URL in the README to the correct path raw.githubusercontent.com, and updated the open-source license information used by the project from MIT to BSD 3-Clause.

ci(release): Added an automated GitHub Actions release workflow.

Added a new CI workflow configuration file to trigger the build process when a tag is pushed. This workflow compiles binaries for multiple platforms, generates checksums, and creates a GitHub Release with attachments. Supports different architectures including Linux, macOS, and Windows.
2025-12-02 16:40:53 +08:00
Gouryella
090efcc64c Add BSD 3-Clause License file
Added the BSD 3-Clause License to the project.
2025-12-02 16:17:36 +08:00
Gouryella
07eea862d5 feat(init): Initializes the project's basic structure and configuration files. 2025-12-02 16:12:18 +08:00