mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 03:43:29 +00:00
luci-app-frpc: add config field of user (#6496)
This commit is contained in:
parent
6b5b7884a8
commit
b1c6b17bf7
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
LUCI_TITLE:=LuCI for FRPC
|
||||
LUCI_DEPENDS:=+wget +frpc
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1.2
|
||||
PKG_VERSION:=1.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
@ -26,6 +26,10 @@ e=t:taboption("base",Value, "token", translate("Token"), translate("Time duratio
|
||||
e.optional=false
|
||||
e.password=true
|
||||
e.rmempty=false
|
||||
e=t:taboption("base",Value, "user", translate("User"), translate("Commonly used to distinguish you with other clients."))
|
||||
e.optional=true
|
||||
e.default = ""
|
||||
e.rmempty=false
|
||||
e=t:taboption("base",Value, "vhost_http_port", translate("Vhost HTTP Port"))
|
||||
e.datatype = "port"
|
||||
e.rmempty=false
|
||||
|
@ -41,6 +41,12 @@ msgstr "端口"
|
||||
msgid "Token"
|
||||
msgstr "令牌"
|
||||
|
||||
msgid "User"
|
||||
msgstr "用户名"
|
||||
|
||||
msgid "Commonly used to distinguish you with other clients."
|
||||
msgstr "通常用于区分你与其他客户端"
|
||||
|
||||
msgid "Time duration between server of frpc and frps mustn't exceed 15 minutes."
|
||||
msgstr "frpc服务器与frps之间的时间间隔不得超过15分钟"
|
||||
|
||||
|
@ -14,3 +14,4 @@ config frp 'common'
|
||||
option log_level 'info'
|
||||
option enable_http_proxy '0'
|
||||
option protocol 'tcp'
|
||||
option user ''
|
||||
|
@ -171,7 +171,7 @@ boot() {
|
||||
start() {
|
||||
|
||||
config_load "frp"
|
||||
local enabled server_addr server_port time privilege_token tcp_mux enable_cpool
|
||||
local enabled server_addr server_port time privilege_token user tcp_mux enable_cpool
|
||||
local pool_count log_level log_max_days login_fail_exit http_proxy protocol
|
||||
|
||||
config_get_bool enabled common enabled 1
|
||||
@ -181,6 +181,7 @@ start() {
|
||||
config_get server_addr common server_addr
|
||||
config_get server_port common server_port
|
||||
config_get token common token
|
||||
config_get user common user
|
||||
config_get enable_cpool common enable_cpool
|
||||
config_get pool_count common pool_count
|
||||
config_get log_level common log_level
|
||||
@ -201,6 +202,7 @@ start() {
|
||||
echo "server_addr=${server_addr}" >>$tmpconf
|
||||
echo "server_port=${server_port}" >>$tmpconf
|
||||
echo "token=${token}" >>$tmpconf
|
||||
[ -n "$user" ] && echo "user=$user" >>$tmpconf
|
||||
echo "log_level=${log_level}" >>$tmpconf
|
||||
echo "log_max_days=${log_max_days}" >>$tmpconf
|
||||
echo "protocol=${protocol}" >>$tmpconf
|
||||
|
Loading…
Reference in New Issue
Block a user