diff --git a/package/lean/luci-app-frpc/Makefile b/package/lean/luci-app-frpc/Makefile index eb1a01eb09..28a304430d 100644 --- a/package/lean/luci-app-frpc/Makefile +++ b/package/lean/luci-app-frpc/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI for FRPC LUCI_DEPENDS:=+wget-ssl +frpc LUCI_PKGARCH:=all -PKG_VERSION:=1.2 +PKG_VERSION:=1.3 PKG_RELEASE:=1 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-frpc/luasrc/model/cbi/frp/frp.lua b/package/lean/luci-app-frpc/luasrc/model/cbi/frp/frp.lua index 531dd84f6c..34fc151fbb 100644 --- a/package/lean/luci-app-frpc/luasrc/model/cbi/frp/frp.lua +++ b/package/lean/luci-app-frpc/luasrc/model/cbi/frp/frp.lua @@ -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 diff --git a/package/lean/luci-app-frpc/po/zh-cn/frp.po b/package/lean/luci-app-frpc/po/zh-cn/frp.po index 17f775a70a..44e60c8c44 100644 --- a/package/lean/luci-app-frpc/po/zh-cn/frp.po +++ b/package/lean/luci-app-frpc/po/zh-cn/frp.po @@ -1,270 +1,276 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8" - - -msgid "Frp Setting" -msgstr "Frp 内网穿透" - -msgid "Frp Status" -msgstr "Frp状态" - -msgid "The Frp service is not running." -msgstr "Frp服务未运行" - -msgid "The Frp service is running." -msgstr "Frp服务正在运行" - -msgid "Frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet." -msgstr "Frp 是一个可用于内网穿透的高性能的反向代理应用。" - -msgid "Global Setting" -msgstr "全局设置" - -msgid "Basic Settings" -msgstr "基本设置" - -msgid "Other Settings" -msgstr "其他设置" - -msgid "Client Log" -msgstr "日志" - -msgid "Enabled" -msgstr "启用" - -msgid "Server" -msgstr "服务器" - -msgid "Port" -msgstr "端口" - -msgid "Token" -msgstr "令牌" - -msgid "Time duration between server of frpc and frps mustn't exceed 15 minutes." -msgstr "frpc服务器与frps之间的时间间隔不得超过15分钟" - -msgid "Vhost HTTP Port" -msgstr "HTTP穿透服务端口" - -msgid "Vhost HTTPS Port" -msgstr "HTTPS穿透服务端口" - -msgid "Exit program when first login failed" -msgstr "初始登录失败即退出程序" - -msgid "TCP Stream Multiplexing" -msgstr "TCP端口复用" - -msgid "decide if exit program when first login failed, otherwise continuous relogin to frps." -msgstr "第一次登录失败就退出程序,否则将持续尝试登陆 Frp 服务器。" - -msgid "Default is Ture. This feature in frps.ini and frpc.ini must be same." -msgstr "该功能默认启用,该配置项在服务端和客户端必须保持一致。" - -msgid "Protocol Type" -msgstr "协议类型" - -msgid "Frp support kcp protocol since v0.12.0" -msgstr "从 v0.12.0 版本开始,底层通信协议支持选择 kcp 协议加速。" - -msgid "TCP Protocol" -msgstr "TCP协议" - -msgid "KCP Protocol" -msgstr "KCP协议" - -msgid "Connect frps by HTTP PROXY" -msgstr "通过代理连接 frps" - -msgid "frpc can connect frps using HTTP PROXY" -msgstr "frpc 支持通过 HTTP PROXY 和 frps 进行通信" - -msgid "HTTP PROXY" -msgstr "HTTP代理" - -msgid "Enable Connection Pool" -msgstr "启用连接池功能" - -msgid "This feature is fit for a large number of short connections." -msgstr "适合有大量短连接请求时开启" - -msgid "Connection Pool" -msgstr "指定预创建连接的数量" - -msgid "Connections will be established in advance." -msgstr "frpc 会预先和服务端建立起指定数量的连接。" - -msgid "Service registration interval" -msgstr "服务注册间隔" - -msgid "0 means disable this feature, unit: min" -msgstr "0表示禁用定时注册功能,单位:分钟" - -msgid "Log Level" -msgstr "日志记录等级" - -msgid "Trace" -msgstr "追踪" - -msgid "Debug" -msgstr "调试" - -msgid "Info" -msgstr "信息" - -msgid "Warning" -msgstr "警告" - -msgid "Error" -msgstr "错误" - -msgid "Log Keepd Max Days" -msgstr "日志记录天数" - -msgid "Services List" -msgstr "服务列表" - -msgid "Service Remark Name" -msgstr "服务备注名" - -msgid "Domain/Subdomain" -msgstr "域名/子域名" - -msgid "Remote Port" -msgstr "远程主机端口" - -msgid "Local Host Address" -msgstr "内网主机地址" - -msgid "Local Host Port" -msgstr "内网主机端口" - -msgid "Use Encryption" -msgstr "开启数据加密" - -msgid "Use Compression" -msgstr "使用压缩" - -msgid "Enable State" -msgstr "开启状态" - -msgid "Frp Domain Config" -msgstr "Frp域名配置" - -msgid "Config Frp Protocol" -msgstr "配置 Frp 协议参数" - -msgid "Disable" -msgstr "关闭" - -msgid "Frp Protocol Type" -msgstr "Frp 协议类型" - -msgid "Domain Type" -msgstr "域名类型" - -msgid "Custom Domains" -msgstr "自定义域名" - -msgid "SubDomain" -msgstr "子域名" - -msgid "Both the above two Domain types" -msgstr "同时使用2种域名" - -msgid "If SubDomain is used, Custom Domains couldn't be subdomain or wildcard domain of the maindomain(subdomain_host)." -msgstr "如果服务端配置了主域名(subdomain_host),则自定义域名不能是属于主域名(subdomain_host) 的子域名或者泛域名。" - -msgid "subdomain_host must be configured in server: frps in advance." -msgstr "使用子域名时,必须预先在服务端配置主域名(subdomain_host)参数。" - -msgid "STCP Role" -msgstr "SFTP服务类型" - -msgid "Use Plugin" -msgstr "使用插件" - -msgid "If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps." -msgstr "使用插件使用插件模式时,本地 IP 地址和端口无需配置,插件将会处理来自服务端的链接请求。" - -msgid "STCP Screct Key" -msgstr "SFTP密钥" - -msgid "STCP Server Name" -msgstr "SFTP服务名称" - -msgid "Enable URL routing" -msgstr "启用 URL 路由" - -msgid "Frp support forward http requests to different backward web services by url routing." -msgstr "Frp支持通过url路由将http请求转发到不同的反向web服务。" - -msgid "Choose Plugin" -msgstr "选择插件" - -msgid "Proxy Authentication" -msgstr "代理认证" - -msgid "Other PCs could access the Internet through frpc's network by using http_proxy plugin." -msgstr "http proxy 插件,可以使其他机器通过 frpc 的网络访问互联网;开启身份验证之后需要用户名、密码才能连接到 HTTP 代理。" - -msgid "HTTP Proxy UserName" -msgstr "HTTP 代理用户名" - -msgid "HTTP Proxy Password" -msgstr "HTTP 代理密码" - -msgid "Plugin Unix Sock Path" -msgstr "Unix Sock 插件路径" - -msgid "Password protecting your web service" -msgstr "密码保护您的web服务" - -msgid "HTTP UserName" -msgstr "HTTP 用户名" - -msgid "HTTP PassWord" -msgstr "HTTP 密码" - -msgid "Rewriting the Host Header" -msgstr "修改 Host Header" - -msgid "Frp can rewrite http requests with a modified Host header." -msgstr "Frp可以用修改后的主机头重写http请求。" - -msgid "Proxy-Protocol Version" -msgstr "Proxy-Protocol 版本" - -msgid "Encrypted the communication between frpc and frps, will effectively prevent the traffic intercepted." -msgstr "将 frpc 与 frps 之间的通信内容加密传输,将会有效防止流量被拦截。" - -msgid "The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources." -msgstr "对传输内容进行压缩,加快流量转发速度,但是会额外消耗一些 cpu 资源。" - -msgid "Http username and password are safety certification for http protocol." -msgstr "Http用户名和密码是Http协议的安全认证。" - -msgid "Proxy Protocol to send user's real IP to local services." -msgstr "将用户的真实IP发送到本地服务的代理协议。" - -msgid "STCP Server Name is Service Remark Name of STCP Server" -msgstr "STCP服务器别名" - -msgid "Please ensure the remark name is unique." -msgstr "确保备注名唯一" - -msgid "Plugin_Local_Addr" -msgstr "插件本地地址(格式 IP:Port)" - -msgid "plugin_crt_path" -msgstr "插件证书路径" - -msgid "plugin_key_path" -msgstr "插件私钥路径" - -msgid "plugin_host_header_rewrite" -msgstr "插件 Host Header 重写" - -msgid "plugin_header_X-From-Where" -msgstr "插件X-From-Where请求头" +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + + +msgid "Frp Setting" +msgstr "Frp 内网穿透" + +msgid "Frp Status" +msgstr "Frp状态" + +msgid "The Frp service is not running." +msgstr "Frp服务未运行" + +msgid "The Frp service is running." +msgstr "Frp服务正在运行" + +msgid "Frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet." +msgstr "Frp 是一个可用于内网穿透的高性能的反向代理应用。" + +msgid "Global Setting" +msgstr "全局设置" + +msgid "Basic Settings" +msgstr "基本设置" + +msgid "Other Settings" +msgstr "其他设置" + +msgid "Client Log" +msgstr "日志" + +msgid "Enabled" +msgstr "启用" + +msgid "Server" +msgstr "服务器" + +msgid "Port" +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分钟" + +msgid "Vhost HTTP Port" +msgstr "HTTP穿透服务端口" + +msgid "Vhost HTTPS Port" +msgstr "HTTPS穿透服务端口" + +msgid "Exit program when first login failed" +msgstr "初始登录失败即退出程序" + +msgid "TCP Stream Multiplexing" +msgstr "TCP端口复用" + +msgid "decide if exit program when first login failed, otherwise continuous relogin to frps." +msgstr "第一次登录失败就退出程序,否则将持续尝试登陆 Frp 服务器。" + +msgid "Default is Ture. This feature in frps.ini and frpc.ini must be same." +msgstr "该功能默认启用,该配置项在服务端和客户端必须保持一致。" + +msgid "Protocol Type" +msgstr "协议类型" + +msgid "Frp support kcp protocol since v0.12.0" +msgstr "从 v0.12.0 版本开始,底层通信协议支持选择 kcp 协议加速。" + +msgid "TCP Protocol" +msgstr "TCP协议" + +msgid "KCP Protocol" +msgstr "KCP协议" + +msgid "Connect frps by HTTP PROXY" +msgstr "通过代理连接 frps" + +msgid "frpc can connect frps using HTTP PROXY" +msgstr "frpc 支持通过 HTTP PROXY 和 frps 进行通信" + +msgid "HTTP PROXY" +msgstr "HTTP代理" + +msgid "Enable Connection Pool" +msgstr "启用连接池功能" + +msgid "This feature is fit for a large number of short connections." +msgstr "适合有大量短连接请求时开启" + +msgid "Connection Pool" +msgstr "指定预创建连接的数量" + +msgid "Connections will be established in advance." +msgstr "frpc 会预先和服务端建立起指定数量的连接。" + +msgid "Service registration interval" +msgstr "服务注册间隔" + +msgid "0 means disable this feature, unit: min" +msgstr "0表示禁用定时注册功能,单位:分钟" + +msgid "Log Level" +msgstr "日志记录等级" + +msgid "Trace" +msgstr "追踪" + +msgid "Debug" +msgstr "调试" + +msgid "Info" +msgstr "信息" + +msgid "Warning" +msgstr "警告" + +msgid "Error" +msgstr "错误" + +msgid "Log Keepd Max Days" +msgstr "日志记录天数" + +msgid "Services List" +msgstr "服务列表" + +msgid "Service Remark Name" +msgstr "服务备注名" + +msgid "Domain/Subdomain" +msgstr "域名/子域名" + +msgid "Remote Port" +msgstr "远程主机端口" + +msgid "Local Host Address" +msgstr "内网主机地址" + +msgid "Local Host Port" +msgstr "内网主机端口" + +msgid "Use Encryption" +msgstr "开启数据加密" + +msgid "Use Compression" +msgstr "使用压缩" + +msgid "Enable State" +msgstr "开启状态" + +msgid "Frp Domain Config" +msgstr "Frp域名配置" + +msgid "Config Frp Protocol" +msgstr "配置 Frp 协议参数" + +msgid "Disable" +msgstr "关闭" + +msgid "Frp Protocol Type" +msgstr "Frp 协议类型" + +msgid "Domain Type" +msgstr "域名类型" + +msgid "Custom Domains" +msgstr "自定义域名" + +msgid "SubDomain" +msgstr "子域名" + +msgid "Both the above two Domain types" +msgstr "同时使用2种域名" + +msgid "If SubDomain is used, Custom Domains couldn't be subdomain or wildcard domain of the maindomain(subdomain_host)." +msgstr "如果服务端配置了主域名(subdomain_host),则自定义域名不能是属于主域名(subdomain_host) 的子域名或者泛域名。" + +msgid "subdomain_host must be configured in server: frps in advance." +msgstr "使用子域名时,必须预先在服务端配置主域名(subdomain_host)参数。" + +msgid "STCP Role" +msgstr "SFTP服务类型" + +msgid "Use Plugin" +msgstr "使用插件" + +msgid "If plugin is defined, local_ip and local_port is useless, plugin will handle connections got from frps." +msgstr "使用插件使用插件模式时,本地 IP 地址和端口无需配置,插件将会处理来自服务端的链接请求。" + +msgid "STCP Screct Key" +msgstr "SFTP密钥" + +msgid "STCP Server Name" +msgstr "SFTP服务名称" + +msgid "Enable URL routing" +msgstr "启用 URL 路由" + +msgid "Frp support forward http requests to different backward web services by url routing." +msgstr "Frp支持通过url路由将http请求转发到不同的反向web服务。" + +msgid "Choose Plugin" +msgstr "选择插件" + +msgid "Proxy Authentication" +msgstr "代理认证" + +msgid "Other PCs could access the Internet through frpc's network by using http_proxy plugin." +msgstr "http proxy 插件,可以使其他机器通过 frpc 的网络访问互联网;开启身份验证之后需要用户名、密码才能连接到 HTTP 代理。" + +msgid "HTTP Proxy UserName" +msgstr "HTTP 代理用户名" + +msgid "HTTP Proxy Password" +msgstr "HTTP 代理密码" + +msgid "Plugin Unix Sock Path" +msgstr "Unix Sock 插件路径" + +msgid "Password protecting your web service" +msgstr "密码保护您的web服务" + +msgid "HTTP UserName" +msgstr "HTTP 用户名" + +msgid "HTTP PassWord" +msgstr "HTTP 密码" + +msgid "Rewriting the Host Header" +msgstr "修改 Host Header" + +msgid "Frp can rewrite http requests with a modified Host header." +msgstr "Frp可以用修改后的主机头重写http请求。" + +msgid "Proxy-Protocol Version" +msgstr "Proxy-Protocol 版本" + +msgid "Encrypted the communication between frpc and frps, will effectively prevent the traffic intercepted." +msgstr "将 frpc 与 frps 之间的通信内容加密传输,将会有效防止流量被拦截。" + +msgid "The contents will be compressed to speed up the traffic forwarding speed, but this will consume some additional cpu resources." +msgstr "对传输内容进行压缩,加快流量转发速度,但是会额外消耗一些 cpu 资源。" + +msgid "Http username and password are safety certification for http protocol." +msgstr "Http用户名和密码是Http协议的安全认证。" + +msgid "Proxy Protocol to send user's real IP to local services." +msgstr "将用户的真实IP发送到本地服务的代理协议。" + +msgid "STCP Server Name is Service Remark Name of STCP Server" +msgstr "STCP服务器别名" + +msgid "Please ensure the remark name is unique." +msgstr "确保备注名唯一" + +msgid "Plugin_Local_Addr" +msgstr "插件本地地址(格式 IP:Port)" + +msgid "plugin_crt_path" +msgstr "插件证书路径" + +msgid "plugin_key_path" +msgstr "插件私钥路径" + +msgid "plugin_host_header_rewrite" +msgstr "插件 Host Header 重写" + +msgid "plugin_header_X-From-Where" +msgstr "插件X-From-Where请求头" diff --git a/package/lean/luci-app-frpc/root/etc/config/frp b/package/lean/luci-app-frpc/root/etc/config/frp index 736e571f92..8b1f67bbb9 100644 --- a/package/lean/luci-app-frpc/root/etc/config/frp +++ b/package/lean/luci-app-frpc/root/etc/config/frp @@ -14,3 +14,4 @@ config frp 'common' option log_level 'info' option enable_http_proxy '0' option protocol 'tcp' + option user '' diff --git a/package/lean/luci-app-frpc/root/etc/init.d/frp b/package/lean/luci-app-frpc/root/etc/init.d/frp index 7423ec3b92..49cfb762f2 100755 --- a/package/lean/luci-app-frpc/root/etc/init.d/frp +++ b/package/lean/luci-app-frpc/root/etc/init.d/frp @@ -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 tcp_mux user 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