chore: Update dependencies
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user