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

feat: support routingA #202

Closed
wants to merge 2 commits into from
Closed

feat: support routingA #202

wants to merge 2 commits into from

Conversation

mzz2017
Copy link
Contributor

@mzz2017 mzz2017 commented Dec 4, 2020

Usage Example

Directory Structure

.
├── glider.conf
├── routingA
└── rules.d
    └── youtube.rule

glider.conf

verbose=True
listen=mixed://127.0.0.1:10888
forward=ss://AEAD_AES_128_GCM:[email protected].*.*:18080
rules-dir=rules.d
routingA=routingA

youtube.rule

forward=ws://104.194.*.*:8080/,vmess://3b446***-2a7e********-62f********42@?alterID=1

routingA

default:proxy
domain(ip111.cn,youtube.com)->youtube
domain(baidu.com)->reject

Result

Access to ip111.cn and youtube.com (and their sub-domain) will use the forwarding defined in youtube.rule.

Access to baidu.com (and its sub-domain) will be rejected.

Other access use forwarding group defined in main config.

Format

Slightly differrent from what in v2rayA.

# preset outbounds are proxy (main group), direct and reject.
# every filename in rule.d will be available as an outbound group.
default:proxy

# domain rules
domain(ip111.cn,youtube.com)->youtube
domain(baidu.com)->reject

# target ip rules
tip(192.168.0.0/16)->direct

# target port rules
tport(8080)->direct

# network
network(udp)->direct

# and rules
network(tcp) && domain(223.5.5.5) -> youtube
tip(192.168.0.15) && tport(1080) && network(tcp)-> reject

@mzz2017
Copy link
Contributor Author

mzz2017 commented Dec 4, 2020

Related #201

@mzz2017
Copy link
Contributor Author

mzz2017 commented Dec 4, 2020

Testing is inadequate, and if you are interested in it, more tests I will do.

@nadoo
Copy link
Owner

nadoo commented Dec 4, 2020

Thanks! I'll study it in this weekend.

@mzz2017 mzz2017 marked this pull request as draft December 23, 2020 06:38
@qqqqqqrrrrhh123a
Copy link

#270 ,help me

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.

3 participants