Compare commits
No commits in common. "main" and "2024-11-29" have entirely different histories.
main
...
2024-11-29
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -26,14 +26,14 @@ jobs:
|
||||
cd /opt/openwrt-sdk*/bin/packages/aarch64_generic/base
|
||||
ls
|
||||
mv *.ipk luci-app-caddy_all.ipk
|
||||
echo "build_time=$(date '+%Y年%m月%d日%H:%M:%S' | jq -sRr @uri)" >> $GITHUB_ENV
|
||||
echo "build_time=$(date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
|
||||
echo "tag=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
|
||||
- name: 发布
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
token: ${{ secrets.c8 }}
|
||||
body: |
|
||||
> ### 
|
||||
> ### 编译时间 :${{ env.build_time }}
|
||||
|
||||
二进制程序下载地址:[caddy](https://github.com/lmq8267/caddy/releases)
|
||||
|
||||
|
19
README.md
19
README.md
@ -1,14 +1,12 @@
|
||||
# luci-app-caddy
|
||||
<p align="center">
|
||||
<img alt="GitHub Created At" src="https://img.shields.io/github/created-at/lmq8267/luci-app-caddy?logo=github&label=%E5%88%9B%E5%BB%BA%E6%97%A5%E6%9C%9F">
|
||||
<a href="https://hits.seeyoufarm.com"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Flmq8267%2Fluci-app-caddy&count_bg=%2395C10D&title_bg=%23555555&icon=github.svg&icon_color=%238DC409&title=%E8%AE%BF%E9%97%AE%E6%95%B0&edge_flat=false"/></a>
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/releases"><img src="https://img.shields.io/github/downloads/lmq8267/luci-app-caddy/total?logo=github&label=%E4%B8%8B%E8%BD%BD%E9%87%8F"></a>
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/graphs/contributors"><img src="https://img.shields.io/github/contributors-anon/lmq8267/luci-app-caddy?logo=github&label=%E8%B4%A1%E7%8C%AE%E8%80%85"></a>
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/releases/"><img src="https://img.shields.io/github/release/lmq8267/luci-app-caddy?logo=github&label=%E6%9C%80%E6%96%B0%E7%89%88%E6%9C%AC"></a>
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/issues"><img src="https://img.shields.io/github/issues-raw/lmq8267/luci-app-caddy?logo=github&label=%E9%97%AE%E9%A2%98"></a>
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/discussions"><img src="https://img.shields.io/github/discussions/lmq8267/luci-app-caddy?logo=github&label=%E8%AE%A8%E8%AE%BA"></a>
|
||||
<a href="GitHub repo size"><img src="https://img.shields.io/github/repo-size/lmq8267/luci-app-caddy?logo=github&label=%E4%BB%93%E5%BA%93%E5%A4%A7%E5%B0%8F"></a>
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/actions?query=workflow%3ABuild"><img src="https://img.shields.io/github/actions/workflow/status/lmq8267/luci-app-caddy/build.yml?branch=main&logo=github&label=%E6%9E%84%E5%BB%BA%E7%8A%B6%E6%80%81" alt="Build status"></a>
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/releases"><img src="https://img.shields.io/github/downloads/lmq8267/luci-app-caddy/total">
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/graphs/contributors"><img src="https://img.shields.io/github/contributors-anon/lmq8267/luci-app-caddy">
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/releases/"><img src="https://img.shields.io/github/release/lmq8267/luci-app-caddy">
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/issues"><img src="https://img.shields.io/github/issues-raw/lmq8267/luci-app-caddy">
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/discussions"><img src="https://img.shields.io/github/discussions/lmq8267/luci-app-caddy">
|
||||
<a href="GitHub repo size"><img src="https://img.shields.io/github/repo-size/lmq8267/luci-app-caddy?color=red&style=flat-square">
|
||||
<a href="https://github.com/lmq8267/luci-app-caddy/actions?query=workflow%3ABuild"><img src="https://img.shields.io/github/actions/workflow/status/lmq8267/luci-app-caddy/build.yml?branch=main" alt="Build status">
|
||||
|
||||
项目地址:https://github.com/caddyserver/caddy
|
||||
|
||||
@ -19,8 +17,7 @@ caddy的大概 [命令参数](https://github.com/lmq8267/caddy/blob/main/README_
|
||||
caddy list-modules -s
|
||||
```
|
||||
------------------------------------------------------
|
||||
编译的大概步骤:抄自网上的方法, 也有我编译好的二进制文件[caddy](https://github.com/lmq8267/caddy/releases)文件服务器支持照片音视频预览播放 支持markdown[UI预览效果图](https://github.com/lmq8267/caddy/tree/main#ui%E9%A2%84%E8%A7%88)
|
||||
还有OpenWrt的[github.com/fuqiang03/openwrt-caddy](https://github.com/fuqiang03/openwrt-caddy)Makefile
|
||||
编译的大概步骤:抄自网上的方法,也有我编译好的二进制文件[caddy](https://github.com/lmq8267/caddy/releases)
|
||||
```shell
|
||||
apt update
|
||||
apt install xcaddy git libnss3 upx-ucl
|
||||
|
@ -11,13 +11,13 @@ o = s:option(Flag, "enabled", translate("Enabled"))
|
||||
o.rmempty = false
|
||||
o.default = 0
|
||||
|
||||
o = s:option(Button, "btnrm", translate("重启"))
|
||||
o.inputtitle = translate("重启")
|
||||
o.description = translate("在没有修改参数的情况下快速重新启动一次")
|
||||
o = s:option(Button, "btnrm", translate("版本"))
|
||||
o.inputtitle = translate("检测更新")
|
||||
o.description = translate("点击按钮开始检测更新,上方状态栏显示")
|
||||
o.inputstyle = "apply"
|
||||
o:depends("enabled", "1")
|
||||
o.write = function()
|
||||
os.execute("/etc/init.d/caddy restart")
|
||||
os.execute("rm -rf /tmp/caddy*.tag /tmp/caddy*.newtag")
|
||||
end
|
||||
|
||||
e=s:option(ListValue,"cmd",translate("启动方式"),
|
||||
|
@ -21,6 +21,11 @@ admin $2a$14$RdbOHzJhf5BaapSdlYTCbe.yWY9cEZjyDpfgwStY28K/qsM1tX8tu
|
||||
#文件服务器 端口12311
|
||||
file_server browse
|
||||
|
||||
header {
|
||||
#中文字符显示
|
||||
Content-Type "charset=utf-8"
|
||||
}
|
||||
|
||||
log {
|
||||
#日志 路径/tmp/caddy/requests.log
|
||||
output file /tmp/caddy/requests.log {
|
||||
|
@ -63,7 +63,7 @@ start_service() {
|
||||
exit 1
|
||||
else
|
||||
chmod +x $PROG
|
||||
if [[ "$($PROG -h 2>&1 | wc -l)" -lt 3 ]] ;then
|
||||
if [ $(($($PROG -h | wc -l))) -lt 3 ] ;then
|
||||
uci -q set caddy.@caddy[0].enabled=0
|
||||
uci commit caddy
|
||||
echo "$(TZ=UTC-8 date -R +%Y年%m月%d日\ %X) : $PROG 程序不完整或CPU架构不支持的程序,无法启动!" >>$log_dir 2>&1
|
||||
@ -139,6 +139,10 @@ $filebasicauth
|
||||
root * $data_dir
|
||||
file_server browse
|
||||
|
||||
header {
|
||||
Content-Type "charset=utf-8"
|
||||
}
|
||||
|
||||
$logs
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user