Skip to content

Feat: add queryStrategy option for DNS#749

Closed
Loyalsoldier wants to merge 9 commits intov2fly:masterfrom
Loyalsoldier:dns-queryStrategy
Closed

Feat: add queryStrategy option for DNS#749
Loyalsoldier wants to merge 9 commits intov2fly:masterfrom
Loyalsoldier:dns-queryStrategy

Conversation

@Loyalsoldier
Copy link
Copy Markdown
Contributor

@Loyalsoldier Loyalsoldier commented Mar 7, 2021

Fixes #482


// SetFakeDNSOption sets FakeEnable option for DNS client.
SetFakeDNSOption(isFakeEnable bool)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

设置项放到这里是不是有点奇怪

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不然怎么动态设置 DNS Client 的查询参数呢?🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

禁止修改V2Ray的v2ray:api:stable接口。你加接口的话也要保证对于没实现这个接口的实现也可以运行。

Copy link
Copy Markdown
Contributor

@xiaokangwang xiaokangwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个修改太魔改了,如果你需要这个功能我可以帮你写,但是如果你写的话需要保证

  • 不要进行破坏性修改:不要修改已有接口,保证任何一个实现已有接口的第三方实现可以继续正常运行
  • 不要破坏兼容性: reserve的字段不能再被使用。

之前的魔改修改接口为我就很难受,正准备想办法给回滚回去。


// SetFakeDNSOption sets FakeEnable option for DNS client.
SetFakeDNSOption(isFakeEnable bool)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

禁止修改V2Ray的v2ray:api:stable接口。你加接口的话也要保证对于没实现这个接口的实现也可以运行。

string tag = 6;

reserved 7;
QueryStrategy query_strategy = 7;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

禁止使用reserved的字段,新加一个吧

@xiaokangwang
Copy link
Copy Markdown
Contributor

xiaokangwang commented Mar 8, 2021

这里正确的实现方法是新加一个接口,然后用类型断言来确定是否实现了新的接口,如果实现了就用新接口。而不是通过改已有接口来实现功能。如果需要的话我可以直接连上次的因为fakedns什么的改的接口一起给改回去。

@Loyalsoldier
Copy link
Copy Markdown
Contributor Author

这里正确的实现方法是新加一个接口,然后用类型断言来确定是否实现了新的接口,如果实现了就用新接口。而不是通过改已有接口来实现功能。如果需要的话我可以直接连上次的因为fakedns什么的改的接口一起给改回去。

请展示真正的技术 😋 😀

@xiaokangwang
Copy link
Copy Markdown
Contributor

好!昨天那么说有点抱歉,实在是看见这种修改有点难受上头了。。。

ttrobot0101 pushed a commit to ttrobot0101/v2ray-core that referenced this pull request Aug 17, 2025
Update workflows
PS: `Submit to winget`  has no  test, because we need next tag.
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

Successfully merging this pull request may close these issues.

使用useipv4时依然会用ipv6地址进行连接

3 participants