mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 18:11:27 +00:00
fix fakedns is nil
This commit is contained in:
parent
244db57398
commit
dcba88e511
|
@ -15,7 +15,7 @@ import (
|
||||||
func newFakeDNSSniffer(ctx context.Context) (protocolSnifferWithMetadata, error) {
|
func newFakeDNSSniffer(ctx context.Context) (protocolSnifferWithMetadata, error) {
|
||||||
var fakeDNSEngine dns.FakeDNSEngine
|
var fakeDNSEngine dns.FakeDNSEngine
|
||||||
{
|
{
|
||||||
fakeDNSEngineFeat := core.MustFromContext(ctx).GetFeature(fakeDNSEngine)
|
fakeDNSEngineFeat := core.MustFromContext(ctx).GetFeature((*dns.FakeDNSEngine)(nil))
|
||||||
if fakeDNSEngineFeat != nil {
|
if fakeDNSEngineFeat != nil {
|
||||||
fakeDNSEngine = fakeDNSEngineFeat.(dns.FakeDNSEngine)
|
fakeDNSEngine = fakeDNSEngineFeat.(dns.FakeDNSEngine)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue