mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-08 02:05:31 -05:00
remove ErrMissingApplication
This commit is contained in:
@@ -3,6 +3,7 @@ package dokodemo
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"errors"
|
||||
"v2ray.com/core/app"
|
||||
"v2ray.com/core/app/dispatcher"
|
||||
"v2ray.com/core/common/alloc"
|
||||
@@ -39,8 +40,7 @@ func NewDokodemoDoor(config *Config, space app.Space, meta *proxy.InboundHandler
|
||||
}
|
||||
space.InitializeApplication(func() error {
|
||||
if !space.HasApp(dispatcher.APP_ID) {
|
||||
log.Error("Dokodemo: Dispatcher is not found in the space.")
|
||||
return app.ErrMissingApplication
|
||||
return errors.New("Dokodemo: Dispatcher is not found in the space.")
|
||||
}
|
||||
d.packetDispatcher = space.GetApp(dispatcher.APP_ID).(dispatcher.PacketDispatcher)
|
||||
return nil
|
||||
|
||||
@@ -3,6 +3,7 @@ package freedom
|
||||
import (
|
||||
"io"
|
||||
|
||||
"errors"
|
||||
"v2ray.com/core/app"
|
||||
"v2ray.com/core/app/dns"
|
||||
"v2ray.com/core/common/alloc"
|
||||
@@ -35,8 +36,7 @@ func NewFreedomConnection(config *Config, space app.Space, meta *proxy.OutboundH
|
||||
space.InitializeApplication(func() error {
|
||||
if config.DomainStrategy == Config_USE_IP {
|
||||
if !space.HasApp(dns.APP_ID) {
|
||||
log.Error("Freedom: DNS server is not found in the space.")
|
||||
return app.ErrMissingApplication
|
||||
return errors.New("Freedom: DNS server is not found in the space.")
|
||||
}
|
||||
f.dns = space.GetApp(dns.APP_ID).(dns.Server)
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ func NewServer(config *ServerConfig, space app.Space, meta *proxy.InboundHandler
|
||||
|
||||
space.InitializeApplication(func() error {
|
||||
if !space.HasApp(dispatcher.APP_ID) {
|
||||
return app.ErrMissingApplication
|
||||
return errors.New("Shadowsocks|Server: Dispatcher is not found in space.")
|
||||
}
|
||||
s.packetDispatcher = space.GetApp(dispatcher.APP_ID).(dispatcher.PacketDispatcher)
|
||||
return nil
|
||||
|
||||
@@ -46,8 +46,7 @@ func NewServer(config *ServerConfig, space app.Space, meta *proxy.InboundHandler
|
||||
}
|
||||
space.InitializeApplication(func() error {
|
||||
if !space.HasApp(dispatcher.APP_ID) {
|
||||
log.Error("Socks|Server: Dispatcher is not found in the space.")
|
||||
return app.ErrMissingApplication
|
||||
return errors.New("Socks|Server: Dispatcher is not found in the space.")
|
||||
}
|
||||
s.packetDispatcher = space.GetApp(dispatcher.APP_ID).(dispatcher.PacketDispatcher)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user