找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: paradi***

[关贴][2017-04-21] Unofficial luci-app-koolproxy, 更新至3.4.1

  [复制链接]
发表于 2017-4-11 20:46 | 显示全部楼层
有大神编译一个arm版本的么?想在k3中使用。^_^。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-11 21:56 | 显示全部楼层
显示404啊            

点评

地址少了一个y  发表于 2017-4-11 22:18
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-11 23:28 来自手机 | 显示全部楼层
楼主还是提供一个编译版本嘛。很多人都没有编译环境。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-12 09:43 来自手机 | 显示全部楼层
本帖最后由 缘亦如此1 于 2017-4-12 09:44 编辑

Didn’t find anything here!

发完就发现好了可以访问了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-12 10:14 | 显示全部楼层
owen5 发表于 2017-4-11 20:28
大神帮忙看看, 还是不行。  找不到原因。  wget 问题吗

确认是wget问题。 改了makefile.   搞定了, 非常感谢楼主分享LUCI, 非常好用
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-12 10:49 | 显示全部楼层
楼主不好意思, 有点强迫症。 这个能否处理下

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

自己修改luci  详情 回复 发表于 2017-4-12 11:48
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2017-4-12 11:48 来自手机 | 显示全部楼层
owen5 发表于 2017-4-12 10:49
楼主不好意思, 有点强迫症。 这个能否处理下

自己修改luci

点评

好的, 谢谢楼主。  详情 回复 发表于 2017-4-12 12:40
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-12 11:59 | 显示全部楼层
怎么没有编译过的版本了,没有编译环境怎么破……求之前下了的人提供个编辑过的版本……
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-12 12:40 | 显示全部楼层

