oneindex bottle edition
Find a file
2020-03-02 12:03:08 +08:00
cache 📜 Add folders 2019-03-24 16:30:12 +08:00
config 📜 Add folders 2019-03-24 16:30:12 +08:00
controller 🥪 format and fix bugs 2019-04-30 22:57:59 +08:00
lib fix 2019-09-25 18:27:59 +08:00
view Initial Commit 2019-03-17 14:48:58 +08:00
index.php Initial Commit 2019-03-17 14:48:58 +08:00
init.php 🍗 增加cache refresh interval 2019-03-24 09:56:46 +08:00
one.php 🥪 format and fix bugs 2019-04-30 22:57:59 +08:00
README.md Update README.md 2020-03-02 12:03:08 +08:00

OneIndex

Oneindex Bottle Edition.
(๑•̀ㅂ•́)و✧ Original Program by Donwa.

star fork GitHub last commit issues Author Download

停止更新

因为程序可维护性不高,目前不再对这个仓库进行维护。取而代之的是另一个项目:
https://github.com/SomeBottle/OdIndex

缘由

之前听网友介绍了入了one的大门结果鼓捣oneindex时我的历程很不顺利一会儿文件列表出不来一会儿jwt token又过期了...
于是我修改了一下,缓解了部分问题.稍后可能会加入更多功能.

修改内容

  1. 密码md5密文保存
  2. 自动判断HTTP 429请求过多的错误并自动限制刷新的时间间隔自动调整刷新周期.(如果没有到周期会返回提示)↓

详细配置可以自行去 /config/refreshfix.php 进行修改,refreshinterval 是刷新允许周期,maxretrytime 是自动调整周期前允许重试的次数.

  1. 防止request失败导致的空文件目录.(づ ̄3 ̄づ拒绝首页空白)
  2. 增加简单的状态码&出错日志(在 /lib 目录下生成).( requestcode.txt & requestlog.php)
  3. nexmoe主题增加了一次性缩略图的加载限制,最多预览五十张(防止请求过多被限制)
  4. 增加缓存刷新结果,如果刷新失败,后台会显示重建缓存失败CLI模式在 one.php 执行刷新时如果失败会返回Failed
    Example
  5. 文件缓存过期引用时自动刷新

店长推荐(误

crontab 选项推荐[可选],非必需:

  1. token自动刷新: 两小时
0 */2 * * * * php /www/one.php token:refresh
  1. cache自动刷新: 30分钟
*/30 * * * * php /www/one.php cache:refresh

设置选项推荐:

  • base.phpcache_refresh_time 推荐为 3600(秒)
  • 缓存类型推荐为 filecache
  • 缓存过期时间推荐为 86400 (秒)
  • 自动调整周期前允许重试的次数(/config/refreshfix.php中的maxretrytime)推荐为 8

Nginx伪静态规则配置

 if (!-f $request_filename){  
set $rule_0 1$rule_0;  
}  
if (!-d $request_filename){  
set $rule_0 2$rule_0;  
}  
if ($rule_0 = "21"){  
rewrite ^/(.*)$ /index.php?/$1 last;  
}  

QA

  1. 周期限制不起效?! 请注意您的 /config 目录下的文件是否可读php有时候会出现 permission denied 问题

  2. 账号绑定出错:
    https://github.com/donwa/oneindex/issues/511

  3. 程序安装失败错误: