diff --git a/Cargo.toml b/Cargo.toml index 279aa77..b2fbb5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sslrelay" -version = "0.4.2" +version = "0.4.3" authors = ["PinkP4nther @Pink_P4nther"] edition = "2018" description = "A TCP relay library for relaying/modifying/spoofing TCP traffic by implementing callback code." diff --git a/README.md b/README.md index dd20c27..a549960 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,6 @@ Then use this library to continuously rewrite or display decrypted network traff 10/06/2021 | v0.4.2 | Added documentation. +10/07/2021 | v0.4.3 | Blocking callbacks now pass self as a mutable reference. This can allow the developer to create structures that can be accessed every stream write ONLY in the BLOCKING callback. The self object is refreshed per TCP connection. Separate TCP connections can not touch eachothers data. + More updates/ideas to come.. I think.. \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 7c9f8b7..4a527d7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -191,9 +191,9 @@ pub enum CallbackRet { /// Callback functions a user may or may not implement. pub trait HandlerCallbacks { - fn ds_b_callback(&self, _in_data: Vec) -> CallbackRet {CallbackRet::Relay(_in_data)} + fn ds_b_callback(&mut self, _in_data: Vec) -> CallbackRet {CallbackRet::Relay(_in_data)} fn ds_nb_callback(&self, _in_data: Vec){} - fn us_b_callback(&self, _in_data: Vec) -> CallbackRet {CallbackRet::Relay(_in_data)} + fn us_b_callback(&mut self, _in_data: Vec) -> CallbackRet {CallbackRet::Relay(_in_data)} fn us_nb_callback(&self, _in_data: Vec){} } diff --git a/src/tcp.rs b/src/tcp.rs index 1d12d20..99d0592 100644 --- a/src/tcp.rs +++ b/src/tcp.rs @@ -128,7 +128,6 @@ impl {