diff --git a/package/jsda/luci-app-kcptun/Makefile b/package/jsda/luci-app-kcptun/Makefile index 74376aa11d..1437d7b267 100755 --- a/package/jsda/luci-app-kcptun/Makefile +++ b/package/jsda/luci-app-kcptun/Makefile @@ -6,14 +6,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-kcptun -PKG_VERSION:=1.5.0 +PKG_VERSION:=1.5.1 PKG_RELEASE:=1 PKG_LICENSE:=Apache-2.0 PKG_MAINTAINER:=Xingwang Liao LUCI_TITLE:=LuCI support for Kcptun -LUCI_DEPENDS:=+jshn +LUCI_DEPENDS:=+jshn +iptables +iptables-mod-tproxy LUCI_PKGARCH:=all define Package/$(PKG_NAME)/conffiles @@ -26,9 +26,11 @@ define Package/$(PKG_NAME)/postinst #!/bin/sh if [ -z "$${IPKG_INSTROOT}" ]; then ( . /etc/uci-defaults/40_luci-kcptun ) && rm -f /etc/uci-defaults/40_luci-kcptun - chmod 755 /etc/init.d/kcptun >/dev/null 2>&1 - /etc/init.d/kcptun enable >/dev/null 2>&1 fi + +chmod 755 $${IPKG_INSTROOT}/etc/init.d/kcptun >/dev/null 2>&1 +ln -sf $${IPKG_INSTROOT}/etc/init.d/kcptun \ + $${IPKG_INSTROOT}/etc/rc.d/S99kcptun >/dev/null 2>&1 exit 0 endef diff --git a/package/jsda/luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua b/package/jsda/luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua index 1d0c500502..2ec722be77 100755 --- a/package/jsda/luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua +++ b/package/jsda/luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua @@ -130,6 +130,16 @@ o.enabled = "true" o.disabled = "false" o.rmempty = false +o = s:option(Flag, "quiet", translate("quiet"), translate("Suppress the 'stream open/close' messages")) +o.enabled = "true" +o.disabled = "false" +o.rmempty = false + +o = s:option(Flag, "tcp", translate("tcp"), translate("TCP transmission")) +o.enabled = "true" +o.disabled = "false" +o.rmempty = false + o = s:option(Flag, "acknodelay", translate("acknodelay")) o.enabled = "true" o.disabled = "false" diff --git a/package/jsda/luci-app-kcptun/po/templates/kcptun.pot b/package/jsda/luci-app-kcptun/po/templates/kcptun.pot index 7200b67be9..d2e2217c6e 100755 --- a/package/jsda/luci-app-kcptun/po/templates/kcptun.pot +++ b/package/jsda/luci-app-kcptun/po/templates/kcptun.pot @@ -1,375 +1,391 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:92 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:92 msgid "2nd ACK" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:44 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:34 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:44 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:34 msgid "Alias" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:143 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:153 msgid "" "Auto expiration time(in seconds) for a single UDP connection, 0 to disable." msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:29 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:29 msgid "Clear Log File" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:41 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:41 msgid "Client File" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:48 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:48 msgid "Client Status" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:54 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:54 msgid "Client Version" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:32 -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:50 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:32 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:50 msgid "Collecting data..." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 msgid "DSCP(6bit)" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:36 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:36 msgid "Disable" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:65 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:65 msgid "Disable Compression" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:128 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:128 msgid "Disable Compression?" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:32 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:32 msgid "Edit Server" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:74 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:59 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:74 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:59 msgid "Embedded Mode" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:50 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:50 msgid "Enable Logging" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:80 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:80 msgid "Enable nodelay Mode." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:68 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:53 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:68 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:53 msgid "Encrypt Method" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:66 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:66 msgid "Error get log data." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:68 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:68 msgid "False" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:31 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:31 msgid "General Settings" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:61 -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:62 -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:70 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:61 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:62 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:70 msgid "Get latest" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:148 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:158 msgid "How long an expired connection can live(in sec), -1 to disable." msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:57 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:57 msgid "Invalid Client File." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:32 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:17 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:28 -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:26 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:32 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:17 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:28 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:26 msgid "Kcptun" msgstr "" -#: ../luci-app-kcptun/luasrc/controller/kcptun.lua:15 +#: luci-app-kcptun/luasrc/controller/kcptun.lua:15 msgid "Kcptun Client" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:63 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:63 msgid "Key" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:61 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:61 msgid "Last 50 lines of log file:" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:63 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:63 msgid "Last 50 lines of syslog:" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:46 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:46 msgid "Listen Address" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:32 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:32 msgid "Loading" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:54 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:54 msgid "Local Listen Host" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:59 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:59 msgid "Local Listen Port." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:59 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:59 msgid "Local Port" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:55 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:55 msgid "Local listen host." msgstr "" -#: ../luci-app-kcptun/luasrc/controller/kcptun.lua:25 +#: luci-app-kcptun/luasrc/controller/kcptun.lua:25 msgid "Log" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:26 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:26 msgid "Log Data" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:53 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:53 msgid "Log Folder" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:67 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:67 msgid "LuCI Version" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:98 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:98 msgid "Maximum transmission unit of UDP packets." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:173 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:183 msgid "" "NAT keepalive interval to prevent your router from removing port mapping, " "default unit is seconds." msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:62 -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:64 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:62 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:64 msgid "No log data." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:36 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:36 msgid "None" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:83 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:83 msgid "Not Running" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:138 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:148 msgid "Number of UDP connections to server." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:90 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:90 msgid "Off" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:91 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:91 msgid "On" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:64 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:64 msgid "Pre-shared secret for client and server." msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:42 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:42 msgid "Processing..." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:109 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:109 msgid "Receive Window Size(num of packets)." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:115 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:115 msgid "Reed-solomon Erasure Coding - datashard." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:120 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:120 msgid "Reed-solomon Erasure Coding - parityshard." msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:33 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:33 msgid "Refresh every 5 seconds." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:44 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:44 msgid "Run Daemon as User" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:83 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:83 msgid "Running" msgstr "" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:45 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:45 msgid "Running Status" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:178 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:188 msgid "SNMP collect period, in seconds" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:103 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:103 msgid "Send Window Size(num of packets)." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:153 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:163 msgid "Send/secv buffer size of udp sockets, default unit is MB." msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:46 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:35 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:46 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:35 msgid "Server" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:39 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:39 msgid "Server Address" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:17 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:17 msgid "Server List" msgstr "" -#: ../luci-app-kcptun/luasrc/controller/kcptun.lua:22 +#: luci-app-kcptun/luasrc/controller/kcptun.lua:22 msgid "Server Manage" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:50 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:50 msgid "Server Port" msgstr "" -#: ../luci-app-kcptun/luasrc/controller/kcptun.lua:18 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:28 +#: luci-app-kcptun/luasrc/controller/kcptun.lua:18 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:28 msgid "Settings" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:68 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:133 +msgid "Suppress the 'stream open/close' messages" +msgstr "" + +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:138 +msgid "TCP transmission" +msgstr "" + +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:68 msgid "True" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:133 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:143 msgid "acknodelay" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:142 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:152 msgid "autoexpire" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:137 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:147 msgid "conn" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:68 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:68 msgid "crypt" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:114 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:114 msgid "datashard" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 msgid "dscp" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:83 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:83 msgid "interval" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:172 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:182 msgid "keepalive" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:74 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:74 msgid "mode" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:97 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:97 msgid "mtu" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:94 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:94 msgid "nc" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:128 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:128 msgid "nocomp" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:80 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:80 msgid "nodelay" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:44 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:54 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:63 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:97 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:102 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:108 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:114 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:119 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:137 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:142 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:147 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:152 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:172 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:178 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:44 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:54 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:63 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:97 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:102 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:108 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:114 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:119 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:147 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:152 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:157 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:162 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:182 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:188 msgid "optional" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:119 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:119 msgid "parityshard" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:108 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:133 +msgid "quiet" +msgstr "" + +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:108 msgid "rcvwnd" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:88 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:88 msgid "resend" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:147 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:157 msgid "scavengettl" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:102 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:102 msgid "sndwnd" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:177 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:187 msgid "snmpperiod" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:152 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:162 msgid "sockbuf" msgstr "" + +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:138 +msgid "tcp" +msgstr "" diff --git a/package/jsda/luci-app-kcptun/po/zh-cn/kcptun.po b/package/jsda/luci-app-kcptun/po/zh-cn/kcptun.po index ad2117b8ae..3d69928cf1 100755 --- a/package/jsda/luci-app-kcptun/po/zh-cn/kcptun.po +++ b/package/jsda/luci-app-kcptun/po/zh-cn/kcptun.po @@ -1,379 +1,395 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8\n" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:92 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:92 msgid "2nd ACK" msgstr "2次 ACK 跨越重传" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:44 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:34 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:44 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:34 msgid "Alias" msgstr "别名" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:143 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:153 msgid "" "Auto expiration time(in seconds) for a single UDP connection, 0 to disable." msgstr "单个 UDP 连接的自动过期时间(秒),设置 0 来禁用" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:29 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:29 msgid "Clear Log File" msgstr "清理日志文件" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:41 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:41 msgid "Client File" msgstr "客户端文件" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:48 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:48 msgid "Client Status" msgstr "客户端状态" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:54 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:54 msgid "Client Version" msgstr "客户端版本" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:32 -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:50 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:32 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:50 msgid "Collecting data..." msgstr "正在收集数据..." -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 msgid "DSCP(6bit)" msgstr "DSCP(6bit)" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:36 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:36 msgid "Disable" msgstr "禁用" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:65 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:65 msgid "Disable Compression" msgstr "禁用压缩" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:128 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:128 msgid "Disable Compression?" msgstr "是否禁用压缩?" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:32 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:32 msgid "Edit Server" msgstr "编辑服务端" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:74 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:59 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:74 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:59 msgid "Embedded Mode" msgstr "内置模式" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:50 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:50 msgid "Enable Logging" msgstr "启用日志记录" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:80 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:80 msgid "Enable nodelay Mode." msgstr "启用 nodelay 模式" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:68 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:53 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:68 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:53 msgid "Encrypt Method" msgstr "加密方式" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:66 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:66 msgid "Error get log data." msgstr "获取日志数据失败。" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:68 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:68 msgid "False" msgstr "否" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:31 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:31 msgid "General Settings" msgstr "基本设置" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:61 -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:62 -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:70 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:61 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:62 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:70 msgid "Get latest" msgstr "获取最新版" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:148 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:158 msgid "How long an expired connection can live(in sec), -1 to disable." msgstr "过期连接保留多长时间(秒),设置 -1 来禁用" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:57 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:57 msgid "Invalid Client File." msgstr "客户端文件配置有误" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:32 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:17 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:28 -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:26 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:32 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:17 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:28 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:26 msgid "Kcptun" msgstr "" -#: ../luci-app-kcptun/luasrc/controller/kcptun.lua:15 +#: luci-app-kcptun/luasrc/controller/kcptun.lua:15 msgid "Kcptun Client" msgstr "Kcptun 客户端" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:63 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:63 msgid "Key" msgstr "密码" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:61 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:61 msgid "Last 50 lines of log file:" msgstr "日志文件的最新 50 行:" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:63 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:63 msgid "Last 50 lines of syslog:" msgstr "系统日志的最新 50 行:" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:46 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:46 msgid "Listen Address" msgstr "监听地址" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:32 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:32 msgid "Loading" msgstr "正在加载..." -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:54 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:54 msgid "Local Listen Host" msgstr "本地监听地址" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:59 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:59 msgid "Local Listen Port." msgstr "本地监听端口" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:59 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:59 msgid "Local Port" msgstr "本地端口" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:55 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:55 msgid "Local listen host." msgstr "本地监听主机" -#: ../luci-app-kcptun/luasrc/controller/kcptun.lua:25 +#: luci-app-kcptun/luasrc/controller/kcptun.lua:25 msgid "Log" msgstr "日志" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:26 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:26 msgid "Log Data" msgstr "日志数据" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:53 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:53 msgid "Log Folder" msgstr "日志文件夹" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:67 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:67 msgid "LuCI Version" msgstr "LuCI 版本" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:98 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:98 msgid "Maximum transmission unit of UDP packets." msgstr "UDP数据包的最大传输单元" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:173 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:183 msgid "" "NAT keepalive interval to prevent your router from removing port mapping, " "default unit is seconds." msgstr "NAT Keepalive 包间隔时间(秒), 防止路由器删除端口映射" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:62 -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:64 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:62 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:64 msgid "No log data." msgstr "无日志数据。" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:36 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:36 msgid "None" msgstr "无" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:83 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:83 msgid "Not Running" msgstr "未运行" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:138 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:148 msgid "Number of UDP connections to server." msgstr "到服务端的UDP连接数量" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:90 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:90 msgid "Off" msgstr "关闭" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:91 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:91 msgid "On" msgstr "开启" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:64 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:64 msgid "Pre-shared secret for client and server." msgstr "客户端和服务端的通信密码" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:42 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:42 msgid "Processing..." msgstr "正在操作..." -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:109 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:109 msgid "Receive Window Size(num of packets)." msgstr "接收窗口大小 (数据包数量)" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:115 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:115 msgid "Reed-solomon Erasure Coding - datashard." msgstr "前向纠错 - datashard" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:120 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:120 msgid "Reed-solomon Erasure Coding - parityshard." msgstr "前向纠错 - parityshard" -#: ../luci-app-kcptun/luasrc/view/kcptun/log_view.htm:33 +#: luci-app-kcptun/luasrc/view/kcptun/log_view.htm:33 msgid "Refresh every 5 seconds." msgstr "每 5 秒刷新。" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:44 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:44 msgid "Run Daemon as User" msgstr "以该用户启动" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:83 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:83 msgid "Running" msgstr "运行中" -#: ../luci-app-kcptun/luasrc/view/kcptun/status.htm:45 +#: luci-app-kcptun/luasrc/view/kcptun/status.htm:45 msgid "Running Status" msgstr "运行状态" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:178 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:188 msgid "SNMP collect period, in seconds" msgstr "SNMP采集周期(秒)" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:103 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:103 msgid "Send Window Size(num of packets)." msgstr "发送窗口大小 (数据包数量)" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:153 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:163 msgid "Send/secv buffer size of udp sockets, default unit is MB." msgstr "发送/接收UDP数据包的缓冲区大小(MB)" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:46 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:35 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:46 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:35 msgid "Server" msgstr "服务端地址" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:39 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:39 msgid "Server Address" msgstr "服务端地址" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:17 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:17 msgid "Server List" msgstr "服务端列表" -#: ../luci-app-kcptun/luasrc/controller/kcptun.lua:22 +#: luci-app-kcptun/luasrc/controller/kcptun.lua:22 msgid "Server Manage" msgstr "服务端管理" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:50 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:50 msgid "Server Port" msgstr "服务端端口" -#: ../luci-app-kcptun/luasrc/controller/kcptun.lua:18 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:28 +#: luci-app-kcptun/luasrc/controller/kcptun.lua:18 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/settings.lua:28 msgid "Settings" msgstr "设置" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:68 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:133 +msgid "Suppress the 'stream open/close' messages" +msgstr "不打印 'stream open/close' 信息" + +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:138 +msgid "TCP transmission" +msgstr "TCP 传输" + +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers.lua:68 msgid "True" msgstr "是" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:133 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:143 msgid "acknodelay" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:142 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:152 msgid "autoexpire" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:137 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:147 msgid "conn" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:68 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:68 msgid "crypt" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:114 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:114 msgid "datashard" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 msgid "dscp" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:83 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:83 msgid "interval" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:172 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:182 msgid "keepalive" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:74 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:74 msgid "mode" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:97 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:97 msgid "mtu" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:94 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:94 msgid "nc" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:128 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:128 msgid "nocomp" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:80 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:80 msgid "nodelay" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:44 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:54 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:63 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:97 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:102 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:108 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:114 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:119 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:137 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:142 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:147 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:152 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:172 -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:178 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:44 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:54 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:63 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:97 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:102 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:108 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:114 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:119 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:124 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:147 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:152 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:157 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:162 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:182 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:188 msgid "optional" msgstr "可选" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:119 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:119 msgid "parityshard" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:108 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:133 +msgid "quiet" +msgstr "" + +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:108 msgid "rcvwnd" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:88 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:88 msgid "resend" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:147 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:157 msgid "scavengettl" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:102 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:102 msgid "sndwnd" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:177 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:187 msgid "snmpperiod" msgstr "" -#: ../luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:152 +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:162 msgid "sockbuf" msgstr "" +#: luci-app-kcptun/luasrc/model/cbi/kcptun/servers-detail.lua:138 +msgid "tcp" +msgstr "" + #~ msgid "Auto" #~ msgstr "自动" diff --git a/package/jsda/luci-app-kcptun/root/etc/config/kcptun b/package/jsda/luci-app-kcptun/root/etc/config/kcptun index 0c7be8eb0a..5b1d59abed 100755 --- a/package/jsda/luci-app-kcptun/root/etc/config/kcptun +++ b/package/jsda/luci-app-kcptun/root/etc/config/kcptun @@ -13,3 +13,5 @@ config servers 'default' option crypt 'aes' option mode 'fast' option nocomp 'false' + option quiet 'false' + option tcp 'false' diff --git a/package/jsda/luci-app-kcptun/root/etc/init.d/kcptun b/package/jsda/luci-app-kcptun/root/etc/init.d/kcptun index 5a178c2f96..123130cc25 100755 --- a/package/jsda/luci-app-kcptun/root/etc/init.d/kcptun +++ b/package/jsda/luci-app-kcptun/root/etc/init.d/kcptun @@ -71,7 +71,7 @@ gen_client_config_file() { add_configs "string" key crypt mode add_configs "int" conn autoexpire mtu sndwnd rcvwnd datashard parityshard dscp \ nodelay interval resend nc sockbuf keepalive scavengettl snmpperiod - add_configs "boolean" nocomp acknodelay + add_configs "boolean" nocomp acknodelay quiet tcp if [ -n "$log_file" ]; then json_add_string "log" "$log_file" @@ -82,38 +82,20 @@ gen_client_config_file() { json_dump -i >"$config_file" } -setup_iptables_chain() { - if ! ( iptables -nL "$KCPTUN" >/dev/null 2>&1 ); then - iptables -N "$KCPTUN" 2>/dev/null - fi - - iptables -C OUTPUT -j "$KCPTUN" 2>/dev/null || \ - iptables -A OUTPUT -j "$KCPTUN" 2>/dev/null - iptables -C INPUT -j "$KCPTUN" 2>/dev/null || \ - iptables -A INPUT -j "$KCPTUN" 2>/dev/null -} - -clear_iptables_chain() { - iptables -F "$KCPTUN" >/dev/null 2>&1 -} - add_iptables_rule() { local port="$1" - local type="$2" - if [ "$type" = "client" ]; then - ( iptables -C "$KCPTUN" -p tcp --dport "$port" -m comment \ - --comment "$type" -j ACCEPT 2>/dev/null ) && return 0 + iptables-restore --noflush <<-EOF 2>/dev/null + *nat + :KCPTUN - + -A KCPTUN -p tcp --dport $port -j ACCEPT + -A INPUT -p tcp -j KCPTUN + COMMIT + EOF +} - iptables -A "$KCPTUN" -p tcp --dport "$port" -m comment \ - --comment "$type" -j ACCEPT 2>/dev/null - elif [ "$type" = "server" ]; then - ( iptables -C "$KCPTUN" -p udp --dport "$port" -m comment \ - --comment "$type" -j ACCEPT 2>/dev/null ) && return 0 - - iptables -A "$KCPTUN" -p udp --dport "$port" -m comment \ - --comment "$type" -j ACCEPT 2>/dev/null - fi +clear_iptables_rule() { + iptables-save --counters | grep -vi "KCPTUN" | iptables-restore --counters } validate_config_section() { @@ -144,6 +126,8 @@ validate_server_section() { 'parityshard:uinteger' \ 'dscp:uinteger' \ 'nocomp:or("true", "false")' \ + 'quiet:or("true", "false")' \ + 'tcp:or("true", "false")' \ 'nodelay:bool' \ 'interval:uinteger' \ 'resend:range(0,2)' \ @@ -161,7 +145,7 @@ validate_client_file() { return 1 fi - [ -x "$file" ] || chmod 755 "$file" + test -x "$file" || chmod 755 "$file" ( $file -v 2>/dev/null | grep -q "$KCPTUN" ) } @@ -200,23 +184,23 @@ start_kcptun_instance() { is_ipv6_address "$server_addr" && server_addr="[${server_addr}]" is_ipv6_address "$listen_addr" && listen_addr="[${listen_addr}]" - [ -d "$CONFIG_FOLDER" ] || mkdir -p "$CONFIG_FOLDER" + test -d "$CONFIG_FOLDER" || mkdir -p "$CONFIG_FOLDER" log_file="" - if [ "$enable_logging" = "1" ]; then + if [ "x$enable_logging" = "x1" ]; then mkdir -p "$log_folder" chown -R "$daemon_user" "$log_folder" log_file="${log_folder}/client.${section}.log" fi - local config_file=${CONFIG_FOLDER}/client.${section}.json + local config_file="${CONFIG_FOLDER}/client.${section}.json" if ! ( gen_client_config_file "$config_file" ); then _log "err" "Can't create config file". return 1 fi - add_iptables_rule "$listen_port" "client" + add_iptables_rule "$listen_port" procd_open_instance procd_set_param command "$client_file" @@ -232,13 +216,12 @@ service_triggers() { } start_service() { - clear_iptables_chain - setup_iptables_chain + clear_iptables_rule config_load "$KCPTUN" config_foreach start_kcptun_instance "general" } stop_service() { - clear_iptables_chain + clear_iptables_rule }