chore: Update dependencies

This commit is contained in:
wwqgtxx
2023-03-04 23:41:41 +08:00
parent 8771fa5c17
commit 3b037acb01
5 changed files with 23 additions and 23 deletions

View File

@@ -221,7 +221,7 @@ func New(options LC.Tun, tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapte
err = E.Cause(err, "build android rules")
return
}
tunIf, err := tunOpen(tunOptions)
tunIf, err := tunNew(tunOptions)
if err != nil {
err = E.Cause(err, "configure tun interface")
return

View File

@@ -6,6 +6,6 @@ import (
tun "github.com/metacubex/sing-tun"
)
func tunOpen(options tun.Options) (tun.Tun, error) {
return tun.Open(options)
func tunNew(options tun.Options) (tun.Tun, error) {
return tun.New(options)
}

View File

@@ -8,11 +8,11 @@ import (
tun "github.com/metacubex/sing-tun"
)
func tunOpen(options tun.Options) (tunIf tun.Tun, err error) {
func tunNew(options tun.Options) (tunIf tun.Tun, err error) {
maxRetry := 3
for i := 0; i < maxRetry; i++ {
timeBegin := time.Now()
tunIf, err = tun.Open(options)
tunIf, err = tun.New(options)
if err == nil {
return
}