Remove DETACH flag (for now)

This commit is contained in:
Sarah Jamie Lewis 2021-01-12 23:34:36 -08:00
parent a634947da1
commit fb3673fb42
4 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "tapir-cwtch" name = "tapir-cwtch"
version = "0.1.5" version = "0.1.6"
authors = ["Sarah Jamie Lewis <sarah@openprivacy.ca>"] authors = ["Sarah Jamie Lewis <sarah@openprivacy.ca>"]
edition = "2018" edition = "2018"
license = "MIT" license = "MIT"

View File

@ -24,7 +24,7 @@ fn main() {
} }
} }
}; };
match service.connect("kaouzo6mkagk5vin663iqq4d2jctkkoh62avglamheohgdz5y7gu7eyd", outbound_service.clone()) { match service.connect("we5hvq7s6uvrdxf5hfqis6xd3s2yxl3jtpway5ziivbtsxunwaee6eyd", outbound_service.clone()) {
_ => {} _ => {}
} }
loop {} loop {}

View File

@ -64,7 +64,7 @@ impl TorProcess<TorAuthenticated> {
let esk = ExpandedSecretKey::from(&secret_key); let esk = ExpandedSecretKey::from(&secret_key);
match write!( match write!(
self.conn, self.conn,
"ADD_ONION ED25519-V3:{} Flags=Detach Port={},{}\r\n", "ADD_ONION ED25519-V3:{} Port={},{}\r\n",
base64::encode(esk.to_bytes()), base64::encode(esk.to_bytes()),
virtual_port, virtual_port,
target_port target_port

View File

@ -87,8 +87,7 @@ impl<Direction> ConnectionInterface for Connection<Direction> {
let secret_box = SecretBox::new(&self.key, Salsa20).unwrap(); let secret_box = SecretBox::new(&self.key, Salsa20).unwrap();
let mut result = [0u8; 8192]; let mut result = [0u8; 8192];
match self.conn.read_exact(&mut result) { match self.conn.read_exact(&mut result) {
Err(e) => { Err(_e) => {
//eprintln!("{}", e.to_string());
return vec![]; return vec![];
} }
_ => {} _ => {}
@ -105,7 +104,6 @@ impl<Direction> ConnectionInterface for Connection<Direction> {
let _len_bytes = [0u8; 2]; let _len_bytes = [0u8; 2];
let len = u16::decode_fixed(&msg[0..2]) as usize; let len = u16::decode_fixed(&msg[0..2]) as usize;
if len > 8192 { if len > 8192 {
//eprintln!("invalid length: {}", len);
return vec![]; // lol no. return vec![]; // lol no.
} }
msg[2..len + 2].to_vec() msg[2..len + 2].to_vec()