Comments (4)
因为在外网下 希望可以独立更改 alist https端口避免被扫 同时通过反代过后的alist302 我这里会出现性能问题 直接不反代映射端口 就不存在这个问题
from luci-app-alist.
如果你们认为这个东西是刚需,你可以自己编译来用,但它肯定不会在这个仓库上出现。修改补丁如下:
From b78bd251a91f8f2cb9f9c35a5b94c1fbc82f4141 Mon Sep 17 00:00:00 2001
From: sbwml <[email protected]>
Date: Mon, 3 Jul 2023 21:52:49 +0800
Subject: [PATCH] luci-app-alist: add https listening port support
---
luci-app-alist/luasrc/model/cbi/alist/basic.lua | 5 +++++
luci-app-alist/po/zh-cn/alist.po | 3 +++
luci-app-alist/root/etc/init.d/alist | 3 ++-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/luci-app-alist/luasrc/model/cbi/alist/basic.lua b/luci-app-alist/luasrc/model/cbi/alist/basic.lua
index 5b7723b..1e95832 100644
--- a/luci-app-alist/luasrc/model/cbi/alist/basic.lua
+++ b/luci-app-alist/luasrc/model/cbi/alist/basic.lua
@@ -23,6 +23,11 @@ o.rmempty = false
o = s:option(Flag, "ssl", translate("Enable SSL"))
o.rmempty=false
+o = s:option(Value, "https_port", translate("HTTPS Port"))
+o.datatype = "and(port,min(1))"
+o.default = "5245"
+o:depends("ssl", "1")
+
o = s:option(Value,"ssl_cert", translate("SSL cert"), translate("SSL certificate file path"))
o.datatype = "file"
o:depends("ssl", "1")
diff --git a/luci-app-alist/po/zh-cn/alist.po b/luci-app-alist/po/zh-cn/alist.po
index 1f996d9..1d625a1 100644
--- a/luci-app-alist/po/zh-cn/alist.po
+++ b/luci-app-alist/po/zh-cn/alist.po
@@ -19,6 +19,9 @@ msgstr "启用"
msgid "Port"
msgstr "端口"
+msgid "HTTPS Port"
+msgstr "HTTPS 端口"
+
msgid "Enable SSL"
msgstr "启用 SSL"
diff --git a/luci-app-alist/root/etc/init.d/alist b/luci-app-alist/root/etc/init.d/alist
index c6de70f..0fc8867 100755
--- a/luci-app-alist/root/etc/init.d/alist
+++ b/luci-app-alist/root/etc/init.d/alist
@@ -12,6 +12,7 @@ get_config() {
config_get data_dir $1 data_dir "/etc/alist"
config_get temp_dir $1 temp_dir "/tmp/alist"
config_get ssl $1 ssl 0
+ config_get https_port $1 https_port 5245
config_get ssl_cert $1 ssl_cert ""
config_get ssl_key $1 ssl_key ""
config_get token_expires_in $1 token_expires_in 48
@@ -79,7 +80,7 @@ start_service() {
set_firewall
cat /dev/null > $temp_dir/alist.log
cat > $data_dir/config.json <<EOF
-{"force":false,"address":"$listen_addr","port":$port,"https_port":$port,"site_url":"$site_url","cdn":"","jwt_secret":"","token_expires_in":$token_expires_in,"database":{"type":"$database","host":"$mysql_host","port":$mysql_port,"user":"$mysql_username","password":"$mysql_password","name":"$mysql_database","db_file":"$data_dir/data.db","table_prefix":"x_","ssl_mode":""},"scheme":{"disable_http":$SSL,"https":$SSL,"cert_file":"$ssl_cert","key_file":"$ssl_key"},"temp_dir":"$temp_dir","log":{"enable":$LOG,"name":"$temp_dir/alist.log","max_size":10,"max_backups":5,"max_age":28,"compress":false},"delayed_start":$delayed_start,"max_connections":$max_connections}
+{"force":false,"address":"$listen_addr","port":$port,"https_port":$https_port,"site_url":"$site_url","cdn":"","jwt_secret":"","token_expires_in":$token_expires_in,"database":{"type":"$database","host":"$mysql_host","port":$mysql_port,"user":"$mysql_username","password":"$mysql_password","name":"$mysql_database","db_file":"$data_dir/data.db","table_prefix":"x_","ssl_mode":""},"scheme":{"disable_http":false,"https":$SSL,"cert_file":"$ssl_cert","key_file":"$ssl_key"},"temp_dir":"$temp_dir","log":{"enable":$LOG,"name":"$temp_dir/alist.log","max_size":10,"max_backups":5,"max_age":28,"compress":false},"delayed_start":$delayed_start,"max_connections":$max_connections}
EOF
procd_open_instance alist
procd_set_param command $PROG
--
2.34.8
from luci-app-alist.
目前仅激活单协议是刻意为之 a86f0ee ,你可以给一个有说服力的理由和它使用场景,再考虑是否需要增加独立 https 端口选项。因为我想不到在openwrt 上是有http/s 独立分开的使用方法(尽管luci 已被反向代理或配置tls 协议访问)
from luci-app-alist.
场景的确不大,内网情况下会更加方便,且免除了 TLS
过程,有时候容器多了也会用到,反过来想仅使用单协议似乎也没有什么好处吧,毕竟内网环境下应该没有 HTTPS
的必要
from luci-app-alist.
Related Issues (20)
- 图片预览问题
- 更新后alist丢失 HOT 25
- iStore系统全新安装3.33 后没有alist菜单 HOT 17
- http和https的问题 HOT 1
- 无法运行 HOT 1
- 莫名其妙自动停止又自动运行 HOT 2
- ✅无法启动alist的解决方法
- alist启动日志,总是提示not enable search HOT 2
- alist 日志文件位置 HOT 1
- 编译失败 HOT 6
- [requests] 增加监听配置:address HOT 3
- 更新脚本出错
- 装完alist,服务菜单变成网络存储了 HOT 2
- alist使用aria2下载,显示磁盘空间不足
- 请问R2S怎么更新
- 编译失败 HOT 4
- luci-app-alist提示`Alist 运行中`就是个笑话 HOT 3
- failed to build this. HOT 1
- v3.31.0没发布openwrt-21.02-xxx版本 HOT 4
- 大佬MTK7981这一芯片是armv8架构请问用哪个啊 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luci-app-alist.