feat: add obfuscation

This commit is contained in:
shinya
2025-08-25 00:01:20 +08:00
parent 2fd4a2d961
commit 571b685c01
13 changed files with 685 additions and 3 deletions

View File

@@ -6,6 +6,8 @@ import { getAuthInfoFromCookie } from '@/lib/auth';
import { getConfig, refineConfig } from '@/lib/config';
import { db } from '@/lib/db';
export const runtime = 'nodejs';
export async function POST(request: NextRequest) {
const storageType = process.env.NEXT_PUBLIC_STORAGE_TYPE || 'localstorage';
if (storageType === 'localstorage') {

View File

@@ -4,6 +4,8 @@ import { NextRequest, NextResponse } from 'next/server';
import { getAuthInfoFromCookie } from '@/lib/auth';
export const runtime = 'nodejs';
export async function POST(request: NextRequest) {
try {
// 权限检查:仅站长可以拉取配置订阅

View File

@@ -9,6 +9,8 @@ import { SimpleCrypto } from '@/lib/crypto';
import { db } from '@/lib/db';
import { CURRENT_VERSION } from '@/lib/version';
export const runtime = 'nodejs';
const gzipAsync = promisify(gzip);
export async function POST(req: NextRequest) {

View File

@@ -9,6 +9,8 @@ import { configSelfCheck, setCachedConfig } from '@/lib/config';
import { SimpleCrypto } from '@/lib/crypto';
import { db } from '@/lib/db';
export const runtime = 'nodejs';
const gunzipAsync = promisify(gunzip);
export async function POST(req: NextRequest) {

View File

@@ -7,6 +7,8 @@ import { getConfig } from '@/lib/config';
import { db } from '@/lib/db';
import { refreshLiveChannels } from '@/lib/live';
export const runtime = 'nodejs';
export async function POST(request: NextRequest) {
try {
// 权限检查

View File

@@ -7,6 +7,8 @@ import { getConfig } from '@/lib/config';
import { db } from '@/lib/db';
import { deleteCachedLiveChannels, refreshLiveChannels } from '@/lib/live';
export const runtime = 'nodejs';
export async function POST(request: NextRequest) {
try {
// 权限检查

View File

@@ -2,6 +2,8 @@ import { NextRequest, NextResponse } from 'next/server';
import { getCachedLiveChannels } from '@/lib/live';
export const runtime = 'nodejs';
export async function GET(request: NextRequest) {
try {
const { searchParams } = new URL(request.url);

View File

@@ -2,6 +2,8 @@ import { NextRequest, NextResponse } from 'next/server';
import { getCachedLiveChannels } from '@/lib/live';
export const runtime = 'nodejs';
export async function GET(request: NextRequest) {
try {
const { searchParams } = new URL(request.url);

View File

@@ -4,6 +4,8 @@ import { NextRequest, NextResponse } from 'next/server';
import { getConfig } from '@/lib/config';
export const runtime = 'nodejs';
export async function GET(request: NextRequest) {
console.log(request.url)
try {