diff --git a/package/lean/luci-app-softethervpn/Makefile b/package/lean/luci-app-softethervpn/Makefile index 236ed1e7b..5636c5c1c 100644 --- a/package/lean/luci-app-softethervpn/Makefile +++ b/package/lean/luci-app-softethervpn/Makefile @@ -9,10 +9,8 @@ LUCI_TITLE:=LuCI support for SoftEtherVPN LUCI_DEPENDS:=+zlib +libpthread +librt +libreadline +libncurses +libiconv-full +kmod-tun +libopenssl +softethervpn5-bridge +softethervpn5-client +softethervpn5-server LUCI_PKGARCH:=all PKG_VERSION:=1.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature - - diff --git a/package/lean/luci-app-softethervpn/luasrc/controller/softethervpn.lua b/package/lean/luci-app-softethervpn/luasrc/controller/softethervpn.lua index 8a5dd036f..e51b3435a 100644 --- a/package/lean/luci-app-softethervpn/luasrc/controller/softethervpn.lua +++ b/package/lean/luci-app-softethervpn/luasrc/controller/softethervpn.lua @@ -6,13 +6,13 @@ function index() end entry({"admin", "vpn"}, firstchild(), "VPN", 45).dependent = false - entry({"admin", "vpn", "softethervpn"}, cbi("softethervpn"), _("SoftEther VPN"), 50).dependent = true - entry({"admin", "vpn", "softethervpn", "status"}, call("status")).leaf = true + entry({"admin", "vpn", "softethervpn"}, cbi("softethervpn"), _("SoftEther VPN Service"), 50).dependent = true + entry({"admin", "vpn", "softethervpn", "status"}, call("act_status")).leaf = true end -function status() - local e={} - e.status=luci.sys.call("pidof %s >/dev/null"%"vpnserver")==0 +function act_status() + local e = {} + e.running = luci.sys.call("pidof vpnserver >/dev/null") == 0 luci.http.prepare_content("application/json") luci.http.write_json(e) end diff --git a/package/lean/luci-app-softethervpn/luasrc/model/cbi/softethervpn.lua b/package/lean/luci-app-softethervpn/luasrc/model/cbi/softethervpn.lua index 5529c82fb..1a25ebe92 100644 --- a/package/lean/luci-app-softethervpn/luasrc/model/cbi/softethervpn.lua +++ b/package/lean/luci-app-softethervpn/luasrc/model/cbi/softethervpn.lua @@ -1,14 +1,18 @@ -local s=require"luci.sys" +local s = require"luci.sys" local m,s,o -m=Map("softethervpn",translate("SoftEther VPN")) + +m = Map("softethervpn") +m.title = translate("SoftEther VPN Service") m.description = translate("SoftEther VPN is an open source, cross-platform, multi-protocol virtual private network solution developed by university of tsukuba graduate student Daiyuu Nobori for master's thesis.
can easily set up OpenVPN, IPsec, L2TP, ms-sstp, L2TPv3 and EtherIP servers on the router using the console.") -m.template="softethervpn/index" -s=m:section(TypedSection,"softether") -s.anonymous=true -o=s:option(DummyValue,"softethervpn_status",translate("Current Condition")) -o.template="softethervpn/status" -o.value=translate("Collecting data...") -o=s:option(Flag,"enable",translate("Enabled")) -o.rmempty=false -o=s:option(DummyValue,"moreinfo",translate("控制台下载:
Windows-x86_x64-intel.exe

macos-x86-32bit.pkg
")) + +m:section(SimpleSection).template = "softethervpn/softethervpn_status" + +s = m:section(TypedSection, "softether") +s.anonymous = true + +o = s:option(Flag, "enable", translate("Enabled")) +o.rmempty = false + +o = s:option(DummyValue, "moreinfo", translate("控制台下载:
Windows-x86_x64-intel.exe

macos-x86-32bit.pkg
")) + return m diff --git a/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/index.htm b/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/index.htm deleted file mode 100644 index 273f604ea..000000000 --- a/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/index.htm +++ /dev/null @@ -1,18 +0,0 @@ -<%# - Copyright (C) 2018-2019 Lienol - Licensed to the public under the Apache License 2.0. --%> - -<% include("cbi/map") %> - diff --git a/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/softethervpn_status.htm b/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/softethervpn_status.htm new file mode 100644 index 000000000..9aa1e647c --- /dev/null +++ b/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/softethervpn_status.htm @@ -0,0 +1,22 @@ + + +
+

+ <%:Collecting data...%> +

+
diff --git a/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/status.htm b/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/status.htm deleted file mode 100644 index 055b112ec..000000000 --- a/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/status.htm +++ /dev/null @@ -1,3 +0,0 @@ -<%+cbi/valueheader%> -<%=pcdata(self:cfgvalue(section) or self.default or "")%> -<%+cbi/valuefooter%> diff --git a/package/lean/luci-app-softethervpn/po/zh-cn/softethervpn.po b/package/lean/luci-app-softethervpn/po/zh-cn/softethervpn.po index 8d17b1507..18b8a0763 100644 --- a/package/lean/luci-app-softethervpn/po/zh-cn/softethervpn.po +++ b/package/lean/luci-app-softethervpn/po/zh-cn/softethervpn.po @@ -1,23 +1,20 @@ -msgid "SoftEther VPN" +msgid "SoftEther VPN Service" msgstr "SoftEther VPN 服务器" msgid "SoftEther VPN is an open source, cross-platform, multi-protocol virtual private network solution developed by university of tsukuba graduate student Daiyuu Nobori for master's thesis.
can easily set up OpenVPN, IPsec, L2TP, ms-sstp, L2TPv3 and EtherIP servers on the router using the console." msgstr "SoftEther VPN是由筑波大学研究生Daiyuu Nobori因硕士论文开发的开源,跨平台,多重协定的虚拟私人网路方案。
使用控制台可以轻松在路由器上搭建OpenVPN, IPsec, L2TP, MS-SSTP, L2TPv3 和 EtherIP服务器。" -msgid "PPTP VPN Server status" -msgstr "PPTP VPN 服务器运行状态" - -msgid "Current Condition" -msgstr "当前状态" - msgid "Enabled" msgstr "启用" +msgid "PPTP VPN Server status" +msgstr "PPTP VPN 服务器运行状态" + msgid "Open L2TP/IPSec firewall" -msgstr "开启L2TP/IPSec防火墙" +msgstr "开启 L2TP/IPSec 防火墙" msgid "Open the MS-SSTP firewall" -msgstr "开启MS-SSTP防火墙" +msgstr "开启 MS-SSTP 防火墙" msgid "Open the OpenVPN firewall" -msgstr "开启OpenVPN防火墙" \ No newline at end of file +msgstr "开启 OpenVPN 防火墙" diff --git a/package/lean/luci-app-softethervpn/root/etc/config/softethervpn b/package/lean/luci-app-softethervpn/root/etc/config/softethervpn index 90732c533..fc4dde380 100644 --- a/package/lean/luci-app-softethervpn/root/etc/config/softethervpn +++ b/package/lean/luci-app-softethervpn/root/etc/config/softethervpn @@ -1,4 +1,3 @@ config softether option enable '0' -