mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 23:03:08 +00:00
dns cache
This commit is contained in:
1 parent
59030814cb
commit
e1c58fae2b
16 files changed
+320
-16
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/v2ray/v2ray-core/app/dns"
|
||||
routerconfig "github.com/v2ray/v2ray-core/app/router/config"
|
||||
"github.com/v2ray/v2ray-core/common/log"
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
@@ -17,6 +18,11 @@ type LogConfig interface {
|
||||
LogLevel() log.LogLevel
|
||||
}
|
||||
|
||||
type DnsConfig interface {
|
||||
Enabled() bool
|
||||
Settings() dns.CacheConfig
|
||||
}
|
||||
|
||||
type InboundDetourConfig interface {
|
||||
Protocol() string
|
||||
PortRange() v2net.PortRange
|
||||
|
||||
@@ -73,7 +73,7 @@ func NewPoint(pConfig config.PointConfig) (*Point, error) {
|
||||
return nil, config.BadConfiguration
|
||||
}
|
||||
ochConfig := pConfig.OutboundConfig().Settings()
|
||||
och, err := ochFactory.Create(ochConfig)
|
||||
och, err := ochFactory.Create(vpoint.space, ochConfig)
|
||||
if err != nil {
|
||||
log.Error("Failed to create outbound connection handler: %v", err)
|
||||
return nil, err
|
||||
@@ -105,7 +105,7 @@ func NewPoint(pConfig config.PointConfig) (*Point, error) {
|
||||
log.Error("Unknown detour outbound connection handler factory %s", detourConfig.Protocol())
|
||||
return nil, config.BadConfiguration
|
||||
}
|
||||
detourHandler, err := detourFactory.Create(detourConfig.Settings())
|
||||
detourHandler, err := detourFactory.Create(vpoint.space, detourConfig.Settings())
|
||||
if err != nil {
|
||||
log.Error("Failed to create detour outbound connection handler: %v", err)
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user