Closed jack338c closed 7 years ago
Which router are u using?
luci/model/cbi/shadowsocksr/access-control.lua:90
Refer to shadowsocks/luci-app-shadowsocks
luci/model/cbi/shadowsocks/access-control.lua:92
OR U can retry after reboot Ur router.
netgear wndr4300
sorry ,this one luci/model/cbi/shadowsocksr/access-control.lua:90
have u try reboot?
yes I do,but it does't work
github is too smart to auto close this issue, please try https://github.com/chenhw2/luci-app-shadowsocksr/commit/bde796bb607b0f5fced9ecd9bf4be1eae4d87e52
thanks for you fast response
haha,ok I got it
unfortunately,I replace /usr/lib/lua/luci/model/cbi/shadowsocksr/access-control.lua in my router
but it still dese't work
/usr/lib/lua/luci/dispatcher.lua:469: Failed to execute cbi dispatcher target for entry '/admin/services/shadowsocksr/access-control'. The called action terminated with an exception: /usr/lib/lua/luci/cbi.lua:53: /usr/lib/lua/luci/model/cbi/shadowsocksr/access-control.lua:90: 'then' expected near '!' stack traceback: [C]: in function 'assert' /usr/lib/lua/luci/dispatcher.lua:469: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:121: in function </usr/lib/lua/luci/dispatcher.lua:120>
can u login and run a command arp
and show me the result.
U try the old one, please try https://github.com/chenhw2/luci-app-shadowsocksr/commit/4acf0c1fedfddb22c9cd02d7dd3a93414211f439
BusyBox v1.26.2 () built-in shell (ash)
_________
/ /\ _ ___ ___ ___
/ LE / \ | | | __| \| __|
/ DE / \ | |__| _|| |) | _|
/________/ LE \ |____|___|___/|___| lede-project.org
\ \ DE /
\ LE \ / -----------------------------------------------------------
\ DE \ / Reboot (SNAPSHOT, r4561-254f0da)
\________\/ -----------------------------------------------------------
root@LEDE:~# arp
IP address HW type Flags HW address Mask Device
192.168.11.185 0x1 0x2 00:21:6a:6d:75:0e * br-lan
192.168.11.143 0x1 0x2 58:94:6b:0c:b6:d0 * br-lan
192.168.11.182 0x1 0x2 f8:f1:b6:57:e4:30 * br-lan
192.168.11.228 0x1 0x2 60:be:b5:68:d9:ce * br-lan
192.168.11.157 0x1 0x2 a4:77:33:fb:80:ba * br-lan
root@LEDE:~#
o = s:option(Value, "host", translate("Host"))
if luci.sys.net.arptable() ~= nil then
luci.sys.net.arptable(function(x)
o:value(x["IP address"], "%s (%s)" %{x["IP address"], x["HW address"]})
end)
end
o.datatype = "ip4addr"
o.rmempty = false
(did not paste other parts)
I chang to above,then did a save& apply on shadowsocksr menu first, but still got same issue while clicking access-control menu
that's rare, than i look into the offical luci-app-shadowsocks
, i find this commit
Can U try this:
o = s:option(Value, "host", translate("Host"))
luci.sys.net.ipv4_hints(function(ip, name)
o:value(ip, "%s (%s)" %{ip, name})
end)
o.datatype = "ip4addr"
o.rmempty = false
it works !! thank you Chenhw2,for your patience and help.
Good, but this code may cause https://github.com/shadowsocks/luci-app-shadowsocks/issues/39 & https://github.com/shadowsocks/luci-app-shadowsocks/issues/32
ok,I got it
@aa65535 ok,thanks a lot !
but I'm using trunk version of lede,how to deal with openwrt/luci@366707a?
Great ! thanks
Dear Chen,I make the neweset luci-app-shadowsocksr from your respoitory,everything is ok except the access-control menu
when I click "access-control",it comes following
/usr/lib/lua/luci/dispatcher.lua:469: Failed to execute cbi dispatcher target for entry '/admin/services/shadowsocksr/access-control'. The called action terminated with an exception: ...b/lua/luci/model/cbi/shadowsocksr/access-control.lua:90: attempt to call field 'arptable' (a nil value) stack traceback: [C]: in function 'assert' /usr/lib/lua/luci/dispatcher.lua:469: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:121: in function </usr/lib/lua/luci/dispatcher.lua:120>