diff --git a/package/cnsztl/luci-app-openclash/Makefile b/package/cnsztl/luci-app-openclash/Makefile index 4565ec77c0..c5efa6dd8f 100644 --- a/package/cnsztl/luci-app-openclash/Makefile +++ b/package/cnsztl/luci-app-openclash/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-openclash -PKG_VERSION:=0.34.4 +PKG_VERSION:=0.34.6 PKG_RELEASE:=beta PKG_MAINTAINER:=vernesong @@ -41,10 +41,10 @@ endef define Package/$(PKG_NAME)/preinst #!/bin/sh if [ -f "/etc/config/openclash" ]; then - cp "/etc/config/openclash" "/tmp/openclash.bak" 2>/dev/null - cp "/etc/config/openclash_custom_rules.list" "/tmp/openclash_custom_rules.list.bak" 2>/dev/null - cp "/etc/config/openclash_custom_hosts.list" "/tmp/openclash_custom_hosts.list.bak" 2>/dev/null - cp "/etc/config/openclash_custom_fake_black.conf" "/tmp/openclash_custom_fake_black.conf.bak" 2>/dev/null + cp "/etc/config/openclash" "/tmp/openclash.bak" >/dev/null 2>&1 + cp "/etc/config/openclash_custom_rules.list" "/tmp/openclash_custom_rules.list.bak" >/dev/null 2>&1 + cp "/etc/config/openclash_custom_hosts.list" "/tmp/openclash_custom_hosts.list.bak" >/dev/null 2>&1 + cp "/etc/config/openclash_custom_fake_black.conf" "/tmp/openclash_custom_fake_black.conf.bak" >/dev/null 2>&1 fi endef @@ -61,31 +61,32 @@ uci set firewall.openclash.path=/var/etc/openclash.include >/dev/null 2>&1 uci set firewall.openclash.reload=1 >/dev/null 2>&1 uci commit firewall >/dev/null 2>&1 if [ -f "/tmp/openclash.bak" ]; then - mv "/tmp/openclash.bak" "/etc/config/openclash" 2>/dev/null - mv "/tmp/openclash_custom_rules.list.bak" "/etc/config/openclash_custom_rules.list" 2>/dev/null - mv "/tmp/openclash_custom_hosts.list.bak" "/etc/config/openclash_custom_hosts.list" 2>/dev/null - mv "/tmp/openclash_custom_fake_black.conf.bak" "/etc/config/openclash_custom_fake_black.conf" 2>/dev/null + mv "/tmp/openclash.bak" "/etc/config/openclash" >/dev/null 2>&1 + mv "/tmp/openclash_custom_rules.list.bak" "/etc/config/openclash_custom_rules.list" >/dev/null 2>&1 + mv "/tmp/openclash_custom_hosts.list.bak" "/etc/config/openclash_custom_hosts.list" >/dev/null 2>&1 + mv "/tmp/openclash_custom_fake_black.conf.bak" "/etc/config/openclash_custom_fake_black.conf" >/dev/null 2>&1 fi if [ -f "/tmp/config.yaml" ]; then - mv "/tmp/config.yaml" "/etc/openclash/config.yaml" 2>/dev/null + mv "/tmp/config.yaml" "/etc/openclash/config.yaml" >/dev/null 2>&1 elif [ -f "/tmp/config.yml" ]; then - mv "/tmp/config.yml" "/etc/openclash/config.yaml" 2>/dev/null + mv "/tmp/config.yml" "/etc/openclash/config.yaml" >/dev/null 2>&1 fi -uci set openclash.config.enable=0 2>/dev/null && uci commit openclash 2>/dev/null -chmod 0755 /etc/init.d/openclash 2>/dev/null -chmod -R 0755 /usr/share/openclash/ 2>/dev/null +uci set openclash.config.enable=0 >/dev/null 2>&1 +uci commit openclash >/dev/null 2>&1 +chmod 0755 /etc/init.d/openclash >/dev/null 2>&1 +chmod -R 0755 /usr/share/openclash/ >/dev/null 2>&1 rm -rf /tmp/luci* endef define Package/$(PKG_NAME)/prerm #!/bin/sh if [ ! -f "/tmp/openclash_update.sh" ]; then - rm -rf /etc/openclash/clash 2>/dev/null + rm -rf /etc/openclash/clash >/dev/null 2>&1 fi - cp "/etc/config/openclash" "/tmp/openclash.bak" 2>/dev/null - cp "/etc/config/openclash_custom_rules.list" "/tmp/openclash_custom_rules.list.bak" 2>/dev/null - cp "/etc/config/openclash_custom_hosts.list" "/tmp/openclash_custom_hosts.list.bak" 2>/dev/null - cp "/etc/config/openclash_custom_fake_black.conf" "/tmp/openclash_custom_fake_black.conf.bak" 2>/dev/null + cp "/etc/config/openclash" "/tmp/openclash.bak" >/dev/null 2>&1 + cp "/etc/config/openclash_custom_rules.list" "/tmp/openclash_custom_rules.list.bak" >/dev/null 2>&1 + cp "/etc/config/openclash_custom_hosts.list" "/tmp/openclash_custom_hosts.list.bak" >/dev/null 2>&1 + cp "/etc/config/openclash_custom_fake_black.conf" "/tmp/openclash_custom_fake_black.conf.bak" >/dev/null 2>&1 endef define Package/$(PKG_NAME)/postrm @@ -94,21 +95,21 @@ if [ -f "/etc/openclash/config.yaml" ]; then mv "/etc/openclash/config.yaml" "/tmp/config.yaml" fi if [ -f "/etc/openclash/clash" ]; then - rm -rf /etc/openclash/config.* 2>/dev/null + rm -rf /etc/openclash/config.* >/dev/null 2>&1 else - rm -rf /etc/openclash 2>/dev/null + rm -rf /etc/openclash >/dev/null 2>&1 fi - rm -rf /tmp/openclash.log 2>/dev/null - rm -rf /tmp/openclash_start.log 2>/dev/null - rm -rf /tmp/Proxy_Group 2>/dev/null - rm -rf /tmp/openclash_last_version 2>/dev/null - rm -rf /tmp/clash_last_version 2>/dev/null - rm -rf /etc/openclash/dnsmasq_fake_block.conf 2>/dev/null + rm -rf /tmp/openclash.log >/dev/null 2>&1 + rm -rf /tmp/openclash_start.log >/dev/null 2>&1 + rm -rf /tmp/Proxy_Group >/dev/null 2>&1 + rm -rf /tmp/openclash_last_version >/dev/null 2>&1 + rm -rf /tmp/clash_last_version >/dev/null 2>&1 + rm -rf /etc/openclash/dnsmasq_fake_block.conf >/dev/null 2>&1 uci delete firewall.openclash >/dev/null 2>&1 uci commit firewall >/dev/null 2>&1 uci delete ucitrack.@openclash[-1] >/dev/null 2>&1 uci commit ucitrack >/dev/null 2>&1 -rm -rf /tmp/luci* + rm -rf /tmp/luci* endef define Package/$(PKG_NAME)/install diff --git a/package/cnsztl/luci-app-openclash/files/etc/init.d/openclash b/package/cnsztl/luci-app-openclash/files/etc/init.d/openclash index 44c6b01eaa..e683742f36 100755 --- a/package/cnsztl/luci-app-openclash/files/etc/init.d/openclash +++ b/package/cnsztl/luci-app-openclash/files/etc/init.d/openclash @@ -21,13 +21,13 @@ HOSTS_FILE="/etc/config/openclash_custom_hosts.list" add_cron() { - [ -z "$(grep "openclash.sh" "$CRON_FILE")" ] && { + [ -z "$(grep "openclash.sh" "$CRON_FILE" 2>/dev/null)" ] && { [ "$(uci get openclash.config.auto_update 2>/dev/null)" -eq 1 ] && echo "0 $(uci get openclash.config.auto_update_time 2>/dev/null) * * $(uci get openclash.config.config_update_week_time 2>/dev/null) /usr/share/openclash/openclash.sh" >> $CRON_FILE } - [ -z "$(grep "openclash_rule.sh" "$CRON_FILE")" ] && { + [ -z "$(grep "openclash_rule.sh" "$CRON_FILE" 2>/dev/null)" ] && { [ "$(uci get openclash.config.other_rule_auto_update 2>/dev/null)" -eq 1 ] && echo "0 $(uci get openclash.config.other_rule_update_day_time 2>/dev/null) * * $(uci get openclash.config.other_rule_update_week_time 2>/dev/null) /usr/share/openclash/openclash_rule.sh" >> $CRON_FILE } - [ -z "$(grep "openclash_ipdb.sh" "$CRON_FILE")" ] && { + [ -z "$(grep "openclash_ipdb.sh" "$CRON_FILE" 2>/dev/null)" ] && { [ "$(uci get openclash.config.geo_auto_update 2>/dev/null)" -eq 1 ] && echo "0 $(uci get openclash.config.geo_update_day_time 2>/dev/null) * * $(uci get openclash.config.geo_update_week_time 2>/dev/null) /usr/share/openclash/openclash_ipdb.sh" >> $CRON_FILE } crontab $CRON_FILE @@ -43,17 +43,19 @@ del_cron() } change_dns() { + uci del dhcp.@dnsmasq[-1].server >/dev/null 2>&1 uci add_list dhcp.@dnsmasq[0].server=127.0.0.1#"$dns_port" uci delete dhcp.@dnsmasq[0].resolvfile uci set dhcp.@dnsmasq[0].noresolv=1 + uci set dhcp.@dnsmasq[0].cachesize=0 uci commit dhcp } revert_dns() { - dns_port=$(uci get openclash.config.dns_port 2>/dev/null) - uci del_list dhcp.@dnsmasq[0].server=127.0.0.1#"$dns_port" >/dev/null 2>&1 + uci del dhcp.@dnsmasq[-1].server >/dev/null 2>&1 uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto uci set dhcp.@dnsmasq[0].noresolv=0 + uci delete dhcp.@dnsmasq[0].cachesize uci commit dhcp rm -rf /tmp/dnsmasq.d/dnsmasq_openclash.conf >/dev/null 2>&1 } @@ -79,6 +81,9 @@ yml_check() if [ ! -f "$4" ]; then cp "$3" "$4" fi + + #替换tab + sed -i 's/\t/ /g' "$3" 2>/dev/null #自定义DNS还原 if [ "$(grep -c '##Custom DNS##' "$3")" -gt 0 ] && [ "$2" = 0 ] && [ -f "$4" ]; then @@ -235,14 +240,20 @@ yml_dns_custom() sed -i "/^ \{0,\}nameserver:/c\ nameserver:" "$2" 2>/dev/null sed -i "/^ \{0,\}fallback:/c\ fallback:" "$2" 2>/dev/null fi - + #fallback-filter if [ ! -z "$(grep '^ \{0,\}fallback:' $2)" ]; then if [ -z "$(grep '^ \{0,\}fallback-filter:' $2)" ]; then - sed -i '/OpenClash-General-Settings/i\ fallback-filter:' "$2" 2>/dev/null - sed -i '/OpenClash-General-Settings/i\ geoip: true' "$2" 2>/dev/null - sed -i '/OpenClash-General-Settings/i\ ipcidr:' "$2" 2>/dev/null - sed -i '/OpenClash-General-Settings/i\ - 240.0.0.0/4' "$2" 2>/dev/null + awk '/^ {0,}fallback:/,/OpenClash-General-Settings/{print}' "$2" |sed '1d' |sed '$d' >/tmp/fallback.cache 2>/dev/null + sed -i '/fallback:/,$d' "$2" 2>/dev/null + echo " fallback:" >>"$2" + sed -i '/ fallback:/a\ - 240.0.0.0/4' "$2" 2>/dev/null + sed -i '/ fallback:/a\ ipcidr:' "$2" 2>/dev/null + sed -i '/ fallback:/a\ geoip: true' "$2" 2>/dev/null + sed -i '/ fallback:/a\ fallback-filter:' "$2" 2>/dev/null + sed -i '/ fallback:/r/tmp/fallback.cache' "$2" 2>/dev/null + rm -rf /tmp/fallback.cache 2>/dev/null + echo "#===================== OpenClash-General-Settings =====================#" >>"$2" else if [ -z "$(grep '^ fallback-filter:' $2)" ]; then sed -i "/fallback-filter:/c\ fallback-filter:" "$2" 2>/dev/null @@ -261,15 +272,13 @@ yml_dns_custom() sed -i '/^ \{0,\}ipcidr:/,/OpenClash-General-Settings/ {s/^ \{0,\}- / - /}' "$2" 2>/dev/null #修改参数空格 fi else #删除fallback-filter - if [ ! -z "$(grep '^ \{0,\}ipcidr:' $2)" ]; then - sed -i '/^ \{0,\}ipcidr:/,/OpenClash-General-Settings/ {/^ \{0,\}-/d}' "$2" 2>/dev/null + if [ ! -z "$(grep '^ \{0,\}fallback-filter:' $2)" ]; then + sed -i '/fallback-filter:/,$d' "$2" 2>/dev/null + echo "#===================== OpenClash-General-Settings =====================#" >>"$2" fi if [ ! -z "$(grep "^ \{0,1\}- " $2)" ]; then sed -i "s/^ \{0,\}- / - /" "$2" 2>/dev/null #添加参数空格 fi - sed -i '/fallback-filter:/d' "$2" 2>/dev/null - sed -i '/geoip:/d' "$2" 2>/dev/null - sed -i '/ipcidr:/d' "$2" 2>/dev/null fi } @@ -320,7 +329,6 @@ if [ ! -f "$CONFIG_FILE" ] && [ -f "$BACKUP_FILE" ]; then cp $BACKUP_FILE $CONFIG_FILE fi -echo "OpenClash 开始启动..." >$START_LOG enable=$(uci get openclash.config.enable 2>/dev/null) LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then @@ -330,6 +338,7 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then nohup /usr/share/openclash/openclash_core.sh & exit 0 } + echo "OpenClash 开始启动..." >$START_LOG echo "第一步: 获取配置..." >$START_LOG en_mode=$(uci get openclash.config.en_mode 2>/dev/null) enable_custom_dns=$(uci get openclash.config.enable_custom_dns 2>/dev/null) @@ -361,10 +370,10 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then yml_auth_custom "$CONFIG_FILE" yml_cut "$CHANGE_FILE" "$RULE_FILE" "$DNS_FILE" "$CONFIG_FILE" "$PROXY_FILE" yml_dns_custom "$enable_custom_dns" "$DNS_FILE" - sh /usr/share/openclash/yml_change.sh "$LOGTIME" "$en_mode" "$enable_custom_dns" "$da_password" "$cn_port" "$proxy_port" "$CHANGE_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$lan_ip" "$HOSTS_FILE" & + sh /usr/share/openclash/yml_change.sh "$LOGTIME" "$en_mode" "$enable_custom_dns" "$da_password" "$cn_port" "$proxy_port" "$CHANGE_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$lan_ip" & sh /usr/share/openclash/yml_rules_change.sh "$LOGTIME" "$rule_source" "$enable_custom_clash_rules" "$RULE_FILE" & wait - cat $CHANGE_FILE $DNS_FILE $PROXY_FILE $RULE_FILE > $CONFIG_FILE 2>/dev/null + cat "$CHANGE_FILE" "$DNS_FILE" "$PROXY_FILE" "$RULE_FILE" >$CONFIG_FILE 2>/dev/null rm -rf /tmp/yaml_* 2>/dev/null echo "第四步: DNS设置检查..." >$START_LOG if [ ! -z "$(sed -n '/^ \{0,\}nameserver:/{n;p}' $CONFIG_FILE |grep '^ \{0,\}fallback:')" ] || [ ! -z "$(sed -n '/^ \{0,\}nameserver:/{n;p}' $CONFIG_FILE |grep 'OpenClash-General')" ]; then @@ -393,33 +402,30 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then uci set firewall.openclash.reload=1 >/dev/null 2>&1 uci commit firewall >/dev/null 2>&1 fi - mkdir -p /var/etc + +mkdir -p /var/etc cat > "/var/etc/openclash.include" <<-EOF -iptables -t nat -N openclash -iptables -t nat -A openclash -d 0.0.0.0/8 -j RETURN -iptables -t nat -A openclash -d 10.0.0.0/8 -j RETURN -iptables -t nat -A openclash -d 127.0.0.0/8 -j RETURN -iptables -t nat -A openclash -d 169.254.0.0/16 -j RETURN -iptables -t nat -A openclash -d 172.16.0.0/12 -j RETURN -iptables -t nat -A openclash -d 192.168.0.0/16 -j RETURN -iptables -t nat -A openclash -d 224.0.0.0/4 -j RETURN -iptables -t nat -A openclash -d 240.0.0.0/4 -j RETURN -iptables -t nat -A openclash -p tcp --dport 22 -j ACCEPT -iptables -t nat -A openclash -p tcp -j REDIRECT --to-ports "$proxy_port" -iptables -t nat -A PREROUTING -p tcp -j openclash -iptables -t nat -A OUTPUT -p tcp -d 198.18.0.1/16 -j REDIRECT --to-ports "$proxy_port" +/etc/init.d/openclash restart EOF + + iptables -t nat -N openclash + iptables -t nat -A openclash -d 0.0.0.0/8 -j RETURN + iptables -t nat -A openclash -d 10.0.0.0/8 -j RETURN + iptables -t nat -A openclash -d 127.0.0.0/8 -j RETURN + iptables -t nat -A openclash -d 169.254.0.0/16 -j RETURN + iptables -t nat -A openclash -d 172.16.0.0/12 -j RETURN + iptables -t nat -A openclash -d 192.168.0.0/16 -j RETURN + iptables -t nat -A openclash -d 224.0.0.0/4 -j RETURN + iptables -t nat -A openclash -d 240.0.0.0/4 -j RETURN + iptables -t nat -A openclash -p tcp -j REDIRECT --to-ports "$proxy_port" + iptables -t nat -A PREROUTING -p tcp -j openclash + iptables -t nat -A OUTPUT -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port" if [ "$ipv6_enable" -eq 1 ]; then -cat >> "/var/etc/openclash.include" <<-EOF -ip6tables -t nat -N openclash -ip6tables -t nat -A openclash -p tcp -j REDIRECT --to-ports "$proxy_port" -ip6tables -t nat -A PREROUTING -p tcp -j openclash -EOF + ip6tables -t nat -N openclash + ip6tables -t nat -A openclash -p tcp -j REDIRECT --to-ports "$proxy_port" + ip6tables -t nat -A PREROUTING -p tcp -j openclash fi - - /etc/init.d/firewall restart >/dev/null 2>&1 - /etc/init.d/miniupnpd restart >/dev/null 2>&1 echo "第八步: 重启 Dnsmasq 程序..." >$START_LOG if [ "$(iptables -t nat -nL PREROUTING --line-number |grep dpt:53 |wc -l)" -gt 2 ]; then @@ -485,27 +491,50 @@ else echo "${LOGTIME} Config Not Found" >> $LOG_FILE sleep 5 echo "" >$START_LOG - else - echo "错误: 请从 OpenClash 客户端界面启动程序!" >$START_LOG - echo "${LOGTIME} OpenClash Must Be Start From The Luci Page" >> $LOG_FILE - sleep 5 - echo "" >$START_LOG fi fi } stop() { + #禁止多个实例 + status=$(ps|grep -c /etc/init.d/openclash) + [ "$status" -gt "3" ] && exit 0 + echo "OpenClash 开始关闭..." >$START_LOG echo "第一步: 删除 OpenClash 防火墙规则..." >$START_LOG rm -rf /var/etc/openclash.include 2>/dev/null - /etc/init.d/firewall restart >/dev/null 2>&1 - /etc/init.d/miniupnpd restart >/dev/null 2>&1 +#ipv4 + iptables -t nat -F openclash >/dev/null 2>&1 + nat_clashs=$(iptables -nvL PREROUTING -t nat |sed 1,2d |sed -n '/openclash/=' |sort -r) + for nat_clash in $nat_clashs; do + iptables -t nat -D PREROUTING "$nat_clash" >/dev/null 2>&1 + done + + iptables -t nat -X openclash >/dev/null 2>&1 + + out_lines=$(iptables -nvL OUTPUT -t nat |sed 1,2d |sed -n '/198.18.0.0\/16/=' 2>/dev/null |sort -r) + for out_line in $out_lines; do + iptables -t nat -D OUTPUT "$out_line" >/dev/null 2>&1 + done + +#ipv6 + ip6tables -t nat -F openclash >/dev/null 2>&1 + + nat6_clashs=$(ip6tables -nvL PREROUTING -t nat 2>/dev/null | sed 1,2d | sed -n '/openclash/=' |sort -r) + for nat6_clash in $nat6_clashs; do + ip6tables -t nat -D PREROUTING "$nat6_clash" >/dev/null 2>&1 + done + + ip6tables -t nat -X openclash >/dev/null 2>&1 echo "第二步: 关闭 OpenClash 守护程序..." >$START_LOG - kill -9 "$(ps |grep openclash_watchdog.sh |grep -v grep |awk '{print $1}')" >/dev/null 2>&1 - + watchdog_pids=$(ps |grep openclash_watchdog.sh |grep -v grep |awk '{print $1}' 2>/dev/null) + for watchdog_pid in $watchdog_pids; do + kill -9 "$watchdog_pid" >/dev/null 2>&1 + done + echo "第三步: 关闭 Clash 主程序..." >$START_LOG kill -9 "$(pidof clash|sed 's/$//g')" 2>/dev/null diff --git a/package/cnsztl/luci-app-openclash/files/etc/openclash/openclash_version b/package/cnsztl/luci-app-openclash/files/etc/openclash/openclash_version index b0f75a9f9c..f6496780bc 100644 --- a/package/cnsztl/luci-app-openclash/files/etc/openclash/openclash_version +++ b/package/cnsztl/luci-app-openclash/files/etc/openclash/openclash_version @@ -1,2 +1,2 @@ -v0.34.4-beta -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWoAAAAqCAMAAACtKeEJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjgxQkY5MzdERDk3QTExRTlBREM2RDg2M0FBQ0YyOTQxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjgxQkY5MzdFRDk3QTExRTlBREM2RDg2M0FBQ0YyOTQxIj4gPHhtcE1NOkRl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Fvd6ErMJHm8zR4OiDr8jB2+qDu9yEtNBynrjo6OjC3u9EmcqFvd2Dq8IFdLTC3Ouyz+Bjnr8lisTB1+NInc6ErcXB2eeAudk1jsLQ5PAab6CEuNYGXY8FZ58JaaB/uNjB1+Q1hrSEq8JkmLaXl5cOe7gnbZURgsMQgcIPgMFZWVlaWlpfX19bW1tcXFxeXl5NTU1PT09QUFBYWFhdXV1OTk7///////820RSCAAABAHRSTlP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AU/cHJQAAC+dJREFUeNrsVwlYVWUaPhxZBCFEBIFYFEVvinrzupALiFcCcUtDcUkmbaLIsijbc8aLst2amZolWgYERBCEi4qQqFmalqXt+VTWLDXobE4zFZOA8TLf///n3HvuvUg++TxOp8f3efjP973f9v/vOZwDUk/P/jXB7TrGxN/98HHqAVtPj9QzL7ld15j4Wz3gOo8eaX/yOX1j4m90gets0ppzepf61/rAA1LytzrHxH/rA9dJ316R+jLhRyD1f3QC6Ru944rUlw3jvtQJpP/qHVekvnxSP6ETSF/rHeOe1Al6lVoKSEk5+/+9CVLCxc4f98wF8MSQtdOmrXZlvwzxn+ZCfxmyenWv9atjXKjVeO2Z7w3pKzcENICjISXsq0tEWMrZ71n5Ml6+yMxxz14AXvwUvjFO5JDXxOF8/Z90kB5AL/VDbHjNhcpxYzSxaTnP9gk3qYNeBuKXR0evbAJSLlXqhIsW7BKkfq537MOSaxfd8BFsIVo2Bzj++uvrlgA5di6DpHevD6Eb8KILl+PGaOfte65PSOddkARMlTleiU85f4mYjarvWWmUjReZOe75XjEEGHk/oRkZWjpn3ReMffCAg/YCCe/ewIPoF124HDfGAZL6+T4huYmDV+T0mtRUk0FODbtYYcJmzw7SuFmzs75T6tlqjhOy1EYOqam3yygXqX/fG56LxPxl3kOHxvaHTUsPvf/+VWe8Y5e9jhcVai2OTwLcGmRgnSNHRQ5jQnJytFROjD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Tg7vYFZ58LdLALerlGm8uEtNBVos90tNg5lcmAudlInc0IWYfR4OiSuc8GdbSDr8gLb6iFvd3B1+Pv9voJcKwVaJfg7/dInc4Zg8AnhryDrcXP5PFTU1MPgMEQgcJZWVlaWlpfX19bW1tcXFxNTU1eXl5PT09QUFBYWFhdXV1OTk7///////9HhLrgAAABAHRSTlP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AU/cHJQAADFBJREFUeNrsVwlUFFcWrQaC20CkEW0QbEUlYCsoRlFoEOMALkQTx42JjtFo1LivMTFGZ0YEgVkyM8xiNkC2xtAgsmtU3LeYSDQxmmh2k5hMzzhOIBgu8/6vqu6qBgxnkuM53cd7Dv+/9/579/26v7qqEFpaKhcMuOUM+IcDYOPT5pYWoSVmzS3nwN8cAhs9WoTK4EYnwV8dAxvNwgJnkbzxLw6Cp4Xg750Fv3YQbBS+v6f53YYTaf5vR4HwrdPgnuZ3H/9yFAj/dRrc0/zu4wVHgfAfp8GfHAVtau4VGhr6q+CfXpXZXl6zrU6wl1dHanReug6yv9guNjzg98AG++ALiwb6+fmtVsXmrN7QunrOFj+/BxapY37we/H/hnDTHhFTKsERMzXi5o+EV6iXyq/EVKs9DiM6QvEm3uxgs5fawaI3+OW8sUgVnSNGUT1QETPjDfvqDWLeanWUNG+v3Uur/Va/dEe00lxXBngXarWB1Mjrx2oeilClmzYIMdajBYJ+Ws1fbgfHcV+vib3uw3FVdClw7dChsdOApXJokQfskl5+eQswbeyhQ9eWqsMHcKC9dndc4xBuqxERg3JBryEYteVet38kSHOVHwzIDaeiPKUjFAaNoYPNXmkbW3Bi5uLFi2dOwxZleOlYl8UsfALr5JAHpuG4uphO5hBLW3xRHSddX2kPd1rjEFqpVB6hiS41Gg0aTdqAjmqr81Idj5eX0LbmpgD0k8wCTGmWknVtM0bYaS6om0TIGTJebRvDMbf/Jxc/6X8Iw5Xhi4sX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aKl81Xw7Mpx5uqyS2edQvkQVZreuOeYnzf1BzB8XvHAVCk9Pgj44CJ9L8944C4TunwR8cBU6k+Z8dBcLsZmfBbxwEXQSfe5rfZbwv1DjNjf5bx0CXz4WW3hENzgEHkfyfLUJLS42Pc6j+dwdAl/c/b2n5nwADAGrWAJvdM6pAAAAAAElFTkSuQmCC \ No newline at end of file diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/controller/openclash.lua b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/controller/openclash.lua index 7d23749696..02fa47e026 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/controller/openclash.lua +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/controller/openclash.lua @@ -37,7 +37,7 @@ local function is_web() end local function is_watchdog() - return luci.sys.exec("ps |grep openclash_watchdog.sh |grep -v grep 2>/dev/null") + return luci.sys.exec("ps |grep openclash_watchdog.sh |grep -v grep 2>/dev/null |sed -n 1p") end local function config_check() @@ -141,11 +141,11 @@ local function startlog() end local function coremodel() - local coremodel = luci.sys.exec("cat /proc/cpuinfo |grep 'cpu model' 2>/dev/null |awk -F ': ' '{print $2}' 2>/dev/null") - if (coremodel ~= "") then - return coremodel - else + local coremodel = luci.sys.exec("cat /proc/cpuinfo |grep 'cpu model' 2>/dev/null |awk -F ': ' '{print $2}' 2>/dev/null") + if not coremodel or coremodel == "" then return luci.sys.exec("opkg status libc 2>/dev/null |grep 'Architecture' |awk -F ': ' '{print $2}' 2>/dev/null") + else + return coremodel end end @@ -252,10 +252,10 @@ function action_update() coremodel = coremodel(), coremodel2 = coremodel2(), corecv = corecv(), - corelv = corelv(), opcv = opcv(), corever = corever(), upchecktime = upchecktime(), + corelv = corelv(), oplv = oplv(); }) end diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/config.lua b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/config.lua index e0f3e87602..612a504151 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/config.lua +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/config.lua @@ -5,6 +5,7 @@ local HTTP = require "luci.http" local DISP = require "luci.dispatcher" local UTIL = require "luci.util" local fs = require "luci.openclash" +local uci = require("luci.model.uci").cursor() local CHIF = "0" ful = SimpleForm("upload", translate("Server Configuration"), nil) @@ -113,14 +114,16 @@ o = a:option(Button, "Commit") o.inputtitle = translate("Commit Configurations") o.inputstyle = "apply" o.write = function() - SYS.call("uci commit openclash") + uci:commit("openclash") end o = a:option(Button, "Apply") o.inputtitle = translate("Apply Configurations") o.inputstyle = "apply" o.write = function() - SYS.call("uci set openclash.config.enable=1 && uci commit openclash && /etc/init.d/openclash restart >/dev/null 2>&1 &") + uci:set("openclash", "config", "enable", 1) + uci:commit("openclash") + SYS.call("/etc/init.d/openclash restart >/dev/null 2>&1 &") HTTP.redirect(DISP.build_url("admin", "services", "openclash")) end diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/groups-config.lua b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/groups-config.lua index 3e7b2abc7f..e0549cbd18 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/groups-config.lua +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/groups-config.lua @@ -1,5 +1,3 @@ --- Copyright (C) 2017 yushi studio github.com/ywb94 --- Licensed to the public under the GNU General Public License v3. local m, s, o local openclash = "openclash" @@ -69,7 +67,7 @@ o = a:option(Button,"Commit") o.inputtitle = translate("Commit Configurations") o.inputstyle = "apply" o.write = function() - uci:commit(openclash, sid) + m.uci:commit(openclash) sys.call("/usr/share/openclash/yml_groups_name_ch.sh start") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers")) end @@ -78,7 +76,7 @@ o = a:option(Button,"Back") o.inputtitle = translate("Back Configurations") o.inputstyle = "reset" o.write = function() - uci:revert(openclash, sid) + m.uci:revert(openclash) luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers")) end diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers-config.lua b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers-config.lua index 6259843101..833b1961df 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers-config.lua +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers-config.lua @@ -1,5 +1,3 @@ --- Copyright (C) 2017 yushi studio github.com/ywb94 --- Licensed to the public under the GNU General Public License v3. local m, s, o local openclash = "openclash" @@ -10,7 +8,7 @@ local sid = arg[1] local uuid = luci.sys.exec("cat /proc/sys/kernel/random/uuid") local encrypt_methods_ss = { - + -- stream "rc4-md5", "aes-128-cfb", @@ -80,7 +78,7 @@ o.rmempty = true o:depends("type", "ss") o = s:option(ListValue, "securitys", translate("Encrypt Method")) -for _, v in ipairs(securitys) do o:value(v, v:upper()) end +for _, v in ipairs(securitys) do o:value(v) end o.rmempty = true o:depends("type", "vmess") @@ -152,8 +150,16 @@ o:depends("type", "socks5") o:depends("type", "http") o.rmempty = true +-- [[ MUX ]]-- +o = s:option(ListValue, "mux", translate("mux")) +o.rmempty = true +o.default = "false" +o:value("true") +o:value("false") +o:depends("obfs", "websocket") + -- [[ skip-cert-verify ]]-- -o = s:option(ListValue, "skip_cert_verify", translate("Skip Cert Verify")) +o = s:option(ListValue, "skip_cert_verify", translate("Skip-Cert-Verify")) o.rmempty = true o.default = "false" o:value("true") @@ -177,7 +183,7 @@ o:depends("type", "http") o = s:option(DynamicList, "groups", translate("Proxy Group")) o.description = translate("No Need Set when Config Create, The added Proxy Groups Must Exist") o.rmempty = true -uci:foreach("openclash", "groups", +m.uci:foreach("openclash", "groups", function(s) o:value(s.name) end) @@ -191,16 +197,16 @@ o = a:option(Button,"Commit") o.inputtitle = translate("Commit Configurations") o.inputstyle = "apply" o.write = function() - uci:commit(openclash, sid) - luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers")) + m.uci:commit(openclash) + luci.http.redirect(m.redirect) end o = a:option(Button,"Back") o.inputtitle = translate("Back Configurations") o.inputstyle = "reset" o.write = function() - uci:revert(openclash, sid) - luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers")) + m.uci:revert(openclash) + luci.http.redirect(m.redirect) end return m diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers.lua b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers.lua index 36b506e914..61bf271155 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers.lua +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers.lua @@ -32,26 +32,17 @@ o = a:option(Button, "Commit") o.inputtitle = translate("Commit Configurations") o.inputstyle = "apply" o.write = function() - uci:commit("openclash") + m.uci:set("openclash", "config", "enable", 0) + m.uci:commit("openclash") end o = a:option(Button, "Apply") o.inputtitle = translate("Apply Configurations") o.inputstyle = "apply" o.write = function() - uci:set("openclash", "config", "enable", 1) - uci:commit("openclash") - local refresh_config = uci:get("openclash", "config", "create_config") - if (refresh_config == "1") then - luci.sys.call("/usr/share/openclash/yml_proxys_set.sh >/dev/null 2>&1") - uci:delete_all("openclash", "servers", function(s) return true end) - uci:delete_all("openclash", "groups", function(s) return true end) - luci.sys.call("/usr/share/openclash/yml_groups_get.sh >/dev/null 2>&1") - luci.sys.call("/etc/init.d/openclash restart >/dev/null 2>&1 &") - else - luci.sys.call("/usr/share/openclash/yml_proxys_set.sh >/dev/null 2>&1") - luci.sys.call("/etc/init.d/openclash restart >/dev/null 2>&1 &") - end + m.uci:set("openclash", "config", "enable", 0) + m.uci:commit("openclash") + luci.sys.call("/usr/share/openclash/yml_proxys_set.sh >/dev/null 2>&1 &") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash")) end @@ -64,18 +55,19 @@ o = b:option(Button,"Load_Config") o.inputtitle = translate("Load Config") o.inputstyle = "apply" o.write = function() - uci:delete_all("openclash", "servers", function(s) return true end) - uci:delete_all("openclash", "groups", function(s) return true end) - luci.sys.call("sh /usr/share/openclash/yml_groups_get.sh 2>/dev/null") - luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers")) + m.uci:set("openclash", "config", "enable", 0) + m.uci:commit("openclash") + luci.sys.call("sh /usr/share/openclash/yml_groups_get.sh 2>/dev/null &") + luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash")) end o = b:option(Button,"Delete_Severs") o.inputtitle = translate("Delete Severs") o.inputstyle = "reset" o.write = function() - uci:delete_all("openclash", "servers", function(s) return true end) - luci.sys.call("uci commit openclash") + m.uci:set("openclash", "config", "enable", 0) + m.uci:delete_all("openclash", "servers", function(s) return true end) + m.uci:commit("openclash") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers")) end @@ -83,8 +75,9 @@ o = b:option(Button,"Delete_Groups") o.inputtitle = translate("Delete Groups") o.inputstyle = "reset" o.write = function() - uci:delete_all("openclash", "groups", function(s) return true end) - luci.sys.call("uci commit openclash") + m.uci:set("openclash", "config", "enable", 0) + m.uci:delete_all("openclash", "groups", function(s) return true end) + m.uci:commit("openclash") luci.http.redirect(luci.dispatcher.build_url("admin", "services", "openclash", "servers")) end diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/settings.lua b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/settings.lua index 34cf15a167..c5a4339907 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/settings.lua +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/settings.lua @@ -4,7 +4,7 @@ local SYS = require "luci.sys" local HTTP = require "luci.http" local DISP = require "luci.dispatcher" local UTIL = require "luci.util" -local uci = require("luci.model.uci").cursor() +local uci = require "luci.model.uci".cursor() m = Map("openclash", translate("Global Settings(Will Modify The Config File Or Subscribe According To The Settings On This Page)")) m.pageaction = false @@ -103,8 +103,8 @@ o:depends("dns_advanced_setting", "1") o.inputtitle = translate("Check And Update") o.inputstyle = "reload" o.write = function() - uci:set("openclash", "config", "enable", 1) - uci:commit("openclash") + m.uci:set("openclash", "config", "enable", 1) + m.uci:commit("openclash") SYS.call("sh /usr/share/openclash/openclash_fake_block.sh && /etc/init.d/openclash restart >/dev/null 2>&1 &") HTTP.redirect(DISP.build_url("admin", "services", "openclash")) end @@ -141,10 +141,8 @@ o:value("lhie1", translate("lhie1 Rules")) o:value("ConnersHua", translate("ConnersHua Rules")) o:value("ConnersHua_return", translate("ConnersHua Return Rules")) -SYS.call("awk '/Proxy Group:/,/Rule:/{print}' /etc/openclash/config.yaml 2>/dev/null |egrep '^ {0,}-' |grep name: |awk -F 'name: ' '{print $2}' |sed 's/,.*//' |sed 's/\"//g' >/tmp/Proxy_Group 2>&1") -SYS.call("echo 'DIRECT' >>/tmp/Proxy_Group") -SYS.call("echo 'REJECT' >>/tmp/Proxy_Group") -file = io.open("/tmp/Proxy_Group", "r"); +SYS.call("/usr/share/openclash/yml_groups_name_get.sh 2>/dev/null") +file = io.open("/tmp/Proxy_Group", "r"); o = s:taboption("rules", ListValue, "GlobalTV", translate("GlobalTV")) o:depends("rule_source", "lhie1") @@ -241,8 +239,8 @@ o.title = translate("Update Subcription") o.inputtitle = translate("Check And Update") o.inputstyle = "reload" o.write = function() - uci:set("openclash", "config", "enable", 1) - uci:commit("openclash") + m.uci:set("openclash", "config", "enable", 1) + m.uci:commit("openclash") SYS.call("rm -rf /etc/openclash/config.bak 2>/dev/null") SYS.call("sh /usr/share/openclash/openclash.sh >/dev/null 2>&1 &") HTTP.redirect(DISP.build_url("admin", "services", "openclash")) @@ -277,8 +275,8 @@ o.inputtitle = translate("Check And Update") o.description = translate("Other Rules Update(Only in Use)") o.inputstyle = "reload" o.write = function() - uci:set("openclash", "config", "enable", 1) - uci:commit("openclash") + m.uci:set("openclash", "config", "enable", 1) + m.uci:commit("openclash") SYS.call("sh /usr/share/openclash/openclash_rule.sh >/dev/null 2>&1 &") HTTP.redirect(DISP.build_url("admin", "services", "openclash")) end @@ -311,8 +309,8 @@ o.title = translate("Update GEOIP Database") o.inputtitle = translate("Check And Update") o.inputstyle = "reload" o.write = function() - uci:set("openclash", "config", "enable", 1) - uci:commit("openclash") + m.uci:set("openclash", "config", "enable", 1) + m.uci:commit("openclash") SYS.call("sh /usr/share/openclash/openclash_ipdb.sh >/dev/null 2>&1 &") HTTP.redirect(DISP.build_url("admin", "services", "openclash")) end @@ -456,15 +454,15 @@ o = a:option(Button, "Commit") o.inputtitle = translate("Commit Configurations") o.inputstyle = "apply" o.write = function() - uci:commit("openclash") + m.uci:commit("openclash") end o = a:option(Button, "Apply") o.inputtitle = translate("Apply Configurations") o.inputstyle = "apply" o.write = function() - uci:set("openclash", "config", "enable", 1) - uci:commit("openclash") + m.uci:set("openclash", "config", "enable", 1) + m.uci:commit("openclash") SYS.call("/etc/init.d/openclash restart >/dev/null 2>&1 &") HTTP.redirect(DISP.build_url("admin", "services", "openclash")) end diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/openclash.lua b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/openclash.lua index 0be7fe675d..d54c1b9756 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/openclash.lua +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/openclash.lua @@ -1,39 +1,11 @@ ---[[ -LuCI - Filesystem tools - -Description: -A module offering often needed filesystem manipulation functions - -FileId: -$Id$ - -License: -Copyright 2008 Steven Barth - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- local fs = require "nixio.fs" - local type = type ---- LuCI filesystem library. module "luci.openclash" ---- Checks wheather the given path exists and points to a directory. --- @param dirname String containing the path of the directory to test --- @return Boolean indicating wheather given path points to directory +--- LuCI filesystem library. + function isdirectory(dirname) return fs.stat(dirname, "type") == "dir" end diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/developer.htm b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/developer.htm index ae70254ee0..6167e5bd39 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/developer.htm +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/developer.htm @@ -14,10 +14,10 @@ var binupdate = document.getElementById('_binupdate'); var openupdate = document.getElementById('_openupdate'); var github = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABiCAMAAACRZYZ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3FpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6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GxsbFlZWUgICAWFhYlJSVMTEwsLCwKCgo6OjqUlJQcHBwaGhr09PQpKSldXV2fn5+4uLiQkJACAgLo6Ojp6elGRkba2tqWlpYBAQHZ2dmnp6fFxcWSkpKurq5KSkqysrI9PT0FBQWYmJhnZ2e9vb1zc3NERETz8/N4eHh+fn5mZmbHx8eIiIiKioq1tbVhYWGoqKhXV1cTExMeHh6srKxqamqLi4ukpKTb29sqKirCwsKmpqbOzs5aWlo8PDyMjIzV1dWdnZ2zs7OFhYXl5eUXFxd0dHQHBweenp7W1tZ9fX0iIiLg4OAtLS2NjY3AwMCgoKCJiYmwsLCPj4/U1NRWVlYRERFPT0+Hh4dsbGxvb2/Pz8/Dw8MdHR0uLi5NTU2+vr4fHx/R0dE5OTm/v7+ioqJQUFDGxsbJyckUFBTKyso2NjZRUVEZGRmtra3i4uImJiZSUlLe3t6CgoJUVFRtbW3Ly8sYGBjMzMwwMDDT09NJSUkkJCRISEi2trZkZGRBQUEMDAy6uro/Pz9/f39ra2sODg4nJycSEhJ7e3s7OzsVFRVycnIyMjJcXFxbW1t2dnYbGxv///8AAAD///9H5/bkAAAA0nRSTlP//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wD8iKrvAAAFUElEQVR42qya90PbOBTHZRKTQQgBMgoByipll00H0E1bRhfr2l6v+7r3uLbXvXvd19t777333svqf3SpTRzbT4ptyd/fkJ7ex9iK9PSe0B2L8lxeVx//qKO4PdJ3qHhXbXzlloOi1bHIilFJxs2X92CgT1adimY7Awnc2JyFqare0RbjhbhfWVuDTTT54RaRAyKunI0taVZbOSNk44k/sGVV7y9jgKDBSdiW7tsp2IWMhrBtffaxLYjnCmbS1LB1yOm5mFFnCq1C7sUcyrUEQfdjLvX4zSHuVZhTh3LMIA2/YG5VlaWHlE/ATuhyOognCzujHDpE+NIhBv6ugQaR5mPHdMZFgWzCDupNMmQQO6pcEiSgt/nzrM2XF9r0r74h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faH8+fuBBhokNw3jcUKuXmpXuyvU4Lnx6vFYuvxElM54SyJVHdwpgzyr62IGHeIj109Sn+USR3BiSKGDclMqcfAT73+yl14425naGEUuyLF0JcB4yu5aHjvkt/TFzBXaROj6w1u83iHvs80v2oN0mpVlD5BGFdmCPGpeYI7aiShJkJNWSuWF52ClzQbkCWv1+DwQpK2xDAmVWL6+0GUYOmwVEkc2LmIE9SWwFdYgFQft3fZAe7UxwhVLkHrB9uWYnHiN+RTWnEc6y5iu+WwcTkbJtTTI9nGDyv0FzBeWysdekH2M0iBKor+iq5zr6hVq7Iw8t42+eDW9G5n6vGDi5H8BBgCTacDsFxo/3wAAAABJRU5ErkJggg==" - Dreamacro.innerHTML = 'Dreamacro'; - vernesong.innerHTML = 'vernesong'; - frainzy1477.innerHTML = 'frainzy1477'; - SukkaW.innerHTML = 'SukkaW'; + Dreamacro.innerHTML = 'Dreamacro'; + vernesong.innerHTML = 'vernesong'; + frainzy1477.innerHTML = 'frainzy1477'; + SukkaW.innerHTML = 'SukkaW'; binupdate.innerHTML = 'binupdate'; openupdate.innerHTML = 'openupdate'; @@ -52,10 +52,10 @@ window.open(url6); } - function imgerrorfun(){ - var img=event.srcElement; - img.src=github; - img.onerror=null; + function imgerrorfun(imgobj,imgSrc){ + setTimeout(function(){ + imgobj.src=imgSrc; + },1000*5); } //]]> \ No newline at end of file diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/status.htm b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/status.htm index cb048faae5..4726bd39a0 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/status.htm +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/status.htm @@ -11,13 +11,13 @@

