@ikyyofc/gemini-cli 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/proxy-manager.js +1 -9
package/package.json
CHANGED
package/utils/proxy-manager.js
CHANGED
|
@@ -3,17 +3,11 @@ import axios from "axios";
|
|
|
3
3
|
// 1. Menghapus data duplikat di proxyPool
|
|
4
4
|
const proxyPool = [
|
|
5
5
|
{ name: "caliph", host: "https://cors.caliph.my.id/" },
|
|
6
|
-
{ name: "eu", host: "https://cors.eu.org/" },
|
|
7
6
|
{ name: "prox", host: "https://prox.26bruunjorl.workers.dev/" },
|
|
8
|
-
{ name: "wave", host: "https://plain-wave-6f5f.apis1.workers.dev/" },
|
|
9
|
-
{ name: "hill", host: "https://young-hill-815e.apis3.workers.dev/" },
|
|
10
7
|
{ name: "icy", host: "https://icy-morning-72e2.apis2.workers.dev/" },
|
|
11
8
|
{ name: "fazri", host: "https://cors.fazri.workers.dev/" },
|
|
12
9
|
{ name: "spring", host: "https://spring-night-57a1.3540746063.workers.dev/" },
|
|
13
|
-
{ name: "sizable", host: "https://cors.sizable.workers.dev/" }
|
|
14
|
-
{ name: "jiashu", host: "https://jiashu.1win.eu.org/" },
|
|
15
|
-
{ name: "artemisandros", host: "https://cors.artemisandros.workers.dev/?" },
|
|
16
|
-
{ name: "supershadowcube", host: "https://cloudflare-cors-anywhere.supershadowcube.workers.dev/?url=" }
|
|
10
|
+
{ name: "sizable", host: "https://cors.sizable.workers.dev/" }
|
|
17
11
|
];
|
|
18
12
|
|
|
19
13
|
const userAgents = [
|
|
@@ -37,7 +31,6 @@ function getRandomProxy() {
|
|
|
37
31
|
|
|
38
32
|
if (available.length === 0) {
|
|
39
33
|
failedProxies.clear();
|
|
40
|
-
console.warn("[Global Proxy] ⚠️ Semua proxy gagal, mereset paksa daftar...");
|
|
41
34
|
return proxyPool[Math.floor(Math.random() * proxyPool.length)];
|
|
42
35
|
}
|
|
43
36
|
return available[Math.floor(Math.random() * available.length)];
|
|
@@ -90,7 +83,6 @@ export function setupGlobalProxy() {
|
|
|
90
83
|
if (meta?.proxyName && !config._retryAttempted) {
|
|
91
84
|
// Tandai proxy gagal
|
|
92
85
|
failedProxies.set(meta.proxyName, Date.now());
|
|
93
|
-
console.warn(`[Global Proxy] ❌ Proxy "${meta.proxyName}" gagal, diblokir sementara.`);
|
|
94
86
|
|
|
95
87
|
// 3. Mekanisme Auto-Retry (Mencoba 1x lagi dengan proxy berbeda)
|
|
96
88
|
config._retryAttempted = true;
|