Skip to content

Commit

Permalink
add dns
Browse files Browse the repository at this point in the history
  • Loading branch information
eycorsican committed Dec 26, 2018
1 parent 264aa1e commit f14b111
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 14 deletions.
5 changes: 5 additions & 0 deletions dns.example.conf
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,8 @@ abcd.com=1.2.3.4
// Client IP for EDNS Client Subnet extension, a single IP address.

115.239.211.92

[RoutingDomainStrategy]
// https://www.v2ray.com/chapter_02/03_routing.html

IPIfNonMatch
84 changes: 70 additions & 14 deletions kitsunebi_default.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
// rules should be grouped by their types (DOMAIN/IP/USER-AGENT)
// Section names such as "DnsServer", "DnsRule" are all case-insensitive.
// All empty lines and whitespaces will be omitted, comment lines are
// start with `//`, inline comments are start with `#`, all characters
// after `#` will be treated as comments.


[Rule]
// [Rule] is equalient to [RoutingRule]
// Rules better group by their types (DOMAIN/IP/USER-AGENT)
// and targets (PROXY/DIRECT/REJECT) for better performance.
//
[Rule]
// ==== block rules ====
//
// google
Expand All @@ -27,11 +34,10 @@ GEOIP,cn,DIRECT
GEOIP,private,DIRECT

// user agent rules
USER-AGENT,wechat,DIRECT
USER-AGENT,micromessenger,DIRECT
USER-AGENT,%E7%BD%91%E6%98%93,DIRECT
USER-AGENT,netease,DIRECT
USER-AGENT,weibo,DIRECT
USER-AGENT,*WeChat*,DIRECT
USER-AGENT,*MicroMessenger*,DIRECT
USER-AGENT,*%E7%BD%91%E6%98%93*,DIRECT
USER-AGENT,*Netease*,DIRECT

// port rules
PORT,123,DIRECT
Expand Down Expand Up @@ -83,13 +89,13 @@ IP-CIDR,91.108.56.0/24,PROXY
IP-CIDR,125.209.222.0/24,PROXY

// user agent rules
USER-AGENT,twitter,PROXY
USER-AGENT,gmail,PROXY
USER-AGENT,telegram,PROXY
USER-AGENT,tumblr,PROXY
USER-AGENT,facebook,PROXY
USER-AGENT,pinterest,PROXY
USER-AGENT,instagram,PROXY
USER-AGENT,*Twitter*,PROXY
USER-AGENT,*Gmail*,PROXY
USER-AGENT,*Telegram*,PROXY
USER-AGENT,*Tumblr*,PROXY
USER-AGENT,*Facebook*,PROXY
USER-AGENT,*Pinterest*,PROXY
USER-AGENT,*Instagram*,PROXY

// twitter
DOMAIN-KEYWORD,twitter,PROXY
Expand Down Expand Up @@ -150,3 +156,53 @@ DOMAIN-SUFFIX,fivecdm.com,PROXY

// ==== final ====
# FINAL,PROXY


[DnsServer]
// Format: address,port,tag
//
// `tag` is a unique alphanumeric string for each DNS server, it's used for
// identifying DNS servers by DNS domain rules, it's case-insensitive. `tag`s are
// only help in the configuration parsing procedure, and won't be used elsewhere.
//
// `port` and `tag` could be omitted, means that using the default 53 port
// and no DNS rules attach to that DNS server.
//
// A DNS lookup will perform on DNS servers list below in order until results
// return, except there is a matching domain rule.

223.5.5.5
114.114.114.114
8.8.8.8,53,REMOTE
8.8.4.4

[DnsRule]
// DNS requests for domain names which match these rules will send to the DNS
// server with the corresponding tag name first, i.e. DNS server with the matched
// tag has the highest priority.

// Remote dns
DOMAIN-KEYWORD,fbcdn,REMOTE
DOMAIN-KEYWORD,facebook,REMOTE
DOMAIN-SUFFIX,fb.com,REMOTE
DOMAIN-KEYWORD,instagram,REMOTE
DOMAIN-KEYWORD,whatsapp,REMOTE
DOMAIN-KEYWORD,akamai,REMOTE
DOMAIN-SUFFIX,line-scdn.net,REMOTE
DOMAIN-SUFFIX,line.me,REMOTE
DOMAIN-SUFFIX,naver.jp,REMOTE

[DnsHost]
// Static DNS map that functions in the same way as /etc/hosts.

localhost=127.0.0.1

[DnsClientIp]
// Client IP for EDNS Client Subnet extension, a single IP address.

115.239.211.92

[RoutingDomainStrategy]
// https://www.v2ray.com/chapter_02/03_routing.html

IPIfNonMatch

0 comments on commit f14b111

Please sign in to comment.