mirror of
https://github.com/iLay1678/i-tools.git
synced 2025-07-03 18:52:17 +08:00
fix decrypt
This commit is contained in:
parent
5c7cd86333
commit
2d017b0178
41
.github/workflows/docker-build.yml
vendored
41
.github/workflows/docker-build.yml
vendored
@ -7,6 +7,10 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -19,6 +23,41 @@ jobs:
|
|||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: Detect package manager
|
||||||
|
id: detect-package-manager
|
||||||
|
run: |
|
||||||
|
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
|
||||||
|
echo "manager=yarn" >> $GITHUB_OUTPUT
|
||||||
|
echo "command=install" >> $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
elif [ -f "${{ github.workspace }}/package.json" ]; then
|
||||||
|
echo "manager=npm" >> $GITHUB_OUTPUT
|
||||||
|
echo "command=ci" >> $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Unable to determine package manager"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: ${{ steps.detect-package-manager.outputs.manager }}
|
||||||
|
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
|
||||||
|
with:
|
||||||
|
path: ${{ steps.npm-cache-dir.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
|
||||||
|
|
||||||
|
- name: Static HTML export with Nuxt
|
||||||
|
run: ${{ steps.detect-package-manager.outputs.manager }} run build
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
@ -33,7 +72,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
|
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
|
||||||
env:
|
env:
|
||||||
OWNER: '${{ github.repository_owner }}'
|
OWNER: "${{ github.repository_owner }}"
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
@ -12,7 +12,7 @@ COPY package*.json ./
|
|||||||
RUN bun install
|
RUN bun install
|
||||||
|
|
||||||
# 复制项目文件到工作目录
|
# 复制项目文件到工作目录
|
||||||
COPY . .
|
COPY ./.output/* ./
|
||||||
|
|
||||||
# 构建项目(如果需要)
|
# 构建项目(如果需要)
|
||||||
RUN bun run build
|
RUN bun run build
|
||||||
@ -21,4 +21,4 @@ RUN bun run build
|
|||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# 启动应用
|
# 启动应用
|
||||||
CMD ["bun","run", "start"]
|
CMD ["bun","server/index.mjs"]
|
85
README.md
85
README.md
@ -1,75 +1,36 @@
|
|||||||
# Nuxt Minimal Starter
|
# 阿里云盘TV版token获取与刷新
|
||||||
|
|
||||||
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
## 路由:
|
||||||
|
|
||||||
## Setup
|
- `/` 在线扫码
|
||||||
|
- `/refresh` 刷新令牌
|
||||||
|
|
||||||
Make sure to install dependencies:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# npm
|
|
||||||
npm install
|
|
||||||
|
|
||||||
# pnpm
|
# Docker部署教程
|
||||||
pnpm install
|
```
|
||||||
|
docker run --name=alipan-tv-token -d -p 3000:3000 ghcr.io/ilay1678/alipan-tv-token:latest
|
||||||
# yarn
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
# bun
|
|
||||||
bun install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development Server
|
# vercel部署
|
||||||
|
[<img src="https://vercel.com/button" alt="Deploy on vercel" height="30">](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FiLay1678%2Falipan-tv-token&&project-name=alipan-tv-token&repository-name=alipan-tv-token)
|
||||||
|
|
||||||
Start the development server on `http://localhost:3000`:
|
# Cloudflare Pages 部署教程
|
||||||
|
|
||||||
```bash
|
## 1. Fork 项目仓库
|
||||||
# npm
|
|
||||||
npm run dev
|
|
||||||
|
|
||||||
# pnpm
|
1. 点击右上角的 "Fork" 按钮创建你自己的副本
|
||||||
pnpm dev
|
|
||||||
|
|
||||||
# yarn
|
## 2. 在 Cloudflare 中部署
|
||||||
yarn dev
|
|
||||||
|
|
||||||
# bun
|
### 2.1 前置准备
|
||||||
bun run dev
|
1. 登录 [Cloudflare Dashboard](https://dash.cloudflare.com)
|
||||||
```
|
2. 在左侧菜单找到并点击 "Pages"
|
||||||
|
3. 点击 "连接到 Git" 按钮
|
||||||
|
4. 按提示关联你的 GitHub 账号
|
||||||
|
|
||||||
## Production
|
### 2.2 创建项目
|
||||||
|
1. 选择你刚才 fork 的仓库
|
||||||
Build the application for production:
|
2. 点击 "开始设置"
|
||||||
|
3. 在项目配置页面:
|
||||||
```bash
|
- 框架预设: 选择 `Nuxt.js`
|
||||||
# npm
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm build
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn build
|
|
||||||
|
|
||||||
# bun
|
|
||||||
bun run build
|
|
||||||
```
|
|
||||||
|
|
||||||
Locally preview production build:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# npm
|
|
||||||
npm run preview
|
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm preview
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn preview
|
|
||||||
|
|
||||||
# bun
|
|
||||||
bun run preview
|
|
||||||
```
|
|
||||||
|
|
||||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
|
||||||
|
@ -26,6 +26,13 @@ export default defineNuxtConfig({
|
|||||||
// 启用内联样式以避免闪烁
|
// 启用内联样式以避免闪烁
|
||||||
build: {
|
build: {
|
||||||
cssCodeSplit: false
|
cssCodeSplit: false
|
||||||
|
},
|
||||||
|
css: {
|
||||||
|
preprocessorOptions: {
|
||||||
|
scss: {
|
||||||
|
api: 'modern-compiler' // or "modern"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
<a-modal
|
<a-modal
|
||||||
v-model:visible="isNoticeOpen"
|
v-model:open="isNoticeOpen"
|
||||||
title="使用说明"
|
title="使用说明"
|
||||||
@ok="closeNotice"
|
@ok="closeNotice"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { md5 } from "js-md5";
|
import { md5 } from "js-md5";
|
||||||
import crypto from "crypto-js";
|
import pkg from "crypto-js";
|
||||||
|
const crypto = pkg;
|
||||||
const decrypt = function (ciphertext: string, iv: string, t: number): string {
|
const decrypt = function (ciphertext: string, iv: string, t: number): string {
|
||||||
try {
|
try {
|
||||||
const key = generateKey(t);
|
const key = generateKey(t);
|
||||||
@ -59,7 +59,6 @@ const generateKey = function (t: number): string {
|
|||||||
|
|
||||||
const keyArray = concatenatedParams.split("");
|
const keyArray = concatenatedParams.split("");
|
||||||
const hashedKey = h(keyArray, t);
|
const hashedKey = h(keyArray, t);
|
||||||
console.log(md5(hashedKey));
|
|
||||||
return md5(hashedKey);
|
return md5(hashedKey);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user