Skip to content

Commit

Permalink
Better name
Browse files Browse the repository at this point in the history
  • Loading branch information
nyonson committed Apr 12, 2024
1 parent 1ff9e58 commit 72a921b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/src/bin/async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ async fn proxy_conn(mut client: TcpStream) -> Result<(), bip324_proxy::Error> {
// TODO: Make this robust.
let mut remote_garbage_and_version = vec![0u8; 5000];
remote.read(&mut remote_garbage_and_version).await?;
let packet_reader = handshake
let packet_handler = handshake
.authenticate_garbage_and_version(&remote_garbage_and_version)
.expect("authenticated garbage");
println!("Channel authenticated.");

println!("Splitting channels.");
let (mut client_reader, mut client_writer) = client.split();
let (mut remote_reader, mut remote_writer) = remote.split();
let (mut decrypter, mut encrypter) = packet_reader.split();
let (mut decrypter, mut encrypter) = packet_handler.split();

println!("Setting up proxy loop.");
loop {
Expand Down
1 change: 1 addition & 0 deletions proxy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ pub async fn read_v2<T: AsyncRead + Unpin>(
let packet_bytes = decrypter.decypt_len(length_bytes);
let mut packet_bytes = vec![0u8; packet_bytes];
input.read_exact(&mut packet_bytes).await?;
let message = RawNetworkMessage::magic()

Ok(todo!())
}
Expand Down

0 comments on commit 72a921b

Please sign in to comment.