commit ba15058f7f23232f2590c859b084013505ccd52b Author: Ixniy Evonniy Date: Tue Jun 30 20:20:50 2026 +0300 init diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md new file mode 100644 index 0000000..b5c6ab7 --- /dev/null +++ b/.agents/AGENTS.md @@ -0,0 +1,39 @@ +# Jai Developer Agent Guidelines + +These guidelines apply to any agent working with the Jai programming language. + +## 1. Syntax & Core Idioms +- **Declarations**: Use `:=` for type inference, `: Type =` for explicit types, and `::` for compile-time constants (functions, structs, constants). +- **Procedures**: Declare procedures as `name :: (params) -> return_type { ... }`. Use `#expand` for macros that compile into the caller's scope and access caller variables using backticks (e.g., `` `x ``). +- **Memory Management**: Jai does not have RAII or garbage collection. Memory is managed manually, typically using `defer` to clean up resources right after allocation: + ```jai + data := alloc(size); + defer free(data); + ``` +- **Context Allocators**: Jai uses an implicit `context` parameter containing the current allocator (`context.allocator`). + - Use `context.allocator = temp_allocator;` for temporary/arena allocations that don't need manual freeing (cleared at the end of the frame/loop iteration via `reset_temporary_storage()`). + - When writing reusable libraries or procedures, accept an optional allocator parameter or use `context.allocator` by default. + +## 2. Standard Libraries & Imports +- **Anonymous Imports**: Use `#import "Basic";` anonymously to bring standard utilities like `print`, `alloc`, `free`, `tprint` directly into the scope. +- **Named Imports**: Use named imports `String :: #import "String";` to namespace helper libraries, which keeps the scope clean. Note that operator overloads do not automatically propagate through namespaces. +- **No Package Manager**: Since Jai does not have a package manager, vendor any external libraries directly into the project's `modules/` folder or implement them yourself. + +## 3. Platform Bindings & Win32 API +- **Windows Bindings**: The standard `Windows` module (`#import "Windows";`) provides native bindings to Win32 APIs. +- **Wide Strings**: Many Windows APIs require wide UTF-16 strings (e.g., `LPCWSTR`). Use helper utilities to convert Jai UTF-8 strings (`string`) to UTF-16 wide strings when calling Windows APIs (e.g. using `utf8_to_wide` or similar functions in the runtime or writing a custom converter using `MultiByteToWideChar`). +- **Callback Conventions**: When defining callbacks for Win32 API (such as Window Procedures or Thread Procedures), you must mark the procedure with `#c_call` calling convention and usually `#no_context` to prevent context mismatches when called from OS threads: + ```jai + window_proc :: (hwnd: HWND, msg: u32, wparam: WPARAM, lparam: LPARAM) -> LRESULT #c_call { + // If context is needed inside the callback, re-push it: + ctx: Context; // or get from global/user data + push_context ctx { + // Jai code here + } + } + ``` + +## 4. Code Quality & Compilation +- **No Compiler Warnings**: Always ensure the code compiles without warnings or errors. +- **Compile-Time Execution**: Utilize `#run` blocks to execute code at compile-time for code generation, building lookups, or validating configurations. +- **Linting & Safety**: Avoid using uninitialized variables unless performance-critical (explicitly mark as `---` if needed). diff --git a/.agents/skills.json b/.agents/skills.json new file mode 100644 index 0000000..9721349 --- /dev/null +++ b/.agents/skills.json @@ -0,0 +1,10 @@ +{ + "entries": [ + { + "path": "C:/Sync/Arc/Projects/Jai" + }, + { + "path": "C:/Sync/Arc/Projects/Jai/jai-language-skill" + } + ] +} diff --git a/.build/.added_strings_w2.jai b/.build/.added_strings_w2.jai new file mode 100644 index 0000000..6095f44 --- /dev/null +++ b/.build/.added_strings_w2.jai @@ -0,0 +1,6 @@ +// Workspace: Target Program + +// +// String added via add_build_string() from C:/Sync/Arc/Projects/Jai/jails/Jails/bin/metaprogram/jails_diagnostics.jai:45. +// +JAILS_DIAGNOSTICS_BUILD :: true; diff --git a/.build/main.exp b/.build/main.exp new file mode 100644 index 0000000..dcfe82b Binary files /dev/null and b/.build/main.exp differ diff --git a/.build/main.lib b/.build/main.lib new file mode 100644 index 0000000..c9b3639 Binary files /dev/null and b/.build/main.lib differ diff --git a/.build/main_0_w2.obj b/.build/main_0_w2.obj new file mode 100644 index 0000000..fd26328 Binary files /dev/null and b/.build/main_0_w2.obj differ diff --git a/.build/main_1_w2.obj b/.build/main_1_w2.obj new file mode 100644 index 0000000..e36a7f9 Binary files /dev/null and b/.build/main_1_w2.obj differ diff --git a/.build/main_2_w2.obj b/.build/main_2_w2.obj new file mode 100644 index 0000000..2f2e8ee Binary files /dev/null and b/.build/main_2_w2.obj differ diff --git a/.build/main_3_w2.obj b/.build/main_3_w2.obj new file mode 100644 index 0000000..5565712 Binary files /dev/null and b/.build/main_3_w2.obj differ diff --git a/.build/singbox_tray.exp b/.build/singbox_tray.exp new file mode 100644 index 0000000..1e8deb5 Binary files /dev/null and b/.build/singbox_tray.exp differ diff --git a/.build/singbox_tray.lib b/.build/singbox_tray.lib new file mode 100644 index 0000000..ea5c75e Binary files /dev/null and b/.build/singbox_tray.lib differ diff --git a/.build/singbox_tray_0_w3.obj b/.build/singbox_tray_0_w3.obj new file mode 100644 index 0000000..7f9dd15 Binary files /dev/null and b/.build/singbox_tray_0_w3.obj differ diff --git a/.build/singbox_tray_1_w3.obj b/.build/singbox_tray_1_w3.obj new file mode 100644 index 0000000..34d7b11 Binary files /dev/null and b/.build/singbox_tray_1_w3.obj differ diff --git a/.build/singbox_tray_2_w3.obj b/.build/singbox_tray_2_w3.obj new file mode 100644 index 0000000..f2f5ec5 Binary files /dev/null and b/.build/singbox_tray_2_w3.obj differ diff --git a/.build/singbox_tray_3_w3.obj b/.build/singbox_tray_3_w3.obj new file mode 100644 index 0000000..6609c8d Binary files /dev/null and b/.build/singbox_tray_3_w3.obj differ diff --git a/.build/test_dialog.exp b/.build/test_dialog.exp new file mode 100644 index 0000000..0f4ca49 Binary files /dev/null and b/.build/test_dialog.exp differ diff --git a/.build/test_dialog.lib b/.build/test_dialog.lib new file mode 100644 index 0000000..dbbd0c2 Binary files /dev/null and b/.build/test_dialog.lib differ diff --git a/.build/test_dialog_0_w2.obj b/.build/test_dialog_0_w2.obj new file mode 100644 index 0000000..5656def Binary files /dev/null and b/.build/test_dialog_0_w2.obj differ diff --git a/.build/test_dialog_1_w2.obj b/.build/test_dialog_1_w2.obj new file mode 100644 index 0000000..bce87c9 Binary files /dev/null and b/.build/test_dialog_1_w2.obj differ diff --git a/.build/test_dialog_2_w2.obj b/.build/test_dialog_2_w2.obj new file mode 100644 index 0000000..9525844 Binary files /dev/null and b/.build/test_dialog_2_w2.obj differ diff --git a/.build/test_dialog_3_w2.obj b/.build/test_dialog_3_w2.obj new file mode 100644 index 0000000..67cbfc5 Binary files /dev/null and b/.build/test_dialog_3_w2.obj differ diff --git a/.build/test_download.exp b/.build/test_download.exp new file mode 100644 index 0000000..bf3fe4a Binary files /dev/null and b/.build/test_download.exp differ diff --git a/.build/test_download.lib b/.build/test_download.lib new file mode 100644 index 0000000..669e661 Binary files /dev/null and b/.build/test_download.lib differ diff --git a/.build/test_download_0_w2.obj b/.build/test_download_0_w2.obj new file mode 100644 index 0000000..7327938 Binary files /dev/null and b/.build/test_download_0_w2.obj differ diff --git a/.build/test_download_1_w2.obj b/.build/test_download_1_w2.obj new file mode 100644 index 0000000..86124ad Binary files /dev/null and b/.build/test_download_1_w2.obj differ diff --git a/.build/test_download_2_w2.obj b/.build/test_download_2_w2.obj new file mode 100644 index 0000000..e67aab9 Binary files /dev/null and b/.build/test_download_2_w2.obj differ diff --git a/.build/test_download_3_w2.obj b/.build/test_download_3_w2.obj new file mode 100644 index 0000000..b5c70b1 Binary files /dev/null and b/.build/test_download_3_w2.obj differ diff --git a/.build/test_file.exp b/.build/test_file.exp new file mode 100644 index 0000000..a95e4ab Binary files /dev/null and b/.build/test_file.exp differ diff --git a/.build/test_file.lib b/.build/test_file.lib new file mode 100644 index 0000000..b2e56f6 Binary files /dev/null and b/.build/test_file.lib differ diff --git a/.build/test_file_0_w2.obj b/.build/test_file_0_w2.obj new file mode 100644 index 0000000..6aee29d Binary files /dev/null and b/.build/test_file_0_w2.obj differ diff --git a/.build/test_file_1_w2.obj b/.build/test_file_1_w2.obj new file mode 100644 index 0000000..ee650db Binary files /dev/null and b/.build/test_file_1_w2.obj differ diff --git a/.build/test_file_2_w2.obj b/.build/test_file_2_w2.obj new file mode 100644 index 0000000..6103e3f Binary files /dev/null and b/.build/test_file_2_w2.obj differ diff --git a/.build/test_file_3_w2.obj b/.build/test_file_3_w2.obj new file mode 100644 index 0000000..1dca49a Binary files /dev/null and b/.build/test_file_3_w2.obj differ diff --git a/.build/test_import.exp b/.build/test_import.exp new file mode 100644 index 0000000..a5e093e Binary files /dev/null and b/.build/test_import.exp differ diff --git a/.build/test_import.lib b/.build/test_import.lib new file mode 100644 index 0000000..8830d54 Binary files /dev/null and b/.build/test_import.lib differ diff --git a/.build/test_import_0_w2.obj b/.build/test_import_0_w2.obj new file mode 100644 index 0000000..58eef5f Binary files /dev/null and b/.build/test_import_0_w2.obj differ diff --git a/.build/test_import_1_w2.obj b/.build/test_import_1_w2.obj new file mode 100644 index 0000000..13ab2a4 Binary files /dev/null and b/.build/test_import_1_w2.obj differ diff --git a/.build/test_import_2_w2.obj b/.build/test_import_2_w2.obj new file mode 100644 index 0000000..1c252c4 Binary files /dev/null and b/.build/test_import_2_w2.obj differ diff --git a/.build/test_import_3_w2.obj b/.build/test_import_3_w2.obj new file mode 100644 index 0000000..d9bec42 Binary files /dev/null and b/.build/test_import_3_w2.obj differ diff --git a/.build/test_json.exp b/.build/test_json.exp new file mode 100644 index 0000000..13abf6a Binary files /dev/null and b/.build/test_json.exp differ diff --git a/.build/test_json.lib b/.build/test_json.lib new file mode 100644 index 0000000..4c6bcc5 Binary files /dev/null and b/.build/test_json.lib differ diff --git a/.build/test_json_0_w2.obj b/.build/test_json_0_w2.obj new file mode 100644 index 0000000..0bafd70 Binary files /dev/null and b/.build/test_json_0_w2.obj differ diff --git a/.build/test_json_1_w2.obj b/.build/test_json_1_w2.obj new file mode 100644 index 0000000..307337f Binary files /dev/null and b/.build/test_json_1_w2.obj differ diff --git a/.build/test_json_2_w2.obj b/.build/test_json_2_w2.obj new file mode 100644 index 0000000..0948cc7 Binary files /dev/null and b/.build/test_json_2_w2.obj differ diff --git a/.build/test_json_3_w2.obj b/.build/test_json_3_w2.obj new file mode 100644 index 0000000..46664bc Binary files /dev/null and b/.build/test_json_3_w2.obj differ diff --git a/.build/test_shell.exp b/.build/test_shell.exp new file mode 100644 index 0000000..ec2bb04 Binary files /dev/null and b/.build/test_shell.exp differ diff --git a/.build/test_shell.lib b/.build/test_shell.lib new file mode 100644 index 0000000..572e81a Binary files /dev/null and b/.build/test_shell.lib differ diff --git a/.build/test_shell_0_w2.obj b/.build/test_shell_0_w2.obj new file mode 100644 index 0000000..16b9f6b Binary files /dev/null and b/.build/test_shell_0_w2.obj differ diff --git a/.build/test_shell_1_w2.obj b/.build/test_shell_1_w2.obj new file mode 100644 index 0000000..8648f48 Binary files /dev/null and b/.build/test_shell_1_w2.obj differ diff --git a/.build/test_shell_2_w2.obj b/.build/test_shell_2_w2.obj new file mode 100644 index 0000000..e5caef0 Binary files /dev/null and b/.build/test_shell_2_w2.obj differ diff --git a/.build/test_shell_3_w2.obj b/.build/test_shell_3_w2.obj new file mode 100644 index 0000000..ee588ad Binary files /dev/null and b/.build/test_shell_3_w2.obj differ diff --git a/.build/test_spawn.exp b/.build/test_spawn.exp new file mode 100644 index 0000000..8f484f4 Binary files /dev/null and b/.build/test_spawn.exp differ diff --git a/.build/test_spawn.lib b/.build/test_spawn.lib new file mode 100644 index 0000000..4095ef4 Binary files /dev/null and b/.build/test_spawn.lib differ diff --git a/.build/test_spawn_0_w2.obj b/.build/test_spawn_0_w2.obj new file mode 100644 index 0000000..7aa4e84 Binary files /dev/null and b/.build/test_spawn_0_w2.obj differ diff --git a/.build/test_spawn_1_w2.obj b/.build/test_spawn_1_w2.obj new file mode 100644 index 0000000..6821fcb Binary files /dev/null and b/.build/test_spawn_1_w2.obj differ diff --git a/.build/test_spawn_2_w2.obj b/.build/test_spawn_2_w2.obj new file mode 100644 index 0000000..6e3fb38 Binary files /dev/null and b/.build/test_spawn_2_w2.obj differ diff --git a/.build/test_spawn_3_w2.obj b/.build/test_spawn_3_w2.obj new file mode 100644 index 0000000..ed1f125 Binary files /dev/null and b/.build/test_spawn_3_w2.obj differ diff --git a/.build/test_spawn_hidden.exp b/.build/test_spawn_hidden.exp new file mode 100644 index 0000000..a689c94 Binary files /dev/null and b/.build/test_spawn_hidden.exp differ diff --git a/.build/test_spawn_hidden.lib b/.build/test_spawn_hidden.lib new file mode 100644 index 0000000..2621c33 Binary files /dev/null and b/.build/test_spawn_hidden.lib differ diff --git a/.build/test_spawn_hidden_0_w2.obj b/.build/test_spawn_hidden_0_w2.obj new file mode 100644 index 0000000..35f2644 Binary files /dev/null and b/.build/test_spawn_hidden_0_w2.obj differ diff --git a/.build/test_spawn_hidden_1_w2.obj b/.build/test_spawn_hidden_1_w2.obj new file mode 100644 index 0000000..cb8e2bf Binary files /dev/null and b/.build/test_spawn_hidden_1_w2.obj differ diff --git a/.build/test_spawn_hidden_2_w2.obj b/.build/test_spawn_hidden_2_w2.obj new file mode 100644 index 0000000..7c107e9 Binary files /dev/null and b/.build/test_spawn_hidden_2_w2.obj differ diff --git a/.build/test_spawn_hidden_3_w2.obj b/.build/test_spawn_hidden_3_w2.obj new file mode 100644 index 0000000..257837a Binary files /dev/null and b/.build/test_spawn_hidden_3_w2.obj differ diff --git a/.build/test_trim.exp b/.build/test_trim.exp new file mode 100644 index 0000000..4ae14b3 Binary files /dev/null and b/.build/test_trim.exp differ diff --git a/.build/test_trim.lib b/.build/test_trim.lib new file mode 100644 index 0000000..c4063ec Binary files /dev/null and b/.build/test_trim.lib differ diff --git a/.build/test_trim_0_w2.obj b/.build/test_trim_0_w2.obj new file mode 100644 index 0000000..8f1bb56 Binary files /dev/null and b/.build/test_trim_0_w2.obj differ diff --git a/.build/test_trim_1_w2.obj b/.build/test_trim_1_w2.obj new file mode 100644 index 0000000..1745c22 Binary files /dev/null and b/.build/test_trim_1_w2.obj differ diff --git a/.build/test_trim_2_w2.obj b/.build/test_trim_2_w2.obj new file mode 100644 index 0000000..94e5677 Binary files /dev/null and b/.build/test_trim_2_w2.obj differ diff --git a/.build/test_trim_3_w2.obj b/.build/test_trim_3_w2.obj new file mode 100644 index 0000000..95a1aab Binary files /dev/null and b/.build/test_trim_3_w2.obj differ diff --git a/.build/test_win32.exp b/.build/test_win32.exp new file mode 100644 index 0000000..d08f66f Binary files /dev/null and b/.build/test_win32.exp differ diff --git a/.build/test_win32.lib b/.build/test_win32.lib new file mode 100644 index 0000000..d1f9090 Binary files /dev/null and b/.build/test_win32.lib differ diff --git a/.build/test_win32_0_w2.obj b/.build/test_win32_0_w2.obj new file mode 100644 index 0000000..99c4b46 Binary files /dev/null and b/.build/test_win32_0_w2.obj differ diff --git a/.build/test_win32_1_w2.obj b/.build/test_win32_1_w2.obj new file mode 100644 index 0000000..fc17f89 Binary files /dev/null and b/.build/test_win32_1_w2.obj differ diff --git a/.build/test_win32_2_w2.obj b/.build/test_win32_2_w2.obj new file mode 100644 index 0000000..07f5761 Binary files /dev/null and b/.build/test_win32_2_w2.obj differ diff --git a/.build/test_win32_3_w2.obj b/.build/test_win32_3_w2.obj new file mode 100644 index 0000000..36c35dc Binary files /dev/null and b/.build/test_win32_3_w2.obj differ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..b5c6ab7 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,39 @@ +# Jai Developer Agent Guidelines + +These guidelines apply to any agent working with the Jai programming language. + +## 1. Syntax & Core Idioms +- **Declarations**: Use `:=` for type inference, `: Type =` for explicit types, and `::` for compile-time constants (functions, structs, constants). +- **Procedures**: Declare procedures as `name :: (params) -> return_type { ... }`. Use `#expand` for macros that compile into the caller's scope and access caller variables using backticks (e.g., `` `x ``). +- **Memory Management**: Jai does not have RAII or garbage collection. Memory is managed manually, typically using `defer` to clean up resources right after allocation: + ```jai + data := alloc(size); + defer free(data); + ``` +- **Context Allocators**: Jai uses an implicit `context` parameter containing the current allocator (`context.allocator`). + - Use `context.allocator = temp_allocator;` for temporary/arena allocations that don't need manual freeing (cleared at the end of the frame/loop iteration via `reset_temporary_storage()`). + - When writing reusable libraries or procedures, accept an optional allocator parameter or use `context.allocator` by default. + +## 2. Standard Libraries & Imports +- **Anonymous Imports**: Use `#import "Basic";` anonymously to bring standard utilities like `print`, `alloc`, `free`, `tprint` directly into the scope. +- **Named Imports**: Use named imports `String :: #import "String";` to namespace helper libraries, which keeps the scope clean. Note that operator overloads do not automatically propagate through namespaces. +- **No Package Manager**: Since Jai does not have a package manager, vendor any external libraries directly into the project's `modules/` folder or implement them yourself. + +## 3. Platform Bindings & Win32 API +- **Windows Bindings**: The standard `Windows` module (`#import "Windows";`) provides native bindings to Win32 APIs. +- **Wide Strings**: Many Windows APIs require wide UTF-16 strings (e.g., `LPCWSTR`). Use helper utilities to convert Jai UTF-8 strings (`string`) to UTF-16 wide strings when calling Windows APIs (e.g. using `utf8_to_wide` or similar functions in the runtime or writing a custom converter using `MultiByteToWideChar`). +- **Callback Conventions**: When defining callbacks for Win32 API (such as Window Procedures or Thread Procedures), you must mark the procedure with `#c_call` calling convention and usually `#no_context` to prevent context mismatches when called from OS threads: + ```jai + window_proc :: (hwnd: HWND, msg: u32, wparam: WPARAM, lparam: LPARAM) -> LRESULT #c_call { + // If context is needed inside the callback, re-push it: + ctx: Context; // or get from global/user data + push_context ctx { + // Jai code here + } + } + ``` + +## 4. Code Quality & Compilation +- **No Compiler Warnings**: Always ensure the code compiles without warnings or errors. +- **Compile-Time Execution**: Utilize `#run` blocks to execute code at compile-time for code generation, building lookups, or validating configurations. +- **Linting & Safety**: Avoid using uninitialized variables unless performance-critical (explicitly mark as `---` if needed). diff --git a/build.jai b/build.jai new file mode 100644 index 0000000..f7bbd97 --- /dev/null +++ b/build.jai @@ -0,0 +1,63 @@ +#import "Basic"; +#import "Compiler"; +#import "File"; +#import "File_Utilities"; + +#run { + // Disable output for default workspace immediately + build_options: Build_Options_During_Compile; + build_options.do_output = false; + set_build_options_dc(build_options); + + w := compiler_create_workspace("Target Workspace"); + if !w return; + + options := get_build_options(w); + options.output_executable_name = "singbox_tray"; + + // Copy libcurl.dll from compiler modules to output directory + for options.import_path { + dll_path := tprint("%Curl/windows/lib/libcurl.dll", it); + if file_exists(dll_path) { + dest_path := "libcurl.dll"; + if options.output_path { + dest_path = tprint("%/libcurl.dll", options.output_path); + } + if copy_file(dll_path, dest_path) { + print("Build: Successfully copied libcurl.dll to %\n", dest_path); + } else { + print("Build Warning: Could not copy libcurl.dll to %\n", dest_path); + } + break; + } + } + + // options.additional_linker_arguments is a slice, so copy it to a dynamic array, append, and assign back + new_args: [..] string; + new_args.allocator = temp; + + for options.additional_linker_arguments { + array_add(*new_args, it); + } + + // Set subsystem to Windows so no console window is created/shown. + array_add(*new_args, "/SUBSYSTEM:WINDOWS"); + + // Route MSVC Windows subsystem entry point to the standard main function. + array_add(*new_args, "/ENTRY:mainCRTStartup"); + + options.additional_linker_arguments = new_args; + + set_build_options(options, w); + + compiler_begin_intercept(w); + add_build_file("main.jai", w); + + while true { + message := compiler_wait_for_message(); + if !message break; + if message.workspace != w continue; + if message.kind == .COMPLETE break; + } + compiler_end_intercept(w); +} diff --git a/cache.db b/cache.db new file mode 100644 index 0000000..e7e3fcb Binary files /dev/null and b/cache.db differ diff --git a/config.json b/config.json new file mode 100644 index 0000000..b951111 --- /dev/null +++ b/config.json @@ -0,0 +1,318 @@ +{ + "log": { + "level": "info" + }, + "dns": { + "final": "dns-remote", + "servers": [ + { + "type": "udp", + "tag": "dns-remote", + "server": "1.1.1.1", + "detour": "auto-balance" + }, + { + "type": "local", + "tag": "dns-direct" + }, + { + "type": "local", + "tag": "dns-local" + } + ], + "rules": [ + { + "action": "predefined", + "answer": "localhost. IN A 127.0.0.1", + "domain": "localhost", + "query_type": "A", + "rcode": "NOERROR" + }, + { + "action": "predefined", + "answer": "localhost. IN AAAA ::1", + "domain": "localhost", + "query_type": "AAAA", + "rcode": "NOERROR" + }, + { "server": "dns-direct", "rule_set": "ru-direct" } + ] + }, + + "inbounds": [ + { + "type": "mixed", + "listen": "127.0.0.1", + "listen_port": 20122 + } + ], + "outbounds": [ + { + "type": "vless", + "tag": "FI-V", + "server": "195.26.230.220", + "server_port": 443, + "uuid": "f58314c6-33ac-4492-b311-3f04d41fc435", + "flow": "xtls-rprx-vision", + "packet_encoding": "xudp", + "tls": { + "enabled": true, + "server_name": "www.microsoft.com", + "utls": { + "enabled": true, + "fingerprint": "chrome" + }, + "reality": { + "enabled": true, + "public_key": "QpDCkVGGc1Dxwm9pqHdY9rz-hmwAxnVRWm6dz_cIykU", + "short_id": "8b9b3af07367e439" + }, + "record_fragment": true + } + }, + { + "type": "anytls", + "tag": "FI-A", + "server": "195.26.230.220", + "server_port": 4437, + "password": "WmN1QdlbygEyAyaznyI4nA==", + "idle_session_check_interval": "30s", + "idle_session_timeout": "30s", + "min_idle_session": 5, + "tls": { + "enabled": true, + "server_name": "subscribe.shusharr.com", + "insecure": true + } + }, + { + "type": "hysteria2", + "tag": "FI-H", + "server": "195.26.230.220", + "server_port": 443, + "password": "220e3faf7e67526e85320bdcae790778fafc965eda80dff0", + "obfs": { + "type": "salamander", + "password": "afed8fcd3653c5914559c8a2b0d8a0c559bf8e6d2e01f6ea" + }, + "tls": { + "enabled": true, + "server_name": "subscribe.shusharr.com", + "alpn": ["h3"] + } + }, + { + "type": "vless", + "tag": "NL-V", + "server": "31.57.44.110", + "server_port": 443, + "uuid": "f58314c6-33ac-4492-b311-3f04d41fc435", + "flow": "xtls-rprx-vision", + "packet_encoding": "xudp", + "tls": { + "enabled": true, + "server_name": "www.microsoft.com", + "utls": { + "enabled": true, + "fingerprint": "chrome" + }, + "reality": { + "enabled": true, + "public_key": "_8feLPRHxFuMPjjvQMNrPWOIoHsdbzC7QFW10avG_Hk", + "short_id": "8b9b3af07367e439" + }, + "record_fragment": true + } + }, + { + "type": "anytls", + "tag": "NL-A", + "server": "31.57.44.110", + "server_port": 8443, + "password": "WmN1QdlbygEyAyaznyI4nA==", + "idle_session_check_interval": "30s", + "idle_session_timeout": "30s", + "min_idle_session": 5, + "tls": { + "enabled": true, + "server_name": "share.shusharr.com", + "insecure": true + } + }, + { + "type": "hysteria2", + "tag": "NL-H", + "server": "31.57.44.110", + "server_port": 443, + "password": "220e3faf7e67526e85320bdcae790778fafc965eda80dff0", + "obfs": { + "type": "salamander", + "password": "4b2b71b824ff76ffaf671427b1c5f74047bb53f37a45cdb2" + }, + "tls": { + "enabled": true, + "server_name": "share.shusharr.com", + "alpn": ["h3"] + } + }, + { + "type": "vless", + "tag": "IS-V", + "server": "5.8.19.154", + "server_port": 443, + "uuid": "f58314c6-33ac-4492-b311-3f04d41fc435", + "flow": "xtls-rprx-vision", + "packet_encoding": "xudp", + "tls": { + "enabled": true, + "server_name": "www.microsoft.com", + "utls": { + "enabled": true, + "fingerprint": "chrome" + }, + "reality": { + "enabled": true, + "public_key": "vFcUCfrWkfdCaAcgJfUf8RjoCcBVgjKB9gucGaSCvjI", + "short_id": "8b9b3af07367e439" + }, + "record_fragment": true + } + }, + { + "type": "anytls", + "tag": "IS-A", + "server": "5.8.19.154", + "server_port": 6447, + "password": "WmN1QdlbygEyAyaznyI4nA==", + "idle_session_check_interval": "30s", + "idle_session_timeout": "30s", + "min_idle_session": 5, + "tls": { + "enabled": true, + "server_name": "blog.shusharr.com", + "insecure": true + } + }, + { + "type": "hysteria2", + "tag": "IS-H", + "server": "5.8.19.154", + "server_port": 443, + "password": "220e3faf7e67526e85320bdcae790778fafc965eda80dff0", + "obfs": { + "type": "salamander", + "password": "1eca1ab5329bc318ab14ad00d0fd2cdc44e941bde497c176" + }, + "tls": { + "enabled": true, + "server_name": "blog.shusharr.com", + "alpn": ["h3"] + } + }, + { + "type": "vless", + "tag": "CZ-V", + "server": "193.93.194.125", + "server_port": 443, + "uuid": "f58314c6-33ac-4492-b311-3f04d41fc435", + "flow": "xtls-rprx-vision", + "packet_encoding": "xudp", + "tls": { + "enabled": true, + "server_name": "www.microsoft.com", + "utls": { + "enabled": true, + "fingerprint": "chrome" + }, + "reality": { + "enabled": true, + "public_key": "codr4s41E7qUFIcA3yNqOQkvrnPmfZoXg4OiBn7-C0A", + "short_id": "8b9b3af07367e439" + }, + "record_fragment": true + } + }, + { + "type": "anytls", + "tag": "CZ-A", + "server": "193.93.194.125", + "server_port": 4436, + "password": "WmN1QdlbygEyAyaznyI4nA==", + "idle_session_check_interval": "30s", + "idle_session_timeout": "30s", + "min_idle_session": 5, + "tls": { + "enabled": true, + "server_name": "media.shusharr.com", + "insecure": true + } + }, + { + "type": "hysteria2", + "tag": "CZ-H", + "server": "193.93.194.125", + "server_port": 443, + "password": "220e3faf7e67526e85320bdcae790778fafc965eda80dff0", + "obfs": { + "type": "salamander", + "password": "e828c7117a521efce5197812f92ba16f0569ffec586b560f" + }, + "tls": { + "enabled": true, + "server_name": "media.shusharr.com", + "alpn": ["h3"] + } + }, + { + "type": "urltest", + "tag": "auto-balance", + "outbounds": [ + "FI-V", + "FI-A", + "FI-H", + "NL-V", + "NL-A", + "NL-H", + "IS-V", + "IS-A", + "IS-H", + "CZ-V", + "CZ-A", + "CZ-H" + ], + "url": "https://cp.cloudflare.com/generate_204", + "interval": "1m", + "tolerance": 50 + }, + { + "type": "direct", + "tag": "direct" + }, + { + "type": "block", + "tag": "block" + } + ], + "route": { + "final": "auto-balance", + "find_process": true, + "auto_detect_interface": true, + "default_domain_resolver": "dns-direct", + "rule_set": [ + { + "type": "inline", + "tag": "ru-direct", + "rules": [{ "domain_suffix": ["00.img.avito.st","01.img.avito.st","02.img.avito.st","03.img.avito.st","04.img.avito.st","05.img.avito.st","06.img.avito.st","07.img.avito.st","08.img.avito.st","09.img.avito.st","10.img.avito.st","11.img.avito.st","12.img.avito.st","13.img.avito.st","14.img.avito.st","15.img.avito.st","16.img.avito.st","17.img.avito.st","18.img.avito.st","19.img.avito.st","1l-api.mail.ru","1l-go.mail.ru","1l-hit.mail.ru","1l-s2s.mail.ru","1l-view.mail.ru","1l.mail.ru","1link.mail.ru","20.img.avito.st","2018.mail.ru","2019.mail.ru","2020.mail.ru","2021.mail.ru","21.img.avito.st","22.img.avito.st","23.img.avito.st","23feb.mail.ru","24.img.avito.st","25.img.avito.st","26.img.avito.st","27.img.avito.st","28.img.avito.st","29.img.avito.st","2gis.com","2gis.ru","30.img.avito.st","300.ya.ru","31.img.avito.st","32.img.avito.st","33.img.avito.st","34.img.avito.st","3475482542.mc.yandex.ru","35.img.avito.st","36.img.avito.st","37.img.avito.st","38.img.avito.st","39.img.avito.st","40.img.avito.st","41.img.avito.st","42.img.avito.st","43.img.avito.st","44.img.avito.st","45.img.avito.st","46.img.avito.st","47.img.avito.st","48.img.avito.st","49.img.avito.st","50.img.avito.st","51.img.avito.st","52.img.avito.st","53.img.avito.st","54.img.avito.st","55.img.avito.st","56.img.avito.st","57.img.avito.st","58.img.avito.st","59.img.avito.st","60.img.avito.st","61.img.avito.st","62.img.avito.st","63.img.avito.st","64.img.avito.st","65.img.avito.st","66.img.avito.st","67.img.avito.st","68.img.avito.st","69.img.avito.st","70.img.avito.st","71.img.avito.st","72.img.avito.st","73.img.avito.st","74.img.avito.st","742231.ms.ok.ru","75.img.avito.st","76.img.avito.st","77.img.avito.st","78.img.avito.st","79.img.avito.st","80.img.avito.st","81.img.avito.st","82.img.avito.st","83.img.avito.st","84.img.avito.st","85.img.avito.st","86.img.avito.st","87.img.avito.st","88.img.avito.st","89.img.avito.st","8mar.mail.ru","8march.mail.ru","90.img.avito.st","91.img.avito.st","92.img.avito.st","93.img.avito.st","94.img.avito.st","95.img.avito.st","96.img.avito.st","97.img.avito.st","98.img.avito.st","99.img.avito.st","9may.mail.ru","a.auth-nsdi.ru","a.res-nsdi.ru","a.wb.ru","aa.mail.ru","adm.digital.gov.ru","adm.mp.rzd.ru","admin.cs7777.vk.ru","admin.tau.vk.ru","ads.vk.ru","adv.ozon.ru","afisha.mail.ru","agent.mail.ru","akashi.vk-portal.net","alfa-mobile.alfabank.ru","alfabank.ru","alpha3.minigames.mail.ru","alpha4.minigames.mail.ru","amigo.mail.ru","ams2-cdn.2gis.com","an.yandex.ru","analytics.predict.mail.ru","analytics.vk.ru","answer.mail.ru","answers.mail.ru","api-maps.yandex.ru","api.2gis.ru","api.avito.ru","api.browser.yandex.com","api.browser.yandex.ru","api.cs7777.vk.ru","api.dobro.ru","api.events.plus.yandex.net","api.evotor.ru","api.hrlink.ru","api.lizaalert.org","api.max.ru","api.ok.ru","api.photo.2gis.com","api.plus.kinopoisk.ru","api.predict.mail.ru","api.reviews.2gis.com","api.roskachestvo.gov.ru","api.s3.yandex.net","api.tau.vk.ru","api.uxfeedback.yandex.net","api.vk.ru","app.hrlink.ru","apps.research.mail.ru","authdl.mail.ru","auto.mail.ru","auto.ru","autodiscover.corp.mail.ru","autodiscover.ord.ozon.ru","av.mail.ru","avatars.mds.yandex.com","avatars.mds.yandex.net","avito.ru","avito.st","aw.mail.ru","away.cs7777.vk.ru","away.tau.vk.ru","azt.mail.ru","b.auth-nsdi.ru","b.res-nsdi.ru","bank.ozon.ru","banners-website.wildberries.ru","bb.mail.ru","bd.mail.ru","beko.dom.mail.ru","bender.mail.ru","beta.mail.ru","bfds.sberbank.ru","bitva.mail.ru","biz.mail.ru","blackfriday.mail.ru","blog.mail.ru","bot.gosuslugi.ru","botapi.max.ru","bratva-mr.mail.ru","bro-bg-store.s3.yandex.com","bro-bg-store.s3.yandex.net","bro-bg-store.s3.yandex.ru","brontp-pre.yandex.ru","browser.mail.ru","browser.yandex.com","browser.yandex.ru","business.vk.ru","cabinet.evotor.ru","calendar.mail.ru","capsula.mail.ru","cargo.rzd.ru","cars.mail.ru","catalog.api.2gis.com","cdn.connect.mail.ru","cdn.lemanapro.ru","cdn.newyear.mail.ru","cdn.s3.yandex.net","cdn.tbank.ru","cdn.yandex.ru","cdnrhkgfkkpupuotntfj.svc.cdn.yandex.net","cf.mail.ru","chat-prod.wildberries.ru","chat3.vtb.ru","cloud.cdn.yandex.com","cloud.cdn.yandex.net","cloud.cdn.yandex.ru","cloud.mail.ru","cloud.vk.com","cloud.vk.ru","cloudcdn-ams19.cdn.yandex.net","cloudcdn-m9-10.cdn.yandex.net","cloudcdn-m9-12.cdn.yandex.net","cloudcdn-m9-13.cdn.yandex.net","cloudcdn-m9-14.cdn.yandex.net","cloudcdn-m9-15.cdn.yandex.net","cloudcdn-m9-2.cdn.yandex.net","cloudcdn-m9-3.cdn.yandex.net","cloudcdn-m9-4.cdn.yandex.net","cloudcdn-m9-5.cdn.yandex.net","cloudcdn-m9-6.cdn.yandex.net","cloudcdn-m9-7.cdn.yandex.net","cloudcdn-m9-9.cdn.yandex.net","cms-res-web.online.sberbank.ru","cobma.mail.ru","cobmo.mail.ru","cobrowsing.tbank.ru","code.mail.ru","codefest.mail.ru","cog.mail.ru","collections.yandex.com","collections.yandex.ru","comba.mail.ru","combu.mail.ru","commba.mail.ru","company.rzd.ru","compute.mail.ru","connect.cs7777.vk.ru","contacts.rzd.ru","contract.gosuslugi.ru","corp.mail.ru","cpg.money.mail.ru","crazypanda.mail.ru","crowdtest.payment-widget-smarttv.plus.tst.kinopoisk.ru","crowdtest.payment-widget.plus.tst.kinopoisk.ru","cs.avito.ru","cs7777.vk.ru","csp.yandex.net","ctlog.mail.ru","ctlog2023.mail.ru","ctlog2024.mail.ru","cto.mail.ru","cups.mail.ru","d-assets.2gis.ru","da-preprod.biz.mail.ru","da.biz.mail.ru","data.amigo.mail.ru","dating.ok.ru","deti.mail.ru","dev.cs7777.vk.ru","dev.max.ru","dev.tau.vk.ru","dev1.mail.ru","dev2.mail.ru","dev3.mail.ru","digital.gov.ru","disk.2gis.com","disk.rzd.ru","dk.mail.ru","dl.mail.ru","dl.marusia.mail.ru","dmp.dmpkit.lemanapro.ru","dn.mail.ru","dnd.wb.ru","dobro.mail.ru","dobro.ru","doc.mail.ru","dom.mail.ru","download.max.ru","dr.yandex.net","dr2.yandex.net","dragonpals.mail.ru","ds.mail.ru","duck.mail.ru","duma.gov.ru","dzen.ru","e.mail.ru","edu.sirius.online","education.mail.ru","egress.yandex.net","eh.vk.com","ekmp-a-51.rzd.ru","enterprise.api-maps.yandex.ru","epp.genproc.gov.ru","esa-res.online.sberbank.ru","esc.predict.mail.ru","esia.gosuslugi.ru","et.mail.ru","evotor.ru","expert.vk.ru","external-api.mediabilling.kinopoisk.ru","external-api.plus.kinopoisk.ru","favicon.yandex.com","favicon.yandex.net","favicon.yandex.ru","favorites.api.2gis.com","fe.mail.ru","filekeeper-vod.2gis.com","finance.mail.ru","finance.wb.ru","five.predict.mail.ru","foto.mail.ru","frontend.vh.yandex.ru","fw.wb.ru","games-bamboo.mail.ru","games-fisheye.mail.ru","games.mail.ru","gazeta.ru","genesis.mail.ru","geo-apart.predict.mail.ru","gibdd.mail.ru","go.mail.ru","golos.mail.ru","gosuslugi.ru","gosweb.gosuslugi.ru","government.ru","goya.rutube.ru","gpb.finance.mail.ru","graphql-web.kinopoisk.ru","graphql.kinopoisk.ru","gu-st.ru","guns.mail.ru","hd.kinopoisk.ru","health.mail.ru","help.max.ru","help.mcs.mail.ru","hi-tech.mail.ru","horo.mail.ru","hrc.tbank.ru","hrlink.ru","hs.mail.ru","http-check-headers.yandex.ru","i.max.ru","i0.photo.2gis.com","i1.photo.2gis.com","i2.photo.2gis.com","i3.photo.2gis.com","i4.photo.2gis.com","i5.photo.2gis.com","i6.photo.2gis.com","i7.photo.2gis.com","i8.photo.2gis.com","i9.photo.2gis.com","id.cs7777.vk.ru","id.sber.ru","id.tau.vk.ru","id.tbank.ru","id.vk.ru","imgproxy.cdn-tinkoff.ru","imperia.mail.ru","informer.yandex.ru","infra.mail.ru","internet.mail.ru","invest.ozon.ru","ir.ozone.ru","it.mail.ru","izbirkom.ru","jam.api.2gis.com","jd.mail.ru","jitsi.wb.ru","journey.mail.ru","juggermobile.mail.ru","junior.mail.ru","keys.api.2gis.com","kicker.mail.ru","kiks.yandex.com","kiks.yandex.ru","kingdomrift.mail.ru","kino.mail.ru","knights.mail.ru","kobma.mail.ru","kobmo.mail.ru","komba.mail.ru","kombo.mail.ru","kombu.mail.ru","kommba.mail.ru","konflikt.mail.ru","kp.ru","kremlin.ru","kz.mcs.mail.ru","la.mail.ru","lady.mail.ru","land.dobro.ru","landing.mail.ru","le.tbank.ru","learning.ozon.ru","legal.max.ru","legenda.mail.ru","legendofheroes.mail.ru","lemanapro.ru","lenta.ru","link.max.ru","link.mp.rzd.ru","live.ok.ru","lizaalert.org","lk.gosuslugi.ru","loa.mail.ru","log.strm.yandex.ru","login.cs7777.vk.ru","login.tau.vk.ru","login.vk.com","login.vk.ru","lotro.mail.ru","love.mail.ru","m.47news.ru","m.avito.ru","m.cs7777.vk.ru","m.ok.ru","m.tau.vk.ru","m.vk.ru","m.vkvideo.cs7777.vk.ru","ma.kinopoisk.ru","mail.yandex.com","mail.yandex.ru","mailer.mail.ru","mailexpress.mail.ru","man.mail.ru","map.gosuslugi.ru","mapgl.2gis.com","mapi.learning.ozon.ru","maps.mail.ru","market.rzd.ru","marusia.mail.ru","max.ru","mc.yandex.com","mc.yandex.ru","mcs.mail.ru","me.cs7777.vk.ru","media-golos.mail.ru","media.mail.ru","mediafeeds.yandex.com","mediafeeds.yandex.ru","mediapro.mail.ru","merch-cpg.money.mail.ru","metrics.alfabank.ru","microapps.kinopoisk.ru","miniapp.internal.myteam.mail.ru","minigames.mail.ru","mking.mail.ru","mobfarm.mail.ru","money.mail.ru","moskva.taximaxim.ru","mosqa.mail.ru","mowar.mail.ru","mozilla.mail.ru","mp.rzd.ru","ms.cs7777.vk.ru","msk.t2.ru","multitest.ok.ru","music.vk.ru","my.mail.ru","my.rzd.ru","myteam.mail.ru","nebogame.mail.ru","net.mail.ru","neuro.translate.yandex.ru","new.mail.ru","news.mail.ru","newyear.mail.ru","newyear2018.mail.ru","nonstandard.sales.mail.ru","notes.mail.ru","novorossiya.gosuslugi.ru","oauth.cs7777.vk.ru","oauth.tau.vk.ru","oauth2.cs7777.vk.ru","octavius.mail.ru","ofd.ru","oneclick-payment.kinopoisk.ru","onf.ru","online.sberbank.ru","operator.mail.ru","ord.ozon.ru","ord.vk.ru","otvet.mail.ru","otveti.mail.ru","otvety.mail.ru","owa.ozon.ru","ozon.ru","panzar.mail.ru","park.mail.ru","partners.gosuslugi.ru","partners.lemanapro.ru","pay.mail.ru","pay.ozon.ru","payment-widget-smarttv.plus.kinopoisk.ru","payment-widget.kinopoisk.ru","payment-widget.plus.kinopoisk.ru","pernatsk.mail.ru","pets.mail.ru","pic.rutubelist.ru","pl-res.online.sberbank.ru","platform.ofd.ru","pms.mail.ru","pochta.ru","pochtabank.mail.ru","pogoda.mail.ru","pokerist.mail.ru","polis.mail.ru","pos.gosuslugi.ru","pp.mail.ru","pptest.userapi.com","predict.mail.ru","preview.rutube.ru","primeworld.mail.ru","privacy-cs.mail.ru","prodvizhenie.rzd.ru","ptd.predict.mail.ru","pubg.mail.ru","public-api.reviews.2gis.com","public.infra.mail.ru","pulse.mail.ru","pulse.mp.rzd.ru","push.vk.ru","pw.mail.ru","quantum.mail.ru","queuev4.vk.com","quiz.kinopoisk.ru","r.vk.ru","r0.mradx.net","rambler.ru","rate.mail.ru","rbc.ru","rebus.calls.mail.ru","rebus.octavius.mail.ru","receive-sentry.lmru.tech","reseach.mail.ru","rev.mail.ru","riot.mail.ru","rl.mail.ru","rm.mail.ru","roskachestvo.gov.ru","rs.mail.ru","rt.api.operator.mail.ru","rutube.ru","rzd.ru","s.vtb.ru","s0.bss.2gis.com","s1.bss.2gis.com","s3.babel.mail.ru","s3.mail.ru","s3.media-mobs.mail.ru","s3.t2.ru","s3.yandex.net","sales.mail.ru","sangels.mail.ru","sba.yandex.com","sba.yandex.net","sba.yandex.ru","sberbank.ru","sdk.money.mail.ru","secure-cloud.rzd.ru","secure.rzd.ru","securepay.ozon.ru","security.mail.ru","seller.ozon.ru","service.amigo.mail.ru","sfd.gosuslugi.ru","shadowbound.mail.ru","sntr.avito.ru","socdwar.mail.ru","sochi-park.predict.mail.ru","sochisirius.ru","souz.mail.ru","speller.yandex.net","sphere.mail.ru","sport.mail.ru","sso-app4.vtb.ru","sso-app5.vtb.ru","sso.auto.ru","sso.dzen.ru","sso.kinopoisk.ru","ssp.rutube.ru","st-im.kinopoisk.ru","st-ok.cdn-vk.ru","st.avito.ru","st.kinopoisk.ru","st.max.ru","st.okcdn.ru","st.ozone.ru","staging-analytics.predict.mail.ru","staging-esc.predict.mail.ru","staging-sochi-park.predict.mail.ru","stand.aoc.mail.ru","stand.bb.mail.ru","stand.cb.mail.ru","stand.la.mail.ru","stand.pw.mail.ru","startrek.mail.ru","static-mon.yandex.net","static.dl.mail.ru","static.lemanapro.ru","static.operator.mail.ru","static.rutube.ru","stats.avito.ru","stats.vk-portal.net","status.mcs.mail.ru","storage.ape.yandex.net","storage0.sirius.online","stormriders.mail.ru","stream.mail.ru","street-combats.mail.ru","strm-rad-23.strm.yandex.net","strm.yandex.net","strm.yandex.ru","styles.api.2gis.com","suggest.dzen.ru","suggest.sso.dzen.ru","sun1-13.userapi.com","sun1-14.userapi.com","sun1-15.userapi.com","sun1-16.userapi.com","sun1-17.userapi.com","sun1-18.userapi.com","sun1-19.userapi.com","sun1-20.userapi.com","sun1-21.userapi.com","sun1-22.userapi.com","sun1-23.userapi.com","sun1-24.userapi.com","sun1-25.userapi.com","sun1-26.userapi.com","sun1-27.userapi.com","sun1-28.userapi.com","sun1-29.userapi.com","sun1-30.userapi.com","sun1-47.userapi.com","sun1-54.userapi.com","sun1-55.userapi.com","sun1-56.userapi.com","sun1-57.userapi.com","sun1-83.userapi.com","sun1-84.userapi.com","sun1-85.userapi.com","sun1-86.userapi.com","sun1-87.userapi.com","sun1-88.userapi.com","sun1-89.userapi.com","sun1-90.userapi.com","sun1-91.userapi.com","sun1-92.userapi.com","sun1-93.userapi.com","sun1-94.userapi.com","sun1-95.userapi.com","sun1-96.userapi.com","sun1-97.userapi.com","sun1-98.userapi.com","sun1-99.userapi.com","sun2-10.userapi.com","sun2-11.userapi.com","sun2-12.userapi.com","sun2-13.userapi.com","sun2-14.userapi.com","sun2-15.userapi.com","sun2-16.userapi.com","sun2-17.userapi.com","sun2-18.userapi.com","sun2-19.userapi.com","sun2-20.userapi.com","sun2-21.userapi.com","sun2-22.userapi.com","sun3-10.userapi.com","sun3-11.userapi.com","sun3-12.userapi.com","sun3-13.userapi.com","sun3-16.userapi.com","sun3-17.userapi.com","sun3-18.userapi.com","sun3-19.userapi.com","sun3-20.userapi.com","sun3-21.userapi.com","sun3-22.userapi.com","sun3-23.userapi.com","sun3-24.userapi.com","sun4-10.userapi.com","sun4-11.userapi.com","sun4-12.userapi.com","sun4-15.userapi.com","sun4-16.userapi.com","sun4-17.userapi.com","sun4-18.userapi.com","sun4-19.userapi.com","sun4-20.userapi.com","sun4-21.userapi.com","sun4-22.userapi.com","sun6-20.userapi.com","sun6-21.userapi.com","sun6-22.userapi.com","sun6-23.userapi.com","sun7-12.userapi.com","sun7-13.userapi.com","sun7-14.userapi.com","sun7-15.userapi.com","sun7-16.userapi.com","sun7-17.userapi.com","sun7-18.userapi.com","sun7-19.userapi.com","sun7-20.userapi.com","sun7-21.userapi.com","sun7-22.userapi.com","sun7-23.userapi.com","sun7-24.userapi.com","sun9-10.userapi.com","sun9-11.userapi.com","sun9-12.userapi.com","sun9-13.userapi.com","sun9-14.userapi.com","sun9-15.userapi.com","sun9-16.userapi.com","sun9-17.userapi.com","sun9-18.userapi.com","sun9-19.userapi.com","sun9-20.userapi.com","sun9-21.userapi.com","sun9-22.userapi.com","sun9-23.userapi.com","sun9-24.userapi.com","sun9-25.userapi.com","sun9-26.userapi.com","sun9-27.userapi.com","sun9-28.userapi.com","sun9-29.userapi.com","sun9-30.userapi.com","sun9-31.userapi.com","sun9-32.userapi.com","sun9-33.userapi.com","sun9-34.userapi.com","sun9-35.userapi.com","sun9-36.userapi.com","sun9-37.userapi.com","sun9-38.userapi.com","sun9-39.userapi.com","sun9-40.userapi.com","sun9-41.userapi.com","sun9-42.userapi.com","sun9-43.userapi.com","sun9-44.userapi.com","sun9-45.userapi.com","sun9-46.userapi.com","sun9-47.userapi.com","sun9-48.userapi.com","sun9-49.userapi.com","sun9-50.userapi.com","sun9-51.userapi.com","sun9-52.userapi.com","sun9-53.userapi.com","sun9-54.userapi.com","sun9-55.userapi.com","sun9-56.userapi.com","sun9-57.userapi.com","sun9-58.userapi.com","sun9-59.userapi.com","sun9-60.userapi.com","sun9-61.userapi.com","sun9-62.userapi.com","sun9-63.userapi.com","sun9-64.userapi.com","sun9-65.userapi.com","sun9-66.userapi.com","sun9-67.userapi.com","sun9-68.userapi.com","sun9-69.userapi.com","sun9-70.userapi.com","sun9-71.userapi.com","sun9-72.userapi.com","sun9-73.userapi.com","sun9-74.userapi.com","sun9-75.userapi.com","sun9-76.userapi.com","sun9-77.userapi.com","sun9-78.userapi.com","sun9-79.userapi.com","sun9-80.userapi.com","sun9-81.userapi.com","sun9-82.userapi.com","sun9-83.userapi.com","sun9-84.userapi.com","sun9-85.userapi.com","sun9-86.userapi.com","sun9-87.userapi.com","sun9-88.userapi.com","support.biz.mail.ru","support.mcs.mail.ru","support.tech.mail.ru","surveys.yandex.ru","sync.browser.yandex.net","tamtam.ok.ru","target.vk.ru","team.mail.ru","team.rzd.ru","tech.mail.ru","tech.vk.ru","tera.mail.ru","ticket.rzd.ru","tickets.widget.kinopoisk.ru","tidaltrek.mail.ru","tile0.maps.2gis.com","tile1.maps.2gis.com","tile2.maps.2gis.com","tile3.maps.2gis.com","tile4.maps.2gis.com","tiles.maps.mail.ru","tmgame.mail.ru","todo.mail.ru","top-fwz1.mail.ru","touch.kinopoisk.ru","townwars.mail.ru","travel.rzd.ru","travel.yandex.ru","travel.yastatic.net","trk.mail.ru","ttbh.mail.ru","tutu.ru","tv.mail.ru","typewriter.mail.ru","u.corp.mail.ru","ufo.mail.ru","ui.cs7777.vk.ru","ui.tau.vk.ru","user-geo-data.wildberries.ru","uslugi.yandex.ru","uxfeedback-cdn.s3.yandex.net","uxfeedback.yandex.ru","vk-portal.net","vk.mail.ru","vkdoc.mail.ru","vkvideo.cs7777.vk.ru","voina.mail.ru","volunteer.lizaalert.org","voter.gosuslugi.ru","vt-1.ozone.ru","wap.yandex.com","wap.yandex.ru","warface.mail.ru","warheaven.mail.ru","wartune.mail.ru","wb.ru","web.max.ru","webagent.mail.ru","weblink.predict.mail.ru","webstore.mail.ru","welcome.mail.ru","welcome.rzd.ru","wf.mail.ru","wh-cpg.money.mail.ru","whatsnew.mail.ru","widgets.kinopoisk.ru","wok.mail.ru","wos.mail.ru","ws-api.oneme.ru","ws.seller.ozon.ru","www.avito.ru","www.avito.st","www.biz.mail.ru","www.cikrf.ru","www.gosuslugi.ru","www.kinopoisk.ru","www.mail.ru","www.mcs.mail.ru","www.ozon.ru","www.pubg.mail.ru","www.rzd.ru","www.sberbank.ru","www.t2.ru","www.vtb.ru","www.wf.mail.ru","xapi.ozon.ru","xn--80ajghhoc2aj1c8b.xn--p1ai","ya.ru","yabro-wbplugin.edadeal.yandex.ru","yabs.yandex.ru","yandex.com","yandex.net","yandex.ru","yastatic.net","zen-yabro-morda.mediascope.mc.yandex.ru","zen.yandex.com","zen.yandex.net","zen.yandex.ru"] }] + } + ], + "rules": [ + { + "inbound": ["mixed-in", "tun-in"], + "action": "sniff" + }, + { "protocol": "dns", "action": "hijack-dns" }, + { "action": "route", "outbound": "direct", "rule_set": "ru-direct" } + ] + }, + "experimental": { "cache_file": { "enabled": true } } +} diff --git a/dialog.jai b/dialog.jai new file mode 100644 index 0000000..bdf5274 --- /dev/null +++ b/dialog.jai @@ -0,0 +1,203 @@ +#import "Basic"; +#import "Windows"; +#import "Windows_Utf8"; +#import "File"; +#import "String"; + +// Win32 declarations are provided by win32.jai loaded in the main workspace. + +Dialog_State :: struct { + edit_hwnd: HWND; + ok_hwnd: HWND; + cancel_hwnd: HWND; + dialog_done: bool; + url_saved: bool; +} + +dialog_proc :: (hwnd: HWND, msg: u32, wparam: WPARAM, lparam: LPARAM) -> LRESULT #c_call { + ctx: #Context; + push_context ctx { + state := cast(*Dialog_State) GetWindowLongPtrW(hwnd, GWLP_USERDATA); + + if msg == { + case WM_CREATE; { + create_struct := cast(*CREATESTRUCTW) lparam; + state = cast(*Dialog_State) create_struct.lpCreateParams; + SetWindowLongPtrW(hwnd, GWLP_USERDATA, cast(LONG_PTR) state); + + hFont := GetStockObject(DEFAULT_GUI_FONT); + + static_label := CreateWindowExW( + 0, + utf8_to_wide("STATIC"), + utf8_to_wide("Enter Sing-box Config URL:"), + WS_CHILD | WS_VISIBLE | SS_LEFT, + 20, 20, 410, 20, + hwnd, + null, + null, + null + ); + SendMessageW(static_label, WM_SETFONT, cast(WPARAM) hFont, TRUE); + + state.edit_hwnd = CreateWindowExW( + WS_EX_CLIENTEDGE, + utf8_to_wide("EDIT"), + utf8_to_wide(""), + WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | ES_AUTOHSCROLL, + 20, 45, 410, 25, + hwnd, + null, + null, + null + ); + SendMessageW(state.edit_hwnd, WM_SETFONT, cast(WPARAM) hFont, TRUE); + + // Populate with existing URL if present + existing_url, ok := read_entire_file("url.txt"); + if ok { + trimmed := trim(existing_url); + wide_url := utf8_to_wide(trimmed); + SetWindowTextW(state.edit_hwnd, wide_url); + free(existing_url); + } + + state.ok_hwnd = CreateWindowExW( + 0, + utf8_to_wide("BUTTON"), + utf8_to_wide("OK"), + WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON, + 220, 85, 100, 30, + hwnd, + cast(HMENU) IDOK, + null, + null + ); + SendMessageW(state.ok_hwnd, WM_SETFONT, cast(WPARAM) hFont, TRUE); + + state.cancel_hwnd = CreateWindowExW( + 0, + utf8_to_wide("BUTTON"), + utf8_to_wide("Cancel"), + WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, + 330, 85, 100, 30, + hwnd, + cast(HMENU) IDCANCEL, + null, + null + ); + SendMessageW(state.cancel_hwnd, WM_SETFONT, cast(WPARAM) hFont, TRUE); + + SetFocus(state.edit_hwnd); + return 0; + } + case WM_COMMAND; { + control_id := LOWORD(wparam); + if control_id == IDOK { + length := GetWindowTextLengthW(state.edit_hwnd); + if length > 0 { + buffer := cast(*u16) alloc((length + 1) * size_of(u16)); + defer free(buffer); + + GetWindowTextW(state.edit_hwnd, buffer, length + 1); + url_utf8 := wide_to_utf8(buffer); + defer free(url_utf8); + + trimmed_url := trim(url_utf8); + if trimmed_url { + write_entire_file("url.txt", trimmed_url); + state.url_saved = true; + } + } else { + DeleteFileW(utf8_to_wide("url.txt")); + state.url_saved = true; + } + DestroyWindow(hwnd); + return 0; + } else if control_id == IDCANCEL { + DestroyWindow(hwnd); + return 0; + } + } + case WM_CLOSE; { + DestroyWindow(hwnd); + return 0; + } + case WM_DESTROY; { + if state { + state.dialog_done = true; + } + PostThreadMessageW(GetCurrentThreadId(), WM_NULL, 0, 0); + return 0; + } + } + return DefWindowProcW(hwnd, msg, wparam, lparam); + } +} + +show_config_url_dialog :: (parent_hwnd: HWND) -> bool { + hInstance := GetModuleHandleW(null); + class_name := utf8_to_wide("SingboxConfigUrlDialogClass"); + + wclass: WNDCLASSEXW; + wclass.cbSize = size_of(WNDCLASSEXW); + wclass.style = CS_HREDRAW | CS_VREDRAW; + wclass.lpfnWndProc = dialog_proc; + wclass.hInstance = hInstance; + wclass.hCursor = LoadCursorW(null, IDC_ARROW); + wclass.hbrBackground = cast(HBRUSH) (COLOR_WINDOW + 1); + wclass.lpszClassName = class_name; + + RegisterClassExW(*wclass); + defer UnregisterClassW(class_name, hInstance); + + screen_w := GetSystemMetrics(SM_CXSCREEN); + screen_h := GetSystemMetrics(SM_CYSCREEN); + dialog_w: s32 = 460; + dialog_h: s32 = 170; + dialog_x := (screen_w - dialog_w) / 2; + dialog_y := (screen_h - dialog_h) / 2; + + state: Dialog_State; + + dialog_hwnd := CreateWindowExW( + WS_EX_DLGMODALFRAME, + class_name, + utf8_to_wide("Configure Sing-box URL"), + WS_POPUP | WS_CAPTION | WS_SYSMENU, + dialog_x, dialog_y, dialog_w, dialog_h, + parent_hwnd, + null, + hInstance, + *state + ); + + if !dialog_hwnd return false; + + if parent_hwnd { + EnableWindow(parent_hwnd, FALSE); + } + + ShowWindow(dialog_hwnd, SW_SHOW); + UpdateWindow(dialog_hwnd); + + while !state.dialog_done { + msg: MSG; + if GetMessageW(*msg, null, 0, 0) { + if !IsDialogMessageW(dialog_hwnd, *msg) { + TranslateMessage(*msg); + DispatchMessageW(*msg); + } + } else { + PostQuitMessage(cast(s32) msg.wParam); + break; + } + } + + if parent_hwnd { + EnableWindow(parent_hwnd, TRUE); + SetFocus(parent_hwnd); + } + + return state.url_saved; +} diff --git a/libcurl.dll b/libcurl.dll new file mode 100644 index 0000000..239b503 Binary files /dev/null and b/libcurl.dll differ diff --git a/main.jai b/main.jai new file mode 100644 index 0000000..00e71e8 --- /dev/null +++ b/main.jai @@ -0,0 +1,493 @@ +#import "Basic"; +#import "Windows"; +#import "Windows_Utf8"; +#import "Thread"; +#import "String"; + +#load "win32.jai"; +#load "dialog.jai"; +#load "updater.jai"; + +// Custom constants +TIMER_PROCESS_CHECK :: 1; + +IDI_APPLICATION :: cast(*u16) 32512; +IDI_SHIELD :: cast(*u16) 32518; + +App_State :: struct { + hwnd: HWND; + singbox_running: bool; + singbox_process_handle: HANDLE; + singbox_thread_handle: HANDLE; + singbox_job_handle: HANDLE; + + updater_thread: Thread; + updater_data: Updater_Thread_Data; + use_system_proxy: bool = true; +} + +// Custom log print sending logs to OutputDebugStringW +log_print :: (format_string: string, args: .. Any) { + formatted := tprint(format_string, .. args); + OutputDebugStringW(utf8_to_wide(formatted)); +} + +file_exists :: (path: string) -> bool { + INVALID_FILE_ATTRIBUTES :: 0xFFFFFFFF; + wide_path := utf8_to_wide(path); + attribs := GetFileAttributesW(wide_path); + return attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY); +} + +// Hidden Process Spawning with Job Object configuration and stdout/stderr redirection +create_process_hidden :: (cmd: string, log_file: string = "") -> HANDLE, PROCESS_INFORMATION, bool { + startup_info: STARTUPINFOW; + startup_info.cb = size_of(STARTUPINFOW); + startup_info.dwFlags = STARTF_USESHOWWINDOW; + startup_info.wShowWindow = SW_HIDE; + + file_handle: HANDLE = INVALID_HANDLE_VALUE; + + if log_file { + sa: SECURITY_ATTRIBUTES; + sa.nLength = size_of(SECURITY_ATTRIBUTES); + sa.bInheritHandle = 1; // TRUE + sa.lpSecurityDescriptor = null; + + wide_log := utf8_to_wide(log_file); + + file_handle = CreateFileW( + wide_log, + GENERIC_WRITE, + FILE_SHARE_READ, + *sa, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + null + ); + + if file_handle != INVALID_HANDLE_VALUE { + startup_info.dwFlags |= STARTF_USESTDHANDLES; + startup_info.hStdOutput = file_handle; + startup_info.hStdError = file_handle; + } + } + + process_info: PROCESS_INFORMATION; + + CREATE_NO_WINDOW :: 0x08000000; + + job_handle := CreateJobObjectA(null, null); + if job_handle { + job_info: JOBOBJECT_EXTENDED_LIMIT_INFORMATION; + job_info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; + SetInformationJobObject(job_handle, .ExtendedLimitInformation, *job_info, size_of(type_of(job_info))); + } + + cmd_wide := utf8_to_wide(cmd); + + inherit_handles := ifx file_handle != INVALID_HANDLE_VALUE then cast(BOOL) 1 else cast(BOOL) 0; + + success := CreateProcessW( + null, + cmd_wide, + null, + null, + inherit_handles, + CREATE_NO_WINDOW, + null, + null, + *startup_info, + *process_info + ); + + if success && job_handle { + AssignProcessToJobObject(job_handle, process_info.hProcess); + } + + if file_handle != INVALID_HANDLE_VALUE { + CloseHandle(file_handle); + } + + return job_handle, process_info, cast(bool) success; +} + +set_tray_tip :: (nid: *NOTIFYICONDATAW, text: string) { + wide_text := utf8_to_wide(text); + i := 0; + while wide_text[i] != 0 && i < 127 { + nid.szTip[i] = wide_text[i]; + i += 1; + } + nid.szTip[i] = 0; +} + +update_tray :: (app: *App_State) { + nid: NOTIFYICONDATAW; + nid.cbSize = size_of(NOTIFYICONDATAW); + nid.hWnd = app.hwnd; + nid.uID = 1; + nid.uFlags = NIF_ICON | NIF_TIP; + + if app.singbox_running { + nid.hIcon = LoadIconW(null, IDI_SHIELD); + set_tray_tip(*nid, "Sing-box: Running"); + } else { + nid.hIcon = LoadIconW(null, IDI_APPLICATION); + set_tray_tip(*nid, "Sing-box: Stopped"); + } + + Shell_NotifyIconW(NIM_MODIFY, *nid); +} + +start_singbox :: (app: *App_State) -> bool { + if app.singbox_running return true; + + if !file_exists("config.json") { + if file_exists("url.txt") { + changed, success, err_msg := perform_update(); + if !success { + msg := tprint("Could not download configuration.\nError: %", err_msg); + MessageBoxW(app.hwnd, utf8_to_wide(msg), utf8_to_wide("Sing-box Tray"), MB_ICONERROR); + return false; + } + } else { + MessageBoxW(app.hwnd, utf8_to_wide("No configuration found. Please configure the Config URL first."), utf8_to_wide("Sing-box Tray"), MB_ICONWARNING); + return false; + } + } + + if file_exists("config.json") { + config_data, read_ok := read_entire_file("config.json"); + if read_ok { + modified := modify_config_inbounds(config_data); + if modified != config_data { + write_entire_file("config.json", modified); + log_print("Existing config.json sanitized to use mixed inbound.\n"); + } + free(config_data); + free(modified); + } + } + + exe_path := "sing-box.exe"; + // Check if sing-box.exe is not in current folder, check in the sing-box subfolder + if !file_exists("sing-box.exe") { + if file_exists("sing-box/sing-box.exe") { + exe_path = "sing-box\\sing-box.exe"; + } + } + + cmd := tprint("% run -c config.json", exe_path); + job, pi, ok := create_process_hidden(cmd, "sing-box.log"); + if !ok { + msg := tprint("Failed to start %. Please ensure sing-box.exe is in the same folder or in the 'sing-box' subfolder.", exe_path); + MessageBoxW(app.hwnd, utf8_to_wide(msg), utf8_to_wide("Sing-box Tray"), MB_ICONERROR); + return false; + } + + app.singbox_process_handle = pi.hProcess; + app.singbox_thread_handle = pi.hThread; + app.singbox_job_handle = job; + app.singbox_running = true; + + if app.use_system_proxy { + set_windows_system_proxy(true, "127.0.0.1:20122"); + log_print("System proxy enabled.\n"); + } + + update_tray(app); + log_print("Sing-box started successfully.\n"); + return true; +} + +stop_singbox :: (app: *App_State) { + if !app.singbox_running return; + + TerminateProcess(app.singbox_process_handle, 0); + CloseHandle(app.singbox_process_handle); + CloseHandle(app.singbox_thread_handle); + CloseHandle(app.singbox_job_handle); + + app.singbox_process_handle = null; + app.singbox_thread_handle = null; + app.singbox_job_handle = null; + app.singbox_running = false; + + set_windows_system_proxy(false, ""); + log_print("System proxy disabled.\n"); + + update_tray(app); + log_print("Sing-box stopped.\n"); +} + +check_process_status :: (app: *App_State) { + if !app.singbox_running return; + + exit_code: u32; + success := GetExitCodeProcess(app.singbox_process_handle, *exit_code); + STILL_ACTIVE :: 259; + if success && exit_code != STILL_ACTIVE { + log_print("Sing-box process exited unexpectedly with code %.\n", exit_code); + + CloseHandle(app.singbox_process_handle); + CloseHandle(app.singbox_thread_handle); + CloseHandle(app.singbox_job_handle); + + app.singbox_process_handle = null; + app.singbox_thread_handle = null; + app.singbox_job_handle = null; + app.singbox_running = false; + + set_windows_system_proxy(false, ""); + log_print("System proxy disabled due to unexpected exit.\n"); + + update_tray(app); + } +} + +trigger_immediate_update :: (app: *App_State) { + changed, success, err_msg := perform_update(); + if success { + if changed { + log_print("Config updated, restarting Sing-box...\n"); + if app.singbox_running { + stop_singbox(app); + start_singbox(app); + } else { + start_singbox(app); + } + MessageBoxW(app.hwnd, utf8_to_wide("Configuration updated and Sing-box restarted successfully."), utf8_to_wide("Sing-box Tray"), MB_ICONINFORMATION); + } else { + if !app.singbox_running { + start_singbox(app); + } + MessageBoxW(app.hwnd, utf8_to_wide("Configuration is already up-to-date."), utf8_to_wide("Sing-box Tray"), MB_ICONINFORMATION); + } + } else { + msg := tprint("Failed to download configuration.\nError: %", err_msg); + MessageBoxW(app.hwnd, utf8_to_wide(msg), utf8_to_wide("Sing-box Tray"), MB_ICONERROR); + } +} + +show_context_menu :: (app: *App_State) { + hMenu := CreatePopupMenu(); + if !hMenu return; + defer DestroyMenu(hMenu); + + status_str := ifx app.singbox_running then "Sing-box: Running" else "Sing-box: Stopped"; + AppendMenuW(hMenu, MF_STRING | MF_GRAYED | MF_DISABLED, CMD_STATUS, utf8_to_wide(status_str)); + + AppendMenuW(hMenu, MF_SEPARATOR, 0, null); + + toggle_str := ifx app.singbox_running then "Stop Sing-box" else "Start Sing-box"; + AppendMenuW(hMenu, MF_STRING, CMD_START_STOP, utf8_to_wide(toggle_str)); + + AppendMenuW(hMenu, MF_STRING, CMD_SET_URL, utf8_to_wide("Configure URL...")); + AppendMenuW(hMenu, MF_STRING, CMD_UPDATE_NOW, utf8_to_wide("Update Config Now")); + + AppendMenuW(hMenu, MF_SEPARATOR, 0, null); + + proxy_flags := MF_STRING; + sys_proxy_flags := MF_STRING; + if app.use_system_proxy { + sys_proxy_flags |= MF_CHECKED; + } else { + proxy_flags |= MF_CHECKED; + } + AppendMenuW(hMenu, proxy_flags, CMD_MODE_PROXY, utf8_to_wide("Proxy Mode (Local only)")); + AppendMenuW(hMenu, sys_proxy_flags, CMD_MODE_SYS_PROXY, utf8_to_wide("System Proxy Mode")); + + AppendMenuW(hMenu, MF_SEPARATOR, 0, null); + + AppendMenuW(hMenu, MF_STRING, CMD_EXIT, utf8_to_wide("Exit")); + + cursor_pos: POINT; + GetCursorPos(*cursor_pos); + + SetForegroundWindow(app.hwnd); + + track_flags := TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD; + cmd := TrackPopupMenu(hMenu, track_flags, cursor_pos.x, cursor_pos.y, 0, app.hwnd, null); + + if cmd == { + case CMD_START_STOP; { + if app.singbox_running { + stop_singbox(app); + } else { + start_singbox(app); + } + } + case CMD_SET_URL; { + changed := show_config_url_dialog(app.hwnd); + if changed { + log_print("URL configured, triggering download...\n"); + trigger_immediate_update(app); + } + } + case CMD_UPDATE_NOW; { + trigger_immediate_update(app); + } + case CMD_MODE_PROXY; { + if app.use_system_proxy { + app.use_system_proxy = false; + write_entire_file("mode.txt", "proxy"); + log_print("Switched to Proxy Mode.\n"); + if app.singbox_running { + set_windows_system_proxy(false, ""); + log_print("System proxy disabled.\n"); + } + } + } + case CMD_MODE_SYS_PROXY; { + if !app.use_system_proxy { + app.use_system_proxy = true; + write_entire_file("mode.txt", "system_proxy"); + log_print("Switched to System Proxy Mode.\n"); + if app.singbox_running { + set_windows_system_proxy(true, "127.0.0.1:20122"); + log_print("System proxy enabled.\n"); + } + } + } + case CMD_EXIT; { + DestroyWindow(app.hwnd); + } + } + + PostMessageW(app.hwnd, WM_NULL, 0, 0); +} + +app_wnd_proc :: (hwnd: HWND, msg: u32, wparam: WPARAM, lparam: LPARAM) -> LRESULT #c_call { + ctx: #Context; + push_context ctx { + app := cast(*App_State) GetWindowLongPtrW(hwnd, GWLP_USERDATA); + + if msg == { + case WM_CREATE; { + create_struct := cast(*CREATESTRUCTW) lparam; + app = cast(*App_State) create_struct.lpCreateParams; + SetWindowLongPtrW(hwnd, GWLP_USERDATA, cast(LONG_PTR) app); + return 0; + } + case WM_TRAY_CALLBACK; { + if lparam == WM_RBUTTONUP || lparam == WM_LBUTTONUP { + show_context_menu(app); + } + return 0; + } + case WM_RESTART_SINGBOX; { + log_print("WM_RESTART_SINGBOX received, restarting sing-box...\n"); + if app.singbox_running { + stop_singbox(app); + start_singbox(app); + } + return 0; + } + case WM_TIMER; { + if wparam == TIMER_PROCESS_CHECK { + check_process_status(app); + } + return 0; + } + case WM_DESTROY; { + PostQuitMessage(0); + return 0; + } + } + return DefWindowProcW(hwnd, msg, wparam, lparam); + } +} + +main :: () { + hInstance := GetModuleHandleW(null); + class_name := utf8_to_wide("SingboxTrayControllerClass"); + + wclass: WNDCLASSEXW; + wclass.cbSize = size_of(WNDCLASSEXW); + wclass.lpfnWndProc = app_wnd_proc; + wclass.hInstance = hInstance; + wclass.hCursor = LoadCursorW(null, IDC_ARROW); + wclass.lpszClassName = class_name; + + RegisterClassExW(*wclass); + defer UnregisterClassW(class_name, hInstance); + + app_state: App_State; + + hwnd := CreateWindowExW( + 0, + class_name, + utf8_to_wide("Singbox Tray Controller"), + 0, + 0, 0, 0, 0, + null, + null, + hInstance, + *app_state + ); + + if !hwnd { + log_print("Failed to create hidden window!\n"); + return; + } + + app_state.hwnd = hwnd; + + // Load persisted mode + mode_data, mode_ok := read_entire_file("mode.txt"); + if mode_ok { + mode_str := trim(mode_data); + if mode_str == "proxy" { + app_state.use_system_proxy = false; + } + free(mode_data); + } + + nid: NOTIFYICONDATAW; + nid.cbSize = size_of(NOTIFYICONDATAW); + nid.hWnd = hwnd; + nid.uID = 1; + nid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; + nid.uCallbackMessage = WM_TRAY_CALLBACK; + nid.hIcon = LoadIconW(null, IDI_APPLICATION); + set_tray_tip(*nid, "Sing-box: Stopped"); + + if !Shell_NotifyIconW(NIM_ADD, *nid) { + log_print("Failed to register tray icon!\n"); + return; + } + defer Shell_NotifyIconW(NIM_DELETE, *nid); + + if file_exists("config.json") { + start_singbox(*app_state); + } + + SetTimer(hwnd, TIMER_PROCESS_CHECK, 1000, null); + defer KillTimer(hwnd, TIMER_PROCESS_CHECK); + + app_state.updater_data.hwnd = hwnd; + app_state.updater_data.update_interval_seconds = 3600; + app_state.updater_data.stop_event = CreateEventW(null, TRUE, FALSE, null); + + thread_init(*app_state.updater_thread, updater_thread_proc); + app_state.updater_thread.data = *app_state.updater_data; + thread_start(*app_state.updater_thread); + + msg: MSG; + while GetMessageW(*msg, null, 0, 0) { + TranslateMessage(*msg); + DispatchMessageW(*msg); + } + + log_print("Exiting application...\n"); + + if app_state.updater_data.stop_event { + SetEvent(app_state.updater_data.stop_event); + thread_is_done(*app_state.updater_thread, -1); + thread_deinit(*app_state.updater_thread); + CloseHandle(app_state.updater_data.stop_event); + } + + stop_singbox(*app_state); +} diff --git a/mode.txt b/mode.txt new file mode 100644 index 0000000..18cd353 --- /dev/null +++ b/mode.txt @@ -0,0 +1 @@ +proxy \ No newline at end of file diff --git a/sing-box.log b/sing-box.log new file mode 100644 index 0000000..01ad0c1 --- /dev/null +++ b/sing-box.log @@ -0,0 +1,867 @@ +INFO[0000] network: updated default interface Беспроводная сеть, index 16 +INFO[0000] inbound/mixed[0]: tcp server started at 127.0.0.1:20122 +INFO[0000] sing-box started (0.11s) +INFO[0000] outbound/hysteria2[CZ-H]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/hysteria2[NL-H]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/vless[FI-V]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/anytls[FI-A]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/hysteria2[FI-H]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/vless[NL-V]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/anytls[NL-A]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/vless[IS-V]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/hysteria2[IS-H]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/anytls[IS-A]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/vless[CZ-V]: outbound connection to cp.cloudflare.com:443 +INFO[0000] outbound/anytls[CZ-A]: outbound connection to cp.cloudflare.com:443 +INFO[0017] [1431904216 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50931 +INFO[0017] [2381729591 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50932 +INFO[0017] [4260945056 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50934 +INFO[0017] [3972403019 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50933 +INFO[0017] [2043944415 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50935 +INFO[0017] [3820594007 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50936 +INFO[0017] [2381729591 3ms] inbound/mixed[0]: inbound connection to 149.154.167.91:443 +INFO[0017] [25346093 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50937 +INFO[0017] [1890729401 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50938 +INFO[0017] [3241195230 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50939 +INFO[0017] [3101946582 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50940 +INFO[0017] [4160296336 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50941 +INFO[0017] [2907378169 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50942 +INFO[0017] [2101235790 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50943 +INFO[0017] [3666367243 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50944 +INFO[0017] [1701673352 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50945 +INFO[0017] [2933851445 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50946 +INFO[0017] [1431904216 23ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0017] [716605295 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50947 +INFO[0017] [2381729591 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3547324047 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50948 +INFO[0017] [2381729591 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.91:443 +INFO[0017] [4183698931 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50949 +INFO[0017] [1431904216 23ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [1431904216 23ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0017] [4260945056 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0017] [4260945056 3ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [4260945056 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0017] [4160296336 5ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0017] [4160296336 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [4160296336 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0017] [2101235790 6ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0017] [2101235790 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [2101235790 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0017] [25346093 7ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0017] [3101946582 7ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0017] [3820594007 7ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0017] [3666367243 6ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0017] [468356626 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50950 +INFO[0017] [1650635272 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50951 +INFO[0017] [1701673352 6ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0017] [1228639268 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50952 +INFO[0017] [879273539 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50953 +INFO[0017] [3810273493 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50954 +INFO[0017] [2326685940 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50955 +INFO[0017] [25346093 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [25346093 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0017] [3101946582 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3101946582 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0017] [1445639775 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50956 +INFO[0017] [3820594007 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3820594007 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0017] [3666367243 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3666367243 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0017] [1701673352 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [1701673352 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0017] [2644398402 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50957 +INFO[0017] [3972403019 10ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0017] [3972403019 10ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3972403019 10ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0017] [2907378169 10ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0017] [2907378169 10ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [2907378169 11ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0017] [2933851445 11ms] inbound/mixed[0]: inbound connection to 149.154.167.91:80 +INFO[0017] [4159241892 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50958 +INFO[0017] [3822563278 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50959 +INFO[0017] [2933851445 11ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [2933851445 11ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.91:80 +INFO[0017] [2138999764 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50960 +INFO[0017] [3711022827 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50961 +INFO[0017] [964833050 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50962 +INFO[0017] [2917485338 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50963 +INFO[0017] [3810754502 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50964 +INFO[0017] [716605295 13ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0017] [716605295 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [716605295 14ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0017] [3241195230 15ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0017] [736709104 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50965 +INFO[0017] [1890729401 15ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0017] [3241195230 15ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3241195230 16ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0017] [1890729401 16ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [1890729401 16ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0017] [3547324047 15ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0017] [2043944415 17ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0017] [3547324047 15ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3547324047 15ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0017] [2043944415 18ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [2043944415 18ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0017] [4183698931 16ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0017] [4183698931 17ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [4183698931 17ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0017] [1650635272 13ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0017] [1650635272 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [1650635272 14ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0017] [2326685940 14ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0017] [468356626 14ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0017] [3810273493 14ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0017] [879273539 14ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0017] [1445639775 14ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0017] [1228639268 14ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0017] [2326685940 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [2326685940 14ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0017] [3810273493 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3810273493 14ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0017] [4159241892 10ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0017] [2644398402 13ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0017] [3822563278 10ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0017] [468356626 15ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [468356626 15ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0017] [1445639775 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [879273539 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [2138999764 9ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0017] [1445639775 15ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0017] [879273539 15ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0017] [1228639268 15ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [1228639268 15ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0017] [964833050 9ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0017] [2917485338 9ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0017] [3822563278 11ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3822563278 12ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0017] [3810754502 9ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0017] [2644398402 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [2644398402 14ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0017] [2138999764 10ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3711022827 10ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0017] [2138999764 10ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0017] [4159241892 12ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [964833050 10ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [736709104 8ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0017] [4159241892 12ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0017] [2917485338 10ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [964833050 10ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0017] [2917485338 10ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0017] [3810754502 9ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3810754502 9ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0017] [3711022827 10ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [3711022827 10ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0017] [736709104 9ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0017] [736709104 9ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0028] [1832812636 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50980 +INFO[0028] [1832812636 1ms] inbound/mixed[0]: inbound connection to antigravity-unleash.goog:443 +INFO[0028] [1832812636 2ms] router: found process path: C:\Users\Ixniy\AppData\Local\agy\bin\agy.exe +INFO[0028] [1832812636 2ms] outbound/hysteria2[FI-H]: outbound connection to antigravity-unleash.goog:443 +INFO[0028] [1541486522 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50983 +INFO[0028] [1541486522 0ms] inbound/mixed[0]: inbound connection to daily-cloudcode-pa.googleapis.com:443 +INFO[0028] [1541486522 1ms] router: found process path: C:\Users\Ixniy\AppData\Local\agy\bin\agy.exe +INFO[0028] [1541486522 1ms] outbound/hysteria2[FI-H]: outbound connection to daily-cloudcode-pa.googleapis.com:443 +INFO[0029] [1858473875 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:50984 +INFO[0029] [1858473875 0ms] inbound/mixed[0]: inbound connection to daily-cloudcode-pa.googleapis.com:443 +INFO[0029] [1858473875 0ms] router: found process path: C:\Users\Ixniy\AppData\Local\agy\bin\agy.exe +INFO[0029] [1858473875 0ms] outbound/hysteria2[FI-H]: outbound connection to daily-cloudcode-pa.googleapis.com:443 +INFO[0062] [1317510623 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:61567 +INFO[0062] [1317510623 0ms] inbound/mixed[0]: inbound connection to sessionserver.mojang.com:443 +INFO[0062] [1317510623 0ms] router: found process path: D:\Games\Modrinth App\Modrinth App.exe +INFO[0062] [1317510623 0ms] outbound/hysteria2[FI-H]: outbound connection to sessionserver.mojang.com:443 +INFO[0077] outbound/vless[FI-V]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/hysteria2[CZ-H]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/hysteria2[IS-H]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/anytls[NL-A]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/anytls[IS-A]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/vless[CZ-V]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/vless[IS-V]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/anytls[FI-A]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/anytls[CZ-A]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/hysteria2[NL-H]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/hysteria2[FI-H]: outbound connection to cp.cloudflare.com:443 +INFO[0077] outbound/vless[NL-V]: outbound connection to cp.cloudflare.com:443 +INFO[0103] [1465044136 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57263 +INFO[0103] [1465044136 0ms] inbound/mixed[0]: inbound connection to api.modrinth.com:443 +INFO[0103] [1465044136 0ms] router: found process path: D:\Games\Modrinth App\Modrinth App.exe +INFO[0103] [1465044136 0ms] outbound/hysteria2[FI-H]: outbound connection to api.modrinth.com:443 +INFO[0109] [1964558877 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57267 +INFO[0109] [3489704696 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57268 +INFO[0109] [3084507372 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57269 +INFO[0109] [1748241758 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57270 +INFO[0109] [4242387018 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57271 +INFO[0109] [715087632 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57272 +INFO[0109] [3489704696 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0109] [3489704696 3ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3489704696 3ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0109] [1748241758 3ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0109] [1964558877 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0109] [4242387018 3ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0109] [1964558877 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1964558877 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0109] [1748241758 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1748241758 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0109] [2876949557 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57273 +INFO[0109] [4242387018 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [4242387018 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0109] [4070975005 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57274 +INFO[0109] [715087632 3ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0109] [715087632 3ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [715087632 3ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0109] [3084507372 5ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0109] [1390305871 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57275 +INFO[0109] [3517727097 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57276 +INFO[0109] [1945303714 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57277 +INFO[0109] [1928229461 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57278 +INFO[0109] [2746075703 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57279 +INFO[0109] [3084507372 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3084507372 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0109] [1297021536 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57280 +INFO[0109] [1255360610 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57281 +INFO[0109] [610130003 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57282 +INFO[0109] [1717302292 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57283 +INFO[0109] [1571474293 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57284 +INFO[0109] [2876949557 2ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0109] [3333753609 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57285 +INFO[0109] [2184765366 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57286 +INFO[0109] [4070975005 1ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0109] [1390305871 1ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0109] [2876949557 2ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [2876949557 2ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0109] [1390305871 1ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1390305871 1ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0109] [4070975005 2ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [4070975005 2ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0109] [1297021536 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0109] [1297021536 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1297021536 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0109] [1945303714 5ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0109] [1255360610 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0109] [3517727097 5ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0109] [610130003 5ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0109] [1571474293 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0109] [3517727097 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1945303714 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1717302292 5ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0109] [1945303714 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0109] [1255360610 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3517727097 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0109] [610130003 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1255360610 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0109] [1928229461 6ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0109] [3957594564 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57287 +INFO[0109] [1571474293 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1571474293 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0109] [610130003 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0109] [2184765366 5ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0109] [644915632 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57288 +INFO[0109] [3986450649 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57289 +INFO[0109] [3333753609 6ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0109] [1147476423 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57290 +INFO[0109] [1717302292 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3189919482 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57291 +INFO[0109] [1717302292 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0109] [1928229461 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [2746075703 6ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0109] [1928229461 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0109] [3327355495 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57292 +INFO[0109] [1493734107 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57293 +INFO[0109] [2184765366 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [2184765366 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0109] [3272003369 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:57294 +INFO[0109] [3333753609 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3333753609 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0109] [2746075703 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [2746075703 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0109] [3986450649 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0109] [3957594564 3ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0109] [644915632 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0109] [1147476423 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0109] [3189919482 3ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0109] [3986450649 3ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3986450649 3ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0109] [3957594564 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3957594564 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0109] [3327355495 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0109] [1493734107 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0109] [3272003369 3ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0109] [1147476423 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [644915632 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1147476423 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0109] [3189919482 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3189919482 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0109] [644915632 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0109] [3327355495 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3327355495 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0109] [1493734107 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [1493734107 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0109] [3272003369 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0109] [3272003369 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0137] outbound/hysteria2[CZ-H]: outbound connection to cp.cloudflare.com:443 +INFO[0137] outbound/vless[IS-V]: outbound connection to cp.cloudflare.com:443 +INFO[0137] outbound/vless[NL-V]: outbound connection to cp.cloudflare.com:443 +INFO[0137] outbound/vless[FI-V]: outbound connection to cp.cloudflare.com:443 +INFO[0137] outbound/anytls[NL-A]: outbound connection to cp.cloudflare.com:443 +INFO[0137] outbound/vless[CZ-V]: outbound connection to cp.cloudflare.com:443 +INFO[0137] outbound/hysteria2[NL-H]: outbound connection to cp.cloudflare.com:443 +INFO[0137] outbound/anytls[CZ-A]: outbound connection to cp.cloudflare.com:443 +ERROR[0152] [1317510623 1m30s] connection: connection upload closed: stream 160 canceled by remote with error code 0 +INFO[0197] outbound/vless[FI-V]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/hysteria2[FI-H]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/anytls[FI-A]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/vless[NL-V]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/vless[IS-V]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/hysteria2[IS-H]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/hysteria2[NL-H]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/anytls[NL-A]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/hysteria2[CZ-H]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/anytls[IS-A]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/vless[CZ-V]: outbound connection to cp.cloudflare.com:443 +INFO[0197] outbound/anytls[CZ-A]: outbound connection to cp.cloudflare.com:443 +INFO[0201] [4235179894 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59541 +INFO[0201] [717510492 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59542 +INFO[0201] [658118124 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59543 +INFO[0201] [1230053707 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59544 +INFO[0201] [1311557284 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59545 +INFO[0201] [3836323132 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59546 +INFO[0201] [899358462 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59547 +INFO[0201] [1874550310 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59549 +INFO[0201] [3959861576 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59548 +INFO[0201] [1285577883 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59550 +INFO[0201] [4274389678 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59551 +INFO[0201] [3583255550 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59552 +INFO[0201] [171399832 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59553 +INFO[0201] [856256676 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59554 +INFO[0201] [3959861576 5ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0201] [3959861576 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [3959861576 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0201] [1230053707 20ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0201] [3836323132 20ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0201] [3252821095 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59555 +INFO[0201] [1285577883 6ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0201] [1532768989 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59556 +INFO[0201] [76674422 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59557 +INFO[0201] [4235179894 21ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0201] [162691262 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59558 +INFO[0201] [899358462 20ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0201] [640806574 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59559 +INFO[0201] [1026466952 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59560 +INFO[0201] [3836323132 20ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [4274389678 6ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0201] [3836323132 21ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0201] [1285577883 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [1230053707 21ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [1285577883 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0201] [1874550310 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0201] [1230053707 21ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0201] [1311557284 21ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0201] [4235179894 22ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [4235179894 22ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0201] [3211001393 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59561 +INFO[0201] [899358462 21ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [899358462 21ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0201] [3166760080 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59562 +INFO[0201] [3583255550 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0201] [4274389678 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [4274389678 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0201] [1874550310 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [856256676 8ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0201] [1874550310 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0201] [2721821495 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59563 +INFO[0201] [1311557284 22ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [1311557284 22ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0201] [3583255550 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [3155480677 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59564 +INFO[0201] [3583255550 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0201] [717510492 23ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0201] [2590703701 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59565 +INFO[0201] [856256676 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [856256676 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0201] [3573597523 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59566 +INFO[0201] [171399832 9ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0201] [717510492 24ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [717510492 24ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0201] [658118124 24ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0201] [171399832 10ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [876025679 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59567 +INFO[0201] [171399832 10ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0201] [1114293102 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:59568 +INFO[0201] [658118124 25ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [658118124 25ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0201] [1532768989 5ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0201] [1532768989 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [1532768989 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0201] [3252821095 7ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0201] [3252821095 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [3252821095 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0201] [640806574 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0201] [76674422 7ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0201] [162691262 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0201] [76674422 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [76674422 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0201] [640806574 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [640806574 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0201] [1026466952 8ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0201] [162691262 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [162691262 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0201] [3211001393 8ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0201] [1026466952 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [1026466952 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0201] [3166760080 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0201] [3211001393 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [3211001393 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0201] [2721821495 7ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0201] [3166760080 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [3166760080 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0201] [3155480677 8ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0201] [2590703701 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0201] [3573597523 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0201] [876025679 6ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0201] [2721821495 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [2721821495 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0201] [1114293102 6ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0201] [3155480677 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [2590703701 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [3573597523 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [3155480677 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0201] [2590703701 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0201] [876025679 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [3573597523 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0201] [876025679 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0201] [1114293102 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0201] [1114293102 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0240] [2090199824 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:62702 +INFO[0240] [2090199824 0ms] inbound/mixed[0]: inbound connection to api.modrinth.com:443 +INFO[0240] [2090199824 0ms] router: found process path: D:\Games\Modrinth App\Modrinth App.exe +INFO[0240] [2090199824 0ms] outbound/hysteria2[FI-H]: outbound connection to api.modrinth.com:443 +INFO[0244] [2547779554 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53936 +INFO[0244] [2547779554 11ms] inbound/mixed[0]: inbound connection to 149.154.162.123:443 +INFO[0244] [2547779554 12ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0244] [2547779554 12ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.162.123:443 +INFO[0245] [1434153766 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53937 +INFO[0245] [1434153766 12ms] inbound/mixed[0]: inbound connection to 149.154.162.123:80 +INFO[0245] [1434153766 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0245] [1434153766 14ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.162.123:80 +INFO[0257] outbound/hysteria2[CZ-H]: outbound connection to cp.cloudflare.com:443 +INFO[0257] outbound/vless[CZ-V]: outbound connection to cp.cloudflare.com:443 +INFO[0257] outbound/vless[IS-V]: outbound connection to cp.cloudflare.com:443 +INFO[0257] outbound/anytls[NL-A]: outbound connection to cp.cloudflare.com:443 +INFO[0257] outbound/hysteria2[NL-H]: outbound connection to cp.cloudflare.com:443 +INFO[0257] outbound/vless[FI-V]: outbound connection to cp.cloudflare.com:443 +INFO[0257] outbound/anytls[CZ-A]: outbound connection to cp.cloudflare.com:443 +INFO[0257] outbound/vless[NL-V]: outbound connection to cp.cloudflare.com:443 +ERROR[0269] [1858473875 4m0s] connection: connection upload closed: stream 156 canceled by remote with error code 0 +INFO[0293] [2603951190 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53987 +INFO[0293] [1825649035 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53988 +INFO[0293] [31643797 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53989 +INFO[0293] [531155798 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53990 +INFO[0293] [490479164 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53991 +INFO[0293] [1949955935 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53992 +INFO[0293] [2194031042 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53993 +INFO[0293] [1852327934 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53994 +INFO[0293] [3367105236 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53995 +INFO[0293] [2108528092 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53996 +INFO[0293] [2459812306 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53997 +INFO[0293] [2048289865 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53998 +INFO[0293] [3909865150 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53999 +INFO[0293] [518794290 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54000 +INFO[0293] [1949955935 14ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0293] [1949955935 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [1949955935 14ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0293] [2603951190 16ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0293] [31643797 15ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0293] [2194031042 15ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0293] [31643797 15ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [31643797 15ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0293] [2603951190 16ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [2603951190 16ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0293] [2194031042 15ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [2194031042 15ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0293] [1825649035 17ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0293] [1825649035 17ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [1825649035 17ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0293] [490479164 17ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0293] [1413355417 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54001 +INFO[0293] [709448493 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54002 +INFO[0293] [1970450258 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54003 +INFO[0293] [1927008157 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54004 +INFO[0293] [4095373192 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54005 +INFO[0293] [490479164 17ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [2917623634 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54006 +INFO[0293] [490479164 17ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0293] [2048289865 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0293] [2048289865 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [2048289865 7ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0293] [531155798 18ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0293] [2459812306 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0293] [859660703 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54007 +INFO[0293] [1852327934 17ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0293] [1692439917 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54008 +INFO[0293] [872490476 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54009 +INFO[0293] [2459812306 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [2459812306 8ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0293] [3909865150 8ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0293] [3738708351 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54010 +INFO[0293] [531155798 19ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [531155798 19ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0293] [3626539883 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54011 +INFO[0293] [1852327934 18ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [1852327934 18ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0293] [1727276467 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54012 +INFO[0293] [518794290 8ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0293] [3367105236 18ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0293] [2313125694 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54013 +INFO[0293] [2108528092 17ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0293] [3909865150 9ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [3909865150 9ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0293] [3367105236 18ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [3367105236 18ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0293] [518794290 9ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [518794290 9ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:443 +INFO[0293] [753379900 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:54014 +INFO[0293] [2108528092 18ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [2108528092 18ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:443 +INFO[0293] [1413355417 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0293] [1927008157 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0293] [1970450258 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0293] [1413355417 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [1413355417 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0293] [1927008157 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [1927008157 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0293] [709448493 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0293] [1970450258 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [1970450258 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0293] [4095373192 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0293] [2917623634 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0293] [709448493 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [709448493 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0293] [4095373192 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [4095373192 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0293] [2917623634 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [2917623634 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0293] [1692439917 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0293] [1692439917 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [1692439917 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0293] [872490476 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0293] [3738708351 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0293] [859660703 5ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0293] [3626539883 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0293] [859660703 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [1727276467 5ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0293] [2313125694 5ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0293] [3738708351 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [3626539883 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [3626539883 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0293] [872490476 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [753379900 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0293] [3738708351 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0293] [859660703 6ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0293] [872490476 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0293] [2313125694 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [2313125694 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0293] [1727276467 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [1727276467 5ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.41:80 +INFO[0293] [753379900 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0293] [753379900 4ms] outbound/hysteria2[FI-H]: outbound connection to 149.154.167.51:80 +INFO[0317] outbound/vless[FI-V]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/vless[NL-V]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/hysteria2[CZ-H]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/anytls[FI-A]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/anytls[IS-A]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/anytls[NL-A]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/hysteria2[FI-H]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/hysteria2[NL-H]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/anytls[CZ-A]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/vless[CZ-V]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/vless[IS-V]: outbound connection to cp.cloudflare.com:443 +INFO[0317] outbound/hysteria2[IS-H]: outbound connection to cp.cloudflare.com:443 +INFO[0362] [1966275856 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58579 +INFO[0362] [1966275856 0ms] inbound/mixed[0]: inbound connection to sessionserver.mojang.com:443 +INFO[0362] [1966275856 1ms] router: found process path: D:\Games\Modrinth App\Modrinth App.exe +INFO[0362] [1966275856 1ms] outbound/anytls[FI-A]: outbound connection to sessionserver.mojang.com:443 +INFO[0377] outbound/hysteria2[NL-H]: outbound connection to cp.cloudflare.com:443 +INFO[0377] outbound/hysteria2[CZ-H]: outbound connection to cp.cloudflare.com:443 +INFO[0377] outbound/vless[FI-V]: outbound connection to cp.cloudflare.com:443 +INFO[0377] outbound/vless[IS-V]: outbound connection to cp.cloudflare.com:443 +INFO[0377] outbound/vless[CZ-V]: outbound connection to cp.cloudflare.com:443 +INFO[0377] outbound/vless[NL-V]: outbound connection to cp.cloudflare.com:443 +INFO[0377] outbound/anytls[CZ-A]: outbound connection to cp.cloudflare.com:443 +INFO[0377] outbound/anytls[NL-A]: outbound connection to cp.cloudflare.com:443 +INFO[0380] [2832783496 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58608 +INFO[0380] [4049230546 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58607 +INFO[0380] [53552781 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58609 +INFO[0380] [4049230546 12ms] inbound/mixed[0]: inbound connection to 149.154.167.255:443 +INFO[0380] [4049230546 13ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0380] [4049230546 13ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.255:443 +INFO[0380] [53552781 14ms] inbound/mixed[0]: inbound connection to 149.154.167.255:443 +INFO[0380] [2832783496 14ms] inbound/mixed[0]: inbound connection to 149.154.167.255:443 +INFO[0380] [3565101570 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58610 +INFO[0380] [2253209051 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58612 +INFO[0380] [892718580 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58613 +INFO[0380] [2832783496 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0380] [53552781 14ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0380] [2832783496 14ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.255:443 +INFO[0380] [53552781 14ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.255:443 +INFO[0380] [2253209051 1ms] inbound/mixed[0]: inbound connection to 149.154.167.255:80 +INFO[0380] [3565101570 1ms] inbound/mixed[0]: inbound connection to 149.154.167.255:80 +INFO[0380] [2253209051 1ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0380] [2253209051 1ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.255:80 +INFO[0380] [3565101570 1ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0380] [3565101570 1ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.255:80 +INFO[0380] [892718580 1ms] inbound/mixed[0]: inbound connection to 149.154.167.255:80 +INFO[0380] [892718580 1ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0380] [892718580 1ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.255:80 +INFO[0385] [195032954 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58625 +INFO[0385] [4099219148 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58626 +INFO[0385] [3720375868 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58627 +INFO[0385] [4157402033 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58628 +INFO[0385] [811633626 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58629 +INFO[0385] [1457204720 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58630 +INFO[0385] [3310489488 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58631 +INFO[0385] [1292574652 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58632 +INFO[0385] [3820360481 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58633 +INFO[0385] [3424951791 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58634 +INFO[0385] [3851692764 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58635 +INFO[0385] [3704328105 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58636 +INFO[0385] [2062770777 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58637 +INFO[0385] [4013259248 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58638 +INFO[0385] [195032954 15ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0385] [195032954 16ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [195032954 16ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0385] [4157402033 14ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0385] [3720375868 15ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0385] [3851692764 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0385] [3424951791 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0385] [4099219148 15ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0385] [1292574652 11ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0385] [4157402033 15ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [4157402033 15ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0385] [3720375868 16ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [3720375868 16ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0385] [3851692764 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [3851692764 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0385] [3424951791 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [3424951791 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0385] [4099219148 16ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [4099219148 16ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0385] [3820360481 11ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0385] [1292574652 12ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [1292574652 12ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0385] [3820360481 12ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [3820360481 12ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0385] [3918984384 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58643 +INFO[0385] [2801507699 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58645 +INFO[0385] [2886623716 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58646 +INFO[0385] [1617752791 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58648 +INFO[0385] [3381128156 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58647 +INFO[0385] [3310489488 18ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0385] [3263818931 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58649 +INFO[0385] [3704328105 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0385] [468996323 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58650 +INFO[0385] [736373075 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58651 +INFO[0385] [2062770777 7ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0385] [3310489488 18ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [3310489488 18ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0385] [1457204720 18ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0385] [3704328105 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [3704328105 8ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0385] [811633626 19ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0385] [2062770777 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [2062770777 8ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0385] [4013259248 8ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0385] [1457204720 19ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [1457204720 19ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0385] [2499956037 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58655 +INFO[0385] [2169764617 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58656 +INFO[0385] [811633626 19ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [811633626 19ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0385] [2698791457 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58658 +INFO[0385] [4013259248 8ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [4013259248 8ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0385] [3809220915 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58659 +INFO[0385] [659473231 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58661 +INFO[0385] [1707503449 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58663 +INFO[0385] [3918984384 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0385] [3918984384 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [3918984384 4ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0385] [1617752791 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0385] [3263818931 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0385] [2886623716 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0385] [2801507699 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0385] [3381128156 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0385] [1617752791 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [1617752791 4ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0385] [2801507699 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [2801507699 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0385] [2499956037 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0385] [3263818931 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [468996323 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0385] [736373075 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0385] [3263818931 4ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0385] [3381128156 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [2886623716 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [3381128156 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0385] [2886623716 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0385] [1707503449 2ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0385] [659473231 2ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0385] [2698791457 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0385] [2169764617 3ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0385] [3809220915 3ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0385] [2499956037 3ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [2499956037 3ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0385] [468996323 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [468996323 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0385] [736373075 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [736373075 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0385] [1707503449 3ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [1707503449 3ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0385] [659473231 3ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [659473231 3ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0385] [2698791457 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [3809220915 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [2698791457 4ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0385] [3809220915 4ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0385] [2169764617 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0385] [2169764617 4ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +ERROR[0385] [4099219148 435ms] connection: connection upload closed: raw-read tcp 127.0.0.1:20122->127.0.0.1:58626: An existing connection was forcibly closed by the remote host. +INFO[0389] [3703065968 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:58680 +INFO[0389] [3703065968 0ms] inbound/mixed[0]: inbound connection to daily-cloudcode-pa.googleapis.com:443 +INFO[0389] [3703065968 1ms] router: found process path: C:\Users\Ixniy\AppData\Local\agy\bin\agy.exe +INFO[0389] [3703065968 1ms] outbound/anytls[FI-A]: outbound connection to daily-cloudcode-pa.googleapis.com:443 +INFO[0431] [2250089523 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:60041 +INFO[0431] [2250089523 0ms] inbound/mixed[0]: inbound connection to api.minecraftservices.com:443 +INFO[0431] [2250089523 1ms] router: found process path: D:\Games\Modrinth App\Modrinth App.exe +INFO[0431] [2250089523 1ms] outbound/anytls[FI-A]: outbound connection to api.minecraftservices.com:443 +INFO[0431] [186976993 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:60042 +INFO[0431] [186976993 0ms] inbound/mixed[0]: inbound connection to api.minecraftservices.com:443 +INFO[0431] [186976993 1ms] router: found process path: D:\Games\Modrinth App\Modrinth App.exe +INFO[0431] [186976993 1ms] outbound/anytls[FI-A]: outbound connection to api.minecraftservices.com:443 +INFO[0431] [2984533206 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:60044 +INFO[0431] [2984533206 0ms] inbound/mixed[0]: inbound connection to textures.minecraft.net:80 +INFO[0431] [2984533206 1ms] router: found process path: D:\Games\Modrinth App\Modrinth App.exe +INFO[0431] [2984533206 1ms] outbound/anytls[FI-A]: outbound connection to textures.minecraft.net:80 +INFO[0437] outbound/vless[FI-V]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/vless[NL-V]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/anytls[FI-A]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/hysteria2[CZ-H]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/anytls[NL-A]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/hysteria2[IS-H]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/hysteria2[NL-H]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/vless[IS-V]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/hysteria2[FI-H]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/anytls[IS-A]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/vless[CZ-V]: outbound connection to cp.cloudflare.com:443 +INFO[0437] outbound/anytls[CZ-A]: outbound connection to cp.cloudflare.com:443 +INFO[0477] [2845713650 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53678 +INFO[0477] [880389287 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53679 +INFO[0477] [912900468 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53680 +INFO[0477] [2891250573 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53681 +INFO[0477] [3312914973 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53682 +INFO[0477] [1992578322 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53683 +INFO[0477] [546359159 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53684 +INFO[0477] [438232820 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53685 +INFO[0477] [46188226 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53686 +INFO[0477] [4231732772 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53687 +INFO[0477] [3968586135 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53688 +INFO[0477] [576283496 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53689 +INFO[0477] [3017438936 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53690 +INFO[0477] [4130392210 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53691 +INFO[0477] [3968586135 20ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0477] [3968586135 20ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [3968586135 20ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0477] [546359159 21ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0477] [880389287 36ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0477] [912900468 36ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0477] [3830951283 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53692 +INFO[0477] [576283496 21ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0477] [1992578322 36ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0477] [46188226 21ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0477] [2891250573 36ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0477] [3718907642 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53693 +INFO[0477] [4231732772 21ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0477] [2845713650 36ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0477] [3312914973 36ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0477] [287507464 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53694 +INFO[0477] [438232820 22ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0477] [546359159 22ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [546359159 22ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0477] [912900468 37ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [3017438936 21ms] inbound/mixed[0]: inbound connection to 149.154.167.41:443 +INFO[0477] [4130392210 6ms] inbound/mixed[0]: inbound connection to 149.154.167.51:443 +INFO[0477] [880389287 37ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [912900468 37ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0477] [880389287 37ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0477] [1992578322 37ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [1992578322 37ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0477] [2891250573 37ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [576283496 22ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [2891250573 37ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0477] [576283496 22ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0477] [46188226 22ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [46188226 22ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0477] [4231732772 22ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [4231732772 22ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0477] [2845713650 37ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [3312914973 37ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [2845713650 37ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0477] [438232820 22ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [3312914973 37ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0477] [438232820 22ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0477] [3017438936 22ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [3017438936 22ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:443 +INFO[0477] [4130392210 7ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [4130392210 7ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:443 +INFO[0477] [2106682024 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53695 +INFO[0477] [1519394680 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53696 +INFO[0477] [3134230985 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53699 +INFO[0477] [2572715919 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53700 +INFO[0477] [2368929877 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53701 +INFO[0477] [1262976495 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53702 +INFO[0477] [385268265 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53703 +INFO[0477] [1695365347 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53704 +INFO[0477] [2430121676 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53705 +INFO[0477] [3387758181 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53706 +INFO[0477] [3648335918 0ms] inbound/mixed[0]: inbound connection from 127.0.0.1:53707 +INFO[0477] [3830951283 3ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0477] [3830951283 4ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [3830951283 4ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0477] [3718907642 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0477] [3718907642 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [3718907642 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0477] [287507464 5ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0477] [287507464 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [287507464 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0477] [2106682024 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0477] [3134230985 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0477] [1519394680 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0477] [2368929877 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0477] [2572715919 4ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0477] [2106682024 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [2106682024 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0477] [1262976495 5ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0477] [1695365347 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0477] [3134230985 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [1519394680 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [1519394680 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0477] [385268265 4ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0477] [3134230985 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0477] [2430121676 5ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0477] [3387758181 5ms] inbound/mixed[0]: inbound connection to 149.154.167.41:80 +INFO[0477] [3648335918 5ms] inbound/mixed[0]: inbound connection to 149.154.167.51:80 +INFO[0477] [2572715919 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [2368929877 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [2572715919 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0477] [2368929877 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0477] [1262976495 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [1262976495 6ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0477] [1695365347 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [1695365347 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0477] [385268265 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [385268265 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0477] [2430121676 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [2430121676 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +INFO[0477] [3387758181 5ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [3387758181 5ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.41:80 +INFO[0477] [3648335918 6ms] router: found process path: C:\Program Files\Telegram Desktop\Telegram.exe +INFO[0477] [3648335918 6ms] outbound/anytls[FI-A]: outbound connection to 149.154.167.51:80 +ERROR[0477] [1519394680 214ms] connection: connection upload closed: raw-read tcp 127.0.0.1:20122->127.0.0.1:53696: An established connection was aborted by the software in your host machine. diff --git a/sing-box/LICENSE b/sing-box/LICENSE new file mode 100644 index 0000000..175f350 --- /dev/null +++ b/sing-box/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) 2022 by nekohasekai + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +In addition, no derivative work may use the name or imply association +with this application without prior consent. diff --git a/sing-box/libcronet.dll b/sing-box/libcronet.dll new file mode 100644 index 0000000..9e99f78 Binary files /dev/null and b/sing-box/libcronet.dll differ diff --git a/sing-box/sing-box.exe b/sing-box/sing-box.exe new file mode 100644 index 0000000..75dd344 Binary files /dev/null and b/sing-box/sing-box.exe differ diff --git a/singbox_tray.exe b/singbox_tray.exe new file mode 100644 index 0000000..3b5a7f7 Binary files /dev/null and b/singbox_tray.exe differ diff --git a/singbox_tray.pdb b/singbox_tray.pdb new file mode 100644 index 0000000..f93024e Binary files /dev/null and b/singbox_tray.pdb differ diff --git a/singbox_tray_plan.md b/singbox_tray_plan.md new file mode 100644 index 0000000..c68a93b --- /dev/null +++ b/singbox_tray_plan.md @@ -0,0 +1,58 @@ +# Planning: Sing-box Windows Tray Controller in Jai + +We will implement a lightweight, headless Windows tray application in the **Jai** language to control the `sing-box` core. + +## 1. Core Architecture + +The application will run with a hidden/message-only window to remain headless, handling tray interaction, background updates, and process management. + +```mermaid +graph TD + A[Main Loop / Hidden Window] --> B[System Tray Icon] + B -->|Right Click| C[Context Menu] + C -->|Set URL| D[Custom Edit Dialog] + C -->|Start/Stop| E[Process Manager: sing-box.exe] + C -->|Update Now| F[Auto-Update Loop: libcurl] + C -->|Exit| G[Shutdown & Cleanup] + F -->|Timer/Thread| F +``` + +## 2. Component Design + +### A. Headless Window & System Tray Icon +- **Win32 Window**: We register a window class and create a hidden utility window using `CreateWindowExW`. This window serves as the message receiver. +- **Tray Icon**: We register a system tray icon via `Shell_NotifyIconW` (using `NOTIFYICONDATAW`). +- **Events**: We define a custom window message `WM_TRAY_CALLBACK` (`WM_USER + 1`). When the tray icon receives input (e.g. mouse clicks), Windows sends `WM_TRAY_CALLBACK` to our hidden window. +- **Context Menu**: On `WM_RBUTTONUP` (right click) or `WM_LBUTTONUP` (left click) over the tray icon, we load a dynamic popup menu using `CreatePopupMenu`, `AppendMenuW`, and `TrackPopupMenu`. + +### B. Custom Modal Dialog (Set URL) +To avoid needing an external resource compiler (`.rc`) or complex UI libraries, we will implement a clean, lightweight modal window: +- **Dialog Window**: A popup window using `WS_POPUP | WS_CAPTION | WS_SYSMENU` centered on screen. +- **Controls**: + - A static label: "Enter Sing-box Config URL:" + - An edit control (`EDIT` window class) to input the URL. + - An OK button and a Cancel button (`BUTTON` window class). +- **Behavior**: Block interactions with other menus, read the edit text on OK, write it to a `url.txt` file, and trigger an immediate config update. + +### C. Config Downloader (Auto-Update Engine) +- **Curl Library**: Use the standard `Curl` module to perform HTTP requests. +- **Storage**: Save the downloaded JSON content to `config.json` in the same directory as the executable. +- **Auto-Update Thread**: Spawn a background thread (using `Thread` module) that sleeps for a set interval (e.g., 1 hour), then downloads the URL. If the file content changes, it updates `config.json` and restarts the `sing-box` process if it was running. + +### D. Process Management (`sing-box.exe`) +- **Process Spawning**: Use the standard `Process` module's `create_process` to run: + `sing-box.exe run -c config.json` +- **Job Object**: Windows processes started via `create_process` will be assigned to a Job Object with `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE`. This ensures `sing-box.exe` automatically shuts down when the controller application is closed. +- **Status Checking**: Use `get_process_result` with 0 timeout to check if sing-box is actively running. + +## 3. Implementation Steps + +1. **`main.jai`**: Core application entry point, hidden window loop, tray icon management. +2. **`dialog.jai`**: Edit-box dialog for config URL input. +3. **`updater.jai`**: Libcurl wrapper and background auto-update thread. +4. **`build.jai`**: Jai build script (metaprogram) to compile the app without standard console window popup (using `-subsystem windows`). + +## 4. Key Questions & Decisions + +- **Tray Icon**: Do we need a default/builtin icon? Yes, we will use a standard Windows system icon (like `IDI_APPLICATION` or `IDI_SHIELD`) so that the application works out-of-the-box without requiring an external `.ico` asset. +- **sing-box Location**: We will assume `sing-box.exe` is in the same directory as the controller. If not found there, we will search the system PATH. diff --git a/updater.jai b/updater.jai new file mode 100644 index 0000000..d70c3f0 --- /dev/null +++ b/updater.jai @@ -0,0 +1,164 @@ +#import "Basic"; +#import "Curl"; +#import "File"; +#import "Thread"; +#import "Windows"; +#import "String"; + + +Updater_Thread_Data :: struct { + hwnd: HWND; + update_interval_seconds: s32 = 3600; // 1 hour + stop_event: HANDLE; +} + +write_callback :: (ptr: *u8, size: u64, nmemb: u64, userdata: *void) -> u64 #c_call { + builder := cast(*String_Builder) userdata; + push_context { + append(builder, ptr, xx nmemb); + } + return nmemb; +} + +download_url :: (url: string) -> string, bool, string { + curl := curl_easy_init(); + if !curl return "", false, "Failed to initialize Curl"; + defer curl_easy_cleanup(curl); + + curl_easy_setopt(curl, .URL, temp_c_string(url)); + curl_easy_setopt(curl, .FOLLOWLOCATION, 1); + curl_easy_setopt(curl, .TIMEOUT, 30); + + // Disable SSL verification to prevent issues with missing CA cert bundles on Windows + curl_easy_setopt(curl, .SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, .SSL_VERIFYHOST, 0); + + builder: String_Builder; + defer free_buffers(*builder); + + curl_easy_setopt(curl, .WRITEFUNCTION, write_callback); + curl_easy_setopt(curl, .WRITEDATA, *builder); + + curl_code := curl_easy_perform(curl); + if curl_code != .OK { + err_msg := tprint("Curl perform failed: %", to_string(curl_easy_strerror(curl_code))); + return "", false, err_msg; + } + + response_code: int; + curl_easy_getinfo(curl, .RESPONSE_CODE, *response_code); + if response_code != 200 { + err_msg := tprint("HTTP request failed with status code %", response_code); + return "", false, err_msg; + } + + return builder_to_string(*builder), true, ""; +} + +perform_update :: () -> changed: bool, success: bool, error_msg: string { + url_data, ok := read_entire_file("url.txt"); + if !ok return false, false, "Could not read url.txt. Please configure the Config URL first."; + defer free(url_data); + + url := trim(url_data); + if !url return false, false, "url.txt is empty. Please configure the Config URL first."; + + downloaded, success, err_msg := download_url(url); + if !success return false, false, err_msg; + defer free(downloaded); + + modified := modify_config_inbounds(downloaded); + defer free(modified); + + config_data, read_ok := read_entire_file("config.json"); + defer if read_ok free(config_data); + + if read_ok && config_data == modified { + return false, true, ""; + } + + write_ok := write_entire_file("config.json", modified); + if !write_ok { + return false, false, "Failed to write downloaded content to config.json"; + } + + return true, true, ""; +} + +updater_thread_proc :: (thread: *Thread) -> s64 { + data := cast(*Updater_Thread_Data) thread.data; + if !data return 1; + + while true { + // Wait on the stop event for the specified interval. + // If the stop event is signaled, wake up immediately and terminate. + status := WaitForSingleObject(data.stop_event, cast(DWORD) (data.update_interval_seconds * 1000)); + if status == WAIT_OBJECT_0 { + break; + } + + changed, success, err_msg := perform_update(); + if success && changed { + if data.hwnd { + PostMessageW(data.hwnd, WM_RESTART_SINGBOX, 0, 0); + } + } + } + + return 0; +} + +modify_config_inbounds :: (json_content: string) -> string { + // Find "inbounds" key + idx := find_index_from_left(json_content, "\"inbounds\""); + if idx == -1 { + first_brace := find_index_from_left(json_content, #char "{"); + if first_brace == -1 return copy_string(json_content); + + builder: String_Builder; + append(*builder, slice(json_content, 0, first_brace + 1)); + append(*builder, "\n \"inbounds\": [\n {\n \"type\": \"mixed\",\n \"listen\": \"127.0.0.1\",\n \"listen_port\": 20122\n }\n ],"); + append(*builder, slice(json_content, first_brace + 1, json_content.count - (first_brace + 1))); + return builder_to_string(*builder); + } + + // Find the opening bracket '[' after "inbounds" + search_start := idx + 10; + open_bracket_idx := -1; + for i: search_start..json_content.count-1 { + if json_content[i] == #char "[" { + open_bracket_idx = i; + break; + } else if json_content[i] == #char ":" || is_space(json_content[i]) { + continue; + } else { + break; + } + } + + if open_bracket_idx == -1 return copy_string(json_content); + + // Find the matching closing bracket ']' + close_bracket_idx := -1; + bracket_depth := 0; + for i: open_bracket_idx..json_content.count-1 { + if json_content[i] == #char "[" { + bracket_depth += 1; + } else if json_content[i] == #char "]" { + bracket_depth -= 1; + if bracket_depth == 0 { + close_bracket_idx = i; + break; + } + } + } + + if close_bracket_idx == -1 return copy_string(json_content); + + builder: String_Builder; + append(*builder, slice(json_content, 0, open_bracket_idx)); + append(*builder, "[\n {\n \"type\": \"mixed\",\n \"listen\": \"127.0.0.1\",\n \"listen_port\": 20122\n }\n ]"); + append(*builder, slice(json_content, close_bracket_idx + 1, json_content.count - (close_bracket_idx + 1))); + + return builder_to_string(*builder); +} diff --git a/url.txt b/url.txt new file mode 100644 index 0000000..cbea3a7 --- /dev/null +++ b/url.txt @@ -0,0 +1 @@ +https://git.ixniy.ru/party/subscriptions/ixniyevonn.json \ No newline at end of file diff --git a/win32.jai b/win32.jai new file mode 100644 index 0000000..21a7228 --- /dev/null +++ b/win32.jai @@ -0,0 +1,190 @@ +#import "Windows"; + +// DLL imports +user32 :: #system_library "user32"; +gdi32 :: #system_library "gdi32"; +shell32 :: #system_library "shell32"; + +// Structs +NOTIFYICONDATAW :: struct { + cbSize: u32; + hWnd: HWND; + uID: u32; + uFlags: u32; + uCallbackMessage: u32; + hIcon: HICON; + szTip: [128] u16; + dwState: u32; + dwStateMask: u32; + szInfo: [256] u16; + uTimeoutOrVersion: u32; + szInfoTitle: [64] u16; + dwInfoFlags: u32; + guidItem: GUID; + hBalloonIcon: HICON; +} + +// Win32 constants +DEFAULT_GUI_FONT :: 17; +COLOR_WINDOW :: 5; +SS_LEFT :: 0x00000000; +ES_AUTOHSCROLL :: 0x0080; +BS_DEFPUSHBUTTON :: 0x00000001; +BS_PUSHBUTTON :: 0x00000000; +GWLP_USERDATA :: -21; +WM_SETFONT :: 0x0030; + +STARTF_USESHOWWINDOW : s32 : 0x00000001; + +TPM_LEFTALIGN : u32 : 0x00000000; +TPM_RIGHTBUTTON : u32 : 0x00000002; +TPM_RETURNCMD : u32 : 0x00000100; + +MF_STRING : u32 : 0x00000000; +MF_GRAYED : u32 : 0x00000001; +MF_DISABLED : u32 : 0x00000002; +MF_SEPARATOR : u32 : 0x00000800; +MF_CHECKED : u32 : 0x00000008; + +NIM_ADD : u32 : 0x00000000; +NIM_MODIFY : u32 : 0x00000001; +NIM_DELETE : u32 : 0x00000002; + +NIF_MESSAGE : u32 : 0x00000001; +NIF_ICON : u32 : 0x00000002; +NIF_TIP : u32 : 0x00000004; + +// Functions +IsDialogMessageW :: (hDlg: HWND, lpMsg: *MSG) -> BOOL #foreign user32; +GetWindowLongPtrW :: (hWnd: HWND, nIndex: s32) -> s64 #foreign user32; +Shell_NotifyIconW :: (dwMessage: u32, lpData: *NOTIFYICONDATAW) -> BOOL #foreign shell32; + +CreatePopupMenu :: () -> HMENU #foreign user32; +DestroyMenu :: (hMenu: HMENU) -> BOOL #foreign user32; +AppendMenuW :: (hMenu: HMENU, uFlags: u32, uIDNewItem: s64, lpNewItem: LPCWSTR) -> BOOL #foreign user32; +TrackPopupMenu :: (hMenu: HMENU, uFlags: u32, x: s32, y: s32, nReserved: s32, hWnd: HWND, prcRect: *RECT) -> BOOL #foreign user32; +SetForegroundWindow :: (hWnd: HWND) -> BOOL #foreign user32; +EnableWindow :: (hWnd: HWND, bEnable: BOOL) -> BOOL #foreign user32; +PostMessageW :: (hWnd: HWND, Msg: u32, wParam: WPARAM, lParam: LPARAM) -> BOOL #foreign user32; + +// Custom message IDs +WM_USER :: 0x0400; +WM_TRAY_CALLBACK :: WM_USER + 1; +WM_RESTART_SINGBOX :: WM_USER + 2; + +// Context menu command IDs +CMD_STATUS :: 1001; +CMD_START_STOP :: 1002; +CMD_SET_URL :: 1003; +CMD_UPDATE_NOW :: 1004; +CMD_EXIT :: 1005; +CMD_MODE_PROXY :: 1006; +CMD_MODE_SYS_PROXY :: 1007; + +// Boolean constants +FALSE :: 0; +TRUE :: 1; + +// CREATESTRUCTW definition +CREATESTRUCTW :: struct { + lpCreateParams: *void; + hInstance: HINSTANCE; + hMenu: HMENU; + hwndParent: HWND; + cy: s32; + cx: s32; + y: s32; + x: s32; + style: s32; + lpszName: LPCWSTR; + lpszClass: LPCWSTR; + dwExStyle: DWORD; +} + +kernel32 :: #system_library "kernel32"; + +LONG_PTR :: s64; +UINT_PTR :: u64; + +// Window and Message Functions +GetMessageW :: (lpMsg: *MSG, hWnd: HWND, wMsgFilterMin: u32, wMsgFilterMax: u32) -> BOOL #foreign user32; + +SetTimer :: (hWnd: HWND, nIDEvent: UINT_PTR, uElapse: u32, lpTimerFunc: *void) -> UINT_PTR #foreign user32; +KillTimer :: (hWnd: HWND, uIDEvent: UINT_PTR) -> BOOL #foreign user32; + + + +GetWindowTextW :: (hWnd: HWND, lpString: *u16, nMaxCount: s32) -> s32 #foreign user32; +GetWindowTextLengthW :: (hWnd: HWND) -> s32 #foreign user32; + + +SendMessageW :: (hWnd: HWND, Msg: u32, wParam: WPARAM, lParam: LPARAM) -> LRESULT #foreign user32; +SetEvent :: (hEvent: HANDLE) -> BOOL #foreign kernel32; +SetFocus :: (hWnd: HWND) -> HWND #foreign user32; + +LOWORD :: (val: WPARAM) -> u16 { + return cast(u16) (val & 0xffff); +} + +HIWORD :: (val: WPARAM) -> u16 { + return cast(u16) ((val >> 16) & 0xffff); +} + +PostThreadMessageW :: (idThread: DWORD, Msg: u32, wParam: WPARAM, lParam: LPARAM) -> BOOL #foreign user32; + +advapi32 :: #system_library "advapi32"; +wininet :: #system_library "wininet"; + +LSTATUS :: s32; +REGSAM :: u32; + +HKEY_CURRENT_USER :: cast(HKEY) 0x80000001; + +KEY_WRITE :: 0x20006; + +INTERNET_OPTION_SETTINGS_CHANGED :: 39; +INTERNET_OPTION_REFRESH :: 37; + +RegOpenKeyExW :: (hKey: HKEY, lpSubKey: LPCWSTR, ulOptions: DWORD, samDesired: REGSAM, phkResult: *HKEY) -> LSTATUS #foreign advapi32; +RegSetValueExW :: (hKey: HKEY, lpValueName: LPCWSTR, Reserved: DWORD, dwType: DWORD, lpData: *u8, cbData: DWORD) -> LSTATUS #foreign advapi32; +RegCloseKey :: (hKey: HKEY) -> LSTATUS #foreign advapi32; + +InternetSetOptionW :: (hInternet: HANDLE, dwOption: DWORD, lpBuffer: *void, dwBufferLength: DWORD) -> BOOL #foreign wininet; + +wcslen :: (str: *u16) -> int { + len := 0; + while str[len] != 0 { + len += 1; + } + return len; +} + +set_windows_system_proxy :: (enable: bool, server: string) -> bool { + hKey: HKEY; + subkey := utf8_to_wide("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"); + + status := RegOpenKeyExW(HKEY_CURRENT_USER, subkey, 0, KEY_WRITE, *hKey); + if status != 0 { + return false; + } + defer RegCloseKey(hKey); + + enable_val: u32 = ifx enable then cast(u32) 1 else cast(u32) 0; + status = RegSetValueExW(hKey, utf8_to_wide("ProxyEnable"), 0, REG_DWORD, cast(*u8) *enable_val, size_of(u32)); + if status != 0 return false; + + if enable { + wide_server := utf8_to_wide(server); + server_len_bytes := cast(u32) ((wcslen(wide_server) + 1) * 2); + status = RegSetValueExW(hKey, utf8_to_wide("ProxyServer"), 0, REG_SZ, cast(*u8) wide_server, server_len_bytes); + if status != 0 return false; + } + + InternetSetOptionW(null, INTERNET_OPTION_SETTINGS_CHANGED, null, 0); + InternetSetOptionW(null, INTERNET_OPTION_REFRESH, null, 0); + + return true; +} + + +