mirror of
https://github.com/iLay1678/i-tools.git
synced 2025-07-03 10:42:15 +08:00
fix decrypt
This commit is contained in:
parent
5c7cd86333
commit
2d017b0178
45
.github/workflows/docker-build.yml
vendored
45
.github/workflows/docker-build.yml
vendored
@ -7,6 +7,10 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -19,6 +23,41 @@ jobs:
|
||||
- name: Set up QEMU
|
||||
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
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
@ -28,12 +67,12 @@ jobs:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ github.token }}
|
||||
|
||||
|
||||
- name: set lower case owner name
|
||||
run: |
|
||||
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
|
||||
env:
|
||||
OWNER: '${{ github.repository_owner }}'
|
||||
OWNER: "${{ github.repository_owner }}"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@ -51,4 +90,4 @@ jobs:
|
||||
tags: ghcr.io/${{ env.OWNER_LC }}/alipan-tv-token:latest
|
||||
|
||||
- name: Post build cleanup
|
||||
run: docker builder prune --force
|
||||
run: docker builder prune --force
|
||||
|
@ -12,7 +12,7 @@ COPY package*.json ./
|
||||
RUN bun install
|
||||
|
||||
# 复制项目文件到工作目录
|
||||
COPY . .
|
||||
COPY ./.output/* ./
|
||||
|
||||
# 构建项目(如果需要)
|
||||
RUN bun run build
|
||||
@ -21,4 +21,4 @@ RUN bun run build
|
||||
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
|
||||
pnpm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# bun
|
||||
bun install
|
||||
# Docker部署教程
|
||||
```
|
||||
docker run --name=alipan-tv-token -d -p 3000:3000 ghcr.io/ilay1678/alipan-tv-token:latest
|
||||
```
|
||||
|
||||
## 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
|
||||
# npm
|
||||
npm run dev
|
||||
## 1. Fork 项目仓库
|
||||
|
||||
# pnpm
|
||||
pnpm dev
|
||||
1. 点击右上角的 "Fork" 按钮创建你自己的副本
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
## 2. 在 Cloudflare 中部署
|
||||
|
||||
# bun
|
||||
bun run dev
|
||||
```
|
||||
### 2.1 前置准备
|
||||
1. 登录 [Cloudflare Dashboard](https://dash.cloudflare.com)
|
||||
2. 在左侧菜单找到并点击 "Pages"
|
||||
3. 点击 "连接到 Git" 按钮
|
||||
4. 按提示关联你的 GitHub 账号
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
# 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.
|
||||
### 2.2 创建项目
|
||||
1. 选择你刚才 fork 的仓库
|
||||
2. 点击 "开始设置"
|
||||
3. 在项目配置页面:
|
||||
- 框架预设: 选择 `Nuxt.js`
|
||||
|
@ -26,6 +26,13 @@ export default defineNuxtConfig({
|
||||
// 启用内联样式以避免闪烁
|
||||
build: {
|
||||
cssCodeSplit: false
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
api: 'modern-compiler' // or "modern"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -95,7 +95,7 @@
|
||||
</main>
|
||||
|
||||
<a-modal
|
||||
v-model:visible="isNoticeOpen"
|
||||
v-model:open="isNoticeOpen"
|
||||
title="使用说明"
|
||||
@ok="closeNotice"
|
||||
:maskClosable="false"
|
||||
|
@ -1,6 +1,6 @@
|
||||
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 {
|
||||
try {
|
||||
const key = generateKey(t);
|
||||
@ -59,7 +59,6 @@ const generateKey = function (t: number): string {
|
||||
|
||||
const keyArray = concatenatedParams.split("");
|
||||
const hashedKey = h(keyArray, t);
|
||||
console.log(md5(hashedKey));
|
||||
return md5(hashedKey);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user