Skip to content

Commit

Permalink
Merge pull request #7 from libp2p/disable-source-address-validation
Browse files Browse the repository at this point in the history
disable source address validation
  • Loading branch information
marten-seemann authored Jun 12, 2018
2 parents e08e8cc + 964a7f1 commit fb445f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions p2p/transport/quic/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"crypto/tls"
"crypto/x509"
"errors"
"net"

ic "github.com/libp2p/go-libp2p-crypto"
peer "github.com/libp2p/go-libp2p-peer"
Expand All @@ -19,6 +20,10 @@ var quicConfig = &quic.Config{
MaxReceiveStreamFlowControlWindow: 3 * (1 << 20), // 3 MB
MaxReceiveConnectionFlowControlWindow: 4.5 * (1 << 20), // 4.5 MB
Versions: []quic.VersionNumber{101},
AcceptCookie: func(clientAddr net.Addr, cookie *quic.Cookie) bool {
// TODO(#6): require source address validation when under load
return true
},
}

var quicDialAddr = quic.DialAddr
Expand Down

0 comments on commit fb445f5

Please sign in to comment.