luci-app-rclone: bump to v1.2.18

This commit is contained in:
CN_SZTL 2020-02-15 22:10:09 +08:00
parent adb1462f05
commit 0fa9d75743
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
7 changed files with 214 additions and 30 deletions

View File

@ -13,11 +13,25 @@ LUCI_TITLE:=LuCI support for Rclone
LUCI_DEPENDS:=+rclone +rclone-webui-react
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-rclone
PKG_VERSION:=1.0.12
PKG_VERSION:=1.2.18
PKG_RELEASE:=1
PKG_LICENSE:=GPLv3.0+
PKG_MAINTAINER:=ElonH <elonhhuang@gmail.com>
define Package/luci-app-rclone/description
LuCI support for Rclone.
Rclone ("rsync for cloud storage") is a command line program to sync root/usr/bin and directories to and from different cloud storage providers.
Cloud storage providers:
1Fichier, Alibaba Cloud (Aliyun) Object Storage System (OSS), Amazon Drive, Amazon S3,
Backblaze B2, Box, Ceph, C14, DigitalOcean Spaces, Dreamhost, Dropbox, FTP,
Google Cloud Storage, Google Drive, Google Photos, HTTP, Hubic, Jottacloud,
IBM COS S3, Koofr, Memset Memstore, Mega, Microsoft Azure Blob Storage,
Microsoft OneDrive, Minio, Nextcloud, OVH, OpenDrive, Openstack Swift,
Oracle Cloud Storage, ownCloud, pCloud, premiumize.me, put.io, QingStor,
Rackspace Cloud root/usr/bin, rsync.net, Scaleway, SFTP, Wasabi, WebDAV,
Yandex Disk, The local root/usr/binystem.
endef
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -4,5 +4,5 @@ function index()
if not nixio.fs.access("/etc/config/rclone") then
return
end
entry({"admin", "services", "rclone"}, cbi("rclone"), _("Rclone"), 100 ).dependent = false
entry({"admin", "nas", "rclone"}, cbi("rclone"), _("Rclone"), 100 ).dependent = false
end

View File

@ -108,6 +108,28 @@ o.placeholder = 'admin'
o.default = 'admin'
o.rmempty = false
s = m:section(TypedSection, 'proxy', translate('proxy'))
s.addremove = false
s.anonymous = true
s.description = "<a style=\"color:#fb6340;\" href=\"#\" onclick=\"window.open('https://rclone.org/faq/#can-i-use-rclone-with-an-http-proxy')\">"
..translate("FAQ").."</a>"
enable = s:option(Flag, 'enabled', translate('enable proxy'))
enable.rmempty = false
o = s:option(Value, 'proxy_addr', translate('proxy address'))
o.placeholder = 'socks5://127.0.0.1:1080'
o.default = 'socks5://127.0.0.1:1080'
o.rmempty = false
o.description = translate("The content of the variable is protocol://server:port. The protocol value is commonly either http or socks5.")
o = s:option(Value, 'no_proxy', translate('disable proxy'))
o.placeholder = 'localhost,127.0.0.0/8'
o.default = 'localhost,127.0.0.0/8'
o.rmempty = false
o.description = translate("This allows you to disable the proxy for specific hosts.").."<br>"..
translate("Hosts must be comma separated, and can contain domains or parts.")
s = m:section(TypedSection, 'log', translate('log'))
s.addremove = false
s.anonymous = true

View File

@ -1,19 +1,17 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"Last-Translator: ElonH <elonhhuang@gmail.com>\n"
"Project-Id-Version: PACKAGE VERSION\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: zh_Hans\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"X-Generator: Poedit 2.0.6\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:41
msgid "Installed Web Interface"
msgstr "已安装Web界面"
msgstr "Installed Web Interface"
#: luci-app-rclone/luasrc/controller/rclone.lua:7
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:37
@ -25,7 +23,8 @@ msgid ""
"Rclone (\"rsync for cloud storage\") is a command line program to sync root/"
"usr/bin and directories to and from different cloud storage providers."
msgstr ""
"Rclone是一款的命令行工具支持在不同对象存储、网盘间同步、上传、下载数据。"
"Rclone (\"rsync for cloud storage\") is a command line program to sync root/"
"usr/bin and directories to and from different cloud storage providers."
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:43
msgid "Webui React"
@ -33,79 +32,79 @@ msgstr "Webui React"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:61
msgid "all address"
msgstr "全部地址"
msgstr "all address"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:54
msgid "configure"
msgstr "配置"
msgstr "configure"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:77
msgid "download"
msgstr "下载"
msgstr "download"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:76
msgid "download configuration"
msgstr "下载配置文件"
msgstr "download configuration"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:47
msgid "global"
msgstr "全局"
msgstr "global"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:58
msgid "listen address"
msgstr "监听地址"
msgstr "listen address"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:65
msgid "listen port"
msgstr "监听端口"
msgstr "listen port"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:60
msgid "local network address"
msgstr "局域网地址"
msgstr "local network address"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:59
msgid "localhost address"
msgstr "本机地址"
msgstr "localhost address"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:111
msgid "log"
msgstr "日志"
msgstr "log"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:105
msgid "password"
msgstr "密码"
msgstr "password"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:115
msgid "path"
msgstr "路径"
msgstr "path"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:28
msgid "rclone address"
msgstr "rclone 地址"
msgstr ""
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:71
msgid "rclone configuration file path"
msgstr "rclone 配置文件地址"
msgstr "rclone configuration file path"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:30
msgid "rclone not run"
msgstr "rclone未运行"
msgstr "rclone not run"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:27
msgid "rclone running"
msgstr "rclone 运行中"
msgstr "rclone running"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:39
msgid "rclone state"
msgstr "rclone 状态"
msgstr "rclone state"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:51
msgid "run Rclone as daemon"
msgstr "启动 rclone 后台服务"
msgstr "run Rclone as daemon"
#: luci-app-rclone/luasrc/model/cbi/rclone.lua:100
msgid "username"
msgstr "用户名"
msgstr "username"
#~ msgid "run Rclone in daeman"
#~ msgstr "启动 rclone 后台服务"
#~ msgstr "run Rclone in daeman"

