Skip to content

Commit

Permalink
fix: lints
Browse files Browse the repository at this point in the history
  • Loading branch information
hcavarsan committed Mar 2, 2025
1 parent 80e2cd4 commit 9a638ce
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 28 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/kftray-commons/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kftray-commons"
version = "0.15.8"
version = "0.16.0"
description = "KFtray commons"
authors = [
"Henrique Cavarsan <hencavarsan@gmail.com>",
Expand Down
6 changes: 6 additions & 0 deletions crates/kftray-http-logs/src/http_response_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ pub struct ResponseLoggingState {
pub is_chunked: bool,
}

impl Default for ResponseLoggingState {
fn default() -> Self {
Self::new()
}
}

impl ResponseLoggingState {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 3 additions & 3 deletions crates/kftray-portforward/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kftray-portforward"
version = "0.15.8"
version = "0.16.0"
description = "KFtray library with port forwarding logic"
authors = [
"Henrique Cavarsan <hencavarsan@gmail.com>",
Expand Down Expand Up @@ -37,7 +37,7 @@ kftray-http-logs = { path = "../kftray-http-logs" }
tower = { version = "0.5.2", features = ["util"] }
hyper-util = "0.1.10"
dirs = "6.0.0"
openssl = { version = "0.10.68", features = ["vendored"] }
openssl = { version = "0.10.71", features = ["vendored"] }
openssl-sys = { version = "0.9.104", features = ["vendored"] }
hyper = "1.4.1"
base64 = "0.22.1"
Expand All @@ -46,4 +46,4 @@ secrecy = "0.10.3"

[lib]
name = "kftray_portforward"
path = "src/lib.rs"
path = "src/lib.rs"
11 changes: 9 additions & 2 deletions crates/kftray-portforward/src/kube/tcp_forwarder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,9 @@ impl TcpForwarder {
let req_id_guard = request_id.lock().await;
if let Some(req_id) = &*req_id_guard {
debug!("Connection closed, logging final response data for request ID: {}", req_id);
let buffer_for_logging = response_buffer.clone();
logger
.log_response(response_buffer.clone().into(), req_id.clone())
.log_response(buffer_for_logging.into(), req_id.clone())
.await;
}
drop(req_id_guard);
Expand Down Expand Up @@ -380,7 +381,13 @@ impl TcpForwarder {

debug!("Response successfully logged for ID: {}", response_id);

let can_clear_buffer = found_end_marker || !is_chunked;

let can_clear_buffer = if is_chunked {
found_end_marker
} else {
kftray_http_logs::http_response_analyzer::HttpResponseAnalyzer::check_content_length_match(&response_buffer)
};

if can_clear_buffer {
debug!("Response fully logged, resetting buffer for next response");
response_buffer.clear();
Expand Down
2 changes: 1 addition & 1 deletion crates/kftray-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kftray-server"
version = "0.15.8"
version = "0.16.0"
description = "KFtray Server is a Rust application that relays UDP/TCP traffic to an upstream server"
authors = [
"Henrique Cavarsan <hencavarsan@gmail.com>",
Expand Down
4 changes: 2 additions & 2 deletions crates/kftray-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kftray-tauri"
version = "0.15.8"
version = "0.16.0"
description = "A cross-platform system tray app for Kubernetes port-forward management"
authors = ["Henrique Cavarsan <hencavarsan@gmail.com>"]
license = "MIT"
Expand Down Expand Up @@ -35,7 +35,7 @@ keyring = { version = "3.6.1", features = ["apple-native", "windows-native", "li
hostsfile = { git = "https://github.com/tonarino/innernet", branch = "main" }
log = "0.4"
env_logger = "0.11.6"
openssl = { version = "0.10.68", features = ["vendored"] }
openssl = { version = "0.10.71", features = ["vendored"] }
openssl-sys = { version = "0.9.104", features = ["vendored"] }
kube = { version = "0.98.0", features = ["client", "config", "rustls-tls", "ws", "openssl-tls"] }
k8s-openapi = { version = "0.24", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion crates/kftray-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "kftray",
"version": "0.15.8"
"version": "0.16.0"
},
"tauri": {
"allowlist": {
Expand Down
2 changes: 1 addition & 1 deletion crates/kftui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kftui"
version = "0.15.8"
version = "0.16.0"
description = "KFtray TUI is a Rust application that manage multiple kubectl port forward configurations"
authors = [
"Henrique Cavarsan <hencavarsan@gmail.com>",
Expand Down
12 changes: 6 additions & 6 deletions docs/kftray/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ Linux Note: due to GTK limitations, it is necessary to install and enable the GN
Download the latest release directly from GitHub:

<div align="left">
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.15.8_universal.dmg">
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.16.0_universal.dmg">
<img src="https://img.shields.io/badge/macOS-Universal-grey.svg?style=for-the-badge&logo=apple" alt="Download for macOS" />
</a>
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.15.8_arm64-setup.exe">
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.16.0_arm64-setup.exe">
<img src="https://img.shields.io/badge/Windows-ARM64-grey.svg?style=for-the-badge&logo=windows" alt="Download for Windows ARM64" />
</a>
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.15.8_x64-setup.exe">
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.16.0_x64-setup.exe">
<img src="https://img.shields.io/badge/Windows-x64-grey.svg?style=for-the-badge&logo=windows" alt="Download for Windows x64" />
</a>
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.15.8_x86-setup.exe">
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.16.0_x86-setup.exe">
<img src="https://img.shields.io/badge/Windows-x86-grey.svg?style=for-the-badge&logo=windows" alt="Download for Windows x86" />
</a>
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.15.8_amd64.AppImage">
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.16.0_amd64.AppImage">
<img src="https://img.shields.io/badge/Linux-x64-grey.svg?style=for-the-badge&logo=linux" alt="Download for Linux AMD64" />
</a>
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.15.8_aarch64.AppImage">
<a href="https://github.com/hcavarsan/kftray/releases/latest/download/kftray_0.16.0_aarch64.AppImage">
<img src="https://img.shields.io/badge/Linux-ARM64-grey.svg?style=for-the-badge&logo=linux" alt="Download for Linux ARM64" />
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kftray/ui",
"version": "0.15.8",
"version": "0.16.0",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kftray",
"version": "0.15.9",
"version": "0.16.0",
"private": true,
"scripts": {
"build": "pnpm --filter @kftray/ui run build",
Expand Down

0 comments on commit 9a638ce

Please sign in to comment.