Commit graph

16 commits

Author SHA1 Message Date
Kirill Minovsky
4c6a68f8f1 fix(compat): fix Python 3.8 compatibility for TLS nullcontext and ASN removeprefix 2026-09-04 19:13:35 +03:00
Kirill Minovsky
6c7b242919 refactor: modularize monolithic scripts into core/dns, cli, and app packages 2026-09-03 23:03:35 +03:00
Kirill Minovsky
5c41a68fd4 feat(ipv6): выбор семейства IPv4/IPv6 в меню, детекция глобального IPv6, v4-фолбэк в резолве
- network: ipv6_supported(), _ip_family(), pin_host() (замена pin_ipv4),
  format_ip_for_url() для [v6]-литералов, get_resolved_ip с family из конфига
- runners: при IPv6-режиме неудачный AAAA-резолв фолбэчится на A,
  отличия NXDOMAIN от "IPv6 не поддерживается"
- tls/telegram: URL с IPv6-адресом в квадратных скобках
2026-08-29 01:46:28 +03:00
Kirill Minovsky
9f133d6de0 feat(dns,tls): strict IPv4 for all probes; show connection failure reason in test 2
- All hostname-based probes (DoH wire/json, TLS/SNI, telegram media)
  now resolve A-record and connect by IP with Host/sni_hostname,
  preventing silent IPv6 fallback via getaddrinfo(AF_UNSPEC).
- Skipped when PROXY_URL is set (remote resolution belongs to proxy).
- Test 2: warmup/combat exceptions classified like test 3
  (SYN DROP / TLS RST / TLS DROP / TLS MITM ...) instead of blanket TIMEOUT;
  async trace hook per request stage.
- Remove unused ipv6 parameter of create_dpi_client.
2026-08-26 01:36:33 +03:00
Kirill Minovsky
e7ee1fa5ec Clarify TLS RST details, hide domain timing on errors
TLS RST details now say where the reset happened: 'TCP RST na
ClientHello' during handshake, 'TCP RST posle handshake' after it.
Domain row shows probe time only when both TLS probes succeed
(green OK or NO TLS1.3) - error rows carry no timing noise.
Legend documents TLS RST.
2026-08-24 22:49:34 +03:00
Kirill Minovsky
d9e2895ba7 Show OK for http->https same-host redirects; fix py3.8
Redirect to the same host/subdomain over https is a normal upgrade,
not a suspicious redirect: report green OK instead of green REDIR in
both TLS and HTTP probes. Replace str.removeprefix (py3.9+) with
_strip_www helper - the win7 build targets Python 3.8.
2026-08-24 22:32:21 +03:00
Kirill Minovsky
6ea57b5adb refactor(core): optimize HTTP requests and SSL context (N/A)
- Switched TLS scanner request method from GET to HEAD
- Updated request headers for better compatibility
- Removed stream=True from scanner response handling
- Introduced _SHARED_VERIFY_CTX for TCP scanner instances
- Reused SSL context to reduce object allocation overhead
2026-05-07 01:11:08 +03:00
Kirill Minovsky
e648e188ae refactor(scanner): improve error classification and logging (main)
- Added log_debug_error helper for detailed exception tracing
- Updated TLS error classification to provide more precise labels
- Integrated stage-aware context into error classification logic
- Added detailed exception chain capture to debug logs
- Refined TCP reset and abort detection for TLS stages
2026-05-06 23:07:49 +03:00
Kirill Minovsky
a4476a2fa8 feat(scanner): add connection stage tracking for error reporting
- Implemented trace hooks in scanners to monitor connection lifecycle
- Added 'stage' parameter to classify_connect_error for precise logs
- Enhanced error reporting to distinguish between SYN, TLS, and I/O drops
- Updated tls_scanner, tcp16_scanner, and error_classifier modules
2026-05-06 15:27:07 +03:00
Kirill Minovsky
d3ebede4e7 feat(scanner): improve IP identification and classification (N/A)
- Added get_fake_ip_type utility for network address validation
- Integrated IP classification logic into tls_scanner
- Added support for detecting ISP, Fake-IP, and local network ranges
- Updated scan results to display specific statuses for detected IPs
2026-04-24 15:11:33 +03:00
Kirill Minovsky
fb5e5f7dbf feat(scanner): Enhance block and redirect detection logic
- Introduce `stub_ips` for early ISP page detection via DNS.
- Refactor redirect classification.
- Differentiate between same-domain/subdomain and external redirects.
- Remove `config.BLOCK_MARKERS` and `BODY_BLOCK_MARKERS` usage.
- Update `cli/ui` legend for new ISP page and redirect statuses.
- Integrate `stub_ips` into TLS and HTTP scanning workers.
- Simplify HTTP/TLS status reporting for redirects and connections.
2026-03-13 23:37:24 +03:00
Kirill Minovsky
b5b7b88077 feat(proxy): Add HTTPX proxy configuration
- Ensure all HTTPX clients and transports respect config.PROXY_URL
- Explicitly set trust_env=False to prevent unexpected proxy discovery
- Apply proxy settings to DoH DNS queries
- Apply proxy settings to TLS scanner connections
- Apply proxy settings to TCP/16 scanner probes
- Apply proxy settings to GitHub API calls for version checks
2026-03-13 22:44:42 +03:00
Kirill Minovsky
f6437ff6bf feat(config): Migrate app config to YAML 2026-03-13 22:42:51 +03:00
Kirill Minovsky
0b1aec94da feat(core): Implement granular HTTPX timeouts and refactor error handling
- Introduced granular httpx.Timeout configurations for AsyncClient.
- Replaced a single config.TIMEOUT with CONNECT_TIMEOUT, READ_TIMEOUT.
- Added POOL_TIMEOUT to manage connection pool wait times.
- Refactored tls_scanner.py and tcp16_scanner.py for error handling.
- Leveraged utils.error_classifier for consistent error classification.
- Enhanced classify_connect_error with specific PoolTimeout handling.
- Updated cli/runners.py to display the new CONNECT_TIMEOUT.
- Improved error labels and details within error_classifier.py.
2026-03-03 23:54:38 +03:00
Kirill Minovsky
e264cc8889 feat(tls): Add IPv6 support and streamline TLS checks
- Add `ipv6` parameter to `create_dpi_client` for IPv6 configuration
- Introduce `resolved_ip` parameter in `_check_tls_single` for direct IP connection
- Refactor `check_tls` to perform a single TLS check, removing internal retries
- Update docstrings to reflect new parameters and simplified check flow
2026-02-28 01:27:40 +03:00
Kirill Minovsky
650b4d26e0 dpi-detector 2.0 init 2026-02-28 00:53:00 +03:00