View File

@ -0,0 +1,136 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"Last-Translator: ElonH <elonhhuang@gmail.com>\n"
"Language-Team: none\n"
"Language: zh-Hans\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"X-Generator: Poedit 2.0.6\n"
#: luasrc/model/cbi/rclone.lua:114
msgid "How to proxy rclone"
msgstr "如何代理rclone"
#: luasrc/model/cbi/rclone.lua:41
msgid "Installed Web Interface"
msgstr "已安装Web界面"
#: luasrc/model/cbi/rclone.lua:37 luasrc/controller/rclone.lua:7
msgid "Rclone"
msgstr "Rclone"
#: luasrc/model/cbi/rclone.lua:38
msgid ""
"Rclone (\"rsync for cloud storage\") is a command line program to sync root/"
"usr/bin and directories to and from different cloud storage providers."
msgstr ""
"Rclone是一款的命令行工具支持在不同对象存储、网盘间同步、上传、下载数据。"
#: luasrc/model/cbi/rclone.lua:43
msgid "Webui React"
msgstr "Webui React"
#: luasrc/model/cbi/rclone.lua:61
msgid "all address"
msgstr "全部地址"
#: luasrc/model/cbi/rclone.lua:54
msgid "configure"
msgstr "配置"
#: luasrc/model/cbi/rclone.lua:126
msgid "disable proxy for specific hosts"
msgstr "针对特定主机禁用代理"
#: luasrc/model/cbi/rclone.lua:77
msgid "download"
msgstr "下载"
#: luasrc/model/cbi/rclone.lua:76
msgid "download configuration"
msgstr "下载配置文件"
#: luasrc/model/cbi/rclone.lua:116
msgid "enable proxy"
msgstr "启用代理"
#: luasrc/model/cbi/rclone.lua:47
msgid "global"
msgstr "全局"
#: luasrc/model/cbi/rclone.lua:58
msgid "listen address"
msgstr "监听地址"
#: luasrc/model/cbi/rclone.lua:65
msgid "listen port"
msgstr "监听端口"
#: luasrc/model/cbi/rclone.lua:60
msgid "local network address"
msgstr "局域网地址"
#: luasrc/model/cbi/rclone.lua:59
msgid "localhost address"
msgstr "本机地址"
#: luasrc/model/cbi/rclone.lua:131
msgid "log"
msgstr "日志"
#: luasrc/model/cbi/rclone.lua:105
msgid "password"
msgstr "密码"
#: luasrc/model/cbi/rclone.lua:135
msgid "path"
msgstr "路径"
#: luasrc/model/cbi/rclone.lua:111
msgid "proxy"
msgstr "代理"
#: luasrc/model/cbi/rclone.lua:119
msgid "proxy address"
msgstr "代理地址"
#: luasrc/model/cbi/rclone.lua:28
msgid "rclone address"
msgstr "rclone 地址"
#: luasrc/model/cbi/rclone.lua:71
msgid "rclone configuration file path"
msgstr "rclone 配置文件地址"
#: luasrc/model/cbi/rclone.lua:30
msgid "rclone not run"
msgstr "rclone未运行"
#: luasrc/model/cbi/rclone.lua:27
msgid "rclone running"
msgstr "rclone 运行中"
#: luasrc/model/cbi/rclone.lua:39
msgid "rclone state"
msgstr "rclone 状态"
#: luasrc/model/cbi/rclone.lua:123
msgid ""
"rclone will follow the standard environment variables for proxies, similar "
"to cURL and other programs."
msgstr "rclone 会使用代理的标准环境变量,类似于 cURL 及其他程序。"
#: luasrc/model/cbi/rclone.lua:51
msgid "run Rclone as daemon"
msgstr "启动 rclone 后台服务"
#: luasrc/model/cbi/rclone.lua:100
msgid "username"
msgstr "用户名"
#~ msgid "run Rclone in daeman"
#~ msgstr "启动 rclone 后台服务"

View File

@ -10,5 +10,10 @@ config conf 'config'
option password 'admin'
option addr_type 'lan'
config proxy 'proxy'
option enabled '0'
option proxy_addr 'socks5://127.0.0.1:1080'
option no_proxy 'localhost,127.0.0.0/8'
config log 'log'
option path '/var/log/rclone/output'

View File

@ -61,6 +61,9 @@ start_service() {
config_get username config username
config_get password config password
config_get proxy_enable proxy enabled
config_get proxy_addr proxy proxy_addr
config_get no_proxy proxy no_proxy
config_get log_path log path
@ -80,6 +83,11 @@ start_service() {
procd_append_param command --config=${config_path}
procd_append_param command --rc-allow-origin=*
procd_append_param command --log-file=${log_path}
if [ "${proxy_enable}" == "1" ]; then
procd_set_param env all_proxy=${proxy_addr} https_proxy=${proxy_addr} http_proxy=${proxy_addr}
procd_set_param env ALL_PROXY=${proxy_addr} HTTPS_PROXY=${proxy_addr} HTTP_PROXY=${proxy_addr}
procd_set_param env no_proxy=${no_proxy} NO_PROXY=${no_proxy}
fi
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param file /etc/config/rclone