dns cache

This commit is contained in:
v2ray committed 2015-12-06 11:00:10 +01:00
1 parent 59030814cb
commit e1c58fae2b
16 files changed
+320 -16

No files matched your search

+6
View File
@@ -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
+2 -2
View File
@@ -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