refactor: remove dead x-is-human token generation system

Cursor no longer validates the x-is-human header, so the entire token
generation pipeline was dead code producing only error logs.

Removed:
- loadScripts(), fetchCursorScript(), generateToken(), replenishPool(),
  getXIsHumanToken() and token pool management from cursor-client.ts
- scriptUrl config field and SCRIPT_URL env var support
- unmaskedVendorWebGL/unmaskedRendererWebGL fingerprint fields
- jscode/ script loading (env.js, main.js templates)
- script_url and WebGL fields from config.yaml

Kept:
- Chrome TLS fingerprint headers (user-agent, sec-ch-ua, etc.)
- x-is-human header sent as empty string (Cursor accepts it)
This commit is contained in:
小海
2026-03-05 17:20:51 +08:00
parent 03a3484067
commit 184cabf5cc
5 changed files with 9 additions and 210 deletions

View File

@@ -90,11 +90,8 @@ export interface AppConfig {
port: number;
timeout: number;
proxy?: string;
scriptUrl: string;
cursorModel: string;
fingerprint: {
unmaskedVendorWebGL: string;
unmaskedRendererWebGL: string;
userAgent: string;
};
}