Closed gxutmj closed 5 months ago
内置配置原本意义是用作 openwrt 上游dns,它没有 socks5 的需求。如果你把 mosdns 已经脱离了 openwrt 自身的应用场景,那么你需要是可能是 “配置文件:自定义”。 你能帮我看一下这个配置配置文件.txt 哪里出问题了吗?mosdns死活运行不了。mosdns版本是v5.3.1,配置是使用内置配置进行修改的。我就算咋都不修改把可以在内置配置可以运行的配置直接复制到自定义配置那里去也运行不了。
log: level: error file: "/var/log/mosdns.log" api: http: "0.0.0.0:9091" include: [] plugins: - tag: geosite_cn type: domain_set args: files: - "/var/mosdns/geosite_cn.txt" - tag: geoip_cn type: ip_set args: files: - "/var/mosdns/geoip_cn.txt" - tag: geosite_apple type: domain_set args: files: - "/var/mosdns/geosite_apple.txt" - tag: geosite_no_cn type: domain_set args: files: - "/var/mosdns/geosite_geolocation-!cn.txt" - tag: whitelist type: domain_set args: files: - "/etc/mosdns/rule/whitelist.txt" - tag: blocklist type: domain_set args: files: - "/etc/mosdns/rule/blocklist.txt" - tag: greylist type: domain_set args: files: - "/etc/mosdns/rule/greylist.txt" - tag: ddnslist type: domain_set args: files: - "/etc/mosdns/rule/ddnslist.txt" - tag: hosts type: hosts args: files: - "/etc/mosdns/rule/hosts.txt" - tag: redirect type: redirect args: files: - "/etc/mosdns/rule/redirect.txt" - tag: adlist type: domain_set args: files: - "/var/mosdns/geosite_category-ads-all.txt" - tag: local_ptr type: domain_set args: files: - "/etc/mosdns/rule/local-ptr.txt" - tag: lazy_cache type: cache args: size: 20000 lazy_cache_ttl: 86400 dump_file: "/etc/mosdns/cache.dump" dump_interval: 600 - tag: forward_xinfeng_udp type: forward args: concurrent: 2 upstreams: - addr: "114.114.114.114" - addr: "114.114.115.115" - tag: forward_local type: forward args: concurrent: 2 upstreams: - addr: 180.76.76.76 idle_timeout: 60 - addr: 119.29.29.29 idle_timeout: 60 - addr: 223.5.5.5 idle_timeout: 60 - tag: forward_remote type: forward args: concurrent: 2 upstreams: - addr:" tls://8.8.4.4" bootstrap: "223.5.5.5" socks5: "127.0.0.1:7890" idle_timeout: 120 enable_pipeline: true - addr: "tls://1.0.0.1" bootstrap: "223.5.5.5" socks5: "127.0.0.1:7890" idle_timeout: 120 enable_pipeline: true - addr: "tls://208.67.220.220" bootstrap: "223.5.5.5" socks5: "127.0.0.1:7890" idle_timeout: 120 enable_pipeline: true - tag: forward_remote_upstream type: sequence args: - exec: prefer_ipv4 - exec: $forward_remote - tag: modify_ttl type: sequence args: - exec: ttl 0-0 - tag: modify_ddns_ttl type: sequence args: - exec: ttl 5-5 - tag: has_resp_sequence type: sequence args: - matches: qname $ddnslist exec: $modify_ddns_ttl - matches: "!qname $ddnslist" exec: $modify_ttl - matches: has_resp exec: accept - tag: query_is_non_local_ip type: sequence args: - exec: $forward_local - matches: "!resp_ip $geoip_cn" exec: drop_resp - tag: fallback type: fallback args: primary: query_is_non_local_ip secondary: forward_remote_upstream threshold: 500 always_standby: true - tag: apple_domain_fallback type: fallback args: primary: query_is_non_local_ip secondary: forward_xinfeng_udp threshold: 100 always_standby: true - tag: query_is_apple_domain type: sequence args: - matches: "!qname $geosite_apple" exec: return - exec: $apple_domain_fallback - tag: query_is_ddns_domain type: sequence args: - matches: qname $ddnslist exec: $forward_local - tag: query_is_local_domain type: sequence args: - matches: qname $geosite_cn exec: $forward_local - tag: query_is_no_local_domain type: sequence args: - matches: qname $geosite_no_cn exec: $forward_remote_upstream - tag: query_is_whitelist_domain type: sequence args: - matches: qname $whitelist exec: $forward_local - tag: query_is_greylist_domain type: sequence args: - matches: qname $greylist exec: $forward_remote_upstream - tag: query_is_reject_domain type: sequence args: - matches: qname $blocklist exec: reject 3 - matches: qname $adlist exec: reject 3 - matches: - qtype 12 - qname $local_ptr exec: reject 3 - matches: qtype 65 exec: reject 3 - tag: main_sequence type: sequence args: - exec: $hosts - exec: jump has_resp_sequence - matches: - "!qname $ddnslist" - "!qname $blocklist" - "!qname $adlist" - "!qname $local_ptr" exec: $lazy_cache - exec: $redirect - exec: jump has_resp_sequence - exec: $query_is_apple_domain - exec: jump has_resp_sequence - exec: $query_is_ddns_domain - exec: jump has_resp_sequence - exec: $query_is_whitelist_domain - exec: jump has_resp_sequence - exec: $query_is_reject_domain - exec: jump has_resp_sequence - exec: $query_is_greylist_domain - exec: jump has_resp_sequence - exec: $query_is_local_domain - exec: jump has_resp_sequence - exec: $query_is_no_local_domain - exec: jump has_resp_sequence - exec: $fallback - tag: udp_server type: udp_server args: entry: main_sequence listen: ":5335" - tag: tcp_server type: tcp_server args: entry: main_sequence listen: ":5335"
你的配置逻辑没有问题,但是这个配置有使用到多个外部数据,你必须确保你使用的数据文件是存在的,如果都存在,它应该能正常运行。
你的配置逻辑没有问题,但是这个配置有使用到多个外部数据,你必须确保你使用的数据文件是存在的,如果都存在,它应该能正常运行。
谢谢,我再检查一下
内置配置原本意义是用作 openwrt 上游dns,它没有 socks5 的需求。如果你把 mosdns 已经脱离了 openwrt 自身的应用场景,那么你需要是可能是 “配置文件:自定义”。