Skip to content

TCP Support#2

Merged
tristanpoland merged 3 commits intoHarbr-Foundation:mainfrom
OmniCloudOrg:main
Apr 2, 2025
Merged

TCP Support#2
tristanpoland merged 3 commits intoHarbr-Foundation:mainfrom
OmniCloudOrg:main

Conversation

@tristanpoland
Copy link
Member

@tristanpoland tristanpoland commented Apr 2, 2025

Here we add low-level TCP support to the proxy primarily to add database support

Co-Authored-By: meowesque <163779298+meowesque@users.noreply.github.com>
Co-Authored-By: Caznix <Caznix01@gmail.com>
@tristanpoland tristanpoland added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Apr 2, 2025
@tristanpoland tristanpoland requested a review from Copilot April 2, 2025 14:46
@tristanpoland tristanpoland self-assigned this Apr 2, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds TCP support to Harbr-Router by introducing a new TCP proxy module, extending configuration to include TCP-specific settings, and updating the documentation to reflect these changes.

  • Introduces a new TCP proxy implementation in src/tcp_proxy.rs with connection pooling and timeout handling.
  • Updates the main application to conditionally launch the TCP proxy alongside the HTTP server.
  • Expands configuration options and README documentation to support TCP and database proxying.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tcp_proxy.rs New TCP proxy module with connection pooling and bidirectional copy.
src/main.rs Main function updated to load TCP proxy configuration and spawn a TCP proxy server.
src/config.rs Added TCP proxy-specific configuration and helper functions.
config.yml Extended configuration to include TCP proxy options and database routes.
README.md Updated documentation to reflect TCP proxy support and new metrics.
Comments suppressed due to low confidence (1)

src/tcp_proxy.rs:201

  • The metric name 'tcp_proxy.connection.duration' is inconsistent with the README which uses 'tcp_proxy.connection.duration_seconds'. Please standardize the metric naming for clarity.
histogram!("tcp_proxy.connection.duration", duration.as_secs_f64());

tristanpoland and others added 2 commits April 2, 2025 10:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tristanpoland tristanpoland merged commit f393b54 into Harbr-Foundation:main Apr 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants