mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Ignore tun config without permission
This commit is contained in:
parent
4f8b382fb3
commit
a8378476ba
@ -2,6 +2,7 @@ package inbound
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
@ -45,6 +46,11 @@ func (m *Manager) Start(stage adapter.StartStage) error {
|
||||
m.stage = stage
|
||||
for _, inbound := range m.inbounds {
|
||||
err := adapter.LegacyStart(inbound, stage)
|
||||
if err != nil && errors.Is(err, os.ErrPermission) {
|
||||
m.Remove(inbound.Tag())
|
||||
m.logger.Warn("inbound/", inbound.Type(), "[", inbound.Tag(), "]: ", err)
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
return E.Cause(err, stage, " inbound/", inbound.Type(), "[", inbound.Tag(), "]")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user