Add tun inbound for linux

This commit is contained in:
世界
2022-07-09 19:18:37 +08:00
parent c463d0cf80
commit 730144cc26
19 changed files with 623 additions and 22 deletions

View File

@@ -34,6 +34,8 @@ func New(ctx context.Context, router adapter.Router, logger log.Logger, index in
return NewMixed(ctx, router, inboundLogger, options.Tag, options.MixedOptions), nil
case C.TypeShadowsocks:
return NewShadowsocks(ctx, router, inboundLogger, options.Tag, options.ShadowsocksOptions)
case C.TypeTun:
return NewTun(ctx, router, inboundLogger, options.Tag, options.TunOptions)
default:
return nil, E.New("unknown inbound type: ", options.Type)
}