Merged
Conversation
Co-Authored-By: meowesque <163779298+meowesque@users.noreply.github.com> Co-Authored-By: Caznix <Caznix01@gmail.com>
Contributor
There was a problem hiding this comment.
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());
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here we add low-level TCP support to the proxy primarily to add database support