vibetunnel/tty-fwd/Cargo.toml
Mario Zechner 0b97181a04 Fix Ctrl+C signal handling and cross-server session compatibility
- Added proper PTY slave terminal configuration for signal interpretation
- Enabled ISIG flag so Ctrl+C generates SIGINT instead of being treated as text
- Configured ICANON and ECHO flags for proper terminal behavior
- Applied configuration in both child process code paths (manual dup2 and login_tty)

- Implemented hybrid proxy fallback system for cross-server session input
- Rust server now proxies input to Node.js server when pipe write fails
- Added reqwest HTTP client for seamless communication between servers
- Reduced pipe timeout to 1 second for faster fallback detection
- Added key translation for special keys when proxying to Node.js

This fixes both:
1. Ctrl+C not interrupting processes in Rust-created sessions
2. "Device not configured" errors when accessing Node.js sessions from Rust server

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-19 23:06:39 +02:00

85 lines
2.6 KiB
TOML

[package]
name = "tty-fwd"
license = "Apache-2.0"
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
description = "Utility to capture a tty and forward it."
version = "0.4.0"
edition = "2021"
rust-version = "1.83.0"
keywords = ["pty", "script", "tty", "tee"]
readme = "README.md"
repository = "https://github.com/steipete/vibetunnel"
categories = ["command-line-utilities", "development-tools"]
exclude = [
"tests/*"
]
[dependencies]
anyhow = "1.0.98"
argument-parser = { git = "https://github.com/mitsuhiko/argument", version = "0.0.1" }
atty = "0.2"
jiff = { version = "0.2", features = ["serde"] }
libc = "0.2"
nix = { version = "0.30.1", default-features = false, features = ["fs", "process", "term", "ioctl", "signal", "poll"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
serde_urlencoded = "0.7"
signal-hook = { version = "0.3.18", default-features = false, features = ["iterator"] }
tempfile = "3.20.0"
uuid = { version = "1.17.0", features = ["v4"], default-features = false }
bytes = "1.10"
shell-words = "1.1"
http = "1.3"
regex = "1.11"
ctrlc = "3.4.7"
data-encoding = "2.9"
glob = "0.3"
notify = "8.0"
reqwest = { version = "0.12", features = ["json", "blocking"] }
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.60", features = ["Win32_System_Console"] }
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true
[lints.rust]
# Allow unsafe code as it's necessary for system operations
unsafe_code = "allow"
missing_docs = "allow"
[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
# Allow some common patterns that are too pedantic
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
# Allow unsafe operations necessary for system calls
multiple_unsafe_ops_per_block = "allow"
# Allow cognitive complexity for main function
cognitive_complexity = "allow"
too_many_lines = "allow"
# Allow some other pedantic lints that are too strict
cast_possible_truncation = "allow"
cast_sign_loss = "allow"
cast_possible_wrap = "allow"
similar_names = "allow"
# Allow some nursery lints that are impractical
option_if_let_else = "allow"
# Allow needless_pass_by_value as it's often cleaner
needless_pass_by_value = "allow"
# Allow other pedantic warnings that are overly strict
manual_let_else = "allow"
items_after_statements = "allow"
useless_let_if_seq = "allow"
unused_self = "allow"
# Allow multiple crate versions (not always controllable)
multiple_crate_versions = "allow"