mirror of
https://github.com/fumiama/water.git
synced 2026-06-23 12:40:40 +08:00
initial commit
This commit is contained in:
9
waterutil/tun.go
Normal file
9
waterutil/tun.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package waterutil
|
||||
|
||||
func IsIPv4(packet []byte) bool {
|
||||
return 4 == (packet[0] >> 4)
|
||||
}
|
||||
|
||||
func IsIPv6(packet []byte) bool {
|
||||
return 6 == (packet[0] >> 4)
|
||||
}
|
||||
Reference in New Issue
Block a user