Skip to content

感谢又出了v5,求个国内国外分流的配置 #562

Answered by suienzan
PHCSJC asked this question in Q&A
Discussion options

You must be logged in to vote

说实话现在要自己维护这几个geo文件挺麻烦的.

如果是通过 AUR 安装的可以通过 Pacman hook 自动下载 geo 文件. 示例 gist

下面是我自己用的配置和需要的文件连接.

# /etc/mosdns/config.yaml
log:
  level: info

plugins:
  # 缓存
  - tag: cache
    type: cache
    args:
      size: 1024
      lazy_cache_ttl: 86400

  # 转发至本地服务器 DNSPod
  - tag: forward_local
    type: forward
    args:
      upstreams:
        - addr: https://1.12.12.12/dns-query

  # 转发至远程服务器 DNS.SB
  - tag: forward_remote
    type: forward
    args:
      upstreams:
        - addr: 45.11.45.11
        - addr: https://45.11.45.11/dns-query

  # fallback 用本地服务器 sequence
  # 返回不包含本地 ip 则 reject
  - tag: local_ip_sequence
    type: sequence
    args

Replies: 19 comments 41 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies

This comment has been hidden.

Comment options

You must be logged in to vote
4 replies
@urlesistiana
Comment options

@nil-ca
Comment options

@urlesistiana
Comment options

@nil-ca
Comment options

This comment was marked as off-topic.

@PHCSJC
Comment options

@urlesistiana
Comment options

@PHCSJC
Comment options

@wutongskype
Comment options

@La-Hire
Comment options

Comment options

You must be logged in to vote
4 replies
@PHCSJC
Comment options

@siddhix
Comment options

@urlesistiana
Comment options

@siddhix
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies

This comment has been hidden.

@70599
Comment options

@dsunn
Comment options

@oit63
Comment options

@yyy8888
Comment options

@onlyJinx
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@v8040
Comment options

Comment options

You must be logged in to vote
5 replies
@ailonei
Comment options

@yeezylife
Comment options

@suienzan
Comment options

@yeezylife
Comment options

@liang-x-j
Comment options

Answer selected by urlesistiana
Comment options

You must be logged in to vote
1 reply
@miooochi
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@PHCSJC
Comment options

@miooochi
Comment options

@nil-ca
Comment options

@PHCSJC
Comment options

@nil-ca
Comment options

Comment options

You must be logged in to vote
2 replies
@chiangbi
Comment options

@llity
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@yubanmeiqin9048
Comment options

@fengguowudi
Comment options

Comment options

You must be logged in to vote
1 reply
@lingchuanbo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #561 on December 01, 2022 02:23.