Banging things around to get a duct-taped version working end-to-end
This commit is contained in:
@@ -27,6 +27,7 @@ fn fake_directory_mixes() -> Vec<SphinxNode> {
|
||||
address: [0u8; 32], //"127.0.0.1:8080".as_bytes(), // start here tomorrow :)
|
||||
pub_key: Default::default()
|
||||
};
|
||||
// vec![node1]
|
||||
let node2 = sphinx::route::Node{
|
||||
address: [1u8;32],
|
||||
pub_key: Default::default()
|
||||
|
||||
+1
-1
@@ -11,10 +11,10 @@ impl MixClient {
|
||||
MixClient {}
|
||||
}
|
||||
|
||||
// Sends a Sphinx packet to a mixnode.
|
||||
pub async fn send(&self, packet: SphinxPacket, mix: &MixNode) -> Result<(), Box<dyn std::error::Error>>{
|
||||
let bytes = packet.to_bytes();
|
||||
|
||||
// now we shoot it into space!
|
||||
let mut stream = TcpStream::connect("127.0.0.1:8080").await?;
|
||||
stream.write_all(&bytes[..]).await?;
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user