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

如何在配置文件中使用include指令引用其它配置文件 #15

Open
cute opened this issue Jul 8, 2020 · 1 comment
Open

Comments

@cute
Copy link
Collaborator

cute commented Jul 8, 2020

Shadowrocket 2.1.54 在配置文件[General]部分增加了一个 include 指令,用于引用本地其他的配置文件。使用该方法可以把公用规则文件和自己的规则分开维护,解决以往更新远程规则会覆盖本地添加的规则的问题。如下两个配置文件的关系是,my.conf 继承 public.conf 的规则配置。

public.conf

[General]
bypass-system = true
dns-server = system 
[Rule]
DOMAIN-KEYWORD,trace,REJECT
DOMAIN-SUFFIX,msn.com,PROXY
DOMAIN-SUFFIX,google.com,PROXY
FINAL,DIRECT

my.conf :

[General]
include = public.conf
dns-server = 1.1.1.1 

[Rule]
DOMAIN-SUFFIX,msn.com,DIRECT
GEOIP,CN,DIRECT
FINAL,PROXY
@achjqz
Copy link

achjqz commented Oct 19, 2020

能否让 my.conf 中的 Rule 先于 public.conf 中的 Rule 判断? 比如 public.conf 中有 DOMAIN-SUFFIX 163.com DIRECT, my.conf 中有 DOMAIN-SUFFIX music.163.com PROXY, 若遇到 music.163.com 应该走 PROXY 而不是 DIRECT

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