Commit graph

1432 commits

Author SHA1 Message Date
Daniel Lavrushin
d9970adec5
B4 mcp server (#312)
Some checks failed
Deploy documentation / build-and-deploy (push) Has been cancelled
2026-08-17 23:25:50 +02:00
Daniel Lavrushin
5be4899104 fix
Some checks are pending
Deploy documentation / build-and-deploy (push) Waiting to run
2026-08-17 20:31:25 +02:00
Daniel Lavrushin
ddd006f560 copilot-comments 2026-08-17 20:31:25 +02:00
Daniel Lavrushin
9436273ac6 fix(dns): improve domain parsing to enforce maximum encoded length
test(dns): add cases for maximum label limits in domain parsing
fix(mtproto): adjust dial timeout handling for name resolution
2026-08-17 20:31:25 +02:00
Daniel Lavrushin
37315ab291 feat(quic): enhance SNI parsing with support for fragmented and out-of-order client hello messages
fix: add .vscode/mcp.json.template to configure MCP server settings
fix: update .gitignore to exclude .vscode/mcp.json
2026-08-17 20:31:25 +02:00
Daniel Lavrushin
59af3532be telegram proxy fix 2026-08-17 20:31:25 +02:00
Daniel Lavrushin
ebd6364b26 1-78-fix 2026-08-17 20:31:25 +02:00
Daniel Lavrushin
df4796da34 fix(tests): enhance stubBinaries function to properly manage binary cache cleanup
Some checks failed
Deploy documentation / build-and-deploy (push) Has been cancelled
2026-08-16 03:12:28 +02:00
Daniel Lavrushin
6f2c19f234 feat(ui): implement customizable dashboard layout with persistent configuration 2026-08-16 02:41:30 +02:00
Daniel Lavrushin
06453f0bbf feat(dashboard): add new dashboard components and layout management
- Introduced a new registry for dashboard panels, defining various metrics and rendering logic for components like RuntimeHealth, LiveSignal, ActiveSets, DeviceActivity, UnmatchedDomains, MTProtoActivity, Escalations, and Blackhole.
- Created a types file to define the Metrics interface and related types for better type safety and clarity.
- Implemented a custom hook `useDashboardLayout` to manage the layout of dashboard panels, including saving and loading layout state from local storage.
- Added tests for self-marking behavior in the NFQ package to ensure proper handling of injected packets and routing rules.
- Developed tests for routing behavior in network namespaces, verifying that packets are routed correctly based on their marks and configurations.
2026-08-16 02:41:30 +02:00
Daniel Lavrushin
e26b65fddb Implement log trace sets and relay functionality
- Added logtrace_sets.go to define traceSet and related structures for managing trace configurations.
- Implemented collectTraceSets function to gather and process enabled trace sets from the configuration.
- Created logtrace_sets_test.go to test the functionality of trace set collection, ensuring proper handling of enabled and disabled sets, redaction of sensitive information, and omission of off modes.
- Introduced relay.go to manage TCP connection relaying with idle timeouts and half-close handling.
- Added relay_test.go to validate the relay functionality, including tests for connection teardown, idle timeouts, and resource management. Отваливается маршруьизация в soscks5
Fixes #304
2026-08-16 02:41:30 +02:00
Daniel Lavrushin
f81b2939b9 fixes: streamline DNS response handling by consolidating packet creation into a dedicated method 2026-08-15 23:36:43 +02:00
Daniel Lavrushin
91f3b7162a fixes: refactor DNS escalation handling and introduce inline resolution logic with enhanced test coverage 2026-08-15 23:36:43 +02:00
Daniel Lavrushin
447eb04372 Refactor code structure for improved readability and maintainability 2026-08-15 23:36:43 +02:00
Daniel Lavrushin
b33d2f0ed8 fixes: enhance upstream health reporting and diagnostics, including logging connection failures and adding support for upstream health checks 2026-08-15 23:36:43 +02:00
Daniel Lavrushin
84c871040d Refactor escalation handling and introduce new escalation logic
- Updated escalation data structures to include `dnsFails` and changed `rstKills` to use `failEntry`.
- Modified `SetEscalation` method to accept a reason string for escalations.
- Enhanced tests to cover new escalation logic, including chaining and max hops.
- Introduced new escalation reasons for better clarity in logs.
- Implemented logic to handle escalations based on DNS failures and ClientHello stalls.
- Added methods for managing escalated routes and refreshing them based on conditions.
- Updated existing methods to utilize the new escalation logic and ensure proper handling of escalated sets.
- Added unit tests for new escalation functionality and edge cases.
2026-08-15 23:36:43 +02:00
Daniel Lavrushin
ebcceae9e4 fixes: enhance DNS handling by improving address resolution and packet processing, and add tests for addressability and query handling 2026-08-15 23:36:43 +02:00
Daniel Lavrushin
28d4b9ca80 fixes: resolve media loading issues by correcting data center address mappings and improving relay connection handling
Some checks failed
Deploy documentation / build-and-deploy (push) Has been cancelled
2026-08-12 22:03:46 +02:00
Daniel Lavrushin
38bce72ab2 fixes: resolve media loading issues by correcting data center address mappings and enhancing routing logic 2026-08-12 22:03:46 +02:00
Daniel Lavrushin
9fce3fde91 fixes: enhance Cloudflare Worker handling and improve media loading reliability 2026-08-12 22:03:46 +02:00
Daniel Lavrushin
57d4672211 fixes: address media loading issues in DC 203 and improve Cloudflare Worker handling 2026-08-12 22:03:46 +02:00
Daniel Lavrushin
73b8ba28e9 fixes: update message_id generation in reqPQ and implement proxy bypass mark tests Проблема с медиа в телеграм при использовании MTProto прокси
Some checks failed
Deploy documentation / build-and-deploy (push) Has been cancelled
Fixes #298
2026-08-11 22:00:23 +02:00
Daniel Lavrushin
cfcef4de04 feat: add stall reporting for relay connections and enhance relay function signature Проблема с медиа в телеграм при использовании MTProto прокси
Fixes #298
2026-08-11 22:00:23 +02:00
Daniel Lavrushin
c471930852 fixes: improve error handling for upstream dial and clarify SO_MARK usage in output 2026-08-11 22:00:23 +02:00
Daniel Lavrushin
8a1234831c fixes: update QUIC reject handling and add test for bypass marks consistency Проблема с медиа в телеграм при использовании MTProto прокси
Fixes #298
2026-08-11 22:00:23 +02:00
Daniel Lavrushin
b4168bb319 feat: enhance routing rule checks with NFT chain parsing and bypass validation Проблема с медиа в телеграм при использовании MTProto прокси
Fixes #298
2026-08-11 22:00:23 +02:00
Daniel Lavrushin
271fdb0ea9 feat: implement self-dial mark and relay stall reporting
- Introduced SelfDialMark to differentiate between self-initiated connections and others, ensuring proper routing and bypassing of DPI.
- Enhanced relay connection handling to report stalls when upstream connections become silent, improving reliability of worker relays.
- Added tests for stall reporting and self-dial mark functionality to ensure correctness.
- Updated various components to utilize the new self-dial mark and stall reporting mechanisms, including routing and proxy rules.
- Implemented a tgprobe tool for testing upstream connections with configurable parameters.
2026-08-11 22:00:23 +02:00
Daniel Lavrushin
c665267c5b fixes: improve error handling in async job execution for routing
Some checks are pending
Deploy documentation / build-and-deploy (push) Waiting to run
2026-08-10 22:23:46 +02:00
Daniel Lavrushin
c5d27865ba fixes: enhance path parsing to handle quoted paths and trailing semicolons 2026-08-10 22:23:46 +02:00
Daniel Lavrushin
81f906e500 Add tests for UDP and TCP port filtering in nfq package
- Implemented `setattr_test.go` to test TCP port filtering behavior, ensuring sets scoped to specific TCP ports do not process packets on other ports.
- Implemented `udpgate_test.go` to validate UDP handling for targeted sets, including scenarios with QUIC filtering and IP-based targeting.
- Added various test cases to cover different configurations of UDP sets and their expected verdicts based on packet characteristics.
2026-08-10 22:23:46 +02:00
Daniel Lavrushin
d16d82c8ed fixes: refactor chain and hook initialization in applyDNSTCPFamily function 2026-08-10 22:23:46 +02:00
Daniel Lavrushin
b0d2fa041c fixes: update changelog for version 1.75.1 and address multiple issues with Telegram media handling and firewall rules 2026-08-10 22:23:46 +02:00
Daniel Lavrushin
e6c5959d38 DNS pass-through в B4 дропает конкурентные запросы с одного source-порта — каждый getaddrinfo (A+AAAA) занимает +5 секунд
Fixes #296
2026-08-10 22:23:46 +02:00
Daniel Lavrushin
ce9b0003d1 feat: add DNS pinning functionality to enhance domain resolution 2026-08-10 22:23:46 +02:00
Daniel Lavrushin
2af2401ff4 fixes 2026-08-10 22:23:46 +02:00
Daniel Lavrushin
7a58353713 fixes 1-75-1 2026-08-10 22:23:46 +02:00
Daniel Lavrushin
d42e6bc58d feat: add import functionality for byedpi and zapret command line to documentation
Some checks failed
Deploy documentation / build-and-deploy (push) Has been cancelled
2026-08-08 22:16:36 +02:00
Daniel Lavrushin
1f0bfaf8d9 feat: add support for new conversion plan and tool listing in error messages 2026-08-08 22:16:36 +02:00
Daniel Lavrushin
4d85344cb8 feat: add import functionality for byedpi and zapret command line configurations 2026-08-08 22:16:36 +02:00
Daniel Lavrushin
37d05fb102 Add zapret tool implementation and associated tests
- Implemented the zapret tool in `tool_zapret.go`, including desynchronization modes, fooling strategies, and split position parsing.
- Added grammar definitions for zapret configurations.
- Created comprehensive tests in `tool_zapret_test.go` to validate the functionality of zapret options, ensuring all recognized options are reported and conflicts are handled correctly.
- Included tests for desync modes, fooling strategies, and the handling of UDP profiles.
2026-08-08 22:16:36 +02:00
Daniel Lavrushin
1ceaab7aa9 feat: enhance conversion logic and UI for better handling of profiles and unresolved files 2026-08-08 22:16:36 +02:00
Daniel Lavrushin
4641c6e398 Add zapret configuration and tests
- Introduced a new JSON configuration file for the zapret tool, defining various options, markers, and profiles.
- Implemented comprehensive tests for the zapret tool, covering recognized options, domain claims, desync modes, and more.
- Ensured that the tests validate the expected behavior of the zapret configurations and report any conflicts or unsupported options.
2026-08-08 22:16:36 +02:00
Daniel Lavrushin
d10095a89b feat: add conversion API and tools support
- Implemented conversion specifications in `src/convert/spec.go` with embedded JSON rules.
- Created HTTP handlers for conversion tools and analysis in `src/http/handler/convert.go`.
- Added unit tests for conversion handlers in `src/http/handler/convert_test.go`.
- Developed TypeScript API client for conversion in `src/http/ui/src/api/convert.ts`.
- Built UI component for importing tools and displaying conversion results in `src/http/ui/src/components/sets/ImportTool.tsx`.
2026-08-08 22:16:36 +02:00
Daniel Lavrushin
c15b2541e8 test: add TestRecordDestAliveSurvivesNilCaches to validate behavior with nil caches 2026-08-08 19:51:33 +02:00
Daniel Lavrushin
f91fd4288e refactor: improve clarity in IP block detection and health settings descriptions 2026-08-08 19:51:33 +02:00
Daniel Lavrushin
7be08fbe76 feat: add IP Health settings to manage unreachable address retest intervals 2026-08-08 19:51:33 +02:00
Daniel Lavrushin
47bd723a0b refactor: update healDNSResponse to include overTCP parameter and adjust response size handling 2026-08-08 19:51:33 +02:00
Daniel Lavrushin
656c752ceb feat: add HealDNS feature to improve DNS response handling for unreachable addresses 2026-08-08 19:51:33 +02:00
Daniel Lavrushin
100216cc20 refactor: rename RecordAlive to RecordResponse and add RecordHandshake for better clarity in IP state management 2026-08-08 19:51:33 +02:00
Daniel Lavrushin
5c1feffa66 Refactor IP health management: replace goodIPStore with iphealth.Tracker and KnownGood
- Removed goodIPStore and its associated tests, replacing it with iphealth.Tracker and KnownGood for better IP health tracking.
- Updated runtimeState to use iphealth.Tracker and iphealth.KnownGood.
- Modified recordDestAlive to use the new Remember method from KnownGood.
- Refactored tests to accommodate the new IP health management structure.
- Introduced new leak tests for iphealth package.
2026-08-08 19:51:33 +02:00