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

More Advanced Router Support #70

Closed
ghost opened this issue Jun 2, 2020 · 1 comment
Closed

More Advanced Router Support #70

ghost opened this issue Jun 2, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jun 2, 2020

V2ray has a very powerful router, trojan-go also add router functionality recently.
See this link for specific detail about v2ray's router.
It would be nice that trojan-go support v2ray's router rules, for instance, domain:.
As a result, there is no need to use a converter between v2ray and trojan-go rules.
Anyway, thanks for developing such a nice client :).

domain: [ string ]

An array of domains. Available formats are:

Plaintext: If this string matches any part of the targeting domain, this rule takes effet. Example: rule "sina.com" matches targeting domain "sina.com", "sina.com.cn" and "www.sina.com", but not "sina.cn".
Regular expression: Begining with "regexp:", the rest is a regular expression. When the regexp matches targeting domain, this rule takes effect. Example: rule "regexp:\\.goo.*\\.com$" matches "www.google.com" and "fonts.googleapis.com", but not "google.com".
Subdomain (recommended): Begining with "domain:" and the rest is a domain. When the targeting domain is exactly the value, or is a subdomain of the value, this rule takes effect. Example: rule "domain:v2ray.com" matches "www.v2ray.com", "v2ray.com", but not "xv2ray.com".
Full domain: Begining with "full:" and the rest is a domain. When the targeting domain is exactly the value, the rule takes effect. Example: rule "domain:v2ray.com" matches "v2ray.com", but not "www.v2ray.com".
Pre-defined domain list: Begining with "geosite:" and the rest is a name, such as geosite:google or geosite:cn. See Pre-defined domain list for more detail.
Domains from file: Such as "ext:file:tag". The value must begin with ext: (lowercase), and followed by filename and tag. The file is placed in resource directory, and has the same format of geosite.dat. The tag must exist in the file.
@p4gefau1t p4gefau1t added the enhancement New feature or request label Jun 3, 2020
@p4gefau1t
Copy link
Owner

已实现

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

No branches or pull requests

1 participant