- star + star     - Wiki + Wiki     - Telegram + Telegram     - +

@@ -125,13 +125,13 @@ } - XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "currentversion")%>', status.currentversion, function(x, status) { - if ( x && x.status == 200 ) { - clashversion.innerHTML = 'currentversion'; - } - }); + XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "currentversion")%>', status.currentversion, function(x, status) { + if ( x && x.status == 200 ) { + clashversion.innerHTML = 'currentversion'; + } + }); -function clashversion_check() + function clashversion_check() { XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "lastversion")%>', status.lastversion, function(x, status) { if ( x && x.status == 200 ) { @@ -143,18 +143,23 @@ function clashversion_check() }); } -function clashversion_error() + function clashversion_error() { - clashversion.innerHTML = 'currentversion'; + clashversion.innerHTML = 'currentversion'; } - -function go_update() + function imgerrorfuns(imgobj,imgSrc){ + setTimeout(function(){ + imgobj.src=imgSrc; + },1000*5); + } + + function go_update() { - url4='https://github.com/vernesong/OpenClash/releases'; - window.open(url4); + url4='https://github.com/vernesong/OpenClash/releases'; + window.open(url4); } var startlog = document.getElementById('_clashstart'); diff --git a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/update.htm b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/update.htm index 2214368990..63d5270bdc 100644 --- a/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/update.htm +++ b/package/cnsztl/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/update.htm @@ -29,6 +29,8 @@ var ma_op_up = document.getElementById('ma_op_up'); XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "update")%>', null, function(x, status) { if ( x && x.status == 200 ) { + cpu_model.innerHTML = status.coremodel ? ""+status.coremodel+"" : "<%:Model Not Found%>"; + cpu_model2.innerHTML = status.coremodel2 ? ""+status.coremodel2+"" : "<%:Model Not Found%>"; if ( status.corever != "0\n" && status.corever != "" ) { core_version.innerHTML = ""+status.corever+""; } @@ -41,8 +43,6 @@ else { checktime.innerHTML = "<%:查询更新失败%>"; } - cpu_model.innerHTML = status.coremodel ? ""+status.coremodel+"" : "<%:Model Not Found%>"; - cpu_model2.innerHTML = status.coremodel2 ? ""+status.coremodel2+"" : "<%:Model Not Found%>"; if ( status.corecv == "0" ) { core_cv.innerHTML = "<%:File Not Exist%>"; } @@ -74,8 +74,10 @@ } }); - XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "update")%>', null, function(x, status) { + XHR.poll(6, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "update")%>', null, function(x, status) { if ( x && x.status == 200 ) { + cpu_model.innerHTML = status.coremodel ? ""+status.coremodel+"" : "<%:Model Not Found%>"; + cpu_model2.innerHTML = status.coremodel2 ? ""+status.coremodel2+"" : "<%:Model Not Found%>"; if ( status.corever != "0\n" && status.corever != "" ) { core_version.innerHTML = ""+status.corever+""; } @@ -88,8 +90,6 @@ else { checktime.innerHTML = "<%:查询更新失败%>"; } - cpu_model.innerHTML = status.coremodel ? ""+status.coremodel+"" : "<%:Model Not Found%>"; - cpu_model2.innerHTML = status.coremodel2 ? ""+status.coremodel2+"" : "<%:Model Not Found%>"; if ( status.corecv == "0" ) { core_cv.innerHTML = "<%:File Not Exist%>"; } diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/clash_version.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/clash_version.sh index 3444e34f23..49d13fada0 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/clash_version.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/clash_version.sh @@ -1,9 +1,9 @@ #!/bin/sh CKTIME=$(date "+%Y-%m-%d-%H") LAST_OPVER="/tmp/clash_last_version" -version_url="https://github.com/vernesong/OpenClash/raw/master/core_version" +version_url="https://raw.githubusercontent.com/vernesong/OpenClash/master/core_version" if [ "$CKTIME" != "$(grep "CheckTime" $LAST_OPVER 2>/dev/null |awk -F ':' '{print $2}')" ]; then - wget-ssl --no-check-certificate --quiet --timeout=5 --tries=2 "$version_url" -O $LAST_OPVER + wget-ssl --no-check-certificate --quiet --timeout=10 --tries=2 "$version_url" -O $LAST_OPVER if [ "$?" -eq "0" ] && [ "$(ls -l $LAST_OPVER 2>/dev/null |awk '{print int($5)}')" -gt 0 ]; then echo "CheckTime:$CKTIME" >>$LAST_OPVER else diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash.sh index 0264f8d704..438b938050 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash.sh @@ -1,4 +1,7 @@ -#!/bin/sh +#!/bin/bash +status=$(ps|grep -c /usr/share/openclash/openclash.sh) +[ "$status" -gt "3" ] && exit 0 + START_LOG="/tmp/openclash_start.log" LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") CONFIG_FILE="/etc/openclash/config.yaml" @@ -6,6 +9,10 @@ LOG_FILE="/tmp/openclash.log" BACKPACK_FILE="/etc/openclash/config.bak" URL_TYPE=$(uci get openclash.config.config_update_url_type 2>/dev/null) subscribe_url=$(uci get openclash.config.subscribe_url 2>/dev/null) +en_mode=$(uci get openclash.config.en_mode 2>/dev/null) + +config_dawnload() +{ if [ "$URL_TYPE" == "V2ray" ]; then echo "开始下载v2ray配置文件..." >$START_LOG subscribe_url=`echo $subscribe_url |sed 's/{/%7B/g;s/}/%7D/g;s/:/%3A/g;s/\"/%22/g;s/,/%2C/g;s/?/%3F/g;s/=/%3D/g;s/&/%26/g;s/\//%2F/g'` @@ -18,7 +25,10 @@ else echo "开始下载Clash配置文件..." >$START_LOG wget-ssl --no-check-certificate --quiet --timeout=10 --tries=2 "$subscribe_url" -O /tmp/config.yaml fi -if [ "$?" -eq "0" ] && [ "$(ls -l /tmp/config.yaml |awk '{print int($5/1024)}')" -ne 0 ] && [ "$(awk '/Proxy Group:/,/Rule:/{print}' /tmp/config.yaml 2>/dev/null |egrep '^ {0,}-' |grep name: |sed 's/,.*//' |awk -F 'name: ' '{print $2}' |sed 's/\"//g' |wc -l)" -gt 0 ]; then +} + +config_su_check() +{ echo "配置文件下载成功,检查是否有更新..." >$START_LOG if [ -f "$CONFIG_FILE" ]; then cmp -s "$BACKPACK_FILE" /tmp/config.yaml @@ -44,10 +54,46 @@ if [ "$?" -eq "0" ] && [ "$(ls -l /tmp/config.yaml |awk '{print int($5/1024)}')" && echo "${LOGTIME} Config Update Successful" >>$LOG_FILE\ && /etc/init.d/openclash restart 2>/dev/null fi -else +} + +config_error() +{ echo "配置文件下载失败,请检查网络或稍后再试!" >$START_LOG echo "${LOGTIME} Config Update Error" >>$LOG_FILE rm -rf /tmp/config.yaml 2>/dev/null - sleep 10 + sleep 5 echo "" >$START_LOG +} + +config_dawnload + +if [ "$?" -eq "0" ] && [ "$(ls -l /tmp/config.yaml |awk '{print int($5/1024)}')" -ne 0 ]; then + config_su_check +else + if pidof clash >/dev/null; then + echo "配置文件下载失败,尝试不使用代理下载配置文件..." >$START_LOG + if [ "$en_mode" = "fake-ip"]; then + resolve_sub_ips=$(nslookup "$subscribe_url" 114.114.114.114 |grep Address |awk -F ': ' '{print $2}') + else + resolve_sub_ips=$(nslookup "$subscribe_url" 127.0.0.1 |grep Address |awk -F ': ' '{print $2}') + fi + + for resolve_sub_ip in $resolve_sub_ips; do + iptables -t nat -I openclash -d "$resolve_sub_ip" -j RETURN >/dev/null 2>&1 + done + + config_dawnload + + if [ "$?" -eq "0" ] && [ "$(ls -l /tmp/config.yaml |awk '{print int($5/1024)}')" -ne 0 ]; then + config_su_check + else + config_error + fi + + for resolve_sub_ip in $resolve_sub_ips; do + iptables -t nat -D openclash -d "$resolve_sub_ip" -j RETURN >/dev/null 2>&1 + done + else + config_error + fi fi diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash_version.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash_version.sh index 40a61dd4a1..950a516712 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash_version.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash_version.sh @@ -1,7 +1,7 @@ #!/bin/sh CKTIME=$(date "+%Y-%m-%d-%H") LAST_OPVER="/tmp/openclash_last_version" -version_url="https://github.com/vernesong/OpenClash/raw/master/version" +version_url="https://raw.githubusercontent.com/vernesong/OpenClash/master/version" if [ "$CKTIME" != "$(grep "CheckTime" $LAST_OPVER 2>/dev/null |awk -F ':' '{print $2}')" ]; then wget-ssl --no-check-certificate --quiet --timeout=10 --tries=2 "$version_url" -O $LAST_OPVER if [ "$?" -eq "0" ] && [ "$(ls -l $LAST_OPVER 2>/dev/null |awk '{print int($5)}')" -gt 0 ]; then diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash_watchdog.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash_watchdog.sh index bb0769b39d..268bec050b 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash_watchdog.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/openclash_watchdog.sh @@ -1,21 +1,24 @@ #!/bin/sh -status=$(ps|grep -c openclash_watchdog.sh) -[ "$status" -gt "3" ] && echo "another clash_watchdog.sh is running,exit " -[ "$status" -gt "3" ] && exit 0 +enable_redirect_dns=$(uci get openclash.config.enable_redirect_dns 2>/dev/null) +dns_port=$(uci get openclash.config.dns_port 2>/dev/null) while :; do + LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") enable=$(uci get openclash.config.enable) + if [ "$enable" -eq 1 ]; then if ! pidof clash >/dev/null; then - LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") echo "${LOGTIME} Watchdog: OpenClash Problem, Restart " >>/tmp/openclash.log - /etc/init.d/openclash restart + nohup /etc/init.d/openclash restart & + exit 0 fi +else + exit 0 fi ## Log File Size Manage: - LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") + LOGSIZE=`ls -l /tmp/openclash.log |awk '{print int($5/1024)}'` if [ "$LOGSIZE" -gt 90 ]; then echo "[$LOGTIME] Watchdog: Size Limit, Clean Up All Log Records." > /tmp/openclash.log @@ -25,9 +28,24 @@ fi zone_line=`iptables -t nat -nL PREROUTING --line-number |grep "zone" 2>/dev/null |awk '{print $1}' 2>/dev/null |awk 'END {print}'` op_line=`iptables -t nat -nL PREROUTING --line-number |grep "openclash" 2>/dev/null |awk '{print $1}' 2>/dev/null |head -1` if [ "$zone_line" -gt "$op_line" ]; then - /etc/init.d/firewall restart >/dev/null 2>&1 - /etc/init.d/miniupnpd restart >/dev/null 2>&1 - echo "[$LOGTIME] Watchdog: Restart Firewall For Enable Redirect." > /tmp/openclash.log + nohup /etc/init.d/openclash restart & + echo "[$LOGTIME] Watchdog: Restart For Enable Firewall Redirect." >> /tmp/openclash.log + exit 0 fi + +## DNS转发劫持 + if [ "$enable_redirect_dns" != "0" ]; then + if [ -z "$(uci get dhcp.@dnsmasq[0].server 2>/dev/null |grep "$dns_port")" ] || [ ! -z "$(uci get dhcp.@dnsmasq[0].server 2>/dev/null |awk -F ' ' '{print $2}')" ]; then + echo "[$LOGTIME] Watchdog: Force Reset DNS Hijack." >> /tmp/openclash.log + uci del dhcp.@dnsmasq[-1].server >/dev/null 2>&1 + uci add_list dhcp.@dnsmasq[0].server=127.0.0.1#"$dns_port" + uci delete dhcp.@dnsmasq[0].resolvfile + uci set dhcp.@dnsmasq[0].noresolv=1 + uci set dhcp.@dnsmasq[0].cachesize=0 + uci commit dhcp + /etc/init.d/dnsmasq restart >/dev/null 2>&1 + fi + fi + sleep 60 done 2>/dev/null diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_change.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_change.sh index 793e787c60..4cf877a876 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_change.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_change.sh @@ -1,5 +1,18 @@ #!/bin/sh - + #删除旧hosts配置 + hostlen=$(sed -n '/hosts:/=' "$7" 2>/dev/null) + dnslen=$(sed -n '/dns:/=' "$7" 2>/dev/null) + dnsheadlen=$(expr "$dnslen" - 1) + if [ ! -z "$hostlen" ] && [ "$hostlen" -gt "$dnslen" ]; then + sed -i '/^ \{0,\}hosts:/,$d' "$7" 2>/dev/null + elif [ ! -z "$hostlen" ]; then + sed -i '/##Custom HOSTS##/,/##Custom HOSTS END##/d' "$7" 2>/dev/null + if [ -z "$(awk '/^ {0,}hosts:/,/^dns:/{print}' "$7" 2>/dev/null |awk -F ':' '{print $2}' 2>/dev/null)" ]; then + sed -i "/${hostlen}p/,/${dnsheadlen}p/d" "$7" 2>/dev/null + sed -i '/^ \{0,\}hosts:/d' "$7" 2>/dev/null + fi + fi + if [ -z "$(grep '^ enhanced-mode: $2' "$7")" ]; then if [ ! -z "$(grep "^ \{0,\}enhanced-mode:" "$7")" ]; then sed -i "/^ \{0,\}enhanced-mode:/c\ enhanced-mode: ${2}" "$7" @@ -125,33 +138,17 @@ fi #添加自定义Hosts设置 - - if [ "$2" = "redir-host" ]; then - if [ -z "$(grep '^ \{0,\}hosts:' $7)" ]; then - sed -i '/^dns:/i\hosts:' "$7" 2>/dev/null - else - if [ ! -z "$(grep '^ \{1,\}hosts:' $7)" ]; then - sed -i '/^ \{1,\}hosts:/d' "$7" 2>/dev/null - sed -i '/^dns:/i\hosts:' "$7" 2>/dev/null - fi - fi - sed -i "s/^ \{0,\}/ /" "$12" 2>/dev/null #修改参数空格 - sed -i "1i\##Custom HOSTS##" "$12" 2>/dev/null - echo "##Custom HOSTS END##" >>"$12" 2>/dev/null - sed -i '/##Custom HOSTS##/,/##Custom HOSTS END##/d' "$7" 2>/dev/null - sed -i '/^hosts:/r/etc/config/openclash_custom_hosts.list' "$7" 2>/dev/null - sed -i '/##Custom HOSTS##/d' "$12" 2>/dev/null - sed -i '/##Custom HOSTS END##/d' "$12" 2>/dev/null - else - sed -i '/##Custom HOSTS##/,/##Custom HOSTS END##/d' "$7" 2>/dev/null - sed -i '/^ *$/d' "$7" 2>/dev/null #删除空行 - hostlen=$(sed -n '/hosts:/=' "$7" 2>/dev/null) - lasthlen=$(sed -n '$=' "$7" 2>/dev/null) #兼容旧版本 - dnslen=$(sed -n '/dns:/=' "$7" 2>/dev/null) - if [ "$hostlen" = "$lasthlen" ] && [ ! -z "$hostlen" ]; then - sed -i '/^ \{0,\}hosts:/d' "$7" 2>/dev/null - fi - if [ "$hostlen" = "$(expr $dnslen - 1)" ] && [ ! -z "$hostlen" ]; then - sed -i '/^ \{0,\}hosts:/d' "$7" 2>/dev/null - fi - fi \ No newline at end of file + + if [ "$2" = "redir-host" ]; then + if [ -z "$(grep '^ \{0,\}hosts:' $7)" ]; then + sed -i '/^dns:/i\hosts:' "$7" 2>/dev/null + else + if [ ! -z "$(grep '^ \{1,\}hosts:' $7)" ]; then + sed -i "/^ \{0,\}hosts:/c\hosts:" "$7" + fi + fi + sed -i '/^hosts:/a\##Custom HOSTS END##' "$7" 2>/dev/null + sed -i '/^hosts:/a\##Custom HOSTS##' "$7" 2>/dev/null + sed -i '/##Custom HOSTS##/r/etc/config/openclash_custom_hosts.list' "$7" 2>/dev/null + sed -i "/^hosts:/,/^dns:/ {s/^ \{0,\}'/ '/}" "$7" 2>/dev/null #修改参数空格 + fi \ No newline at end of file diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_get.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_get.sh index 566ef98abf..d2f2667dbc 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_get.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_get.sh @@ -1,15 +1,24 @@ -#!/bin/sh +#!/bin/bash status=$(ps|grep -c /usr/share/openclash/yml_groups_get.sh) [ "$status" -gt "3" ] && exit 0 +START_LOG="/tmp/openclash_start.log" +CFG_FILE="/etc/config/openclash" + if [ ! -f "/etc/openclash/config.yml" ] && [ ! -f "/etc/openclash/config.yaml" ]; then exit 0 elif [ ! -f "/etc/openclash/config.yaml" ] && [ "$(ls -l /etc/openclash/config.yml 2>/dev/null |awk '{print int($5/1024)}')" -gt 0 ]; then mv "/etc/openclash/config.yml" "/etc/openclash/config.yaml" fi - -awk '/Proxy Group:/,/Rule:/{print}' /etc/openclash/config.yaml 2>/dev/null >/tmp/yaml_group.yaml 2>&1 -awk '/Proxy Group:/,/Rule:/{print}' /etc/openclash/config.yaml 2>/dev/null |egrep '^ {0,}-' |grep name: |awk -F 'name: ' '{print $2}' |sed 's/,.*//' |sed 's/\"//g' >/tmp/Proxy_Group 2>&1 +echo "开始更新策略组配置..." >$START_LOG +while ( [ ! -z "$(grep "config groups" "$CFG_FILE")" ] || [ ! -z "$(grep "config servers" "$CFG_FILE")" ] ) + do + uci delete openclash.@groups[0] 2>/dev/null + uci delete openclash.@servers[0] 2>/dev/null + uci commit openclash +done +awk '/Proxy Group:/,/Rule:/{print}' /etc/openclash/config.yaml 2>/dev/null |sed 's/\"//g' 2>/dev/null |sed "s/\'//g" 2>/dev/null |sed 's/\t/ /g' 2>/dev/null >/tmp/yaml_group.yaml 2>&1 +awk '/Proxy Group:/,/Rule:/{print}' /etc/openclash/config.yaml 2>/dev/null |sed 's/\"//g' 2>/dev/null |sed "s/\'//g" 2>/dev/null |sed 's/\t/ /g' 2>/dev/null |grep name: 2>/dev/null |awk -F 'name:' '{print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null |sed 's/ \{0,\}\}\{0,\}$//g' 2>/dev/null >/tmp/Proxy_Group 2>&1 echo "DIRECT" >>/tmp/Proxy_Group echo "REJECT" >>/tmp/Proxy_Group count=1 @@ -19,6 +28,11 @@ group_file="/tmp/yaml_group.yaml" line=$(sed -n '/name:/=' $group_file) num=$(grep -c "name:" $group_file) +cfg_get() +{ + echo "$(grep "$1" "$2" 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null |sed 's/ \{0,\}\}\{0,\}$//g' 2>/dev/null)" +} + for n in $line do single_group="/tmp/group_$file_count.yaml" @@ -38,15 +52,15 @@ do startLine=$(expr "$endLine" + 1) #type - group_type=$(grep "type:" $single_group |awk -F 'type:' '{print $2}' |sed 's/,.*//' |sed 's/\"//g' |sed 's/^ \{0,\}//g') + group_type="$(cfg_get "type:" "$single_group")" #name - group_name=$(grep "name:" $single_group |awk -F 'name:' '{print $2}' |sed 's/,.*//' |sed 's/\"//g' |sed 's/^ \{0,\}//g') + group_name="$(cfg_get "name:" "$single_group")" #test_url - group_test_url=$(grep "url:" $single_group |awk -F 'url:' '{print $2}' |sed 's/,.*//' |sed 's/\"//g' |sed 's/^ \{0,\}//g' |sed 's/ \{0,\}$//g' 2>/dev/null |sed 's/ \{0,\}\}$//g' 2>/dev/null) + group_test_url="$(cfg_get "url:" "$single_group")" #test_interval - group_test_interval=$(grep "interval:" $single_group |awk -F 'interval:' '{print $2}' |sed 's/,.*//' |sed 's/\"//g' |sed 's/^ \{0,\}//g' |sed 's/ \{0,\}$//g' 2>/dev/null |sed 's/ \{0,\}\}$//g' 2>/dev/null) + group_test_interval="$(cfg_get "interval:" "$single_group")" - + echo "正在读取【$group_type】-【$group_name】策略组配置..." >$START_LOG name=openclash uci_name_tmp=$(uci add $name groups) @@ -66,19 +80,19 @@ do continue fi - group_name1=$(echo "$line" |grep "^ \{0,\}-" 2>/dev/null |awk -F '^ \{0,\}- ' '{print $2}' 2>/dev/null |grep -v "name:" 2>/dev/null |sed 's/\"//g') - group_name2=$(echo "$line" |awk -F 'proxies: \\[' '{print $2}' 2>/dev/null |sed 's/].*//' 2>/dev/null |sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null |sed 's/ \{0,\}, \{0,\}/#,#/g' 2>/dev/null |sed 's/,\t/#,#/g' 2>/dev/null |sed 's/\"//g' 2>/dev/null) + group_name1=$(echo "$line" |grep -v "name:" 2>/dev/null |grep "^ \{0,\}-" 2>/dev/null |awk -F '^ \{0,\}-' '{print $2}' 2>/dev/null |sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null) + group_name2=$(echo "$line" |awk -F 'proxies: \\[' '{print $2}' 2>/dev/null |sed 's/].*//' 2>/dev/null |sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null |sed 's/ \{0,\}, \{0,\}/#,#/g' 2>/dev/null) if [ -z "$group_name1" ] && [ -z "$group_name2" ]; then continue elif [ ! -z "$group_name1" ] && [ -z "$group_name2" ]; then - if [ ! -z "$(grep "$group_name1" $match_group_file)" ] && [ "$group_name1" != "$group_name" ]; then + if [ ! -z "$(grep -F "$group_name1" $match_group_file)" ] && [ "$group_name1" != "$group_name" ]; then ${uci_add}other_group="$group_name1" fi elif [ -z "$group_name1" ] && [ ! -z "$group_name2" ]; then group_num=$(expr $(echo "$group_name2" |grep -c "#,#") + 1) if [ "$group_num" -le 1 ]; then - if [ ! -z "$(grep "$group_name2" $match_group_file)" ] && [ "$group_name2" != "$group_name" ]; then + if [ ! -z "$(grep -F "$group_name2" $match_group_file)" ] && [ "$group_name2" != "$group_name" ]; then ${uci_add}other_group="$group_name2" fi else @@ -86,7 +100,7 @@ do while [[ "$group_nums" -le "$group_num" ]] do other_group_name=$(echo "$group_name2" |awk -v t="${group_nums}" -F '#,#' '{print $t}' 2>/dev/null) - if [ ! -z "$(grep "$other_group_name" $match_group_file)" ] && [ "$other_group_name" != "$group_name" ]; then + if [ ! -z "$(grep -F "$other_group_name" $match_group_file 2>/dev/null)" ] && [ "$other_group_name" != "$group_name" ]; then ${uci_add}other_group="$other_group_name" fi group_nums=$(expr "$group_nums" + 1) @@ -101,4 +115,4 @@ do done uci commit openclash -/usr/share/openclash/yml_proxys_get.sh +/usr/share/openclash/yml_proxys_get.sh \ No newline at end of file diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_name_get.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_name_get.sh new file mode 100755 index 0000000000..9421f35877 --- /dev/null +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_name_get.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ -f "/etc/openclash/config.yaml" ]; then + awk '/Proxy Group:/,/Rule:/{print}' /etc/openclash/config.yaml 2>/dev/null |sed "s/\'//g" 2>/dev/null |sed 's/\"//g' 2>/dev/null |sed 's/\t/ /g' 2>/dev/null |grep name: |awk -F 'name:' '{print $2}' |sed 's/,.*//' |sed 's/^ \{0,\}//' 2>/dev/null |sed 's/ \{0,\}$//' 2>/dev/null |sed 's/ \{0,\}\}\{0,\}$//g' 2>/dev/null >/tmp/Proxy_Group 2>&1 + echo 'DIRECT' >>/tmp/Proxy_Group + echo 'REJECT' >>/tmp/Proxy_Group +else + echo '读取错误,配置文件异常!' >/tmp/Proxy_Group + exit 0 +fi \ No newline at end of file diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_set.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_set.sh index 12ed2fa904..25594689ac 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_set.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_groups_set.sh @@ -57,6 +57,8 @@ yml_groups_set() return fi + echo "正在写入【$type】-【$name】策略组到配置文件..." >$START_LOG + echo "- name: $name" >>$GROUP_FILE echo " type: $type" >>$GROUP_FILE echo " proxies:" >>$GROUP_FILE @@ -84,7 +86,7 @@ create_config=$(uci get openclash.config.create_config 2>/dev/null) if [ "$create_config" = "0" ]; then if [ -z "$(grep "^ \{0,\}Proxy:" /etc/openclash/config.yaml)" ] || [ -z "$(grep "^ \{0,\}Proxy Group:" /etc/openclash/config.yaml)" ]; then - echo "未找到配置文件,开始使用ConnersHua规则创建..." >$START_LOG + echo "配置文件不完整,开始使用ConnersHua规则创建..." >$START_LOG uci set openclash.config.create_config=1 uci set openclash.config.rule_sources="ConnersHua" uci set openclash.config.rule_source="ConnersHua" @@ -98,4 +100,4 @@ if [ "$create_config" = "0" ]; then fi fi -echo "配置文件策略组创建完成!" >$START_LOG +echo "配置文件策略组写入完成!" >$START_LOG diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_proxys_get.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_proxys_get.sh index d11a7678bc..bb44f3e454 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_proxys_get.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_proxys_get.sh @@ -2,13 +2,17 @@ status=$(ps|grep -c /usr/share/openclash/yml_proxys_get.sh) [ "$status" -gt "3" ] && exit 0 +START_LOG="/tmp/openclash_start.log" + if [ ! -f "/etc/openclash/config.yml" ] && [ ! -f "/etc/openclash/config.yaml" ]; then exit 0 elif [ ! -f "/etc/openclash/config.yaml" ] && [ "$(ls -l /etc/openclash/config.yml 2>/dev/null |awk '{print int($5/1024)}')" -gt 0 ]; then mv "/etc/openclash/config.yml" "/etc/openclash/config.yaml" fi -awk '/^ {0,}Proxy:/,/^ {0,}Proxy Group:/{print}' /etc/openclash/config.yaml 2>/dev/null >/tmp/yaml_proxy.yaml 2>&1 +echo "开始更新服务器节点配置..." >$START_LOG + +awk '/^ {0,}Proxy:/,/^ {0,}Proxy Group:/{print}' /etc/openclash/config.yaml 2>/dev/null |sed 's/\"//g' 2>/dev/null |sed "s/\'//g" 2>/dev/null |sed 's/\t/ /g' 2>/dev/null >/tmp/yaml_proxy.yaml 2>&1 server_file="/tmp/yaml_proxy.yaml" single_server="/tmp/servers.yaml" @@ -19,13 +23,7 @@ num=$(grep -c "^ \{0,\}-" $server_file) cfg_get() { - echo "$(grep "$1" $single_server |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' |sed 's/,.*//' |sed 's/\"//g' |sed 's/^ \{0,\}//g' |sed 's/ \{0,\}$//g' 2>/dev/null |sed 's/ \{0,\}\}$//g' 2>/dev/null)" - -} - -cfg_get_host() -{ - echo "$(grep "$1" $single_server |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' |sed 's/}.*//' |sed 's/,.*//' |sed 's/\"//g' |sed 's/^ \{0,\}//g' |sed 's/ \{0,\}$//g')" + echo "$(grep "$1" $single_server 2>/dev/null |awk -v tag=$1 'BEGIN{FS=tag} {print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null |sed 's/ \{0,\}\}\{0,\}$//g' 2>/dev/null)" } for n in $line @@ -73,10 +71,12 @@ do tls="$(cfg_get "tls:")" #skip-cert-verify: verify="$(cfg_get "skip-cert-verify:")" + #mux: + mux="$(cfg_get "mux:")" #host: host="$(cfg_get "host:")" #Host: - Host="$(cfg_get_host "Host:")" + Host="$(cfg_get "Host:")" #path: path="$(cfg_get "path:")" #ws-path: @@ -92,6 +92,8 @@ do #username username="$(cfg_get "username:")" + echo "正在读取【$server_type】-【$server_name】服务器节点配置..." >$START_LOG + name=openclash uci_name_tmp=$(uci add $name servers) @@ -118,6 +120,7 @@ do ${uci_set}skip_cert_verify="$verify" ${uci_set}path="$path" [ -z "$path" ] && ${uci_set}path="$ws_path" + ${uci_set}mux="$mux" ${uci_set}custom="$headers" [ -z "$headers" ] && ${uci_set}custom="$Host" @@ -134,19 +137,18 @@ do ${uci_set}password="$password" fi - server_name_change=$(echo "$server_name" |sed 's/\\/#d#/g' 2>/dev/null |sed 's/ /#spas#/g' |sed 's/\t/#tab#/g' 2>/dev/null) #替换斜杠和空格 for ((i=1;i<=$group_num;i++)) #循环加入策略组 do single_group="/tmp/group_$i.yaml" - sed -i -e 's/\\/#d#/g' -e 's/ /#spas#/g' -e 's/\t/#tab#/g' "$single_group" 2>/dev/null #替换斜杠和空格 - if [ ! -z "$(grep "$server_name_change" "$single_group")" ]; then - group_name=$(grep "name:" $single_group |sed 's/#d#/\\/g' |sed 's/#spas#/ /g' |sed 's/#tab#/ /g' |awk -F 'name: ' '{print $2}' |sed 's/,.*//' 2>/dev/null |sed 's/\"//g' 2>/dev/null) + if [ ! -z "$(grep -F "$server_name" "$single_group")" ]; then + group_name=$(grep "name:" $single_group 2>/dev/null |awk -F 'name:' '{print $2}' 2>/dev/null |sed 's/,.*//' 2>/dev/null |sed 's/^ \{0,\}//g' 2>/dev/null |sed 's/ \{0,\}$//g' 2>/dev/null) ${uci_add}groups="$group_name" fi done - done - +echo "配置文件读取完成!" >$START_LOG +sleep 3 +echo "" >$START_LOG uci commit openclash rm -rf /tmp/servers.yaml 2>/dev/null rm -rf /tmp/yaml_proxy.yaml 2>/dev/null diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_proxys_set.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_proxys_set.sh index 557fe4091e..84a6f22c02 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_proxys_set.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_proxys_set.sh @@ -5,7 +5,6 @@ status=$(ps|grep -c /usr/share/openclash/yml_proxys_set.sh) START_LOG="/tmp/openclash_start.log" SERVER_FILE="/tmp/yaml_servers.yaml" - #写入服务器节点到配置文件 yml_servers_set() { @@ -22,6 +21,7 @@ yml_servers_set() config_get "obfs" "$section" "obfs" "" config_get "obfs_vmess" "$section" "obfs_vmess" "" config_get "host" "$section" "host" "" + config_get "mux" "$section" "mux" "" config_get "custom" "$section" "custom" "" config_get "tls" "$section" "tls" "" config_get "skip_cert_verify" "$section" "skip_cert_verify" "" @@ -36,6 +36,10 @@ yml_servers_set() return fi + if [ -z "$name" ]; then + return + fi + if [ -z "$server" ]; then return fi @@ -48,6 +52,8 @@ yml_servers_set() return fi + echo "正在写入【$type】-【$name】节点到配置文件..." >$START_LOG + if [ "$obfs" != "none" ]; then if [ "$obfs" = "websocket" ]; then obfss="plugin: v2ray-plugin" @@ -131,6 +137,11 @@ EOF if [ ! -z "$path" ]; then cat >> "$SERVER_FILE" <<-EOF $path +EOF + fi + if [ ! -z "$mux" ]; then +cat >> "$SERVER_FILE" <<-EOF + mux: $mux EOF fi if [ ! -z "$custom" ]; then @@ -160,7 +171,7 @@ config_foreach yml_servers_set "servers" echo "Proxy Group:" >>$SERVER_FILE rule_sources=$(uci get openclash.config.rule_sources 2>/dev/null) create_config=$(uci get openclash.config.create_config 2>/dev/null) -egrep '^ {0,}-' $SERVER_FILE |grep name: |awk -F 'name: ' '{print $2}' |sed 's/,.*//' >/tmp/Proxy_Server 2>&1 +egrep '^ {0,}-' $SERVER_FILE |grep name: |awk -F 'name: ' '{print $2}' |sed 's/,.*//' 2>/dev/null >/tmp/Proxy_Server 2>&1 sed -i "s/^ \{0,\}/ - /" /tmp/Proxy_Server 2>/dev/null #添加参数 @@ -310,18 +321,21 @@ uci set openclash.config.Others="Others" fi if [ "$create_config" != "0" ]; then echo "Rule:" >>$SERVER_FILE - uci commit openclash + echo "服务器节点写入配置文件完成,开始更新配置文件..." >$START_LOG cat "$SERVER_FILE" > "/etc/openclash/config.yaml" 2>/dev/null + /usr/share/openclash/yml_groups_get.sh >/dev/null 2>&1 else - echo "正在更新配置文件服务器节点信息..." >$START_LOG - /usr/share/openclash/yml_groups_set.sh + echo "正在更新配置文件..." >$START_LOG + /usr/share/openclash/yml_groups_set.sh >/dev/null 2>&1 sed -i '/^ \{0,\}Proxy:/i\#change server#' "/etc/openclash/config.yaml" 2>/dev/null sed -i '/^ \{0,\}Proxy:/,/^ \{0,\}Rule:/d' "/etc/openclash/config.yaml" 2>/dev/null sed -i '/#change server#/r/tmp/yaml_servers.yaml' "/etc/openclash/config.yaml" 2>/dev/null sed -i '/Proxy Group:/r/tmp/yaml_groups.yaml' "/etc/openclash/config.yaml" 2>/dev/null sed -i '/#change server#/d' "/etc/openclash/config.yaml" 2>/dev/null fi -echo "配置文件更新完成!" >$START_LOG +echo "配置文件服务器节点写入完成!" >$START_LOG rm -rf $SERVER_FILE 2>/dev/null rm -rf /tmp/Proxy_Server 2>/dev/null rm -rf /tmp/yaml_groups.yaml 2>/dev/null +uci set openclash.config.enable=1 2>/dev/null +/etc/init.d/openclash restart >/dev/null 2>&1 diff --git a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_rules_change.sh b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_rules_change.sh index 5d61a8987f..093b716500 100755 --- a/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_rules_change.sh +++ b/package/cnsztl/luci-app-openclash/files/usr/share/openclash/yml_rules_change.sh @@ -95,13 +95,13 @@ elif [ "$2" = 0 ]; then } fi - sed -i '/^##Custom Rules$/,/^##Custom Rules End$/d' "$4" 2>/dev/null - sed -i '/^##Custom Rules$/d' "$4" 2>/dev/null - sed -i '/^##Custom Rules End$/d' "$4" 2>/dev/null + sed -i '/^##Custom Rules/,/^##Custom Rules End/d' "$4" 2>/dev/null + sed -i '/^##Custom Rules/d' "$4" 2>/dev/null + sed -i '/^##Custom Rules End/d' "$4" 2>/dev/null [ "$3" = 1 ] && { - sed -i '/^Rule:/a\##Custom Rules End' "$4" 2>/dev/null - sed -i '/^Rule:/a\##Custom Rules' "$4" 2>/dev/null - sed -i '/^##Custom Rules$/r/etc/config/openclash_custom_rules.list' "$4" 2>/dev/null - sed -i "s/^ \{0,\}- /- /" "$4" 2>/dev/null #修改参数空格 - sed -i "s/^\t\{0,\}- /- /" "$4" 2>/dev/null #修改参数tab + sed -i '/^Rule:/a\##Custom Rules End##' "$4" 2>/dev/null + sed -i '/^Rule:/a\##Custom Rules##' "$4" 2>/dev/null + sed -i '/^##Custom Rules##/r/etc/config/openclash_custom_rules.list' "$4" 2>/dev/null + sed -i "s/^ \{0,\}-/-/" "$4" 2>/dev/null #修改参数空格 + sed -i "s/^\t\{0,\}-/-/" "$4" 2>/dev/null #修改参数tab } \ No newline at end of file diff --git a/package/cnsztl/luci-app-openclash/i18n/zh-cn/openclash.zh-cn.po b/package/cnsztl/luci-app-openclash/i18n/zh-cn/openclash.zh-cn.po index f40f648ee3..2caa0ef47d 100644 --- a/package/cnsztl/luci-app-openclash/i18n/zh-cn/openclash.zh-cn.po +++ b/package/cnsztl/luci-app-openclash/i18n/zh-cn/openclash.zh-cn.po @@ -163,7 +163,7 @@ msgstr "IPV6类型DNS解析" msgid "Force Enable to Resolve ipv6 DNS Requests" msgstr "" -"允许解析IPV6类型的DNS请求,如果您没有公网IPV6地址但开启了IPV6的DHCP服务,客户端连接可能会出现异常" +"固件须配置好IPV6的NAT,如果您没有公网IPV6地址但开启了IPV6的DHCP服务,客户端连接可能会出现异常" msgid "Rules Setting" msgstr "规则设置(访问控制)" @@ -383,7 +383,7 @@ msgid "Chose to Download" msgstr "选择内核编译版本" msgid "Select Based On Your CPU Model For Core Update, Wrong Version Will Not Work" -msgstr "请根据CPU架构选择以便下载、更新对应内核,错误的版本将不能正常运行" +msgstr "请根据处理器架构选择以便下载、更新对应内核,错误的版本将不能正常运行" msgid "Update Core File" msgstr "更新内核" @@ -474,9 +474,6 @@ msgstr "登录用户名" msgid "Auth Password" msgstr "登录密码" -msgid "Skip Cert Verify" -msgstr "忽略许可验证(skip-cert-verify)" - msgid "None" msgstr "未配置"