Repository Analysis

telemt/telemt

MTProxy for Telegram on Rust + Tokio

2.5 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of telemt/telemt, a Rust project with 5,486 GitHub stars. SynthScan v2.0 examined 174,348 lines of code across 370 source files, recording 207 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 2.5 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

2.5
Adjusted Score
2.5
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.5K
Stars
Rust
Language
174.3K
Lines of Code
370
Files
207
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 105LOW 102

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 207 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators105 hits · 342 pts
SeverityFileLineSnippetContext
MEDIUMIMPLEMENTATION_PLAN.md87// ── RecordingWriter ─────────────────────────────────────────────────COMMENT
MEDIUMIMPLEMENTATION_PLAN.md143// ── PendingCountWriter ──────────────────────────────────────────────COMMENT
MEDIUMIMPLEMENTATION_PLAN.md199// ── Deterministic seeded RNG ────────────────────────────────────────COMMENT
MEDIUMIMPLEMENTATION_PLAN.md211// ── Config builders ─────────────────────────────────────────────────COMMENT
MEDIUMtools/telemt_api.py177 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py179 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py189 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py191 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py201 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py203 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py284 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py286 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py296 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py298 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py429 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py431 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py439# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py441# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py23# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py25# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py42# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py44# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py57# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py59# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py87 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py89 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py217 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py219 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py245 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py247 # ------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py456# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/telemt_api.py458# ---------------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/release.yml63 # ==========================COMMENT
MEDIUM.github/workflows/release.yml65 # ==========================COMMENT
MEDIUM.github/workflows/release.yml174 # ==========================COMMENT
MEDIUM.github/workflows/release.yml176 # ==========================COMMENT
MEDIUM.github/workflows/release.yml310 # ==========================COMMENT
MEDIUM.github/workflows/release.yml312 # ==========================COMMENT
MEDIUM.github/workflows/release.yml343 # ==========================COMMENT
MEDIUM.github/workflows/release.yml345 # ==========================COMMENT
MEDIUM.github/workflows/check.yml17# ==========================COMMENT
MEDIUM.github/workflows/check.yml19# ==========================COMMENT
MEDIUM.github/workflows/check.yml36# ==========================COMMENT
MEDIUM.github/workflows/check.yml38# ==========================COMMENT
MEDIUM.github/workflows/check.yml72# ==========================COMMENT
MEDIUM.github/workflows/check.yml74# ==========================COMMENT
MEDIUM.github/workflows/check.yml105# ==========================COMMENT
MEDIUM.github/workflows/check.yml107# ==========================COMMENT
MEDIUMsrc/proxy/relay.rs290 // ── Combine split halves into bidirectional streams ──────────────COMMENT
MEDIUMsrc/proxy/relay.rs306 // ── Watchdog: activity timeout + periodic rate logging ──────────COMMENT
MEDIUMsrc/proxy/relay.rs326 // ── Activity timeout ────────────────────────────────────COMMENT
MEDIUMsrc/proxy/relay.rs340 // ── Periodic rate logging ───────────────────────────────COMMENT
MEDIUMsrc/proxy/relay.rs363 // ── Run bidirectional copy + watchdog concurrently ───────────────COMMENT
MEDIUMsrc/proxy/relay.rs399 // ── Clean shutdown ──────────────────────────────────────────────COMMENT
MEDIUMsrc/proxy/relay.rs405 // ── Final logging ───────────────────────────────────────────────COMMENT
MEDIUMsrc/proxy/tests/adaptive_buffers_security_tests.rs13// ── Positive / Lifecycle ────────────────────────────────────────────────COMMENT
MEDIUMsrc/proxy/tests/adaptive_buffers_security_tests.rs55// ── Edge Cases ──────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/proxy/tests/adaptive_buffers_security_tests.rs94// ── Stale Entry Handling ────────────────────────────────────────────────COMMENT
MEDIUMsrc/proxy/tests/adaptive_buffers_security_tests.rs139// ── Cardinality Attack / Unbounded Growth ───────────────────────────────COMMENT
MEDIUMsrc/proxy/tests/adaptive_buffers_security_tests.rs188// ── Key Length Validation ────────────────────────────────────────────────COMMENT
45 more matches not shown…
Over-Commented Block64 hits · 58 pts
SeverityFileLineSnippetContext
LOWconfig.toml1### Telemt Based Config.tomlCOMMENT
LOWIMPLEMENTATION_PLAN.md201//COMMENT
LOWIMPLEMENTATION_PLAN.md341handshake_baseline_probe_always_falls_back_to_maskingCOMMENT
LOWIMPLEMENTATION_PLAN.md801// Adversarial: inner writer returns Pending on first 5 poll_write calls.COMMENT
LOWIMPLEMENTATION_PLAN.md881// NOTE: Unlike real TLS 1.3, FakeTlsWriter does NOT add a content-type byteCOMMENT
LOWIMPLEMENTATION_PLAN.md1441COMMENT
LOW…tions/self-explanatory-code-commenting.instructions.md101COMMENT
LOWsrc/crypto/aes.rs1//! AES encryption implementationsCOMMENT
LOWsrc/crypto/hash.rs1//! Cryptographic hash functionsCOMMENT
LOWsrc/tls_front/types.rs141#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)]COMMENT
LOWsrc/tls_front/types.rs161 Fallback,COMMENT
LOWsrc/transport/middle_proxy/health.rs1541/// Last-resort safety net for draining writers stuck past their deadline.COMMENT
LOWsrc/proxy/relay.rs1//! Bidirectional Relay — poll-based, no head-of-line blockingCOMMENT
LOWsrc/proxy/relay.rs21//! Old (select! + write_all — BLOCKING):COMMENT
LOWsrc/proxy/relay.rs41//! - No head-of-line blocking: slow client download doesn't block uploadsCOMMENT
LOWsrc/proxy/relay.rs101/// ## API compatibilityCOMMENT
LOWsrc/proxy/relay.rs361 };COMMENT
LOWsrc/proxy/relay/io.rs21 refund_reserved_quota_bytes,COMMENT
LOWsrc/proxy/relay/io/combined.rs1use std::io;COMMENT
LOWsrc/config/types.rs341/// Per-user unique source IP limit mode.COMMENT
LOWsrc/config/types.rs521 /// Deprecated legacy single STUN server for NAT probing.COMMENT
LOWsrc/config/types.rs561 /// Keepalive interval in seconds.COMMENT
LOWsrc/config/types.rs581COMMENT
LOWsrc/config/types.rs621 /// Additional bytes above strict per-user quota allowed in hot-path soft mode.COMMENT
LOWsrc/config/types.rs641 #[serde(default = "default_direct_relay_copy_buf_s2c_bytes")]COMMENT
LOWsrc/config/types.rs761 /// Override logical CPU core count for adaptive floor calculations.COMMENT
LOWsrc/config/types.rs881 /// Maximum wait time in milliseconds for async-recovery failfast mode.COMMENT
LOWsrc/config/types.rs901COMMENT
LOWsrc/config/types.rs1001 /// Cooldown for repetitive soft-eviction on the same writer in milliseconds.COMMENT
LOWsrc/config/types.rs1061 /// NTP servers for drift check.COMMENT
LOWsrc/config/types.rs1321 /// CIDR whitelist allowed to access API.COMMENT
LOWsrc/config/types.rs1541 /// Tracks whether inline_conntrack_control was explicitly set in config.COMMENT
LOWsrc/config/types.rs1601 #[serde(default = "default_listen_addr_ipv6_opt")]COMMENT
LOWsrc/config/types.rs1621COMMENT
LOWsrc/config/types.rs1641 ///COMMENT
LOWsrc/config/types.rs1661COMMENT
LOWsrc/config/types.rs1721COMMENT
LOWsrc/config/types.rs1941COMMENT
LOWsrc/config/types.rs1961 pub alpn_enforce: bool,COMMENT
LOWsrc/config/types.rs1981 #[serde(default = "default_mask_shape_bucket_floor_bytes")]COMMENT
LOWsrc/config/types.rs2001COMMENT
LOWsrc/config/types.rs2101 /// Per-user transport rate limits in bits-per-second.COMMENT
LOWsrc/config/types.rs2381pub struct UpstreamConfig {COMMENT
LOWsrc/config/types.rs2421 pub port: Option<u16>,COMMENT
LOWsrc/config/types.rs2441 /// iOS-like SYN-fix token-bucket rate amount.COMMENT
LOWsrc/config/hot_reload.rs1//! Hot-reload: watches the config file via inotify (Linux) / FSEvents (macOS)COMMENT
LOWsrc/config/load.rs81 /// Anti-censorship behavior and traffic shaping configuration.COMMENT
LOWsrc/maestro/shutdown.rs1//! Shutdown and signal handling for telemt.COMMENT
LOWsrc/maestro/mod.rs1//! telemt — Telegram MTProto ProxyCOMMENT
LOWsrc/maestro/mod.rs61COMMENT
LOWsrc/stream/tls_stream.rs1//! Fake TLS 1.3 stream wrappersCOMMENT
LOWsrc/stream/tls_stream.rs21COMMENT
LOWsrc/stream/tls_stream.rs241COMMENT
LOWsrc/stream/tls_stream.rs261/// │ <-------- (CCS) -------- │ │COMMENT
LOWsrc/stream/crypto_stream.rs1//! Encrypted stream wrappers using AES-CTRCOMMENT
LOWsrc/stream/crypto_stream.rs21COMMENT
LOWsrc/stream/crypto_stream.rs41//! -> poll_write returns Poll::PendingCOMMENT
LOWsrc/stream/frame.rs121/// Trait for frame codecs that can encode and decode framesCOMMENT
LOWsrc/protocol/constants.rs201pub const MIN_CERT_LEN: usize = 1024;COMMENT
LOWsrc/protocol/tls.rs81/// Length to store for replay protection (first 16 bytes of digest)COMMENT
4 more matches not shown…
Structural Annotation Overuse22 hits · 28 pts
SeverityFileLineSnippetContext
LOWIMPLEMENTATION_PLAN.md559### Step 1: Add seam, then write red tests (must fail on then-current code)COMMENT
LOWIMPLEMENTATION_PLAN.md605### Step 2: Implement `ProxySharedState`COMMENT
LOWIMPLEMENTATION_PLAN.md652### Step 3: Thread `Arc<ProxySharedState>` through the call chainCOMMENT
LOWIMPLEMENTATION_PLAN.md711### Step 4: Remove test helpers and migrate test filesCOMMENT
LOWIMPLEMENTATION_PLAN.md776### Step 1: Write red tests (must fail on current code)COMMENT
LOWIMPLEMENTATION_PLAN.md860### Step 2: Implement `DrsWriter`COMMENT
LOWIMPLEMENTATION_PLAN.md946### Step 3: Wire into relay path with compatibilityCOMMENT
LOWIMPLEMENTATION_PLAN.md1031### Step 5: Add `drs_enabled` config flagCOMMENT
LOWIMPLEMENTATION_PLAN.md1090### Step 1: Write red tests for remaining gaps (must fail on current code)COMMENT
LOWIMPLEMENTATION_PLAN.md1115### Step 2: Keep current hardening, remove outdated dead-code suppressionCOMMENT
LOWIMPLEMENTATION_PLAN.md1128### Step 3: Add explicit throughput mapping APICOMMENT
LOWIMPLEMENTATION_PLAN.md1153### Step 4: Wire into `direct_relay.rs`COMMENT
LOWIMPLEMENTATION_PLAN.md1221### Step 1: Required deterministic decision tests (CI required)COMMENT
LOWIMPLEMENTATION_PLAN.md1246### Step 2: Optional feasibility experiments (ignored by default)COMMENT
LOWIMPLEMENTATION_PLAN.md1274### Step 3: Option B boundary validation experiment (ignored by default)COMMENT
LOWIMPLEMENTATION_PLAN.md1293### Step 4: Decision artifactCOMMENT
LOWIMPLEMENTATION_PLAN.md1379### Step 1: Write red tests only for missing coverage (must fail on current code)COMMENT
LOWIMPLEMENTATION_PLAN.md1408### Step 2: Keep current masking implementation, harden where neededCOMMENT
LOWIMPLEMENTATION_PLAN.md1472### Step 3: Implement in `handshake.rs`COMMENT
LOWIMPLEMENTATION_PLAN.md1542### Step 1: Write red tests (must fail on current code)COMMENT
LOWIMPLEMENTATION_PLAN.md1620### Step 2: Implement `IptController`COMMENT
LOWIMPLEMENTATION_PLAN.md1726### Step 3: Integrate into relay pathCOMMENT
Unused Imports7 hits · 4 pts
SeverityFileLineSnippetContext
LOWtools/dc.py3CODE
LOWtools/telemt_api.py13CODE
LOWtools/telemt_api.py17CODE
LOWtools/telemt_api.py18CODE
LOWtools/telemt_api.py18CODE
LOWtools/telemt_api.py18CODE
LOWtools/tlsearch.py12CODE
Excessive Try-Catch Wrapping3 hits · 2 pts
SeverityFileLineSnippetContext
LOWtools/telemt_api.py135 except Exception:CODE
LOWtools/aesdiag.py316 except Exception as e:CODE
LOWtools/tlsearch.py387 except Exception as e: # noqa: BLE001CODE
Hyper-Verbose Identifiers3 hits · 2 pts
SeverityFileLineSnippetContext
LOWtools/telemt_api.py269 def runtime_connections_summary(self) -> APIResponse:CODE
LOWtools/tlsearch.py125def decode_supported_versions(data: list[int]) -> str:CODE
LOW…tions/self-explanatory-code-commenting.instructions.md97function calculateCompoundInterest(principal, rate, time, compoundFrequency = 1) {CODE
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtools/aesdiag.py106CODE
LOWtools/tlsearch.py190CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtools/aesdiag.py222 # Check if the extra bytes after hs_plain in decrypted are all zero (zero padding)COMMENT