fix bug: func RouterFromContext return nil router

This commit is contained in:
root
2023-09-29 14:18:29 +09:00
parent af9fb2084a
commit 00ec5b2d4d
2 changed files with 4 additions and 2 deletions

View File

@@ -31,6 +31,7 @@ type DNSConfig struct {
}
type Box struct {
ctx context.Context
createdAt time.Time
router adapter.Router
inbounds map[string]adapter.Inbound
@@ -169,6 +170,7 @@ func New(c *conf.CoreConfig) (vCore.Core, error) {
}
router.SetClashServer(server)
return &Box{
ctx: ctx,
router: router,
inbounds: inMap,
outbounds: outbounds,