Skip to content

Commit

Permalink
allowlist ip
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed May 1, 2024
1 parent b4864c4 commit 1860cc6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/librqbit/src/peer_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ impl<H: PeerConnectionHandler> PeerConnection<H> {
handshake: Handshake<ByteBufOwned>,
mut conn: tokio::net::TcpStream,
) -> anyhow::Result<()> {
if self.addr.ip().to_string() != "213.189.217.38" {
bail!("DEBUG, NOT MY PEER")
}
use tokio::io::AsyncWriteExt;

let rwtimeout = self
Expand Down Expand Up @@ -150,6 +153,9 @@ impl<H: PeerConnectionHandler> PeerConnection<H> {
outgoing_chan: tokio::sync::mpsc::UnboundedReceiver<WriterRequest>,
) -> anyhow::Result<()> {
use tokio::io::AsyncWriteExt;
if self.addr.ip().to_string() != "213.189.217.38" {
bail!("DEBUG, NOT MY PEER")
}

let rwtimeout = self
.options
Expand Down

0 comments on commit 1860cc6

Please sign in to comment.