Do not start tun in init

This commit is contained in:
Fangliding
2026-06-05 18:03:19 +08:00
parent fdb9b616fc
commit 6de10652d7
2 changed files with 15 additions and 4 deletions
+6
View File
@@ -170,6 +170,12 @@ func NewAlwaysOnInboundHandler(ctx context.Context, tag string, receiverConfig *
// Start implements common.Runnable.
func (h *AlwaysOnInboundHandler) Start() error {
// for inbound without worker (TUN)
if run, ok := h.proxy.(common.Runnable); ok {
if err := run.Start(); err != nil {
return errors.New("failed to start proxy").Base(err)
}
}
for _, worker := range h.workers {
if err := worker.Start(); err != nil {
return err