vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
16.63k stars 3.07k forks source link

错误:Get DNS 'listen' Option Error, OpenClash Can Not Start With Raw Config File #1122

Closed Powerhotpot closed 2 years ago

Powerhotpot commented 3 years ago

Hello, 在OpenwrtX86 上运行Openclash, 显示如下错误,进行各种尝试后依然没解决问题,请各位大神帮忙解决~,非常感谢!

  1. Openclash 内核版本:0.41.13-beta; 安装以后, 使用 [服务器&策略组管理] 选择【lhIe1】规则,一键生成config.yaml, 并且在语法检查Pass,
  2. Fake-IP增强模式
  3. 重启Openclash后错误如下: 2020-12-28 20:32:36 Error: Get General 'redir-port' Option Error, OpenClash Can Not Start With Raw Config File 2020-12-28 20:32:36 Error: Get DNS 'enhanced-mode' Option Error, OpenClash Can Not Start With Raw Config File 2020-12-28 20:32:36 Error: Get DNS 'listen' Option Error, OpenClash Can Not Start With Raw Config File 2020-12-28 20:32:36 Error: OpenClash Can Not Start, Try Use Raw Config Restart Again 2020-12-28 20:32:44 level=fatal msg="Parse config error: proxy group[0]: use or proxies missing" 2020-12-28 20:32:36 Error: OpenClash Can Not Start, Try Use Backup Rules Start Again 2020-12-28 20:32:40 level=fatal msg="Parse config error: proxy group[0]: use or proxies missing";

参照 issue/913 中的步骤,进行了如下操作:

  1. 在配置文件订阅里设置订阅转换模板
  2. 重装了 libcap和libcap-bin 为最新版本2.43-1;

root@OpenWrt:~# opkg list | grep libcap libcap - 2.43-1 - Linux capabilities library library libcap-bin - 2.43-1 - Linux capabilities . This package contains the libcap utilities. libcap-ng - 0.8.1-1 - POSIX capabilities library library libcap-ng-bin - 0.8.1-1 - POSIX capabilities library . This package contains the libcap-ng utilities.

  1. 内核启动无错误;

  2. capsh --print 结果如下: root@OpenWrt:~# capsh --print Current: =ep Bounding set =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fset id,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_s ervice,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,ca p_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_a dmin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config, cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_overri de,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read Ambient set = Current IAB: Securebits: 00/0x0/1'b0 secure-noroot: no (unlocked) secure-no-suid-fixup: no (unlocked) secure-keep-caps: no (unlocked) secure-no-ambient-raise: no (unlocked) uid=0(root) euid=0(root) gid=0(root) groups= Guessed mode: UNCERTAIN (0)

  3. 调试日子如下: penClash 调试日志

生成时间: 2020-12-25 15:59:02 插件版本: v0.41.13-beta 隐私提示: 上传此日志前请注意检查、屏蔽公网IP、节点、密码等相关敏感信息



#===================== 系统信息 =====================#

主机型号: Intel(R) Celeron(R) CPU G3930 @ 2.90GHz : 1 Core 2 Thread
固件版本: OpenWrt SNAPSHOT r0-785c914
LuCI版本: git-20.343.54716-6fc079f-1
内核版本: 5.4.84
处理器架构: x86_64

#此项在使用Tun模式时应为ACCEPT
防火墙转发: ACCEPT

#此项有值时建议到网络-接口-lan的设置中禁用IPV6的DHCP
IPV6-DHCP: 

#此项结果应仅有配置文件的DNS监听地址
Dnsmasq转发设置: 192.168.25.1#53

#===================== 依赖检查 =====================#

dnsmasq-full: 已安装
coreutils: 已安装
coreutils-nohup: 已安装
bash: 已安装
curl: 已安装
jsonfilter: 已安装
ca-certificates: 已安装
ipset: 已安装
ip-full: 已安装
iptables-mod-tproxy: 已安装
kmod-ipt-tproxy: 已安装
iptables-mod-extra: 已安装
kmod-ipt-extra: 已安装
libcap: 已安装
libcap-bin: 已安装
ruby: 已安装
ruby-yaml: 已安装
ruby-psych: 已安装
ruby-pstore: 已安装
ruby-dbm: 已安装
kmod-tun(TUN模式): 未安装
luci-compat(Luci-19.07): 已安装

#===================== 内核检查 =====================#

