update 2023-01-29 20:16:55

This commit is contained in:
github-actions[bot] 2023-01-29 20:16:55 +08:00
parent fa55e56aab
commit 863393b65f
8 changed files with 53 additions and 9 deletions

View File

@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for quickstart
LUCI_DEPENDS:=+quickstart +luci-app-store
LUCI_PKGARCH:=all
PKG_VERSION:=0.6.2-1
PKG_VERSION:=0.6.3-1
# PKG_RELEASE MUST be empty for luci.mk
PKG_RELEASE:=

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,8 +6,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-socat
PKG_VERSION:=20200824
PKG_RELEASE:=5
PKG_VERSION:=20230129
PKG_RELEASE:=1
PKG_MAINTAINER:=Lienol <lawlienol@gmail.com>

View File

@ -75,6 +75,25 @@ o = s:option(Value, "dest_port", translate("Destination port"))
o.datatype = "portrange"
o.rmempty = false
o = s:option(ListValue, "proxy", translate("Proxy"))
o:value("", translate("None"))
o:value("socks4/4a", "Socks4/4a")
o:value("http", "HTTP")
o:depends({ proto = "tcp", dest_proto = "tcp4" })
o = s:option(Value, "proxy_server", translate("Proxy Server"))
o.placeholder = "127.0.0.1"
o.default = o.placeholder
o:depends("proxy", "socks4/4a")
o:depends("proxy", "http")
o = s:option(Value, "proxy_port", translate("Proxy Port"))
o.datatype = "port"
o.placeholder = "1080"
o.default = o.placeholder
o:depends("proxy", "socks4/4a")
o:depends("proxy", "http")
o = s:option(Flag, "firewall_accept", translate("Open firewall port"))
o.default = "1"
o.rmempty = false

View File

@ -46,5 +46,14 @@ msgstr "目标地址"
msgid "Destination port"
msgstr "目标端口"
msgid "Proxy"
msgstr "代理"
msgid "Proxy Server"
msgstr "代理服务器"
msgid "Proxy Port"
msgstr "代理端口"
msgid "Open firewall port"
msgstr "打开防火墙端口"

View File

@ -58,6 +58,9 @@ run_service() {
config_get dest_proto $1 dest_proto
config_get dest_ip $1 dest_ip
config_get dest_port $1 dest_port
config_get proxy $1 proxy
config_get proxy_server $1 proxy_server
config_get proxy_port $1 proxy_port
config_get firewall_accept $1 firewall_accept
ln -s /usr/bin/socat ${CONFIG_PATH}/$1
@ -77,7 +80,20 @@ run_service() {
if [ "$protocol" == "port_forwards" ]; then
listen=${proto}${family}
[ "$family" == "" ] && listen=${proto}6
${CONFIG_PATH}/$1 ${listen}-listen:${listen_port}${ipv6only_params}${reuseaddr},fork ${dest_proto}:${dest_ip}:${dest_port} >/dev/null 2>&1 &
[ "$proxy" != "" ] && {
proxy_arg=""
[ "$proxy" == "socks4/4a" ] && {
dest_proto="socks4a"
proxy_arg="socksport"
}
[ "$proxy" == "http" ] && {
dest_proto="proxy"
proxy_arg="proxyport"
}
[ -n "$proxy_server" ] && dest_proto="${dest_proto}:${proxy_server}"
[ -n "$proxy_port" ] && proxy_arg=",${proxy_arg}=${proxy_port}"
}
${CONFIG_PATH}/$1 ${listen}-listen:${listen_port}${ipv6only_params}${reuseaddr},fork ${dest_proto}:${dest_ip}:${dest_port}${proxy_arg} >/dev/null 2>&1 &
fi
[ "$firewall_accept" == "1" ] && {

View File

@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
PKG_ARCH_quickstart:=$(ARCH)
PKG_NAME:=quickstart
PKG_VERSION:=0.6.2
PKG_VERSION:=0.6.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://fw.koolcenter.com/binary/quickstart/
PKG_HASH:=3f1a8fb5f6b4ffab4c612773a12561ec8fef15e33bfa27260f05bba03fad1b1d
PKG_HASH:=39787dda2846482d5766d97500c120690270fd09fe487517b94b0b980738b128
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)