Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fakedns+others does not work #3140

Open
Losalado opened this issue Sep 5, 2024 · 3 comments
Open

fakedns+others does not work #3140

Losalado opened this issue Sep 5, 2024 · 3 comments

Comments

@Losalado
Copy link

Losalado commented Sep 5, 2024

          不要使用 `fakedns+others`,因为 `fakedns+others` [从来就没有正常工作过](https://github.com/v2fly/v2ray-core/blob/2a22a8579d485498b2f423af5073fcbcb784c351/app/dispatcher/sniffer.go#L64-L66)。

1b0e046 使得 fakedns+othersfakedns 效果相同(但也不是预期的工作方式),但是 82c42fc3c0aff7 又改坏了。
strings.HasPrefix(protocolString, p) || strings.HasSuffix(protocolString, p)strings.HasPrefix(protocolString, p) || strings.HasPrefix(p, protocolString) 可不是一回事。

Originally posted by @dyhkwong in #2973 (comment)

@Losalado
Copy link
Author

Losalado commented Sep 5, 2024

#2973
Coud anyone fix fakedns+others issue?

@dyhkwong
Copy link
Contributor

dyhkwong commented Sep 5, 2024

This is because content sniffers skip unsupported network,

if si.network != network {
continue
}

but fakedns+others does not specify network, so it will always be skipped.

It is indeed possible to fix this, but fixing this may break current the semantics of other sniffers, especially routing.rules.protocol also uses the protocol value from sniffing. I think new interfaces or methods may be needed.

@Losalado
Copy link
Author

Losalado commented Sep 6, 2024

This is because content sniffers skip unsupported network,

if si.network != network {
continue
}

but fakedns+others does not specify network, so it will always be skipped.

It is indeed possible to fix this, but fixing this may break current the semantics of other sniffers, especially routing.rules.protocol also uses the protocol value from sniffing. I think new interfaces or methods may be needed.

thanks for your info.
Actually when I follow document to configure fakedns+others, it does not work. We may need to add note for fakedns+others if it does not work as document now. Of course, it is the best to achieve function we expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants