chore: clean up code — remove dead code, stale allows, eprintln→tracing, remove volatile data from docs
This commit is contained in:
@@ -117,7 +117,7 @@ Falls back to hardcoded values if the app isn't installed. No manual updates nee
|
|||||||
|
|
||||||
## Stealth Features
|
## Stealth Features
|
||||||
|
|
||||||
- **TLS fingerprint**: BoringSSL with Chrome 142 JA3/JA4 + H2 fingerprint via `wreq`
|
- **TLS fingerprint**: BoringSSL with Chrome JA3/JA4 + H2 fingerprint via `wreq` (version auto-detected)
|
||||||
- **Protobuf**: Hand-rolled encoder producing byte-exact match to real webview traffic
|
- **Protobuf**: Hand-rolled encoder producing byte-exact match to real webview traffic
|
||||||
- **Warmup**: Mimics real webview startup RPC calls
|
- **Warmup**: Mimics real webview startup RPC calls
|
||||||
- **Heartbeat**: Periodic keep-alive matching real webview lifecycle
|
- **Heartbeat**: Periodic keep-alive matching real webview lifecycle
|
||||||
@@ -160,7 +160,7 @@ The LS uses `daily-cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?
|
|||||||
|
|
||||||
**Verify patch:** `grep -o 'detectAndUseProxy=[^;]*' /usr/share/antigravity/resources/app/extensions/antigravity/dist/extension.js` should show `detectAndUseProxy=1`.
|
**Verify patch:** `grep -o 'detectAndUseProxy=[^;]*' /usr/share/antigravity/resources/app/extensions/antigravity/dist/extension.js` should show `detectAndUseProxy=1`.
|
||||||
|
|
||||||
**Model IDs** (for standalone LS testing): `MODEL_PLACEHOLDER_M18` = Gemini 3 Flash, `MODEL_PLACEHOLDER_M8` = Gemini 3 Pro (High), `MODEL_PLACEHOLDER_M7` = Gemini 3 Pro (Low), `MODEL_PLACEHOLDER_M26` = Claude Opus 4.6, `MODEL_PLACEHOLDER_M12` = Claude Opus 4.5, `MODEL_CLAUDE_4_5_SONNET` = Claude Sonnet 4.5.
|
**Model IDs** (for standalone LS testing): See `docs/ls-binary-analysis.md` for the full proto enum mapping.
|
||||||
|
|
||||||
### Usage Stats
|
### Usage Stats
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ The proxy needs an OAuth token. Three ways to provide it:
|
|||||||
|
|
||||||
## Stealth Features
|
## Stealth Features
|
||||||
|
|
||||||
- **TLS fingerprint**: BoringSSL with Chrome 142 JA3/JA4 + H2 fingerprint via `wreq`
|
- **TLS fingerprint**: BoringSSL with Chrome JA3/JA4 + H2 fingerprint via `wreq` (version auto-detected)
|
||||||
- **Protobuf**: Hand-rolled encoder producing byte-exact match to real webview traffic
|
- **Protobuf**: Hand-rolled encoder producing byte-exact match to real webview traffic
|
||||||
- **Warmup**: Mimics real webview startup RPC calls
|
- **Warmup**: Mimics real webview startup RPC calls
|
||||||
- **Heartbeat**: Periodic keep-alive matching real webview lifecycle
|
- **Heartbeat**: Periodic keep-alive matching real webview lifecycle
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ struct ResponseData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Build a full Response object matching the official OpenAI schema.
|
/// Build a full Response object matching the official OpenAI schema.
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn build_response_object(data: ResponseData, params: &RequestParams) -> ResponsesResponse {
|
fn build_response_object(data: ResponseData, params: &RequestParams) -> ResponsesResponse {
|
||||||
ResponsesResponse {
|
ResponsesResponse {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ fn detect_versions() -> DetectedVersions {
|
|||||||
const FALLBACK_CLIENT: &str = "1.16.5";
|
const FALLBACK_CLIENT: &str = "1.16.5";
|
||||||
|
|
||||||
let Some(install_dir) = find_install_dir() else {
|
let Some(install_dir) = find_install_dir() else {
|
||||||
eprintln!(
|
tracing::warn!(
|
||||||
"[constants] ⚠ Could not find Antigravity install — using fallback versions"
|
"Could not find Antigravity install — using fallback versions"
|
||||||
);
|
);
|
||||||
return DetectedVersions {
|
return DetectedVersions {
|
||||||
antigravity: FALLBACK_ANTIGRAVITY.to_string(),
|
antigravity: FALLBACK_ANTIGRAVITY.to_string(),
|
||||||
@@ -139,9 +139,12 @@ fn detect_versions() -> DetectedVersions {
|
|||||||
client: client_ver.unwrap_or_else(|| FALLBACK_CLIENT.to_string()),
|
client: client_ver.unwrap_or_else(|| FALLBACK_CLIENT.to_string()),
|
||||||
};
|
};
|
||||||
|
|
||||||
eprintln!(
|
tracing::info!(
|
||||||
"[constants] ✓ Detected versions: Antigravity={}, Chrome={}, Electron={}, Client={}",
|
antigravity = %versions.antigravity,
|
||||||
versions.antigravity, versions.chrome, versions.electron, versions.client
|
chrome = %versions.chrome,
|
||||||
|
electron = %versions.electron,
|
||||||
|
client = %versions.client,
|
||||||
|
"Detected app versions"
|
||||||
);
|
);
|
||||||
|
|
||||||
versions
|
versions
|
||||||
|
|||||||
@@ -147,14 +147,6 @@ impl MitmStore {
|
|||||||
latest.remove(cascade_id)
|
latest.remove(cascade_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Peek at the latest usage without consuming it.
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub async fn peek_usage(&self, cascade_id: &str) -> Option<ApiUsage> {
|
|
||||||
let latest = self.latest_usage.read().await;
|
|
||||||
latest.get(cascade_id)
|
|
||||||
.cloned()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get aggregate stats.
|
/// Get aggregate stats.
|
||||||
pub async fn stats(&self) -> MitmStats {
|
pub async fn stats(&self) -> MitmStats {
|
||||||
self.stats.read().await.clone()
|
self.stats.read().await.clone()
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ fn domain_label(domain: &str) -> (&str, &str) {
|
|||||||
|
|
||||||
const BOLD: &str = "\x1b[1m";
|
const BOLD: &str = "\x1b[1m";
|
||||||
const DIM: &str = "\x1b[2m";
|
const DIM: &str = "\x1b[2m";
|
||||||
#[allow(dead_code)]
|
|
||||||
const RED: &str = "\x1b[91m";
|
|
||||||
const GREEN: &str = "\x1b[92m";
|
const GREEN: &str = "\x1b[92m";
|
||||||
const YELLOW: &str = "\x1b[93m";
|
const YELLOW: &str = "\x1b[93m";
|
||||||
const CYAN: &str = "\x1b[96m";
|
const CYAN: &str = "\x1b[96m";
|
||||||
|
|||||||
Reference in New Issue
Block a user