运行状态: 未运行
已选择的架构: linux-amd64

#下方无法显示内核版本号时请确认您的内核版本是否正确或者有无权限
Tun内核版本: 2020.12.18.gaf66a7a
Tun内核文件: 存在
Tun内核运行权限: 正常

Game内核版本: v0.17.0-232-ge389e33
Game内核文件: 存在
Game内核运行权限: 正常

Dev内核版本: v1.3.0-4-g4b1b494
Dev内核文件: 存在
Dev内核运行权限: 正常

#===================== 插件设置 =====================#

当前配置文件: /etc/openclash/config/config.yaml
启动配置文件: /etc/openclash/config.yaml
运行模式: fake-ip
默认代理模式: rule
UDP流量转发(tproxy): 启用
DNS劫持: 启用
自定义DNS: 启用
IPV6-DNS解析: 停用
禁用Dnsmasq缓存: 启用
自定义规则: 停用
仅允许内网: 启用
仅代理命中规则流量: 停用
仅允许常用端口流量: 停用
绕过中国大陆IP: 停用

#启动异常时建议关闭此项后重试
混合节点: 启用
保留配置: 停用

#启动异常时建议关闭此项后重试
第三方规则: 启用

#===================== 配置文件 =====================#

proxy-groups:
- name: Auto - UrlTest
  type: url-test
  url: https://cp.cloudflare.com/generate_204
  interval: '600'
  tolerance: '150'
- name: Proxy
  type: select
  proxies:
  - Auto - UrlTest
  - DIRECT
- name: Domestic
  type: select
  proxies:
  - DIRECT
  - Proxy
- name: Others
  type: select
  proxies:
  - Proxy
  - DIRECT
  - Domestic
- name: Apple
  type: select
  proxies:
  - DIRECT
  - Proxy
- name: Microsoft
  type: select
  proxies:
  - DIRECT
  - Proxy
- name: Netflix
  type: select
  proxies:
  - GlobalTV
  - DIRECT
- name: Youtube
  type: select
  disable-udp: true
  proxies:
  - GlobalTV
  - DIRECT
- name: Spotify
  type: select
  proxies:
  - GlobalTV
  - DIRECT
- name: Steam
  type: select
  proxies:
  - DIRECT
  - Proxy
- name: AdBlock
  type: select
  proxies:
  - REJECT
  - DIRECT
  - Proxy
- name: AsianTV
  type: select
  proxies:
  - DIRECT
  - Proxy
- name: GlobalTV
  type: select
  proxies:
  - Proxy
  - DIRECT
- name: Speedtest
  type: select
  proxies:
  - Proxy
  - DIRECT
- name: Telegram
  type: select
  proxies:
  - Proxy
  - DIRECT
- name: PayPal
  type: select
  proxies:
  - DIRECT
  - Proxy
rules:

#===================== 防火墙设置 =====================#

#NAT chain

# Generated by iptables-save v1.8.4 on Fri Dec 25 15:59:02 2020
*nat
:PREROUTING ACCEPT [14980:834206]
:INPUT ACCEPT [4644:325104]
:OUTPUT ACCEPT [2621:182178]
:POSTROUTING ACCEPT [16866:969917]
:MINIUPNPD - [0:0]
:MINIUPNPD-POSTROUTING - [0:0]
:postrouting_lan_rule - [0:0]
:postrouting_rule - [0:0]
:postrouting_wan_rule - [0:0]
:prerouting_lan_rule - [0:0]
:prerouting_rule - [0:0]
:prerouting_wan_rule - [0:0]
:zone_lan_postrouting - [0:0]
:zone_lan_prerouting - [0:0]
-A PREROUTING -p udp -m udp --dport 53 -j REDIRECT --to-ports 53
-A PREROUTING -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 53
-A PREROUTING -m comment --comment "!fw3: Custom prerouting rule chain" -j prerouting_rule
-A PREROUTING -i eth0 -m comment --comment "!fw3" -j zone_lan_prerouting
-A POSTROUTING -m comment --comment "!fw3: Custom postrouting rule chain" -j postrouting_rule
-A POSTROUTING -o eth0 -m comment --comment "!fw3" -j zone_lan_postrouting
-A zone_lan_postrouting -j MINIUPNPD-POSTROUTING
-A zone_lan_postrouting -m comment --comment "!fw3: Custom lan postrouting rule chain" -j postrouting_lan_rule
-A zone_lan_prerouting -j MINIUPNPD
-A zone_lan_prerouting -m comment --comment "!fw3: Custom lan prerouting rule chain" -j prerouting_lan_rule
COMMIT
# Completed on Fri Dec 25 15:59:02 2020

