Browse Source

Remove unused

世界 3 năm trước cách đây
mục cha
commit
5a2cebebd1

+ 1 - 1
transport/wireguard/device_system.go

@@ -82,7 +82,7 @@ func (w *SystemDevice) File() *os.File {
 }
 
 func (w *SystemDevice) Read(bytes []byte, index int) (int, error) {
-	return w.device.Read(bytes[index-tunPacketOffset:])
+	return w.device.Read(bytes[index-tun.PacketOffset:])
 }
 
 func (w *SystemDevice) Write(bytes []byte, index int) (int, error) {

+ 0 - 3
transport/wireguard/tun_darwin.go

@@ -1,3 +0,0 @@
-package wireguard
-
-const tunPacketOffset = 4

+ 0 - 5
transport/wireguard/tun_nondarwin.go

@@ -1,5 +0,0 @@
-//go:build !darwin
-
-package wireguard
-
-const tunPacketOffset = 0