mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-12 08:45:25 -04:00
refine app settings in v2ray config
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"v2ray.com/core/app"
|
||||
"v2ray.com/core/app/dispatcher"
|
||||
"v2ray.com/core/common/loader"
|
||||
"v2ray.com/core/common/log"
|
||||
v2net "v2ray.com/core/common/net"
|
||||
|
||||
@@ -111,3 +112,18 @@ func (this *CacheServer) Get(domain string) []net.IP {
|
||||
log.Debug("DNS: Returning nil for domain ", domain)
|
||||
return nil
|
||||
}
|
||||
|
||||
type CacheServerFactory struct{}
|
||||
|
||||
func (this CacheServerFactory) Create(space app.Space, config interface{}) (app.Application, error) {
|
||||
server := NewCacheServer(space, config.(*Config))
|
||||
return server, nil
|
||||
}
|
||||
|
||||
func (this CacheServerFactory) AppId() app.ID {
|
||||
return APP_ID
|
||||
}
|
||||
|
||||
func init() {
|
||||
app.RegisterApplicationFactory(loader.GetType(new(Config)), CacheServerFactory{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user