#Mangle chain

# Generated by iptables-save v1.8.4 on Fri Dec 25 15:59:02 2020
*mangle
:PREROUTING ACCEPT [1613629:1006144163]
:INPUT ACCEPT [341057:77866820]
:FORWARD ACCEPT [1272547:928274905]
:OUTPUT ACCEPT [320499:157982662]
:POSTROUTING ACCEPT [1591768:1086139634]
COMMIT
# Completed on Fri Dec 25 15:59:02 2020

#===================== IPSET状态 =====================#

Name: china

#===================== 路由表状态 =====================#

#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.25.1    0.0.0.0         UG    0      0        0 eth0
192.168.25.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
#ip route list
default via 192.168.25.1 dev eth0 proto static 
192.168.25.0/24 dev eth0 proto kernel scope link src 192.168.25.2 
#ip rule show
0:  from all lookup local
32766:  from all lookup main
32767:  from all lookup default

#===================== 端口占用状态 =====================#

#===================== 测试本机DNS查询 =====================#

Server:     127.0.0.1
Address:    127.0.0.1#53

Name:      www.baidu.com
www.baidu.com   canonical name = www.a.shifen.com
Name:      www.a.shifen.com
Address 1: 180.101.49.11
Address 2: 180.101.49.12
www.baidu.com   canonical name = www.a.shifen.com

#===================== 测试本机网络连接 =====================#

HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
Connection: keep-alive
Content-Length: 277
Content-Type: text/html
Date: Fri, 25 Dec 2020 07:59:03 GMT
Etag: "575e1f60-115"
Last-Modified: Mon, 13 Jun 2016 02:50:08 GMT
Pragma: no-cache
Server: bfe/1.0.8.18

#===================== 测试本机网络下载 =====================#

#===================== 最近运行日志 =====================#

time="2020-12-25T07:35:12Z" level=fatal msg="Parse config error: proxy group[0]: `use` or `proxies` missing"
2020-12-25 15:35:07 Error: OpenClash Can Not Start, Try Use Backup Rules Start Again
time="2020-12-25T07:35:16Z" level=fatal msg="Parse config error: proxy group[0]: `use` or `proxies` missing"
2020-12-25 15:35:07 Error: OpenClash Can Not Start, Try Use Raw Config Restart Again
2020-12-25 15:35:07 Error: Get DNS 'listen' Option Error, OpenClash Can Not Start With Raw Config File
2020-12-25 15:35:07 Error: Get DNS 'enhanced-mode' Option Error, OpenClash Can Not Start With Raw Config File
2020-12-25 15:35:07 Error: Get General 'redir-port' Option Error, OpenClash Can Not Start With Raw Config File
time="2020-12-25T07:55:27Z" level=fatal msg="Parse config error: proxy group[0]: `use` or `proxies` missing"
2020-12-25 15:55:22 Error: OpenClash Can Not Start, Try Use Backup Rules Start Again
time="2020-12-25T07:55:31Z" level=fatal msg="Parse config error: proxy group[0]: `use` or `proxies` missing"
2020-12-25 15:55:22 Error: OpenClash Can Not Start, Try Use Raw Config Restart Again
2020-12-25 15:55:22 Error: Get DNS 'listen' Option Error, OpenClash Can Not Start With Raw Config File
2020-12-25 15:55:22 Error: Get DNS 'enhanced-mode' Option Error, OpenClash Can Not Start With Raw Config File
2020-12-25 15:55:22 Error: Get General 'redir-port' Option Error, OpenClash Can Not Start With Raw Config File

![运行状态截图](https://user-images.githubusercontent.com/76617147/103216341-cc603300-4950-11eb-8837-ff93c6db9e6f.JPG)
vernesong commented 3 years ago

这个策略组没有加节点

Powerhotpot commented 3 years ago

这个策略组没有加节点

第一次使用是新手小白, 不知道如何添加节点, 或者有模板可以可以参考;非常感谢!

vernesong commented 3 years ago

一键生成页面创建节点信息,然后重新一键生成

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days