mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-22 01:06:30 -05:00
fix fakedns is nil
This commit is contained in:
parent
f965d25af2
commit
1df432218e
@ -18,7 +18,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 New Issue
Block a user