Coder Social home page Coder Social logo

Comments (5)

aa65535 avatar aa65535 commented on May 8, 2024

guest-lan 对应的 firewall zone 名称是?
与在「网络 - 接口」下有对应的接口名称一样吗?

from luci-app-shadowsocks.

aa65535 avatar aa65535 commented on May 8, 2024

@cokebar 试一下这个

diff --git a/files/luci/model/cbi/shadowsocks/access-control.lua b/files/luci/model/cbi/shadowsocks/access-control.lua
index f993a3d..0e1080a 100644
--- a/files/luci/model/cbi/shadowsocks/access-control.lua
+++ b/files/luci/model/cbi/shadowsocks/access-control.lua
@@ -44,9 +44,9 @@ s = m:section(TypedSection, "access_control", translate("Zone LAN"))
 s.anonymous = true

 o = s:option(MultiValue, "lan_ifaces", translate("Interface"))
-for _, zone in ipairs(fwm:get_zones()) do
-       if string.find(zone:name(), "wan") ~= 1 then
-               local net = nwm:get_network(zone:name())
+for _, net in ipairs(nwm:get_networks()) do
+       if net:name() ~= "loopback" and string.find(net:name(), "wan") ~= 1 then
+               net = nwm:get_network(net:name())
                local device = net and net:get_interface()
                if device then
                        o:value(device:name(), device:get_i18n())

from luci-app-shadowsocks.

cokebar avatar cokebar commented on May 8, 2024

名字改一样的有了

from luci-app-shadowsocks.

aa65535 avatar aa65535 commented on May 8, 2024

@cokebar 请帮忙试一下上面的 patch 是否可以解决.
文件位置 /usr/lib/lua/luci/model/cbi/shadowsocks/access-control.lua

from luci-app-shadowsocks.

cokebar avatar cokebar commented on May 8, 2024

This patch fixed the problem. Thanks.

from luci-app-shadowsocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.