use anyhow::Result;
use reverse_ssh::{ReverseSshClient, ReverseSshConfig};
use tracing_subscriber;
#[tokio::main]
async fn main() -> Result<()> {
tracing_subscriber::fmt::init();
let config = ReverseSshConfig {
server_addr: "your-server.com".to_string(),
server_port: 22,
username: "your-username".to_string(),
key_path: Some("/path/to/your/private/key".to_string()),
password: None,
bind_address: String::new(),
remote_port: 8080,
local_addr: "127.0.0.1".to_string(),
local_port: 3000,
};
let mut client = ReverseSshClient::new(config);
println!("Starting reverse SSH tunnel...");
println!("Remote port 8080 will forward to local 127.0.0.1:3000");
client.run().await?;
Ok(())
}