Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
frainzy1477 committed Jan 17, 2020
1 parent ca021e4 commit 6e1db65
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
A rule based custom proxy for Openwrt based on <a href="https://github.com/Dreamacro/clash" target="_blank">Clash</a>.
</p>
<p align="center">
<a target="_blank" href="https://github.com/frainzy1477/luci-app-clash/releases/tag/v1.4.7">
<img src="https://img.shields.io/badge/luci%20for%20clash-v1.4.7-blue.svg">
<a target="_blank" href="https://github.com/frainzy1477/luci-app-clash/releases/tag/v1.4.8">
<img src="https://img.shields.io/badge/luci%20for%20clash-v1.4.8-blue.svg">
</a>
<!-- <a href="https://github.com/frainzy1477/luci-app-clash/releases" target="_blank">
<img src="https://img.shields.io/github/downloads/frainzy1477/luci-app-clash/total.svg?style=flat-square"/>
Expand All @@ -23,8 +23,8 @@

- cd /tmp

- opkg install luci-app-clash_1.4.7_all.ipk
- opkg install luci-app-clash_1.4.7_all.ipk --force-depends
- opkg install luci-app-clash_1.4.8_all.ipk
- opkg install luci-app-clash_1.4.8_all.ipk --force-depends

## Features

Expand Down
7 changes: 7 additions & 0 deletions luasrc/model/cbi/clash/cusconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ sev.write = function(self, section, value)
NXFS.writefile(conf, value:gsub("\r\n", "\n"))
end

o=s:option(Button,"apply")
o.inputtitle = translate("Save & Apply")
o.inputstyle = "reload"
o.write = function()
m.uci:commit("clash")
end


o = s:option(Button,"configrm")
o.inputtitle = translate("Delete Config")
Expand Down
6 changes: 6 additions & 0 deletions luasrc/model/cbi/clash/subconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ sev.write = function(self, section, value)
NXFS.writefile(conf, value:gsub("\r\n", "\n"))
end

o=s:option(Button,"apply")
o.inputtitle = translate("Save & Apply")
o.inputstyle = "reload"
o.write = function()
m.uci:commit("clash")
end


o = s:option(Button,"configrm")
Expand Down
8 changes: 8 additions & 0 deletions luasrc/model/cbi/clash/upconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ o.write = function()
SYS.call("rm -rf /usr/share/clash/config/upload/config.yaml >/dev/null 2>&1 &")
end

o=s:option(Button,"apply")
o.inputtitle = translate("Save & Apply")
o.inputstyle = "reload"
o.write = function()
m.uci:commit("clash")
end


return m


2 changes: 1 addition & 1 deletion root/usr/share/clash/geoip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ -f /var/run/geoip_down_complete ];then
rm -rf /var/run/geoip_down_complete 2>/dev/null
fi
echo '' >/tmp/geoip_update.txt 2>/dev/null
wget -c4 --no-check-certificate --timeout=300 --tries=5 --user-agent="Mozilla" "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key="$Key"&suffix=tar.gz" -O /tmp/ipdb.tar.gz
wget -c4 --no-check-certificate --timeout=300 --user-agent="Mozilla" "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key="$Key"&suffix=tar.gz" -O /tmp/ipdb.tar.gz
if [ "$?" -eq "0" ]; then
tar zxvf /tmp/ipdb.tar.gz -C /tmp\
&& rm -rf /tmp/ipdb.tar.gz >/dev/null 2>&1\
Expand Down

0 comments on commit 6e1db65

Please sign in to comment.