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

fix incorrect RuleObject key domains to domain #447

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NessajCN
Copy link

@NessajCN NessajCN commented Apr 17, 2024

According to v2ray-core source
master branch

type RawFieldRule struct {
	RouterRule
	Domain     *StringList  `json:"domain"`
	IP         *StringList  `json:"ip"`
	Port       *PortList    `json:"port"`
	Network    *NetworkList `json:"network"`
	SourceIP   *StringList  `json:"source"`
	SourcePort *PortList    `json:"sourcePort"`
	User       *StringList  `json:"user"`
	InboundTag *StringList  `json:"inboundTag"`
	Protocols  *StringList  `json:"protocol"`
	Attributes string       `json:"attrs"`
}

4.45.2 branch

type RawFieldRule struct {
	RouterRule
	Domain     *cfgcommon.StringList  `json:"domain"`
	Domains    *cfgcommon.StringList  `json:"domains"`
	IP         *cfgcommon.StringList  `json:"ip"`
	Port       *cfgcommon.PortList    `json:"port"`
	Network    *cfgcommon.NetworkList `json:"network"`
	SourceIP   *cfgcommon.StringList  `json:"source"`
	SourcePort *cfgcommon.PortList    `json:"sourcePort"`
	User       *cfgcommon.StringList  `json:"user"`
	InboundTag *cfgcommon.StringList  `json:"inboundTag"`
	Protocols  *cfgcommon.StringList  `json:"protocol"`
	Attributes string                 `json:"attrs"`
}

In master branch, RuleObject in RoutingObject has only domain key while both domains and domain key existed in 4.45.2 version.

However, the example of config.json in 4.45.2 release took domain key instead of domains that confuse some users like me. I suggest the doc consisting with release example.

This PR is created to fix this.

Related issue: fix #445

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.

v4配置文档"domain"项问题
1 participant