Compare commits

..

1 commit
main ... v0.4.2

Author SHA1 Message Date
6750aa6487 Add LICENSE 2024-09-06 22:41:13 +02:00
3 changed files with 3 additions and 6 deletions

2
Cargo.lock generated
View file

@ -86,7 +86,7 @@ dependencies = [
[[package]]
name = "revpfw3"
version = "0.4.1"
version = "0.4.0"
dependencies = [
"enum-ordinalize",
"serial",

View file

@ -3,7 +3,7 @@ name = "revpfw3"
repository = "https://github.com/tudbut/revpfw3"
description = "A tool to bypass portforwarding restrictions using some cheap VServer"
license = "MIT"
version = "0.4.3"
version = "0.4.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -36,12 +36,9 @@ pub fn server(port: u16, key: &str, sleep_delay_ms: u64) {
let mut buf8 = [0u8; 8];
let mut buf16 = [0u8; 16];
let mut buf = [0; 1024];
let tcpl = TcpListener::bind(("::0", port)).unwrap();
let tcpl = TcpListener::bind(("0.0.0.0", port)).unwrap();
let mut tcp = loop {
let Ok(mut tcp) = tcpl.accept() else { continue };
tcp.0
.set_read_timeout(Some(Duration::from_secs(5)))
.unwrap();
let Ok(()) = tcp.0.read_exact(&mut buf4) else {
tcp.0.shutdown(Shutdown::Both).unwrap();
continue;