Code Monkey home page Code Monkey logo

ql-scripts's Introduction

支持青龙面板的脚本集

免责说明

  • 本项目发布的脚本及其中涉及的任何逆向解密分析内容,仅用于个人测试和学习研究,不用于其他任何目的,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关。
  • 请自行评估使用本项目内容可能产生的安全风险,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断。本人对使用本项目涉及的任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失或损害。
  • 间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, 本人对于由此引起的任何隐私泄漏或其他后果概不负责。
  • 本项目内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。
  • 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本。
  • 任何以任何方式查看此项目的人或直接或间接使用该项目的任何脚本的使用者都应仔细阅读此声明。本人保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或Script项目的规则,则视为您已接受此免责声明。
  • 请在下载本项目后的24小时内予以删除全部内容。
  • 您使用或者复制了本仓库制作的任何脚本,则视为 已接受 以上声明,请仔细阅读。

安装

命令行方式

# ql repo <repo_url> <whitelist> <blacklist> <dependence> <branch> <extensions>
ql repo https://github.com/lzwme/ql-scripts.git "ql_|ql-" "backup|todo|deprecated" "utils" "" "js ts"
cd /ql/scripts
pnpm add @lzwme/fe-utils commander enquirer moment json5 crypto-js axios

面板方式

订阅管理 -> 创建订阅,表单填写参考:

  • 名称:lzwme/ql-scripts
  • 链接:https://github.com/lzwme/ql-scripts.git
  • 分支:main
  • 定时:0 0 1 * * *
  • 白名单:ql_|ql-
  • 黑名单:backup|todo|deprecated
  • 依赖文件:utils
  • 文件后缀:js ts

依赖管理 -> nodejs 类型依赖添加:@lzwme/fe-utils commander enquirer moment json5 crypto-js axios

配置

青龙面板 配置文件 -> 编辑 config.sh 文件,搜索 RepoFileExtensions,增加 ts 配置。参考:

RepoFileExtensions="ts js py"

各脚本的具体配置,可参考具体脚本内注释说明进行设置。

通用环境变量

  • process.env.LZWME_QL_NOTIFY_TYPE 配置通知策略:
    • 0 - 关闭通知
    • 1 - 仅发送异常时通知。默认值
    • 2 - 全通知

脚本变量快速自动获取与更新至青龙面板的方法参考

一些脚本的认证参数有效期较短,频繁的手动更新比较麻烦。下面介绍一种基于 whistle 代理工具及插件 @lzwme/whistle.x-scripts 编写规则,实现自动收集相关环境变量参数并更新至青龙面板的方法。

环境安装与配置(编辑青龙面板的 配置文件 - extra.sh 文件,追加如下内容):

# 全局安装 whistle 代理工具。注意,需本机已安装 node.js
npm i -g whistle @lzwme/whistle.x-scripts

# 创建工作目录(青龙面板示例)
mkdir -p /ql/data/scripts/whistle
cd /ql/data/scripts/whistle

if [ ! -e w2.x-scripts.config.js ]; then
  cp /usr/local/lib/node_modules/@lzwme/whistle.x-scripts/w2.x-scripts.config.sample.js w2.x-scripts.config.js
fi

# 拉取公开供参考学习的常用脚本规则
if [ ! -e x-scripts-rules ]; then
    git clone https://mirror.ghproxy.com/github.com/lzwme/x-scripts-rules.git
fi

# 用于存放自定义的脚本规则
# 脚本规则编写方法参考:https://github.com/lzwme/whistle.x-scripts.git
mkdir local-x-scripts-rules

# 启动代理插件
w2 start

接着 PC 或手机设置代理地址为 w2 start 启动打印的地址。代理设置方法参考:https://github.com/lzwme/whistle.x-scripts.git

最后, 从 PC 或手机访问相关脚本对应的 APP 或小程序。在正常使用过程中,当代理插件脚本匹配到目标参数数据,即会自动更新至青龙面板的环境变量中。

此外,还可以在“脚本管理”中新建一个脚本(如 rules-update.sh),并新建一个定时任务每天执行一次,用于定时拉取更新公开的脚本规则。示例:

#! /usr/bin/env bash
cd /ql/data/scripts/whistle/x-scripts-rules
git pull -r -n -v
cd ..
w2 restart

扩展参考:

脚本列表(20):

其他相关

获取指定位置的经纬度

ql-scripts's People

Contributors

renxia avatar actions-user avatar zjk2017 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.