好的, 谢谢楼主。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-12 14:16 | 显示全部楼层
owen5 发表于 2017-4-12 12:40
好的, 谢谢楼主。
  1. local a=require"nixio.fs"
  2. local e=require"luci.dispatcher"
  3. local e=require("luci.model.ipkg")
  4. local e=luci.model.uci.cursor()
  5. local n=require"luci.sys"
  6. local d=luci.http
  7. local e
  8. local e="1.7"
  9. local r="koolproxy"
  10. local o,t,e
  11. local v=luci.sys.exec("/usr/share/koolproxy/koolproxy -v")
  12. local s=luci.sys.exec("head -3 /usr/share/koolproxy/data/koolproxy.txt | grep rules | awk -F' ' '{print $3,$4}'")
  13. local u=luci.sys.exec("head -4 /usr/share/koolproxy/data/koolproxy.txt | grep video | awk -F' ' '{print $3,$4}'")
  14. local l=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/koolproxy.txt | wc -l")
  15. local i=luci.sys.exec("cat /usr/share/koolproxy/dnsmasq.adblock | wc -l")
  16. local h=luci.sys.exec("grep -v '^!' /usr/share/koolproxy/data/user.txt | wc -l")

  17. local function is_running(name)
  18.         return luci.sys.call("pidof %s >/dev/null" %{name}) == 0
  19. end

  20. local function get_status(name)
  21.         return is_running(name) and translate("RUNNING") or translate("NOT RUNNING")
  22. end

  23. o=Map(r,translate("koolproxy"),translate("A powerful advertisement blocker. <br /><font color="red">Adblock Plus Host list + koolproxy Blacklist mode runs without loss of bandwidth due to performance issues.<br /></font>"))
  24. o.template="koolproxy/index"
  25. t=o:section(TypedSection,"global",translate("Running Status"))
  26. t.anonymous=true
  27. e=t:option(DummyValue,"_status",translate("Transparent Proxy"))
  28. e.value=get_status("koolproxy")
  29. t=o:section(TypedSection,"global",translate("Global Setting"))
  30. t.anonymous=true
  31. t.addremove=false
  32. t:tab("base",translate("Basic Settings"))
  33. t:tab("cert",translate("Certificate Management"))
  34. t:tab("weblist",translate("Set Backlist Of Websites"))
  35. t:tab("iplist",translate("Set Backlist Of IP"))
  36. t:tab("customlist",translate("Set Backlist Of custom"))
  37. t:tab("logs",translate("View the logs"))
  38. e=t:taboption("base",Flag,"enabled",translate("Enable"))
  39. e.default=0
  40. e.rmempty=false
  41. e=t:taboption("base",Value, "startup_delay", translate("启动延时"))
  42. e:value(0, translate("禁用"))
  43. for _, v in ipairs({5, 10, 15, 25, 40}) do
  44.         e:value(v, translate(v .. "秒"))
  45. end
  46. e.datatype = "uinteger"
  47. e.default = 0
  48. e.rmempty = false
  49. e=t:taboption("base",ListValue,"filter_mode",translate('Default')..translate("Filter Mode"))
  50. e.default="adblock"
  51. e.rmempty=false
  52. e:value("disable",translate("No Filter"))
  53. e:value("global",translate("Global Filter"))
  54. e:value("adblock",translate("AdBlock Filter"))
  55. e=t:taboption("base",Flag,"adblock",translate("Open adblock"))
  56. e.default=0
  57. e:depends("filter_mode","adblock")
  58. e=t:taboption("base",ListValue,"time_update",translate("Timing update rules"))
  59. for t=0,23 do
  60.         e:value(t,translate("每天"..t.."点"))
  61. end
  62. e.default=0
  63. e.rmempty=false
  64. restart=t:taboption("base",Button,"restart",translate("Manually update the koolproxy rule"))
  65. restart.inputtitle=translate("Update manually")
  66. restart.inputstyle="reload"
  67. restart.write=function()
  68.         luci.sys.call("/usr/share/koolproxy/koolproxyupdate rules 2>/dev/null")
  69.         luci.http.redirect(luci.dispatcher.build_url("admin","services","koolproxy"))
  70. end
  71. update=t:taboption("base",Button,"update",translate("主程序更新"))
  72. update.inputtitle=translate("Update manually")
  73. update.inputstyle="reload"
  74. update.write=function()
  75.         luci.sys.call("/usr/share/koolproxy/koolproxyupdate binary 2>&1 >/dev/null")
  76.         luci.http.redirect(luci.dispatcher.build_url("admin","services","koolproxy"))
  77. end

  78. e=t:taboption("base",DummyValue,"status0",translate("</label><div align="left">当前版本<strong>【<font color="#660099">"..v.."</font>】</strong></div>"))
  79. e=t:taboption("base",DummyValue,"status1",translate("</label><div align="left">静态规则<strong>【<font color="#660099">"..s.."共"..l.."条</font>】</strong></div>"))
  80. e=t:taboption("base",DummyValue,"status2",translate("</label><div align="left">视频规则<strong>【<font color="#660099">"..u.."</font>】</strong></div>"))
  81. e=t:taboption("base",DummyValue,"status3",translate("</label><div align="left">自定规则<strong>【<font color="#660099">"..h.."</font>】</strong></div>"))
  82. e=t:taboption("base",DummyValue,"status4",translate("</label><div align="left">Host规则<strong>【<font color="#660099">"..i.."</font>】</strong></div>"))

  83. e=t:taboption("cert",DummyValue,"c1status",translate("<div align="left">Certificate Restore</div>"))
  84. e=t:taboption("cert",FileUpload,"")
  85. e.template="koolproxy/caupload"
  86. e=t:taboption("cert",DummyValue,"",nil)
  87. e.template="koolproxy/cadvalue"
  88. if nixio.fs.access("/usr/share/koolproxy/data/certs/ca.crt")then
  89.         e=t:taboption("cert",DummyValue,"c2status",translate("<div align="left">Certificate Backup</div>"))
  90.         e=t:taboption("cert",Button,"certificate")
  91.         e.inputtitle=translate("Backup Download")
  92.         e.inputstyle="reload"
  93.         e.write=function()
  94.                 luci.sys.call("/usr/share/koolproxy/camanagement backup")
  95.                 Download()
  96.                 luci.http.redirect(luci.dispatcher.build_url("admin","services","koolproxy"))
  97.         end
  98. end
  99. local i="/etc/adblocklist/adblock"
  100. e=t:taboption("weblist",TextValue,"configfile")
  101. e.description=translate("These had been joined websites will use filter,but only blacklist model.Please input the domain names of websites,every line can input only one website domain.For example,google.com.")
  102. e.rows=28
  103. e.wrap="off"
  104. e.cfgvalue=function(t,t)
  105.         return a.readfile(i)or""
  106. end
  107. e.write=function(t,t,e)
  108.         a.writefile("/tmp/adblock",e:gsub("\r\n","\n"))
  109.         if(luci.sys.call("cmp -s /tmp/adblock /etc/adblocklist/adblock")==1)then
  110.                 a.writefile(i,e:gsub("\r\n","\n"))
  111.                 luci.sys.call("/usr/sbin/adblock >/dev/null")
  112.         end
  113.         a.remove("/tmp/adblock")
  114. end
  115. local i="/etc/adblocklist/adblockip"
  116. e=t:taboption("iplist",TextValue,"adconfigfile")
  117. e.description=translate("These had been joined ip addresses will use proxy,but only GFW model.Please input the ip address or ip address segment,every line can input only one ip address.For example,112.123.134.145/24 or 112.123.134.145.")
  118. e.rows=28
  119. e.wrap="off"
  120. e.cfgvalue=function(t,t)
  121.         return a.readfile(i)or""
  122. end
  123. e.write=function(t,t,e)
  124.         a.writefile(i,e:gsub("\r\n","\n"))
  125. end
  126. local i="/usr/share/koolproxy/data/user.txt"
  127. e=t:taboption("customlist",TextValue,"configfile1")
  128. e.description=translate("Enter your custom rules, each row.")
  129. e.rows=28
  130. e.wrap="off"
  131. e.cfgvalue=function(t,t)
  132.         return a.readfile(i)or""
  133. end
  134. e.write=function(t,t,e)
  135.         a.writefile(i,e:gsub("\r\n","\n"))
  136. end
  137. local i="/var/log/koolproxy.log"
  138. e=t:taboption("logs",TextValue,"configfile2")
  139. e.description=translate("Koolproxy Logs")
  140. e.rows=28
  141. e.wrap="off"
  142. e.cfgvalue=function(t,t)
  143.         return a.readfile(i)or""
  144. end
  145. e.write=function(e,e,e)
  146. end
  147. t=o:section(TypedSection,"acl_rule",translate("koolproxy ACLs"),
  148. translate("ACLs is a tools which used to designate specific IP filter mode,The MAC addresses added to the list will be filtered using https"))
  149. t.template="cbi/tblsection"
  150. t.sortable=true
  151. t.anonymous=true
  152. t.addremove=true
  153. e=t:option(Value,"remarks",translate("Client Remarks"))
  154. e.width="30%"
  155. e.rmempty=true
  156. e=t:option(Value,"ipaddr",translate("IP Address"))
  157. e.width="20%"
  158. e.datatype="ip4addr"
  159. n.net.arptable(function(t)
  160.         e:value(t["IP address"])
  161. end)
  162. e=t:option(Value,"mac",translate("MAC Address"))
  163. e.width="20%"
  164. e.rmempty=true
  165. n.net.mac_hints(function(t,a)
  166.         e:value(t,"%s (%s)"%{t,a})
  167. end)
  168. e=t:option(ListValue,"filter_mode",translate("Filter Mode"))
  169. e.width="20%"
  170. e.default="disable"
  171. e.rmempty=false
  172. e:value("disable",translate("No Filter"))
  173. e:value("global",translate("Global Filter"))
  174. e:value("adblock",translate("AdBlock Filter"))
  175. e:value("ghttps",translate("Global Https Filter"))
  176. e:value("ahttps",translate("AdBlock Https Filter"))

  177. t=o:section(TypedSection,"rss_rule",translate("订阅规则"),
  178. translate("请确保第三方规则兼容Koolproxy").."<br /> " ..
  179. translate("地址变动请关注官方群: ") .. "<a href="https://jq.qq.com/?_wv=1027&k=479s5t4">" ..
  180. "<b><font color="#660099">" .. translate("==点击链接加入群【koolproxy交流】==") .. "</font></b>" .. "</a>")
  181. t.template="cbi/tblsection"
  182. t.sortable=true
  183. t.anonymous=true
  184. t.addremove=true
  185. e=t:option(Value,"name",translate("规则名称"))
  186. e.width="10%"
  187. e.rmempty=false
  188. e=t:option(Value,"url",translate("订阅地址"))
  189. e.width="55%"
  190. e.rmempty=false
  191. e.placeholder="[https|http|ftp]://[Hostname]/[File]"
  192. function e.validate(self, value)
  193.         if not value then
  194.                 return nil
  195.         else
  196.                 return value
  197.         end
  198. end
  199. e=t:option(DummyValue,"time",translate("更新时间"))
  200. e.width="15%"
  201. e=t:option(Flag,"load",translate("启用"))
  202. e.width="10%"
  203. e.default=0
  204. e.rmempty=false

  205. function Download()
  206.         local t,e
  207.         t=nixio.open("/tmp/upload/koolproxyca.tar.gz","r")
  208.         luci.http.header('Content-Disposition','attachment; filename="koolproxyCA.tar.gz"')
  209.         luci.http.prepare_content("application/octet-stream")
  210.         while true do
  211.                 e=t:read(nixio.const.buffersize)
  212.                 if(not e)or(#e==0)then
  213.                         break
  214.                 else
  215.                         luci.http.write(e)
  216.                 end
  217.         end
  218.         t:close()
  219.         luci.http.close()
  220. end
  221. local t,e
  222. t="/tmp/upload/"
  223. nixio.fs.mkdir(t)
  224. d.setfilehandler(
  225. function(o,a,i)
  226.         if not e then
  227.                 if not o then return end
  228.                 e=nixio.open(t..o.file,"w")
  229.                 if not e then
  230.                         return
  231.                 end
  232.         end
  233.         if a and e then
  234.                 e:write(a)
  235.         end
  236.         if i and e then
  237.                 e:close()
  238.                 e=nil
  239.                 luci.sys.call("/usr/share/koolproxy/camanagement restore")
  240.         end
  241. end
  242. )
  243. return o
复制代码

点评

非常感觉。。。  详情 回复 发表于 2017-4-12 14:41
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-12 14:41 | 显示全部楼层
本帖最后由 owen5 于 2017-4-12 15:42 编辑

非常感谢。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-14 11:02 | 显示全部楼层
出现这个, 不知道有影响吗?

Fri Apr 14 07:57:28 CST 2017: 正在下载adblockplus规则...
Fri Apr 14 08:07:25 CST 2017: 检测到adblockplus规则有更新,开始转换规则!
Fri Apr 14 08:07:25 CST 2017: adblockplus规则转换完成,应用新规则。
diff: /tmp/dnsmasq.adblock: No such file or directory
Fri Apr 14 08:07:35 CST 2017: 检测到adblockplus规则有更新,开始转换规则!
mv: can't rename '/tmp/dnsmasq.adblock': No such file or directory
Fri Apr 14 08:07:35 CST 2017: adblockplus规则转换完成,应用新规则。

点评

下载easylist失败导致的  详情 回复 发表于 2017-4-14 14:56
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-14 12:58 | 显示全部楼层
本帖最后由 shiyiyueyu 于 2017-4-14 13:07 编辑

自己ar9341 cpu用sdk使用楼主的github编译了ipk。使用还可以
反馈下几个现象
1.安装ipk后核心的二进制主程序文件只有300多k,ipk解包里也可以看到
不过运行是显示3.3.6 和官方网页的主程序版本号一样,官方有500多k,二者这区别会在哪儿



2.程序爱自己挂掉,所以写了个监控脚本定时运行下




3.自己运行脚本会报这种错误

然后系统日志显示这些

看起来像是规则问题导致

烦请解答下疑惑,谢谢



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

3, 因为koolproxy已经因为不明原因被干掉了,stop不存在的程序当然会有警告 规则的原因,你可以自己运行/usr/share/koolproxy/koolproxy -l 0  详情 回复 发表于 2017-4-14 14:58
正常的。因为和adb语法不一样。  详情 回复 发表于 2017-4-14 13:07
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-4-14 13:07 | 显示全部楼层
shiyiyueyu 发表于 2017-4-14 12:58
自己ar9341 cpu用sdk使用楼主的github编译了ipk。使用还可以
反馈下几个现象
1.安装ipk后核心的二进制主 ...

正常的。因为和adb语法不一样。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2017-4-14 14:56 | 显示全部楼层
owen5 发表于 2017-4-14 11:02
出现这个, 不知道有影响吗?

Fri Apr 14 07:57:28 CST 2017: 正在下载adblockplus规则...

下载easylist失败导致的

点评

这个有影响吗  详情 回复 发表于 2017-4-14 17:12
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-26 04:05

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表