Skip to content

Commit

Permalink
Disable DNS resolution of remote ICE candidates. (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-signal authored May 12, 2020
1 parent 402f9f2 commit 8000931
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion p2p/base/p2p_transport_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,14 @@ void P2PTransportChannel::AddRemoteCandidate(const Candidate& candidate) {
}

if (new_remote_candidate.address().IsUnresolvedIP()) {
ResolveHostnameCandidate(new_remote_candidate);
// Do not resolve remote candidates because doing so causes a connection to a DNS
// server which can leak the local agent's public IP address to the DNS server.
// ResolveHostnameCandidate(new_remote_candidate);

// Do not process the ICE candidate further because TCPPort may still attempt
// a resolution of DNS hostnames later on for TCP candidates, despite
// the fact that we didn't resolve the hostname above, which could also
// leak the local agent's IP address to the DNS server.
return;
}

Expand Down

1 comment on commit 8000931

@Bangybug
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will block connections within LAN/vpn.

Please sign in to comment.