TUN inbound: Start TUN by AlwaysOnInboundHandler (#6275)

Fixes https://github.com/XTLS/Xray-core/issues/6274
This commit is contained in:
风扇滑翔翼
2026-06-09 17:22:33 +08:00
committed by GitHub
parent 6189d2bfd5
commit 06b4931743
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