mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-14 20:39:36 +03:00
Enhance DNS and Dialer (#341)
This commit is contained in:
@ -16,6 +16,7 @@ import (
|
||||
"github.com/xtls/xray-core/features/policy"
|
||||
"github.com/xtls/xray-core/features/routing"
|
||||
"github.com/xtls/xray-core/features/stats"
|
||||
"github.com/xtls/xray-core/transport/internet"
|
||||
)
|
||||
|
||||
// Server is an instance of Xray. At any time, there must be at most one Server instance running.
|
||||
@ -223,6 +224,14 @@ func initInstanceWithConfig(config *Config, server *Instance) (bool, error) {
|
||||
}
|
||||
}
|
||||
|
||||
internet.InitSystemDialer(
|
||||
server.GetFeature(dns.ClientType()).(dns.Client),
|
||||
func() outbound.Manager {
|
||||
obm, _ := server.GetFeature(outbound.ManagerType()).(outbound.Manager)
|
||||
return obm
|
||||
}(),
|
||||
)
|
||||
|
||||
if server.featureResolutions != nil {
|
||||
return true, newError("not all dependency are resolved.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user