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

在OpenWrt Chaos Calmer 15.05.1 r49587中运行不了。 #24

Closed
ll3027 opened this issue Aug 29, 2018 · 5 comments
Closed

在OpenWrt Chaos Calmer 15.05.1 r49587中运行不了。 #24

ll3027 opened this issue Aug 29, 2018 · 5 comments

Comments

@ll3027
Copy link

ll3027 commented Aug 29, 2018

芯片:ar9344
内核版本 :3.18.79
openwrt 版本:OpenWrt Chaos Calmer 15.05.1 r49587
安装:luci-app-smartdns.1.2018.08.19-2204.all.ipk smartdns.1.2018.08.19-2204.ar71xx.ipk

在网页中尝试了主路由和上游dns模式两种方式,“在勾选配置页面中的Enable(启用)来启动SmartDNS”,均未运行SmartDNS。
怀疑是不是smartdns版本不对,改用smartdns.1.2018.08.19-2204.mips_24kc.ipk,也不能运行。
手动运行smartdns,不能运行,无进程。
使用“iptables -t nat -L PREROUTING | grep REDIRECT”检查路由规则,无路由规则。

PS.在上游dns模式,"去勾选Redirect选项"的表述建议改为"不勾选Redirect选项"。

@pymumu
Copy link
Owner

pymumu commented Aug 30, 2018

装ar71xx是对的,看看有无端口冲突
换个端口试试

@ll3027
Copy link
Author

ll3027 commented Aug 30, 2018

set_iptable()
{
IPS="ifconfig | grep "inet addr" | grep -v ":127" | grep "Bcast" | awk '{print $2}' | awk -F: '{print $2}'"
for IP in $IPS
do
//.........
done
}
改为

set_iptable()
{
IPS="ifconfig | grep "inet addr" | grep -v ":127" | grep "Bcast" | awk '{print $2}' | awk -F ':' '{print $2}'"
for IP in $IPS
do
//.........
done
}
`
-F中间没有空格。

还是没运行,换端口也不行。

@ll3027
Copy link
Author

ll3027 commented Aug 31, 2018

查看了日志,发现是socket创建失败,手动写配置文件上加上ip地址就可以了。
bind 127.0.0.1:5353。
但是到自启动就不行,仔细检查启动脚本/etc/ini.d/smartdns发现是写死了。
修改为
config_get "port" "$section" "port" "5353"
conf_append "bind" "127.0.0.1:$port"
SMARTDNS_PORT="$port"
本来的程序是ip地址是可配置项,网页上不能配置。

有个小建议:其实不需要这么多配置文件来生成最终配置文件的,只增加复杂程度了。

@pymumu
Copy link
Owner

pymumu commented Aug 31, 2018

这个是因为没有IPV6协议的支持。
程序默认绑定了ipv6的全局端口,以支持ipv4,ipv6.

网页上有自定义页面可以修改配置的,不需要改脚本的。

@pymumu
Copy link
Owner

pymumu commented Sep 3, 2018

新版本对这些问题作了修改,请更新验证。

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

No branches or pull requests

2 participants