mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 12:30:02 +00:00
TUN-4597: Add a QUIC server skeleton
- Added a QUIC server to accept streams - Unit test for this server also tests ALPN - Temporary echo capability for HTTP ConnectionType
This commit is contained in:
10
vendor/github.com/lucas-clemente/quic-go/internal/utils/ip.go
generated
vendored
Normal file
10
vendor/github.com/lucas-clemente/quic-go/internal/utils/ip.go
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
package utils
|
||||
|
||||
import "net"
|
||||
|
||||
func IsIPv4(ip net.IP) bool {
|
||||
// If ip is not an IPv4 address, To4 returns nil.
|
||||
// Note that there might be some corner cases, where this is not correct.
|
||||
// See https://stackoverflow.com/questions/22751035/golang-distinguish-ipv4-ipv6.
|
||||
return ip.To4() != nil
|
||||
}
|
Reference in New Issue
Block a user