Rename module

This commit is contained in:
世界 2026-05-17 20:08:42 +08:00
parent f853bfc5c5
commit 75d0f348d5
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
20 changed files with 33 additions and 46 deletions

View file

@ -4,9 +4,7 @@ import (
"errors"
)
var (
// ErrTooManySegments is returned by Device.Read() when segmentation
// overflows the length of supplied buffers. This error should not cause
// reads to cease.
ErrTooManySegments = errors.New("too many segments")
)
// ErrTooManySegments is returned by Device.Read() when segmentation
// overflows the length of supplied buffers. This error should not cause
// reads to cease.
var ErrTooManySegments = errors.New("too many segments")

View file

@ -12,8 +12,8 @@ import (
"io"
"unsafe"
"github.com/sagernet/wireguard-go/conn"
"golang.org/x/sys/unix"
"golang.zx2c4.com/wireguard/conn"
)
const tcpFlagsOffset = 13

View file

@ -17,9 +17,9 @@ import (
"time"
"unsafe"
"github.com/sagernet/wireguard-go/conn"
"github.com/sagernet/wireguard-go/rwcancel"
"golang.org/x/sys/unix"
"golang.zx2c4.com/wireguard/conn"
"golang.zx2c4.com/wireguard/rwcancel"
)
const (
@ -514,9 +514,7 @@ func (tun *NativeTun) initFromFlags(name string) error {
return err
}
if e := sc.Control(func(fd uintptr) {
var (
ifr *unix.Ifreq
)
var ifr *unix.Ifreq
ifr, err = unix.NewIfreq(name)
if err != nil {
return