Full Code of 2dust/v2rayN for AI

master eb0ef90ed254 cached
357 files
2.7 MB
727.7k tokens
1623 symbols
3 requests
Download .txt
Showing preview only (2,904K chars total). Download the full file or copy to clipboard to get everything.
Repository: 2dust/v2rayN
Branch: master
Commit: eb0ef90ed254
Files: 357
Total size: 2.7 MB

Directory structure:
gitextract_8wam50gz/

├── .editorconfig
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── 01_bug_report.yml
│   │   ├── 02_feature_request.yml
│   │   └── config.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── build-all.yml
│       ├── build-linux.yml
│       ├── build-osx.yml
│       ├── build-windows-desktop.yml
│       ├── build-windows.yml
│       └── winget-publish.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── package-debian.sh
├── package-osx.sh
├── package-release-zip.sh
├── package-rhel.sh
└── v2rayN/
    ├── AmazTool/
    │   ├── AmazTool.csproj
    │   ├── Program.cs
    │   ├── Resx/
    │   │   ├── Resource.Designer.cs
    │   │   ├── Resource.resx
    │   │   ├── Resource.zh-Hans.resx
    │   │   └── Resource.zh-Hant.resx
    │   ├── UpgradeApp.cs
    │   └── Utils.cs
    ├── Directory.Build.props
    ├── Directory.Packages.props
    ├── ServiceLib/
    │   ├── Base/
    │   │   └── MyReactiveObject.cs
    │   ├── Common/
    │   │   ├── EmbedUtils.cs
    │   │   ├── Extension.cs
    │   │   ├── FileUtils.cs
    │   │   ├── JsonUtils.cs
    │   │   ├── Logging.cs
    │   │   ├── ProcUtils.cs
    │   │   ├── QRCodeUtils.cs
    │   │   ├── Utils.cs
    │   │   ├── WindowsUtils.cs
    │   │   └── YamlUtils.cs
    │   ├── Enums/
    │   │   ├── EConfigType.cs
    │   │   ├── ECoreType.cs
    │   │   ├── EGirdOrientation.cs
    │   │   ├── EGlobalHotkey.cs
    │   │   ├── EInboundProtocol.cs
    │   │   ├── EMove.cs
    │   │   ├── EMultipleLoad.cs
    │   │   ├── EPresetType.cs
    │   │   ├── ERuleMode.cs
    │   │   ├── ERuleType.cs
    │   │   ├── EServerColName.cs
    │   │   ├── ESpeedActionType.cs
    │   │   ├── ESysProxyType.cs
    │   │   ├── ETheme.cs
    │   │   ├── ETransport.cs
    │   │   └── EViewAction.cs
    │   ├── Events/
    │   │   ├── AppEvents.cs
    │   │   └── EventChannel.cs
    │   ├── FodyWeavers.xml
    │   ├── Global.cs
    │   ├── GlobalUsings.cs
    │   ├── Handler/
    │   │   ├── AutoStartupHandler.cs
    │   │   ├── Builder/
    │   │   │   ├── CoreConfigContextBuilder.cs
    │   │   │   └── NodeValidator.cs
    │   │   ├── ConfigHandler.cs
    │   │   ├── ConnectionHandler.cs
    │   │   ├── CoreConfigHandler.cs
    │   │   ├── Fmt/
    │   │   │   ├── AnytlsFmt.cs
    │   │   │   ├── BaseFmt.cs
    │   │   │   ├── ClashFmt.cs
    │   │   │   ├── FmtHandler.cs
    │   │   │   ├── HtmlPageFmt.cs
    │   │   │   ├── Hysteria2Fmt.cs
    │   │   │   ├── ShadowsocksFmt.cs
    │   │   │   ├── SingboxFmt.cs
    │   │   │   ├── SocksFmt.cs
    │   │   │   ├── TrojanFmt.cs
    │   │   │   ├── TuicFmt.cs
    │   │   │   ├── V2rayFmt.cs
    │   │   │   ├── VLESSFmt.cs
    │   │   │   ├── VmessFmt.cs
    │   │   │   └── WireguardFmt.cs
    │   │   ├── SubscriptionHandler.cs
    │   │   └── SysProxy/
    │   │       ├── ProxySettingLinux.cs
    │   │       ├── ProxySettingOSX.cs
    │   │       ├── ProxySettingWindows.cs
    │   │       └── SysProxyHandler.cs
    │   ├── Helper/
    │   │   ├── DownloaderHelper.cs
    │   │   ├── HttpClientHelper.cs
    │   │   └── SqliteHelper.cs
    │   ├── Manager/
    │   │   ├── AppManager.cs
    │   │   ├── CertPemManager.cs
    │   │   ├── ClashApiManager.cs
    │   │   ├── CoreAdminManager.cs
    │   │   ├── CoreInfoManager.cs
    │   │   ├── CoreManager.cs
    │   │   ├── GroupProfileManager.cs
    │   │   ├── NoticeManager.cs
    │   │   ├── PacManager.cs
    │   │   ├── ProfileExManager.cs
    │   │   ├── StatisticsManager.cs
    │   │   ├── TaskManager.cs
    │   │   └── WebDavManager.cs
    │   ├── Models/
    │   │   ├── CheckUpdateModel.cs
    │   │   ├── ClashConnectionModel.cs
    │   │   ├── ClashConnections.cs
    │   │   ├── ClashProviders.cs
    │   │   ├── ClashProxies.cs
    │   │   ├── ClashProxyModel.cs
    │   │   ├── CmdItem.cs
    │   │   ├── ComboItem.cs
    │   │   ├── Config.cs
    │   │   ├── ConfigItems.cs
    │   │   ├── CoreConfigContext.cs
    │   │   ├── CoreInfo.cs
    │   │   ├── DNSItem.cs
    │   │   ├── FullConfigTemplateItem.cs
    │   │   ├── GitHubRelease.cs
    │   │   ├── IPAPIInfo.cs
    │   │   ├── ProfileExItem.cs
    │   │   ├── ProfileGroupItem.cs
    │   │   ├── ProfileItem.cs
    │   │   ├── ProfileItemModel.cs
    │   │   ├── ProtocolExtraItem.cs
    │   │   ├── RetResult.cs
    │   │   ├── RoutingItem.cs
    │   │   ├── RoutingItemModel.cs
    │   │   ├── RoutingTemplate.cs
    │   │   ├── RulesItem.cs
    │   │   ├── RulesItemModel.cs
    │   │   ├── SemanticVersion.cs
    │   │   ├── ServerSpeedItem.cs
    │   │   ├── ServerStatItem.cs
    │   │   ├── ServerTestItem.cs
    │   │   ├── SingboxConfig.cs
    │   │   ├── SpeedTestResult.cs
    │   │   ├── SsSIP008.cs
    │   │   ├── SubItem.cs
    │   │   ├── UpdateResult.cs
    │   │   ├── V2rayConfig.cs
    │   │   ├── V2rayMetricsVars.cs
    │   │   ├── V2rayTcpRequest.cs
    │   │   └── VmessQRCode.cs
    │   ├── Resx/
    │   │   ├── ResUI.Designer.cs
    │   │   ├── ResUI.fa-Ir.resx
    │   │   ├── ResUI.fr.resx
    │   │   ├── ResUI.hu.resx
    │   │   ├── ResUI.resx
    │   │   ├── ResUI.ru.resx
    │   │   ├── ResUI.zh-Hans.resx
    │   │   └── ResUI.zh-Hant.resx
    │   ├── Sample/
    │   │   ├── SampleClientConfig
    │   │   ├── SampleHttpRequest
    │   │   ├── SampleHttpResponse
    │   │   ├── SampleInbound
    │   │   ├── SampleOutbound
    │   │   ├── SingboxSampleClientConfig
    │   │   ├── SingboxSampleOutbound
    │   │   ├── clash_mixin_yaml
    │   │   ├── clash_tun_yaml
    │   │   ├── custom_routing_black
    │   │   ├── custom_routing_global
    │   │   ├── custom_routing_white
    │   │   ├── dns_singbox_normal
    │   │   ├── dns_v2ray_normal
    │   │   ├── kill_as_sudo_linux_sh
    │   │   ├── kill_as_sudo_osx_sh
    │   │   ├── linux_autostart_config
    │   │   ├── pac
    │   │   ├── proxy_set_linux_sh
    │   │   ├── proxy_set_osx_sh
    │   │   ├── singbox_fakeip_filter
    │   │   ├── tun_singbox_dns
    │   │   ├── tun_singbox_inbound
    │   │   └── tun_singbox_rules
    │   ├── ServiceLib.csproj
    │   ├── Services/
    │   │   ├── CoreConfig/
    │   │   │   ├── CoreConfigClashService.cs
    │   │   │   ├── Singbox/
    │   │   │   │   ├── CoreConfigSingboxService.cs
    │   │   │   │   ├── SingboxConfigTemplateService.cs
    │   │   │   │   ├── SingboxDnsService.cs
    │   │   │   │   ├── SingboxInboundService.cs
    │   │   │   │   ├── SingboxLogService.cs
    │   │   │   │   ├── SingboxOutboundService.cs
    │   │   │   │   ├── SingboxRoutingService.cs
    │   │   │   │   ├── SingboxRulesetService.cs
    │   │   │   │   └── SingboxStatisticService.cs
    │   │   │   └── V2ray/
    │   │   │       ├── CoreConfigV2rayService.cs
    │   │   │       ├── V2rayBalancerService.cs
    │   │   │       ├── V2rayConfigTemplateService.cs
    │   │   │       ├── V2rayDnsService.cs
    │   │   │       ├── V2rayInboundService.cs
    │   │   │       ├── V2rayLogService.cs
    │   │   │       ├── V2rayOutboundService.cs
    │   │   │       ├── V2rayRoutingService.cs
    │   │   │       └── V2rayStatisticService.cs
    │   │   ├── DownloadService.cs
    │   │   ├── ProcessService.cs
    │   │   ├── SpeedtestService.cs
    │   │   ├── Statistics/
    │   │   │   ├── StatisticsSingboxService.cs
    │   │   │   └── StatisticsXrayService.cs
    │   │   ├── UpdateService.cs
    │   │   └── WindowsJobService.cs
    │   └── ViewModels/
    │       ├── AddGroupServerViewModel.cs
    │       ├── AddServer2ViewModel.cs
    │       ├── AddServerViewModel.cs
    │       ├── BackupAndRestoreViewModel.cs
    │       ├── CheckUpdateViewModel.cs
    │       ├── ClashConnectionsViewModel.cs
    │       ├── ClashProxiesViewModel.cs
    │       ├── DNSSettingViewModel.cs
    │       ├── FullConfigTemplateViewModel.cs
    │       ├── GlobalHotkeySettingViewModel.cs
    │       ├── MainWindowViewModel.cs
    │       ├── MsgViewModel.cs
    │       ├── OptionSettingViewModel.cs
    │       ├── ProfilesSelectViewModel.cs
    │       ├── ProfilesViewModel.cs
    │       ├── RoutingRuleDetailsViewModel.cs
    │       ├── RoutingRuleSettingViewModel.cs
    │       ├── RoutingSettingViewModel.cs
    │       ├── StatusBarViewModel.cs
    │       ├── SubEditViewModel.cs
    │       └── SubSettingViewModel.cs
    ├── v2rayN/
    │   ├── App.xaml
    │   ├── App.xaml.cs
    │   ├── AssemblyInfo.cs
    │   ├── Base/
    │   │   ├── MyDGTextColumn.cs
    │   │   └── WindowBase.cs
    │   ├── Common/
    │   │   ├── QRCodeWindowsUtils.cs
    │   │   ├── UI.cs
    │   │   └── WindowsUtils.cs
    │   ├── Converters/
    │   │   ├── DelayColorConverter.cs
    │   │   ├── InverseBooleanConverter.cs
    │   │   └── MaterialDesignFonts.cs
    │   ├── FodyWeavers.xml
    │   ├── GlobalUsings.cs
    │   ├── Manager/
    │   │   ├── HotkeyManager.cs
    │   │   └── WindowsManager.cs
    │   ├── Properties/
    │   │   ├── Resources.Designer.cs
    │   │   └── Resources.resx
    │   ├── ViewModels/
    │   │   └── ThemeSettingViewModel.cs
    │   ├── Views/
    │   │   ├── AddGroupServerWindow.xaml
    │   │   ├── AddGroupServerWindow.xaml.cs
    │   │   ├── AddServer2Window.xaml
    │   │   ├── AddServer2Window.xaml.cs
    │   │   ├── AddServerWindow.xaml
    │   │   ├── AddServerWindow.xaml.cs
    │   │   ├── BackupAndRestoreView.xaml
    │   │   ├── BackupAndRestoreView.xaml.cs
    │   │   ├── CheckUpdateView.xaml
    │   │   ├── CheckUpdateView.xaml.cs
    │   │   ├── ClashConnectionsView.xaml
    │   │   ├── ClashConnectionsView.xaml.cs
    │   │   ├── ClashProxiesView.xaml
    │   │   ├── ClashProxiesView.xaml.cs
    │   │   ├── DNSSettingWindow.xaml
    │   │   ├── DNSSettingWindow.xaml.cs
    │   │   ├── FullConfigTemplateWindow.xaml
    │   │   ├── FullConfigTemplateWindow.xaml.cs
    │   │   ├── GlobalHotkeySettingWindow.xaml
    │   │   ├── GlobalHotkeySettingWindow.xaml.cs
    │   │   ├── MainWindow.xaml
    │   │   ├── MainWindow.xaml.cs
    │   │   ├── MsgView.xaml
    │   │   ├── MsgView.xaml.cs
    │   │   ├── OptionSettingWindow.xaml
    │   │   ├── OptionSettingWindow.xaml.cs
    │   │   ├── ProfilesSelectWindow.xaml
    │   │   ├── ProfilesSelectWindow.xaml.cs
    │   │   ├── ProfilesView.xaml
    │   │   ├── ProfilesView.xaml.cs
    │   │   ├── QrcodeView.xaml
    │   │   ├── QrcodeView.xaml.cs
    │   │   ├── RoutingRuleDetailsWindow.xaml
    │   │   ├── RoutingRuleDetailsWindow.xaml.cs
    │   │   ├── RoutingRuleSettingWindow.xaml
    │   │   ├── RoutingRuleSettingWindow.xaml.cs
    │   │   ├── RoutingSettingWindow.xaml
    │   │   ├── RoutingSettingWindow.xaml.cs
    │   │   ├── StatusBarView.xaml
    │   │   ├── StatusBarView.xaml.cs
    │   │   ├── SubEditWindow.xaml
    │   │   ├── SubEditWindow.xaml.cs
    │   │   ├── SubSettingWindow.xaml
    │   │   ├── SubSettingWindow.xaml.cs
    │   │   ├── ThemeSettingView.xaml
    │   │   └── ThemeSettingView.xaml.cs
    │   ├── app.manifest
    │   └── v2rayN.csproj
    ├── v2rayN.Desktop/
    │   ├── App.axaml
    │   ├── App.axaml.cs
    │   ├── Assets/
    │   │   ├── GlobalResources.axaml
    │   │   └── GlobalStyles.axaml
    │   ├── Base/
    │   │   └── WindowBase.cs
    │   ├── Common/
    │   │   ├── AppBuilderExtension.cs
    │   │   ├── AvaUtils.cs
    │   │   ├── TextEditorKeywordHighlighter.cs
    │   │   └── UI.cs
    │   ├── Converters/
    │   │   └── DelayColorConverter.cs
    │   ├── FodyWeavers.xml
    │   ├── GlobalUsings.cs
    │   ├── Manager/
    │   │   └── HotkeyManager.cs
    │   ├── Program.cs
    │   ├── ViewModels/
    │   │   └── ThemeSettingViewModel.cs
    │   ├── Views/
    │   │   ├── AddGroupServerWindow.axaml
    │   │   ├── AddGroupServerWindow.axaml.cs
    │   │   ├── AddServer2Window.axaml
    │   │   ├── AddServer2Window.axaml.cs
    │   │   ├── AddServerWindow.axaml
    │   │   ├── AddServerWindow.axaml.cs
    │   │   ├── BackupAndRestoreView.axaml
    │   │   ├── BackupAndRestoreView.axaml.cs
    │   │   ├── CheckUpdateView.axaml
    │   │   ├── CheckUpdateView.axaml.cs
    │   │   ├── ClashConnectionsView.axaml
    │   │   ├── ClashConnectionsView.axaml.cs
    │   │   ├── ClashProxiesView.axaml
    │   │   ├── ClashProxiesView.axaml.cs
    │   │   ├── DNSSettingWindow.axaml
    │   │   ├── DNSSettingWindow.axaml.cs
    │   │   ├── FullConfigTemplateWindow.axaml
    │   │   ├── FullConfigTemplateWindow.axaml.cs
    │   │   ├── GlobalHotkeySettingWindow.axaml
    │   │   ├── GlobalHotkeySettingWindow.axaml.cs
    │   │   ├── MainWindow.axaml
    │   │   ├── MainWindow.axaml.cs
    │   │   ├── MsgView.axaml
    │   │   ├── MsgView.axaml.cs
    │   │   ├── OptionSettingWindow.axaml
    │   │   ├── OptionSettingWindow.axaml.cs
    │   │   ├── ProfilesSelectWindow.axaml
    │   │   ├── ProfilesSelectWindow.axaml.cs
    │   │   ├── ProfilesView.axaml
    │   │   ├── ProfilesView.axaml.cs
    │   │   ├── QrcodeView.axaml
    │   │   ├── QrcodeView.axaml.cs
    │   │   ├── RoutingRuleDetailsWindow.axaml
    │   │   ├── RoutingRuleDetailsWindow.axaml.cs
    │   │   ├── RoutingRuleSettingWindow.axaml
    │   │   ├── RoutingRuleSettingWindow.axaml.cs
    │   │   ├── RoutingSettingWindow.axaml
    │   │   ├── RoutingSettingWindow.axaml.cs
    │   │   ├── StatusBarView.axaml
    │   │   ├── StatusBarView.axaml.cs
    │   │   ├── SubEditWindow.axaml
    │   │   ├── SubEditWindow.axaml.cs
    │   │   ├── SubSettingWindow.axaml
    │   │   ├── SubSettingWindow.axaml.cs
    │   │   ├── SudoPasswordInputView.axaml
    │   │   ├── SudoPasswordInputView.axaml.cs
    │   │   ├── ThemeSettingView.axaml
    │   │   └── ThemeSettingView.axaml.cs
    │   ├── v2rayN.Desktop.csproj
    │   └── v2rayN.icns
    ├── v2rayN.sln
    └── v2rayN.slnx

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
root = true

[*]
charset = utf-8
indent_style = space
tab_width = 4
indent_size = 4
end_of_line = crlf
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.cs]
dotnet_hide_advanced_members = true
dotnet_member_insertion_location = with_other_members_of_the_same_kind
dotnet_property_generation_behavior = prefer_throwing_properties
dotnet_search_reference_assemblies = true
dotnet_separate_import_directive_groups = false:warning
dotnet_sort_system_directives_first = true:warning
file_header_template = unset

dotnet_style_qualification_for_event = false:warning
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_property = false:warning
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_operators = always_for_clarity:warning
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
dotnet_style_require_accessibility_modifiers = always:warning
dotnet_prefer_system_hash_code = true:warning
dotnet_style_coalesce_expression = true:warning
dotnet_style_collection_initializer = false:warning
dotnet_style_explicit_tuple_names = true:warning
dotnet_style_namespace_match_folder = true:warning
dotnet_style_null_propagation = true:warning
dotnet_style_object_initializer = true:warning
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_auto_properties = true:warning
dotnet_style_prefer_collection_expression = false:warning
dotnet_style_prefer_compound_assignment = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = false:warning
dotnet_style_prefer_conditional_expression_over_return = false:warning
dotnet_style_prefer_foreach_explicit_cast_in_source = always:warning
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
dotnet_style_prefer_inferred_tuple_names = true:warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
dotnet_style_prefer_simplified_boolean_expressions = true:warning
dotnet_style_prefer_simplified_interpolation = true:warning
dotnet_style_readonly_field = true:warning
dotnet_code_quality_unused_parameters = all:warning
dotnet_remove_unnecessary_suppression_exclusions = none
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
dotnet_style_allow_statement_immediately_after_block_experimental = true:warning

csharp_style_var_elsewhere = true:warning
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_expression_bodied_accessors = when_on_single_line:warning
csharp_style_expression_bodied_constructors = false:warning
csharp_style_expression_bodied_indexers = when_on_single_line:warning
csharp_style_expression_bodied_lambdas = when_on_single_line:warning
csharp_style_expression_bodied_local_functions = false:warning
csharp_style_expression_bodied_methods = false:warning
csharp_style_expression_bodied_operators = false:warning
csharp_style_expression_bodied_properties = when_on_single_line:warning
csharp_style_pattern_matching_over_as_with_null_check = true:warning
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
csharp_style_prefer_extended_property_pattern = true:warning
csharp_style_prefer_not_pattern = true:warning
csharp_style_prefer_pattern_matching = true:warning
csharp_style_prefer_switch_expression = false:warning
csharp_style_conditional_delegate_call = true:warning
csharp_prefer_static_anonymous_function = true:warning
csharp_prefer_static_local_function = true:warning
csharp_preferred_modifier_order = public,internal,private,protected,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:warning
csharp_style_prefer_readonly_struct = true:warning
csharp_style_prefer_readonly_struct_member = true:warning
csharp_prefer_braces = true:warning
csharp_prefer_simple_using_statement = true:warning
csharp_prefer_system_threading_lock = true:warning
csharp_style_namespace_declarations = file_scoped:warning
csharp_style_prefer_method_group_conversion = true:warning
csharp_style_prefer_primary_constructors = true:warning
csharp_style_prefer_top_level_statements = false:warning
csharp_prefer_simple_default_expression = true:warning
csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
csharp_style_inlined_variable_declaration = true:warning
csharp_style_prefer_index_operator = false:warning
csharp_style_prefer_local_over_anonymous_function = true:warning
csharp_style_prefer_null_check_over_type_check = true:warning
csharp_style_prefer_range_operator = false:warning
csharp_style_prefer_tuple_swap = true:warning
csharp_style_prefer_utf8_string_literals = true:warning
csharp_style_throw_expression = true:warning
csharp_style_unused_value_assignment_preference = discard_variable:warning
csharp_style_unused_value_expression_statement_preference = discard_variable:warning
csharp_using_directive_placement = outside_namespace:warning
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:warning
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:warning
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = false:warning
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:warning
csharp_style_allow_embedded_statements_on_same_line_experimental = false:warning

csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = no_change
csharp_indent_switch_labels = true
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false:warning
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false

dotnet_naming_rule.interface_should_be_pascal.severity = warning
dotnet_naming_rule.interface_should_be_pascal.symbols = interface
dotnet_naming_rule.interface_should_be_pascal.style = pascal
dotnet_naming_rule.types_should_be_pascal.severity = warning
dotnet_naming_rule.types_should_be_pascal.symbols = types
dotnet_naming_rule.types_should_be_pascal.style = pascal
dotnet_naming_rule.non_field_members_should_be_pascal.severity = warning
dotnet_naming_rule.non_field_members_should_be_pascal.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal.style = pascal
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = *
dotnet_naming_symbols.interface.required_modifiers = 
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = *
dotnet_naming_symbols.types.required_modifiers = 
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = *
dotnet_naming_symbols.non_field_members.required_modifiers = 
dotnet_naming_style.pascal.required_prefix = 
dotnet_naming_style.pascal.required_suffix = 
dotnet_naming_style.pascal.word_separator = 
dotnet_naming_style.pascal.capitalization = pascal_case

================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs     diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following 
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln       merge=binary
#*.csproj    merge=binary
#*.vbproj    merge=binary
#*.vcxproj   merge=binary
#*.vcproj    merge=binary
#*.dbproj    merge=binary
#*.fsproj    merge=binary
#*.lsproj    merge=binary
#*.wixproj   merge=binary
#*.modelproj merge=binary
#*.sqlproj   merge=binary
#*.wwaproj   merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg   binary
#*.png   binary
#*.gif   binary

###############################################################################
# diff behavior for common document formats
# 
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the 
# entries below.
###############################################################################
#*.doc   diff=astextplain
#*.DOC   diff=astextplain
#*.docx  diff=astextplain
#*.DOCX  diff=astextplain
#*.dot   diff=astextplain
#*.DOT   diff=astextplain
#*.pdf   diff=astextplain
#*.PDF   diff=astextplain
#*.rtf   diff=astextplain
#*.RTF   diff=astextplain


================================================
FILE: .github/ISSUE_TEMPLATE/01_bug_report.yml
================================================
name: Bug 报告
description: 在提出问题前请先自行排除服务器端问题和升级到最新客户端,同时也请通过搜索确认是否有人提出过相同问题。
title: "[Bug]: "
labels: ["bug"]
body:
  - type: markdown
    attributes:
      value: |
        ### 报告 Bug 前请务必确认以下事项:
        > ** **
        > **✓ 已自行排除服务器端问题。**
        > **✓ 已升级到最新客户端版本。**
        > **✓ 已通过搜索确认没有人提出过相同问题。**
        > **✓ 已确认自己的电脑系统环境是受支持的。**

        ---

  - type: input
    id: "os-version"
    attributes:
      label: "操作系统和版本"
      description: "操作系统和版本"
    validations:
      required: true

  - type: input
    id: "expectation"
    attributes:
      label: "预期情况"
      description: "描述你认为应该发生什么"
    validations:
      required: true

  - type: textarea
    id: "describe-the-bug"
    attributes:
      label: "实际情况"
      description: "描述实际发生了什么"
    validations:
      required: true

  - type: textarea
    id: "reproduction-method"
    attributes:
      label: "复现方法"
      description: "在BUG出现前执行了哪些操作"
      placeholder: "标序号"
    validations:
      required: true

  - type: textarea
    id: "gui-log"
    attributes:
      label: "软件日志"
      description: "位置在软件当前目录下的guiLogs"
      placeholder: "在日志开始和结束位置粘贴冒号后的内容到这:"
    validations:
      required: true

  - type: textarea
    id: "core-log"
    attributes:
      label: "内核日志"
      description: "位置在软件主界面的信息框内"
      placeholder: "在信息框内鼠标右键复制全部信息粘贴在这:"
    validations:
      required: true

  - type: textarea
    id: "more"
    attributes:
      label: "额外信息"
      description: "可选"
    validations:
      required: false

  - type: checkboxes
    id: "latest-version"
    attributes:
      label: "我确认已更新至最新版本"
      description: "否则请更新后尝试"
      options:
        - label: 是
          required: true

  - type: checkboxes
    id: "issues"
    attributes:
      label: "我确认已查询历史issues"
      description: "否则请查询后提出"
      options:
        - label: 是
          required: true

  - type: checkboxes
    id: "system-version"
    attributes:
      label: "我确认系统版本是受支持的"
      description: "否则请切换后尝试"
      options:
        - label: 是
          required: true


================================================
FILE: .github/ISSUE_TEMPLATE/02_feature_request.yml
================================================
name: Feature 请求
description: "为这个项目提出一个建议"
title: "[Feature request]: "
labels: ['enhancement']
body: 
- type: input
  id: problem
  attributes:
    label: 相关问题
    description: "清楚而简洁地描述问题是什么。"
    placeholder: "当我想要……时,软件不能……"
  validations:
    required: true
- type: input
  id: way-to-solve
  attributes:
    label: 描述你希望的解决方案
    description: "你希望发生什么"
  validations:
    required: true
- type: input
  id: instead
  attributes:
    label: 描述你所考虑的替代方案
  validations:
    required: false
- type: checkboxes
  id: "issues"
  attributes:
    label: "我确认已查询历史issues"
    description: "否则请查询后提出"
    options:
      - label: 是
        required: true


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false

contact_links:
  - name: Discussions / 讨论区
    url: https://github.com/2dust/v2rayN/discussions
    about: 使用问题或需要帮助请前往 Discussions。
  - name: Wiki / 使用说明
    url: https://github.com/2dust/v2rayN/wiki
    about: 查看常见问题和使用文档。


================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "daily"

  - package-ecosystem: "nuget"
    directory: "/"
    schedule:
      interval: "daily"


================================================
FILE: .github/workflows/build-all.yml
================================================
name: release all platforms

on:
  workflow_dispatch:
    inputs:
      release_tag:
        required: false
        type: string

jobs:
  update:
    runs-on: ubuntu-latest
    steps:

      - name: Trigger build windows
        if: github.event.inputs.release_tag != ''
        run: |
          curl -X POST \
            -H "Accept: application/vnd.github.v3+json" \
            -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
            https://api.github.com/repos/${{ github.repository }}/actions/workflows/build-windows.yml/dispatches \
            -d "{
              \"ref\": \"master\",
              \"inputs\": {
                \"release_tag\": \"${{ github.event.inputs.release_tag }}\"
              }
            }"

      - name: Trigger build linux
        if: github.event.inputs.release_tag != ''
        run: |
          curl -X POST \
            -H "Accept: application/vnd.github.v3+json" \
            -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
            https://api.github.com/repos/${{ github.repository }}/actions/workflows/build-linux.yml/dispatches \
            -d "{
              \"ref\": \"master\",
              \"inputs\": {
                \"release_tag\": \"${{ github.event.inputs.release_tag }}\"
              }
            }"

      - name: Trigger build osx
        if: github.event.inputs.release_tag != ''
        run: |
          curl -X POST \
            -H "Accept: application/vnd.github.v3+json" \
            -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
            https://api.github.com/repos/${{ github.repository }}/actions/workflows/build-osx.yml/dispatches \
            -d "{
              \"ref\": \"master\",
              \"inputs\": {
                \"release_tag\": \"${{ github.event.inputs.release_tag }}\"
              }
            }"

      - name: Trigger build windows desktop
        if: github.event.inputs.release_tag != ''
        run: |
          curl -X POST \
            -H "Accept: application/vnd.github.v3+json" \
            -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
            https://api.github.com/repos/${{ github.repository }}/actions/workflows/build-windows-desktop.yml/dispatches \
            -d "{
              \"ref\": \"master\",
              \"inputs\": {
                \"release_tag\": \"${{ github.event.inputs.release_tag }}\"
              }
            }"

================================================
FILE: .github/workflows/build-linux.yml
================================================
name: release Linux

on:
  workflow_dispatch:
    inputs:
      release_tag:
        required: false
        type: string
  push:
    branches:
      - master
    tags:
      - 'v*'
      - 'V*'

permissions:
  contents: write

env:
  OutputArch: "linux-64"
  OutputArchArm: "linux-arm64"
  OutputPath64:  "${{ github.workspace }}/v2rayN/Release/linux-64"
  OutputPathArm64:  "${{ github.workspace }}/v2rayN/Release/linux-arm64"

jobs:
  build:
    strategy:
      matrix:
        configuration: [Release]
    runs-on: ubuntu-24.04

    steps:
    - name: Checkout
      uses: actions/checkout@v6.0.2
      with:
        submodules: 'recursive'
        fetch-depth: '0'

    - name: Setup .NET
      uses: actions/setup-dotnet@v5.2.0
      with:
        dotnet-version: '8.0.x'

    - name: Build
      run: |
        cd v2rayN
        dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r linux-x64   -p:SelfContained=true -o "$OutputPath64"
        dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r linux-arm64 -p:SelfContained=true -o "$OutputPathArm64"
        dotnet publish ./AmazTool/AmazTool.csproj             -c Release -r linux-x64   -p:SelfContained=true -p:PublishTrimmed=true -o "$OutputPath64"
        dotnet publish ./AmazTool/AmazTool.csproj             -c Release -r linux-arm64 -p:SelfContained=true -p:PublishTrimmed=true -o "$OutputPathArm64"

    - name: Upload build artifacts
      uses: actions/upload-artifact@v7.0.0
      with:
        name: v2rayN-linux
        path: |
          ${{ github.workspace }}/v2rayN/Release/linux*

    # release debian package
    - name: Package debian
      if: github.event.inputs.release_tag != ''
      run: |
        chmod 755 package-debian.sh
        ./package-debian.sh "$OutputArch" "$OutputPath64" "${{ github.event.inputs.release_tag }}"
        ./package-debian.sh "$OutputArchArm" "$OutputPathArm64" "${{ github.event.inputs.release_tag }}"

    - name: Upload deb to release
      uses: svenstaro/upload-release-action@v2
      if: github.event.inputs.release_tag != ''
      with:
        file: ${{ github.workspace }}/v2rayN*.deb
        tag: ${{ github.event.inputs.release_tag }}
        file_glob: true
        prerelease: true

    # release zip archive
    - name: Package release zip archive
      if: github.event.inputs.release_tag != ''
      run: |
        chmod 755 package-release-zip.sh
        ./package-release-zip.sh "$OutputArch" "$OutputPath64"
        ./package-release-zip.sh "$OutputArchArm" "$OutputPathArm64"
    
    - name: Upload zip archive to release
      uses: svenstaro/upload-release-action@v2
      if: github.event.inputs.release_tag != ''
      with:
        file: ${{ github.workspace }}/v2rayN*.zip
        tag: ${{ github.event.inputs.release_tag }}
        file_glob: true
        prerelease: true

  rpm:
    needs: build
    if: |
      (github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag != '') ||
      (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
    runs-on: ubuntu-24.04
    container:
      image: registry.access.redhat.com/ubi10/ubi
    env:
      RELEASE_TAG: ${{ github.event.inputs.release_tag != '' && github.event.inputs.release_tag || github.ref_name }}

    steps:
    - name: Prepare tools (Red Hat)
      shell: bash
      run: |
        set -euo pipefail

        . /etc/os-release
        EL_MAJOR="${VERSION_ID%%.*}"
        echo "EL_MAJOR=${EL_MAJOR}"

        dnf -y makecache || true
        command -v curl >/dev/null || dnf -y install curl ca-certificates

        ARCH="$(uname -m)"
        case "$ARCH" in x86_64|aarch64) ;; *) echo "Unsupported arch: $ARCH"; exit 1 ;; esac

        install_epel_from_dir() {
          local base="$1" rpm
          echo "Try: $base"

          rpm="$(
            {
              curl -fsSL "$base/Packages/"   2>/dev/null
              curl -fsSL "$base/Packages/e/" 2>/dev/null | sed 's|href="|href="e/|'
            } |
            sed -n 's/.*href="\([^"]*epel-release-[^"]*\.noarch\.rpm\)".*/\1/p' |
            sort -V | tail -n1
          )" || true

          if [[ -n "$rpm" ]]; then
            dnf -y install "$base/Packages/$rpm"
            return 0
          fi
          return 1
        }

        FEDORA="https://dl.fedoraproject.org/pub/epel/epel-release-latest-${EL_MAJOR}.noarch.rpm"
        echo "Try Fedora: $FEDORA"

        if curl -fsSLI "$FEDORA" >/dev/null; then
          dnf -y install "$FEDORA"
        else
          ROCKY="https://dl.rockylinux.org/pub/rocky/${EL_MAJOR}/extras/${ARCH}/os"
          if install_epel_from_dir "$ROCKY"; then
            :
          else
            ALMA="https://repo.almalinux.org/almalinux/${EL_MAJOR}/extras/${ARCH}/os"
            if install_epel_from_dir "$ALMA"; then
              :
            else
              echo "EPEL bootstrap failed (Fedora/Rocky/Alma)"
              exit 1
            fi
          fi
        fi

        dnf -y install sudo git rpm-build rpmdevtools dnf-plugins-core \
                       rsync findutils tar gzip unzip which

        dnf repolist | grep -i epel || true

    - name: Checkout repo (for scripts)
      uses: actions/checkout@v6.0.2
      with:
        submodules: 'recursive'
        fetch-depth: '0'

    - name: Restore build artifacts
      uses: actions/download-artifact@v8
      with:
        name: v2rayN-linux
        path: ${{ github.workspace }}/v2rayN/Release

    - name: Ensure script permissions
      run: chmod 755 package-rhel.sh

    - name: Package RPM (RHEL-family)
      run: ./package-rhel.sh "${RELEASE_TAG}" --arch all

    - name: Collect RPMs into workspace
      run: |
        mkdir -p "$GITHUB_WORKSPACE/dist/rpm"
        rsync -av "$HOME/rpmbuild/RPMS/" "$GITHUB_WORKSPACE/dist/rpm/" || true
        find "$GITHUB_WORKSPACE/dist/rpm" -name "v2rayN-*-1*.x86_64.rpm"  -exec mv {} "$GITHUB_WORKSPACE/dist/rpm/v2rayN-linux-rhel-64.rpm" \;  || true
        find "$GITHUB_WORKSPACE/dist/rpm" -name "v2rayN-*-1*.aarch64.rpm" -exec mv {} "$GITHUB_WORKSPACE/dist/rpm/v2rayN-linux-rhel-arm64.rpm" \; || true
        echo "==== Dist tree ===="
        ls -R "$GITHUB_WORKSPACE/dist/rpm" || true

    - name: Upload RPM artifacts
      uses: actions/upload-artifact@v7.0.0
      with:
        name: v2rayN-rpm
        path: dist/rpm/**/*.rpm

    - name: Upload RPMs to release
      uses: svenstaro/upload-release-action@v2
      with:
        file: dist/rpm/**/*.rpm
        tag: ${{ env.RELEASE_TAG }}
        file_glob: true
        prerelease: true


================================================
FILE: .github/workflows/build-osx.yml
================================================
name: release macOS

on:
  workflow_dispatch:
    inputs:
      release_tag:
        required: false
        type: string
  push:
    branches:
      - master

env:
  OutputArch: "macos-64"
  OutputArchArm: "macos-arm64"
  OutputPath64:  "${{ github.workspace }}/v2rayN/Release/macos-64"
  OutputPathArm64:  "${{ github.workspace }}/v2rayN/Release/macos-arm64"

jobs:
  build:
    strategy:
      matrix:
        configuration: [Release]

    runs-on: macos-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v6.0.2
      with:
        submodules: 'recursive'
        fetch-depth: '0'

    - name: Setup
      uses: actions/setup-dotnet@v5.2.0
      with:
        dotnet-version: '8.0.x'

    - name: Build
      run: |
        cd v2rayN 
        dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-x64   -p:SelfContained=true -o $OutputPath64
        dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-arm64 -p:SelfContained=true -o $OutputPathArm64
        dotnet publish ./AmazTool/AmazTool.csproj             -c Release -r osx-x64   -p:SelfContained=true -p:PublishTrimmed=true -o $OutputPath64
        dotnet publish ./AmazTool/AmazTool.csproj             -c Release -r osx-arm64 -p:SelfContained=true -p:PublishTrimmed=true -o $OutputPathArm64

    - name: Upload build artifacts
      uses: actions/upload-artifact@v7.0.0
      with:
        name: v2rayN-macos
        path: |
          ${{ github.workspace }}/v2rayN/Release/macos*
    
    # release osx package
    - name: Package osx
      if: github.event.inputs.release_tag != ''
      run: |
        brew install create-dmg
        chmod 755 package-osx.sh
        ./package-osx.sh $OutputArch $OutputPath64 ${{ github.event.inputs.release_tag }}
        ./package-osx.sh $OutputArchArm $OutputPathArm64 ${{ github.event.inputs.release_tag }}
    
    - name: Upload dmg to release
      uses: svenstaro/upload-release-action@v2
      if: github.event.inputs.release_tag != ''
      with:
        file: ${{ github.workspace }}/v2rayN*.dmg
        tag: ${{ github.event.inputs.release_tag }}
        file_glob: true
        prerelease: true

    # release zip archive
    - name: Package release zip archive
      if: github.event.inputs.release_tag != ''
      run: |
        chmod 755 package-release-zip.sh
        ./package-release-zip.sh $OutputArch $OutputPath64
        ./package-release-zip.sh $OutputArchArm $OutputPathArm64
    
    - name: Upload zip archive to release
      uses: svenstaro/upload-release-action@v2
      if: github.event.inputs.release_tag != ''
      with:
        file: ${{ github.workspace }}/v2rayN*.zip
        tag: ${{ github.event.inputs.release_tag }}
        file_glob: true
        prerelease: true

================================================
FILE: .github/workflows/build-windows-desktop.yml
================================================
name: release Windows desktop (Avalonia UI)

on:
  workflow_dispatch:
    inputs:
      release_tag:
        required: false
        type: string
  push:
    branches:
      - master

env:
  OutputArch: "windows-64"
  OutputArchArm: "windows-arm64"
  OutputPath64:  "${{ github.workspace }}/v2rayN/Release/windows-64"
  OutputPathArm64:  "${{ github.workspace }}/v2rayN/Release/windows-arm64"

jobs:
  build:
    strategy:
      matrix:
        configuration: [Release]

    runs-on: ubuntu-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v6.0.2
      with:
        submodules: 'recursive'
        fetch-depth: '0'

    - name: Setup
      uses: actions/setup-dotnet@v5.2.0
      with:
        dotnet-version: '8.0.x'

    - name: Build
      run: |
        cd v2rayN 
        dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r win-x64   -p:SelfContained=true -p:EnableWindowsTargeting=true -o $OutputPath64
        dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r win-arm64 -p:SelfContained=true -p:EnableWindowsTargeting=true -o $OutputPathArm64
        dotnet publish ./AmazTool/AmazTool.csproj             -c Release -r win-x64   -p:SelfContained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPath64
        dotnet publish ./AmazTool/AmazTool.csproj             -c Release -r win-arm64 -p:SelfContained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPathArm64

    - name: Upload build artifacts
      uses: actions/upload-artifact@v7.0.0
      with:
        name: v2rayN-windows-desktop
        path: |
          ${{ github.workspace }}/v2rayN/Release/windows*

    # release zip archive
    - name: Package release zip archive
      if: github.event.inputs.release_tag != ''
      run: |
        chmod 755 package-release-zip.sh
        ./package-release-zip.sh $OutputArch $OutputPath64
        mv "v2rayN-${OutputArch}.zip" "v2rayN-${OutputArch}-desktop.zip"
        ./package-release-zip.sh $OutputArchArm $OutputPathArm64
        mv "v2rayN-${OutputArchArm}.zip" "v2rayN-${OutputArchArm}-desktop.zip"

    - name: Upload zip archive to release
      uses: svenstaro/upload-release-action@v2
      if: github.event.inputs.release_tag != ''
      with:
        file: ${{ github.workspace }}/v2rayN*.zip
        tag: ${{ github.event.inputs.release_tag }}
        file_glob: true
        prerelease: true


================================================
FILE: .github/workflows/build-windows.yml
================================================
name: release Windows

on:
  workflow_dispatch:
    inputs:
      release_tag:
        required: false
        type: string
  push:
    branches:
      - master

env:
  OutputArch: "windows-64"
  OutputArchArm: "windows-arm64"
  OutputPath64:  "${{ github.workspace }}/v2rayN/Release/windows-64"
  OutputPathArm64:  "${{ github.workspace }}/v2rayN/Release/windows-arm64"

jobs:
  build:
    strategy:
      matrix:
        configuration: [Release]

    runs-on: ubuntu-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v6.0.2

    - name: Setup
      uses: actions/setup-dotnet@v5.2.0
      with:
        dotnet-version: '8.0.x'

    - name: Build
      run: |
        cd v2rayN 
        dotnet publish ./v2rayN/v2rayN.csproj     -c Release -r win-x64   -p:SelfContained=true -p:EnableWindowsTargeting=true -o $OutputPath64
        dotnet publish ./v2rayN/v2rayN.csproj     -c Release -r win-arm64 -p:SelfContained=true -p:EnableWindowsTargeting=true -o $OutputPathArm64
        dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-x64   -p:SelfContained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPath64
        dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-arm64 -p:SelfContained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPathArm64
  
    - name: Upload build artifacts
      uses: actions/upload-artifact@v7.0.0
      with:
        name: v2rayN-windows
        path: |
          ${{ github.workspace }}/v2rayN/Release/windows*
    
    # release zip archive
    - name: Package release zip archive
      if: github.event.inputs.release_tag != ''
      run: |
        chmod 755 package-release-zip.sh
        ./package-release-zip.sh $OutputArch $OutputPath64
        ./package-release-zip.sh $OutputArchArm $OutputPathArm64
    
    - name: Upload zip archive to release
      uses: svenstaro/upload-release-action@v2
      if: github.event.inputs.release_tag != ''
      with:
        file: ${{ github.workspace }}/v2rayN*.zip
        tag: ${{ github.event.inputs.release_tag }}
        file_glob: true
        prerelease: true


================================================
FILE: .github/workflows/winget-publish.yml
================================================
name: WinGet submission on release
# based off of https://github.com/nushell/nushell/blob/main/.github/workflows/winget-submission.yml
# inspired by https://github.com/microsoft/PowerToys/blob/main/.github/workflows/package-submissions.yml
# Modified by @MerrickZ https://github.com/anpho

on:
  workflow_dispatch:
  release:
    types: [released]

jobs:
  winget:
    name: Publish winget package
    runs-on: windows-latest
    steps:
      - name: Submit v2ray package to Windows Package Manager Community Repository
        run: |

          $wingetPackage = "2dust.v2rayN"
          $gitToken = "${{ secrets.PT_WINGET }}"

          $github = Invoke-RestMethod -uri "https://api.github.com/repos/2dust/v2rayN/releases" 

          $targetRelease = $github | Where-Object -Property prerelease -match 'False' | Select -First 1
          
          $x64InstallerUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'v2rayN-windows-64\.zip' | Select -ExpandProperty browser_download_url
          $arm64InstallerUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'v2rayN-windows-arm64\.zip' | Select -ExpandProperty browser_download_url
          
          $ver = $targetRelease.tag_name

          # getting latest wingetcreate file
          iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
          
          Write-Host "Updating with both x64 and arm64 installers"
          Write-Host "Version: $ver"
          Write-Host "x64 URL: $x64InstallerUrl"
          Write-Host "arm64 URL: $arm64InstallerUrl"
          
          .\wingetcreate.exe update $wingetPackage -s -v $ver -u "$x64InstallerUrl|x64" "$arm64InstallerUrl|arm64" -t $gitToken


================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Mono auto generated files
mono_crash.*

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# Visual Studio 2017 auto generated files
Generated\ Files/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# StyleCop
StyleCopReport.xml

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
# but not Directory.Build.rsp, as it configures directory-level build defaults
!Directory.Build.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# Visual Studio Trace Files
*.e2e

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json

# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info

# Visual Studio code coverage results
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak

# SQL Server files
*.mdf
*.ldf
*.ndf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp

# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp

# Visual Studio 6 technical files
*.ncb
*.aps

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# CodeRush personal settings
.cr/personal

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Tabs Studio
*.tss

# Telerik's JustMock configuration file
*.jmconfig

# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
*.binlog

# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Local History for Visual Studio
.localhistory/

# Visual Studio History (VSHistory) files
.vshistory/

# BeatPulse healthcheck temp database
healthchecksdb

# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd

# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp

# JetBrains Rider
.idea/
*.sln.iml


================================================
FILE: .gitmodules
================================================
[submodule "v2rayN/GlobalHotKeys"]
	path = v2rayN/GlobalHotKeys
	url = https://github.com/2dust/GlobalHotKeys


================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) 2019-Present  2dust

    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 <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    v2rayN  Copyright (C) 2019-Present  2dust
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.


================================================
FILE: README.md
================================================
# v2rayN

A GUI client for Windows, Linux and macOS, support [Xray](https://github.com/XTLS/Xray-core)
and [sing-box](https://github.com/SagerNet/sing-box)
and [others](https://github.com/2dust/v2rayN/wiki/List-of-supported-cores)

[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/2dust/v2rayN)](https://github.com/2dust/v2rayN/commits/master)
[![CodeFactor](https://www.codefactor.io/repository/github/2dust/v2rayn/badge)](https://www.codefactor.io/repository/github/2dust/v2rayn)
[![GitHub Releases](https://img.shields.io/github/downloads/2dust/v2rayN/latest/total?logo=github)](https://github.com/2dust/v2rayN/releases)
[![Chat on Telegram](https://img.shields.io/badge/Chat%20on-Telegram-brightgreen.svg)](https://t.me/v2rayn)

## How to use

Read the [Wiki](https://github.com/2dust/v2rayN/wiki) for details.

## Telegram Channel

[github_2dust](https://t.me/github_2dust)


================================================
FILE: package-debian.sh
================================================
#!/bin/bash

Arch="$1"
OutputPath="$2"
Version="$3"

FileName="v2rayN-${Arch}.zip"
wget -nv -O $FileName "https://github.com/2dust/v2rayN-core-bin/raw/refs/heads/master/$FileName"
7z x $FileName
cp -rf v2rayN-${Arch}/* $OutputPath

PackagePath="v2rayN-Package-${Arch}"
mkdir -p "${PackagePath}/DEBIAN"
mkdir -p "${PackagePath}/opt"
cp -rf $OutputPath "${PackagePath}/opt/v2rayN"
echo "When this file exists, app will not store configs under this folder" > "${PackagePath}/opt/v2rayN/NotStoreConfigHere.txt"

if [ $Arch = "linux-64" ]; then
    Arch2="amd64"
else
    Arch2="arm64"
fi
echo $Arch2

# basic
cat >"${PackagePath}/DEBIAN/control" <<-EOF
Package: v2rayN
Version: $Version
Architecture: $Arch2
Maintainer: https://github.com/2dust/v2rayN
Depends: libc6 (>= 2.34), fontconfig (>= 2.13.1), desktop-file-utils (>= 0.26), xdg-utils (>= 1.1.3), coreutils (>= 8.32), bash (>= 5.1), libfreetype6 (>= 2.11)
Description: A GUI client for Windows and Linux, support Xray core and sing-box-core and others
EOF

mkdir -p "${PackagePath}/usr/share/applications"
cat >"${PackagePath}/usr/share/applications/v2rayN.desktop" <<-EOF
[Desktop Entry]
Name=v2rayN
Comment=A GUI client for Windows and Linux, support Xray core and sing-box-core and others
Exec=/opt/v2rayN/v2rayN
Icon=/opt/v2rayN/v2rayN.png
Terminal=false
Type=Application
Categories=Network;Application;
EOF

cat >"${PackagePath}/DEBIAN/postinst" <<-'EOF'
set -e
update-desktop-database || true
exit 0
EOF

sudo chmod 0755 "${PackagePath}/DEBIAN/postinst"
sudo chmod 0755 "${PackagePath}/opt/v2rayN/v2rayN"
sudo chmod 0755 "${PackagePath}/opt/v2rayN/AmazTool"

# Patch
# set owner to root:root
sudo chown -R root:root "${PackagePath}"
# set all directories to 755 (readable & traversable by all users)
sudo find "${PackagePath}/opt/v2rayN" -type d -exec chmod 755 {} +
# set all regular files to 644 (readable by all users)
sudo find "${PackagePath}/opt/v2rayN" -type f -exec chmod 644 {} +
# ensure main binaries are 755 (executable by all users)
sudo chmod 755 "${PackagePath}/opt/v2rayN/v2rayN" 2>/dev/null || true
sudo chmod 755 "${PackagePath}/opt/v2rayN/AmazTool" 2>/dev/null || true

# build deb package
sudo dpkg-deb -Zxz --build $PackagePath
sudo mv "${PackagePath}.deb" "v2rayN-${Arch}.deb"


================================================
FILE: package-osx.sh
================================================
#!/bin/bash

Arch="$1"
OutputPath="$2"
Version="$3"

FileName="v2rayN-${Arch}.zip"
wget -nv -O $FileName "https://github.com/2dust/v2rayN-core-bin/raw/refs/heads/master/$FileName"
7z x $FileName
cp -rf v2rayN-${Arch}/* $OutputPath

PackagePath="v2rayN-Package-${Arch}"
mkdir -p "$PackagePath/v2rayN.app/Contents/Resources"
cp -rf "$OutputPath" "$PackagePath/v2rayN.app/Contents/MacOS"
cp -f "$PackagePath/v2rayN.app/Contents/MacOS/v2rayN.icns" "$PackagePath/v2rayN.app/Contents/Resources/AppIcon.icns"
echo "When this file exists, app will not store configs under this folder" > "$PackagePath/v2rayN.app/Contents/MacOS/NotStoreConfigHere.txt"
chmod +x "$PackagePath/v2rayN.app/Contents/MacOS/v2rayN"

cat >"$PackagePath/v2rayN.app/Contents/Info.plist" <<-EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>CFBundleDevelopmentRegion</key>
  <string>English</string>
  <key>CFBundleDisplayName</key>
  <string>v2rayN</string>
  <key>CFBundleExecutable</key>
  <string>v2rayN</string>
  <key>CFBundleIconFile</key>
  <string>AppIcon</string>
  <key>CFBundleIconName</key>
  <string>AppIcon</string>
  <key>CFBundleIdentifier</key>
  <string>2dust.v2rayN</string>
  <key>CFBundleName</key>
  <string>v2rayN</string>
  <key>CFBundlePackageType</key>
  <string>APPL</string>
  <key>CFBundleShortVersionString</key>
  <string>${Version}</string>
  <key>CSResourcesFileMapped</key>
  <true/>
  <key>NSHighResolutionCapable</key>
  <true/>
  <key>LSMinimumSystemVersion</key>
  <string>12.7</string>
</dict>
</plist>
EOF

create-dmg \
    --volname "v2rayN Installer" \
    --window-size 700 420 \
    --icon-size 100 \
    --icon "v2rayN.app" 160 185 \
    --hide-extension "v2rayN.app" \
    --app-drop-link 500 185 \
    "v2rayN-${Arch}.dmg" \
    "$PackagePath/v2rayN.app"


================================================
FILE: package-release-zip.sh
================================================
#!/bin/bash

Arch="$1"
OutputPath="$2"

OutputArch="v2rayN-${Arch}"
FileName="v2rayN-${Arch}.zip"

wget -nv -O $FileName "https://github.com/2dust/v2rayN-core-bin/raw/refs/heads/master/$FileName"

ZipPath64="./$OutputArch"
mkdir $ZipPath64

cp -rf $OutputPath "$ZipPath64/$OutputArch"
7z a -tZip $FileName "$ZipPath64/$OutputArch" -mx1

================================================
FILE: package-rhel.sh
================================================
#!/usr/bin/env bash
set -euo pipefail

# Require Red Hat base branch
. /etc/os-release

case "${ID:-}" in
  rhel|rocky|almalinux|fedora|centos)
    echo "Detected supported system: ${NAME:-$ID} ${VERSION_ID:-}"
    ;;
  *)
    echo "Unsupported system: ${NAME:-unknown} (${ID:-unknown})."
    echo "This script only supports: RHEL / Rocky / AlmaLinux / Fedora / CentOS."
    exit 1
    ;;
esac

# Kernel version
MIN_KERNEL="6.11"
CURRENT_KERNEL="$(uname -r)"

lowest="$(printf '%s\n%s\n' "$MIN_KERNEL" "$CURRENT_KERNEL" | sort -V | head -n1)"

if [[ "$lowest" != "$MIN_KERNEL" ]]; then
    echo "Kernel $CURRENT_KERNEL is below $MIN_KERNEL"
    exit 1
fi

echo "[OK] Kernel $CURRENT_KERNEL verified."

# Config & Parse arguments
VERSION_ARG="${1:-}"     # Pass version number like 7.13.8, or leave empty
WITH_CORE="both"         # Default: bundle both xray+sing-box
FORCE_NETCORE=0          # --netcore => skip archive bundle, use separate downloads
ARCH_OVERRIDE=""         # --arch x64|arm64|all (optional compile target)
BUILD_FROM=""            # --buildfrom 1|2|3 to select channel non-interactively

# If the first argument starts with --, do not treat it as a version number
if [[ "${VERSION_ARG:-}" == --* ]]; then
  VERSION_ARG=""
fi
# Take the first non --* argument as version, discard it
if [[ -n "${VERSION_ARG:-}" ]]; then shift || true; fi

# Parse remaining optional arguments
while [[ $# -gt 0 ]]; do
  case "$1" in
    --with-core)     WITH_CORE="${2:-both}"; shift 2;;
    --xray-ver)      XRAY_VER="${2:-}"; shift 2;;
    --singbox-ver)   SING_VER="${2:-}"; shift 2;;
    --netcore)       FORCE_NETCORE=1; shift;;
    --arch)          ARCH_OVERRIDE="${2:-}"; shift 2;;
    --buildfrom)     BUILD_FROM="${2:-}"; shift 2;;
    *)
      if [[ -z "${VERSION_ARG:-}" ]]; then VERSION_ARG="$1"; fi
      shift;;
  esac
done

# Conflict: version number AND --buildfrom cannot be used together
if [[ -n "${VERSION_ARG:-}" && -n "${BUILD_FROM:-}" ]]; then
  echo "You cannot specify both an explicit version and --buildfrom at the same time."
  echo "        Provide either a version (e.g. 7.14.0) OR --buildfrom 1|2|3."
  exit 1
fi

# Check and install dependencies
host_arch="$(uname -m)"
[[ "$host_arch" == "aarch64" || "$host_arch" == "x86_64" ]] || { echo "Only supports aarch64 / x86_64"; exit 1; }

install_ok=0

if command -v dnf >/dev/null 2>&1; then
  sudo dnf -y install rpm-build rpmdevtools curl unzip tar jq rsync dotnet-sdk-8.0 \
    && install_ok=1
fi

if [[ "$install_ok" -ne 1 ]]; then
  echo "Could not auto-install dependencies for '$ID'. Make sure these are available:"
  echo "dotnet-sdk 8.x, curl, unzip, tar, rsync, rpm, rpmdevtools, rpm-build (on Red Hat branch)"
fi

# Root directory
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"

# Git submodules (best effort)
if [[ -f .gitmodules ]]; then
  git submodule sync --recursive || true
  git submodule update --init --recursive || true
fi

# Locate project
PROJECT="v2rayN.Desktop/v2rayN.Desktop.csproj"
if [[ ! -f "$PROJECT" ]]; then
  PROJECT="$(find . -maxdepth 3 -name 'v2rayN.Desktop.csproj' | head -n1 || true)"
fi
[[ -f "$PROJECT" ]] || { echo "v2rayN.Desktop.csproj not found"; exit 1; }

choose_channel() {
  # If --buildfrom provided, map it directly and skip interaction.
  if [[ -n "${BUILD_FROM:-}" ]]; then
    case "$BUILD_FROM" in
      1) echo "latest"; return 0;;
      2) echo "prerelease"; return 0;;
      3) echo "keep"; return 0;;
      *) echo "[ERROR] Invalid --buildfrom value: ${BUILD_FROM}. Use 1|2|3." >&2; exit 1;;
    esac
  fi

  # Print menu to stderr and read from /dev/tty so stdout only carries the token.
  local ch="latest" sel=""

  if [[ -t 0 ]]; then
    echo "[?] Choose v2rayN release channel:" >&2
    echo "    1) Latest (stable)  [default]" >&2
    echo "    2) Pre-release (preview)" >&2
    echo "    3) Keep current (do nothing)" >&2
    printf "Enter 1, 2 or 3 [default 1]: " >&2

    if read -r sel </dev/tty; then
      case "${sel:-}" in
        2) ch="prerelease" ;;
        3) ch="keep" ;;
      esac
    fi
  fi

  echo "$ch"
}

get_latest_tag_latest() {
  curl -fsSL "https://api.github.com/repos/2dust/v2rayN/releases/latest" \
    | jq -re '.tag_name' \
    | sed 's/^v//'
}

get_latest_tag_prerelease() {
  curl -fsSL "https://api.github.com/repos/2dust/v2rayN/releases?per_page=20" \
    | jq -re 'first(.[] | select(.prerelease == true) | .tag_name)' \
    | sed 's/^v//'
}

git_try_checkout() {
  # Try a series of refs and checkout when found.
  local want="$1" ref=""
  if git rev-parse --git-dir >/dev/null 2>&1; then
    git fetch --tags --force --prune --depth=1 || true
    if git rev-parse "refs/tags/${want}" >/dev/null 2>&1; then
      ref="${want}"
    fi
    if [[ -n "$ref" ]]; then
      echo "[OK] Found ref '${ref}', checking out..."
      git checkout -f "${ref}"
      if [[ -f .gitmodules ]]; then
        git submodule sync --recursive || true
        git submodule update --init --recursive || true
      fi
      return 0
    fi
  fi
  return 1
}

apply_channel_or_keep() {
  local ch="$1" tag

  if [[ "$ch" == "keep" ]]; then
    echo "[*] Keep current repository state (no checkout)."
    VERSION="$(git describe --tags --abbrev=0 2>/dev/null || echo '0.0.0+git')"
    VERSION="${VERSION#v}"
    return 0
  fi

  echo "[*] Resolving ${ch} tag from GitHub releases..."
  if [[ "$ch" == "prerelease" ]]; then
    tag="$(get_latest_tag_prerelease || true)"
  else
    tag="$(get_latest_tag_latest || true)"
  fi

  [[ -n "$tag" ]] || { echo "Failed to resolve latest tag for channel '${ch}'."; exit 1; }
  echo "[*] Latest tag for '${ch}': ${tag}"
  git_try_checkout "$tag" || { echo "Failed to checkout '${tag}'."; exit 1; }
  VERSION="${tag#v}"
}

if git rev-parse --git-dir >/dev/null 2>&1; then
  if [[ -n "${VERSION_ARG:-}" ]]; then
    clean_ver="${VERSION_ARG#v}"
    if git_try_checkout "$clean_ver"; then
      VERSION="$clean_ver"
    else
      echo "[WARN] Tag '${VERSION_ARG}' not found."
      ch="$(choose_channel)"
      apply_channel_or_keep "$ch"
    fi
  else
    ch="$(choose_channel)"
    apply_channel_or_keep "$ch"
  fi
else
  echo "Current directory is not a git repo; proceeding on current tree."
  VERSION="${VERSION_ARG:-0.0.0}"
fi

VERSION="${VERSION#v}"
echo "[*] GUI version resolved as: ${VERSION}"

# Helpers for core
download_xray() {
  # Download Xray core
  local outdir="$1" ver="${XRAY_VER:-}" url tmp zipname="xray.zip"
  mkdir -p "$outdir"
  if [[ -z "$ver" ]]; then
    ver="$(curl -fsSL https://api.github.com/repos/XTLS/Xray-core/releases/latest \
        | grep -Eo '"tag_name":\s*"v[^"]+"' | sed -E 's/.*"v([^"]+)".*/\1/' | head -n1)" || true
  fi
  [[ -n "$ver" ]] || { echo "[xray] Failed to get version"; return 1; }
  if [[ "$RID_DIR" == "linux-arm64" ]]; then
    url="https://github.com/XTLS/Xray-core/releases/download/v${ver}/Xray-linux-arm64-v8a.zip"
  else
    url="https://github.com/XTLS/Xray-core/releases/download/v${ver}/Xray-linux-64.zip"
  fi
  echo "[+] Download xray: $url"
  tmp="$(mktemp -d)"; trap '[[ -n "${tmp:-}" ]] && rm -rf "$tmp"' RETURN
  curl -fL "$url" -o "$tmp/$zipname"
  unzip -q "$tmp/$zipname" -d "$tmp"
  install -Dm755 "$tmp/xray" "$outdir/xray"
}

download_singbox() {
  # Download sing-box
  local outdir="$1" ver="${SING_VER:-}" url tmp tarname="singbox.tar.gz" bin
  mkdir -p "$outdir"
  if [[ -z "$ver" ]]; then
    ver="$(curl -fsSL https://api.github.com/repos/SagerNet/sing-box/releases/latest \
        | grep -Eo '"tag_name":\s*"v[^"]+"' | sed -E 's/.*"v([^"]+)".*/\1/' | head -n1)" || true
  fi
  [[ -n "$ver" ]] || { echo "[sing-box] Failed to get version"; return 1; }
  if [[ "$RID_DIR" == "linux-arm64" ]]; then
    url="https://github.com/SagerNet/sing-box/releases/download/v${ver}/sing-box-${ver}-linux-arm64.tar.gz"
  else
    url="https://github.com/SagerNet/sing-box/releases/download/v${ver}/sing-box-${ver}-linux-amd64.tar.gz"
  fi
  echo "[+] Download sing-box: $url"
  tmp="$(mktemp -d)"; trap '[[ -n "${tmp:-}" ]] && rm -rf "$tmp"' RETURN
  curl -fL "$url" -o "$tmp/$tarname"
  tar -C "$tmp" -xzf "$tmp/$tarname"
  bin="$(find "$tmp" -type f -name 'sing-box' | head -n1 || true)"
  [[ -n "$bin" ]] || { echo "[!] sing-box unpack failed"; return 1; }
  install -Dm755 "$bin" "$outdir/sing-box"
}

# Move geo files to outroot/bin
unify_geo_layout() {
  local outroot="$1"
  mkdir -p "$outroot/bin"
  local names=( \
    "geosite.dat" \
    "geoip.dat" \
    "geoip-only-cn-private.dat" \
    "Country.mmdb" \
    "geoip.metadb" \
  )
  for n in "${names[@]}"; do
    if [[ -f "$outroot/bin/xray/$n" ]]; then
      mv -f "$outroot/bin/xray/$n" "$outroot/bin/$n"
    fi
  done
}

# Download geo/rule assets
download_geo_assets() {
  local outroot="$1"
  local bin_dir="$outroot/bin"
  local srss_dir="$bin_dir/srss"
  mkdir -p "$bin_dir" "$srss_dir"

  echo "[+] Download Xray Geo to ${bin_dir}"
  curl -fsSL -o "$bin_dir/geosite.dat" \
    "https://github.com/Loyalsoldier/V2ray-rules-dat/releases/latest/download/geosite.dat"
  curl -fsSL -o "$bin_dir/geoip.dat" \
    "https://github.com/Loyalsoldier/V2ray-rules-dat/releases/latest/download/geoip.dat"
  curl -fsSL -o "$bin_dir/geoip-only-cn-private.dat" \
    "https://raw.githubusercontent.com/Loyalsoldier/geoip/release/geoip-only-cn-private.dat"
  curl -fsSL -o "$bin_dir/Country.mmdb" \
    "https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb"

  echo "[+] Download sing-box rule DB & rule-sets"
  curl -fsSL -o "$bin_dir/geoip.metadb" \
    "https://github.com/MetaCubeX/meta-rules-dat/releases/latest/download/geoip.metadb" || true

  for f in \
    geoip-private.srs geoip-cn.srs geoip-facebook.srs geoip-fastly.srs \
    geoip-google.srs geoip-netflix.srs geoip-telegram.srs geoip-twitter.srs; do
    curl -fsSL -o "$srss_dir/$f" \
      "https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geoip/$f" || true
  done
  for f in \
    geosite-cn.srs geosite-gfw.srs geosite-google.srs geosite-greatfire.srs \
    geosite-geolocation-cn.srs geosite-category-ads-all.srs geosite-private.srs; do
    curl -fsSL -o "$srss_dir/$f" \
      "https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geosite/$f" || true
  done

  # Unify to bin
  unify_geo_layout "$outroot"
}

# Prefer the prebuilt v2rayN core bundle; then unify geo layout
download_v2rayn_bundle() {
  local outroot="$1"
  local url=""
  if [[ "$RID_DIR" == "linux-arm64" ]]; then
    url="https://raw.githubusercontent.com/2dust/v2rayN-core-bin/refs/heads/master/v2rayN-linux-arm64.zip"
  else
    url="https://raw.githubusercontent.com/2dust/v2rayN-core-bin/refs/heads/master/v2rayN-linux-64.zip"
  fi
  echo "[+] Try v2rayN bundle archive: $url"
  local tmp zipname
  tmp="$(mktemp -d)"; zipname="$tmp/v2rayn.zip"
  curl -fL "$url" -o "$zipname" || { echo "[!] Bundle download failed"; return 1; }
  unzip -q "$zipname" -d "$tmp" || { echo "[!] Bundle unzip failed"; return 1; }

  if [[ -d "$tmp/bin" ]]; then
    mkdir -p "$outroot/bin"
    rsync -a "$tmp/bin/" "$outroot/bin/"
  else
    rsync -a "$tmp/" "$outroot/"
  fi

  rm -f "$outroot/v2rayn.zip" 2>/dev/null || true
  find "$outroot" -type d -name "mihomo" -prune -exec rm -rf {} + 2>/dev/null || true

  local nested_dir
  nested_dir="$(find "$outroot" -maxdepth 1 -type d -name 'v2rayN-linux-*' | head -n1 || true)"
  if [[ -n "$nested_dir" && -d "$nested_dir/bin" ]]; then
    mkdir -p "$outroot/bin"
    rsync -a "$nested_dir/bin/" "$outroot/bin/"
    rm -rf "$nested_dir"
  fi

  # Unify to bin/
  unify_geo_layout "$outroot"

  echo "[+] Bundle extracted to $outroot"
}

# ===== Build results collection for --arch all ========================================
BUILT_RPMS=()     # Will collect absolute paths of built RPMs
BUILT_ALL=0       # Flag to know if we should print the final summary

# ===== Build (single-arch) function ====================================================
build_for_arch() {
  # $1: target short arch: x64 | arm64
  local short="$1"
  local rid rpm_target archdir
  case "$short" in
    x64)   rid="linux-x64";   rpm_target="x86_64"; archdir="x86_64" ;;
    arm64) rid="linux-arm64"; rpm_target="aarch64"; archdir="aarch64" ;;
    *) echo "Unknown arch '$short' (use x64|arm64)"; return 1;;
  esac

  echo "[*] Building for target: $short  (RID=$rid, RPM --target $rpm_target)"

  # .NET publish (self-contained) for this RID
  dotnet clean "$PROJECT" -c Release
  rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true

  dotnet restore "$PROJECT"
  dotnet publish "$PROJECT" \
    -c Release -r "$rid" \
    -p:PublishSingleFile=false \
    -p:SelfContained=true

  # Per-arch variables (scoped)
  local RID_DIR="$rid"
  local PUBDIR
  PUBDIR="$(dirname "$PROJECT")/bin/Release/net8.0/${RID_DIR}/publish"
  [[ -d "$PUBDIR" ]]

  # Make RID_DIR visible to download helpers (they read this var)
  export RID_DIR

  # Per-arch working area
  local PKGROOT="v2rayN-publish"
  local WORKDIR
  WORKDIR="$(mktemp -d)"
  trap '[[ -n "${WORKDIR:-}" ]] && rm -rf "$WORKDIR"' RETURN

  # rpmbuild topdir selection
  local TOPDIR SPECDIR SOURCEDIR
  rpmdev-setuptree
  TOPDIR="${HOME}/rpmbuild"
  SPECDIR="${TOPDIR}/SPECS"
  SOURCEDIR="${TOPDIR}/SOURCES"

  # Stage publish content
  mkdir -p "$WORKDIR/$PKGROOT"
  cp -a "$PUBDIR/." "$WORKDIR/$PKGROOT/"

  # Optional icon
  local ICON_CANDIDATE
  ICON_CANDIDATE="$(dirname "$PROJECT")/../v2rayN.Desktop/v2rayN.png"
  [[ -f "$ICON_CANDIDATE" ]] && cp "$ICON_CANDIDATE" "$WORKDIR/$PKGROOT/v2rayn.png" || true

  # Prepare bin structure
  mkdir -p "$WORKDIR/$PKGROOT/bin/xray" "$WORKDIR/$PKGROOT/bin/sing_box"

  # Bundle / cores per-arch
  fetch_separate_cores_and_rules() {
    local outroot="$1"

    if [[ "$WITH_CORE" == "xray" || "$WITH_CORE" == "both" ]]; then
      download_xray "$outroot/bin/xray" || echo "[!] xray download failed (skipped)"
    fi
    if [[ "$WITH_CORE" == "sing-box" || "$WITH_CORE" == "both" ]]; then
      download_singbox "$outroot/bin/sing_box" || echo "[!] sing-box download failed (skipped)"
    fi
    download_geo_assets "$outroot" || echo "[!] Geo rules download failed (skipped)"
  }

  if [[ "$FORCE_NETCORE" -eq 0 ]]; then
    if download_v2rayn_bundle "$WORKDIR/$PKGROOT"; then
      echo "[*] Using v2rayN bundle archive."
    else
      echo "[*] Bundle failed, fallback to separate core + rules."
      fetch_separate_cores_and_rules "$WORKDIR/$PKGROOT"
    fi
  else
    echo "[*] --netcore specified: use separate core + rules."
    fetch_separate_cores_and_rules "$WORKDIR/$PKGROOT"
  fi

  # Tarball
  mkdir -p "$SOURCEDIR"
  tar -C "$WORKDIR" -czf "$SOURCEDIR/$PKGROOT.tar.gz" "$PKGROOT"

  # SPEC
  local SPECFILE="$SPECDIR/v2rayN.spec"
  mkdir -p "$SPECDIR"
  cat > "$SPECFILE" <<'SPEC'
%global debug_package %{nil}
%undefine _debuginfo_subpackages
%undefine _debugsource_packages
# Ignore outdated LTTng dependencies incorrectly reported by the .NET runtime (to avoid installation failures)
%global __requires_exclude ^liblttng-ust\.so\..*$

Name:           v2rayN
Version:        __VERSION__
Release:        1%{?dist}
Summary:        v2rayN (Avalonia) GUI client for Linux (x86_64/aarch64)
License:        GPL-3.0-only
URL:            https://github.com/2dust/v2rayN
BugURL:         https://github.com/2dust/v2rayN/issues
ExclusiveArch:  aarch64 x86_64
Source0:        __PKGROOT__.tar.gz

# Runtime dependencies (Avalonia / X11 / Fonts / GL)
Requires:       cairo, pango, openssl, mesa-libEGL, mesa-libGL
Requires:       glibc >= 2.34
Requires:       fontconfig >= 2.13.1
Requires:       desktop-file-utils >= 0.26
Requires:       xdg-utils >= 1.1.3
Requires:       coreutils >= 8.32
Requires:       bash >= 5.1
Requires:       freetype >= 2.10

%description
v2rayN Linux for Red Hat Enterprise Linux
Support vless / vmess / Trojan / http / socks / Anytls / Hysteria2 / Shadowsocks / tuic / WireGuard
Support Red Hat Enterprise Linux / Fedora Linux / Rocky Linux / AlmaLinux / CentOS
For more information, Please visit our website
https://github.com/2dust/v2rayN

%prep
%setup -q -n __PKGROOT__

%build
# no build

%install
install -dm0755 %{buildroot}/opt/v2rayN
cp -a * %{buildroot}/opt/v2rayN/

# Launcher (prefer native ELF first, then DLL fallback)
install -dm0755 %{buildroot}%{_bindir}
cat > %{buildroot}%{_bindir}/v2rayn << 'EOF'
#!/usr/bin/bash
set -euo pipefail
DIR="/opt/v2rayN"

# Prefer native apphost
if [[ -x "$DIR/v2rayN" ]]; then exec "$DIR/v2rayN" "$@"; fi

# DLL fallback
for dll in v2rayN.Desktop.dll v2rayN.dll; do
  if [[ -f "$DIR/$dll" ]]; then exec /usr/bin/dotnet "$DIR/$dll" "$@"; fi
done

echo "v2rayN launcher: no executable found in $DIR" >&2
ls -l "$DIR" >&2 || true
exit 1
EOF
chmod 0755 %{buildroot}%{_bindir}/v2rayn

# Desktop file
install -dm0755 %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/v2rayn.desktop << 'EOF'
[Desktop Entry]
Type=Application
Name=v2rayN
Comment=v2rayN for Red Hat Enterprise Linux
Exec=v2rayn
Icon=v2rayn
Terminal=false
Categories=Network;
EOF

# Icon
if [ -f "%{_builddir}/__PKGROOT__/v2rayn.png" ]; then
  install -dm0755 %{buildroot}%{_datadir}/icons/hicolor/256x256/apps
  install -m0644 %{_builddir}/__PKGROOT__/v2rayn.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/v2rayn.png
fi

%post
/usr/bin/update-desktop-database %{_datadir}/applications >/dev/null 2>&1 || true
/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor >/dev/null 2>&1 || true

%postun
/usr/bin/update-desktop-database %{_datadir}/applications >/dev/null 2>&1 || true
/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor >/dev/null 2>&1 || true

%files
%{_bindir}/v2rayn
/opt/v2rayN
%{_datadir}/applications/v2rayn.desktop
%{_datadir}/icons/hicolor/256x256/apps/v2rayn.png
SPEC

  # Replace placeholders
  sed -i "s/__VERSION__/${VERSION}/g" "$SPECFILE"
  sed -i "s/__PKGROOT__/${PKGROOT}/g" "$SPECFILE"

  # Build RPM for this arch
  rpmbuild -ba "$SPECFILE" --target "$rpm_target"

  echo "Build done for $short. RPM at:"
  local f
  for f in "${TOPDIR}/RPMS/${archdir}/v2rayN-${VERSION}-1"*.rpm; do
    [[ -e "$f" ]] || continue
    echo "  $f"
    BUILT_RPMS+=("$f")
  done
}

# ===== Arch selection and build orchestration =========================================
case "${ARCH_OVERRIDE:-}" in
  all)           targets=(x64 arm64); BUILT_ALL=1 ;;
  x64|amd64)     targets=(x64) ;;
  arm64|aarch64) targets=(arm64) ;;
  "")            targets=($([[ "$host_arch" == "aarch64" ]] && echo arm64 || echo x64)) ;;
  *)             echo "Unknown --arch '${ARCH_OVERRIDE}'. Use x64|arm64|all."; exit 1 ;;
esac

for arch in "${targets[@]}"; do
  build_for_arch "$arch"
done

# Print Both arches information
if [[ "$BUILT_ALL" -eq 1 ]]; then
  echo ""
  echo "================ Build Summary (both architectures) ================"
  if [[ "${#BUILT_RPMS[@]}" -gt 0 ]]; then
    for rp in "${BUILT_RPMS[@]}"; do
      echo "$rp"
    done
  else
    echo "No RPMs detected in summary (check build logs above)."
  fi
  echo "===================================================================="
fi


================================================
FILE: v2rayN/AmazTool/AmazTool.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">

	<PropertyGroup>
		<OutputType>Exe</OutputType>
	</PropertyGroup>

	<ItemGroup>
		<EmbeddedResource Update="Resx\Resource.resx">
			<Generator>ResXFileCodeGenerator</Generator>
			<LastGenOutput>Resource.Designer.cs</LastGenOutput>
		</EmbeddedResource>

		<Compile Update="Resx\Resource.Designer.cs">
			<DesignTime>True</DesignTime>
			<AutoGen>True</AutoGen>
			<DependentUpon>Resource.resx</DependentUpon>
		</Compile>
	</ItemGroup>

</Project>

================================================
FILE: v2rayN/AmazTool/Program.cs
================================================
namespace AmazTool;

internal static class Program
{
    [STAThread]
    private static void Main(string[] args)
    {
        try
        {
            // If no arguments are provided, display usage guidelines and exit
            if (args.Length == 0)
            {
                ShowHelp();
                return;
            }

            // Log all arguments for debugging purposes
            foreach (var arg in args)
            {
                Console.WriteLine(arg);
            }

            // Parse command based on first argument
            switch (args[0].ToLowerInvariant())
            {
                case "rebootas":
                    // Handle application restart
                    HandleRebootAsync();
                    break;

                case "help":
                case "--help":
                case "-h":
                case "/?":
                    // Display help information
                    ShowHelp();
                    break;

                default:
                    // Default behavior: handle as upgrade data
                    // Maintain backward compatibility with existing usage pattern
                    var argData = Uri.UnescapeDataString(string.Join(" ", args));
                    HandleUpgrade(argData);
                    break;
            }
        }
        catch (Exception ex)
        {
            // Global exception handling
            Console.WriteLine($"An error occurred: {ex.Message}");
            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
    }

    /// <summary>
    /// Display help information and usage guidelines
    /// </summary>
    private static void ShowHelp()
    {
        Console.WriteLine(Resx.Resource.Guidelines);
        Console.WriteLine("Available commands:");
        Console.WriteLine("  rebootas             - Restart the application");
        Console.WriteLine("  help                 - Display this help information");
        Thread.Sleep(5000);
    }

    /// <summary>
    /// Handle application restart
    /// </summary>
    private static void HandleRebootAsync()
    {
        Console.WriteLine("Restarting application...");
        Thread.Sleep(1000);
        Utils.StartV2RayN();
    }

    /// <summary>
    /// Handle application upgrade with the provided data
    /// </summary>
    /// <param name="upgradeData">Data for the upgrade process</param>
    private static void HandleUpgrade(string upgradeData)
    {
        Console.WriteLine("Upgrading application...");
        UpgradeApp.Upgrade(upgradeData);
    }
}


================================================
FILE: v2rayN/AmazTool/Resx/Resource.Designer.cs
================================================
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行时版本:4.0.30319.42000
//
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace AmazTool.Resx {
    using System;
    
    
    /// <summary>
    ///   一个强类型的资源类,用于查找本地化的字符串等。
    /// </summary>
    // 此类是由 StronglyTypedResourceBuilder
    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
    // (以 /str 作为命令选项),或重新生成 VS 项目。
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resource {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resource() {
        }
        
        /// <summary>
        ///   返回此类使用的缓存的 ResourceManager 实例。
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AmazTool.Resx.Resource", typeof(Resource).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }
        
        /// <summary>
        ///   重写当前线程的 CurrentUICulture 属性,对
        ///   使用此强类型资源类的所有资源查找执行重写。
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }
        
        /// <summary>
        ///   查找类似 Failed to terminate the v2rayN. Close it manually, or the upgrade may fail. 的本地化字符串。
        /// </summary>
        internal static string FailedTerminateProcess {
            get {
                return ResourceManager.GetString("FailedTerminateProcess", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Failed to extract the update package. 的本地化字符串。
        /// </summary>
        internal static string FailedUnzipping {
            get {
                return ResourceManager.GetString("FailedUnzipping", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Upgrade failed. 的本地化字符串。
        /// </summary>
        internal static string FailedUpgrade {
            get {
                return ResourceManager.GetString("FailedUpgrade", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Please run it from the main application. 的本地化字符串。
        /// </summary>
        internal static string Guidelines {
            get {
                return ResourceManager.GetString("Guidelines", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Information 的本地化字符串。
        /// </summary>
        internal static string Information {
            get {
                return ResourceManager.GetString("Information", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 In progress, please wait... 的本地化字符串。
        /// </summary>
        internal static string InProgress {
            get {
                return ResourceManager.GetString("InProgress", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Start v2rayN, please wait... 的本地化字符串。
        /// </summary>
        internal static string Restartv2rayN {
            get {
                return ResourceManager.GetString("Restartv2rayN", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Start extracting the update package... 的本地化字符串。
        /// </summary>
        internal static string StartUnzipping {
            get {
                return ResourceManager.GetString("StartUnzipping", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Successfully extracted the update package. 的本地化字符串。
        /// </summary>
        internal static string SuccessUnzipping {
            get {
                return ResourceManager.GetString("SuccessUnzipping", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Upgrade success. 的本地化字符串。
        /// </summary>
        internal static string SuccessUpgrade {
            get {
                return ResourceManager.GetString("SuccessUpgrade", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Try to terminate the v2rayN process... 的本地化字符串。
        /// </summary>
        internal static string TryTerminateProcess {
            get {
                return ResourceManager.GetString("TryTerminateProcess", resourceCulture);
            }
        }
        
        /// <summary>
        ///   查找类似 Upgrade failed, file not found. 的本地化字符串。
        /// </summary>
        internal static string UpgradeFileNotFound {
            get {
                return ResourceManager.GetString("UpgradeFileNotFound", resourceCulture);
            }
        }
    }
}


================================================
FILE: v2rayN/AmazTool/Resx/Resource.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 2.0
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used for serialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="Restartv2rayN" xml:space="preserve">
    <value>Start v2rayN, please wait...</value>
  </data>
  <data name="Guidelines" xml:space="preserve">
    <value>Please run it from the main application.</value>
  </data>
  <data name="UpgradeFileNotFound" xml:space="preserve">
    <value>Upgrade failed, file not found.</value>
  </data>
  <data name="InProgress" xml:space="preserve">
    <value>In progress, please wait...</value>
  </data>
  <data name="TryTerminateProcess" xml:space="preserve">
    <value>Try to terminate the v2rayN process...</value>
  </data>
  <data name="FailedTerminateProcess" xml:space="preserve">
    <value>Failed to terminate the v2rayN. Close it manually, or the upgrade may fail.</value>
  </data>
  <data name="StartUnzipping" xml:space="preserve">
    <value>Start extracting the update package...</value>
  </data>
  <data name="SuccessUnzipping" xml:space="preserve">
    <value>Successfully extracted the update package.</value>
  </data>
  <data name="FailedUnzipping" xml:space="preserve">
    <value>Failed to extract the update package.</value>
  </data>
  <data name="FailedUpgrade" xml:space="preserve">
    <value>Upgrade failed.</value>
  </data>
  <data name="SuccessUpgrade" xml:space="preserve">
    <value>Upgrade success.</value>
  </data>
  <data name="Information" xml:space="preserve">
    <value>Information</value>
  </data>
</root>

================================================
FILE: v2rayN/AmazTool/Resx/Resource.zh-Hans.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 2.0
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used for serialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="Restartv2rayN" xml:space="preserve">
    <value>正在重启,请等待...</value>
  </data>
  <data name="Guidelines" xml:space="preserve">
    <value>请从主应用运行。</value>
  </data>
  <data name="UpgradeFileNotFound" xml:space="preserve">
    <value>升级失败,文件不存在。</value>
  </data>
  <data name="InProgress" xml:space="preserve">
    <value>正在进行中,请等待...</value>
  </data>
  <data name="TryTerminateProcess" xml:space="preserve">
    <value>尝试结束 v2rayN 进程...</value>
  </data>
  <data name="FailedTerminateProcess" xml:space="preserve">
    <value>请手动关闭正在运行的 v2rayN,否则可能升级失败。</value>
  </data>
  <data name="StartUnzipping" xml:space="preserve">
    <value>开始解压缩更新包...</value>
  </data>
  <data name="SuccessUnzipping" xml:space="preserve">
    <value>解压缩更新包成功。</value>
  </data>
  <data name="FailedUnzipping" xml:space="preserve">
    <value>解压缩更新包失败。</value>
  </data>
  <data name="FailedUpgrade" xml:space="preserve">
    <value>升级失败。</value>
  </data>
  <data name="SuccessUpgrade" xml:space="preserve">
    <value>升级成功。</value>
  </data>
  <data name="Information" xml:space="preserve">
    <value>提示</value>
  </data>
</root>

================================================
FILE: v2rayN/AmazTool/Resx/Resource.zh-Hant.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 2.0
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used for serialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="Restartv2rayN" xml:space="preserve">
    <value>正在重啟,請等待...</value>
  </data>
  <data name="Guidelines" xml:space="preserve">
    <value>請從主應用程式運行。</value>
  </data>
  <data name="UpgradeFileNotFound" xml:space="preserve">
    <value>升級失敗,檔案不存在。</value>
  </data>
  <data name="InProgress" xml:space="preserve">
    <value>正在進行中,請等待...</value>
  </data>
  <data name="TryTerminateProcess" xml:space="preserve">
    <value>嘗試結束 v2rayN 進程...</value>
  </data>
  <data name="FailedTerminateProcess" xml:space="preserve">
    <value>請手動關閉正在執行的 v2rayN,否則可能會升級失敗。</value>
  </data>
  <data name="StartUnzipping" xml:space="preserve">
    <value>開始解壓縮更新包...</value>
  </data>
  <data name="SuccessUnzipping" xml:space="preserve">
    <value>解壓縮更新包成功。</value>
  </data>
  <data name="FailedUnzipping" xml:space="preserve">
    <value>解壓縮更新包失敗。</value>
  </data>
  <data name="FailedUpgrade" xml:space="preserve">
    <value>升級失敗。</value>
  </data>
  <data name="SuccessUpgrade" xml:space="preserve">
    <value>升級成功。</value>
  </data>
  <data name="Information" xml:space="preserve">
    <value>提示</value>
  </data>
</root>

================================================
FILE: v2rayN/AmazTool/UpgradeApp.cs
================================================
using System.Diagnostics;
using System.IO.Compression;
using System.Text;

namespace AmazTool;

internal class UpgradeApp
{
    public static void Upgrade(string fileName)
    {
        Console.WriteLine($"{Resx.Resource.StartUnzipping}\n{fileName}");

        Utils.Waiting(5);

        if (!File.Exists(fileName))
        {
            Console.WriteLine(Resx.Resource.UpgradeFileNotFound);
            return;
        }

        Console.WriteLine(Resx.Resource.TryTerminateProcess);
        try
        {
            var existing = Process.GetProcessesByName(Utils.V2rayN);
            foreach (var pp in existing)
            {
                var path = pp.MainModule?.FileName ?? "";
                if (path.StartsWith(Utils.GetPath(Utils.V2rayN)))
                {
                    pp?.Kill();
                    pp?.WaitForExit(1000);
                }
            }
        }
        catch (Exception ex)
        {
            // Access may be denied without admin right. The user may not be an administrator.
            Console.WriteLine(Resx.Resource.FailedTerminateProcess + ex.StackTrace);
        }

        Console.WriteLine(Resx.Resource.StartUnzipping);
        StringBuilder sb = new();
        try
        {
            var thisAppOldFile = $"{Utils.GetExePath()}.tmp";
            File.Delete(thisAppOldFile);
            var splitKey = "/";

            using var archive = ZipFile.OpenRead(fileName);
            foreach (var entry in archive.Entries)
            {
                try
                {
                    if (entry.Length == 0)
                    {
                        continue;
                    }

                    Console.WriteLine(entry.FullName);

                    var lst = entry.FullName.Split(splitKey);
                    if (lst.Length == 1)
                    {
                        continue;
                    }

                    var fullName = string.Join(splitKey, lst[1..lst.Length]);

                    if (string.Equals(Utils.GetExePath(), Utils.GetPath(fullName), StringComparison.OrdinalIgnoreCase))
                    {
                        File.Move(Utils.GetExePath(), thisAppOldFile);
                    }

                    var entryOutputPath = Utils.GetPath(fullName);
                    Directory.CreateDirectory(Path.GetDirectoryName(entryOutputPath)!);
                    //In the bin folder, if the file already exists, it will be skipped
                    if (fullName.StartsWith("bin") && File.Exists(entryOutputPath))
                    {
                        continue;
                    }

                    TryExtractToFile(entry, entryOutputPath);

                    Console.WriteLine(entryOutputPath);
                }
                catch (Exception ex)
                {
                    sb.Append(ex.StackTrace);
                }
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine(Resx.Resource.FailedUpgrade + ex.StackTrace);
            //return;
        }
        if (sb.Length > 0)
        {
            Console.WriteLine(Resx.Resource.FailedUpgrade + sb.ToString());
            //return;
        }

        Console.WriteLine(Resx.Resource.Restartv2rayN);
        Utils.Waiting(2);

        Utils.StartV2RayN();
    }

    private static bool TryExtractToFile(ZipArchiveEntry entry, string outputPath)
    {
        var retryCount = 5;
        var delayMs = 1000;

        for (var i = 1; i <= retryCount; i++)
        {
            try
            {
                entry.ExtractToFile(outputPath, true);
                return true;
            }
            catch
            {
                Thread.Sleep(delayMs * i);
            }
        }
        return false;
    }
}


================================================
FILE: v2rayN/AmazTool/Utils.cs
================================================
using System.Diagnostics;

namespace AmazTool;

internal class Utils
{
    public static string GetExePath()
    {
        return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
    }

    public static string StartupPath()
    {
        return AppDomain.CurrentDomain.BaseDirectory;
    }

    public static string GetPath(string fileName)
    {
        var startupPath = StartupPath();
        if (string.IsNullOrEmpty(fileName))
        {
            return startupPath;
        }
        return Path.Combine(startupPath, fileName);
    }

    public static string V2rayN => "v2rayN";

    public static void StartV2RayN()
    {
        Process process = new()
        {
            StartInfo = new()
            {
                UseShellExecute = true,
                FileName = V2rayN,
                WorkingDirectory = StartupPath()
            }
        };
        process.Start();
    }

    public static void Waiting(int second)
    {
        for (var i = second; i > 0; i--)
        {
            Console.WriteLine(i);
            Thread.Sleep(1000);
        }
    }
}


================================================
FILE: v2rayN/Directory.Build.props
================================================
<Project>

    <PropertyGroup>
        <Version>7.19.4</Version>
    </PropertyGroup>

    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
        <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
        <NoWarn>CA1031;CS1591;NU1507;CA1416;IDE0058;IDE0053;IDE0200</NoWarn>
        <Nullable>annotations</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
        <Authors>2dust</Authors>
        <PackageLicenseExpression>GPL-3.0</PackageLicenseExpression>
        <Copyright>Copyright © 2017-$([System.DateTime]::UtcNow.Year) $(Authors)</Copyright>
        <InvariantGlobalization>false</InvariantGlobalization>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)' == 'Release'">
        <DebugType>embedded</DebugType>
        <EventSourceSupport>false</EventSourceSupport>
        <StackTraceSupport>false</StackTraceSupport>
        <MetricsSupport>false</MetricsSupport>
        <MetadataUpdaterSupport>false</MetadataUpdaterSupport>
        <EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
        <EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>

        <UseSystemResourceKeys>true</UseSystemResourceKeys>
        <PublishSingleFile>true</PublishSingleFile>
        <PublishReadyToRun>false</PublishReadyToRun>
    </PropertyGroup>
</Project>


================================================
FILE: v2rayN/Directory.Packages.props
================================================
<Project>
  <PropertyGroup>
    <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
    <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
    <CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
  </PropertyGroup>
  <ItemGroup>
    <PackageVersion Include="Avalonia.AvaloniaEdit" Version="11.4.1" />
    <PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.12" />
    <PackageVersion Include="Avalonia.Desktop" Version="11.3.12" />
    <PackageVersion Include="Avalonia.Diagnostics" Version="11.3.12" />
    <PackageVersion Include="ReactiveUI.Avalonia" Version="11.4.12" />
    <PackageVersion Include="CliWrap" Version="3.10.0" />
    <PackageVersion Include="Downloader" Version="5.1.0" />
    <PackageVersion Include="H.NotifyIcon.Wpf" Version="2.4.1" />
    <PackageVersion Include="MaterialDesignThemes" Version="5.3.0" />
    <PackageVersion Include="MessageBox.Avalonia" Version="3.3.1.1" />
    <PackageVersion Include="QRCoder" Version="1.7.0" />
    <PackageVersion Include="ReactiveUI" Version="23.1.8" />
    <PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
    <PackageVersion Include="ReactiveUI.WPF" Version="23.1.8" />
    <PackageVersion Include="Semi.Avalonia" Version="11.3.7.3" />
    <PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="11.2.0.2" />
    <PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.3.7.3" />
    <PackageVersion Include="NLog" Version="6.1.1" />
    <PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
    <PackageVersion Include="TaskScheduler" Version="2.12.2" />
    <PackageVersion Include="WebDav.Client" Version="2.9.0" />
    <PackageVersion Include="YamlDotNet" Version="16.3.0" />
    <PackageVersion Include="ZXing.Net.Bindings.SkiaSharp" Version="0.16.14" />
  </ItemGroup>
</Project>

================================================
FILE: v2rayN/ServiceLib/Base/MyReactiveObject.cs
================================================
namespace ServiceLib.Base;

public class MyReactiveObject : ReactiveObject
{
    protected static Config? _config;
    protected Func<EViewAction, object?, Task<bool>>? _updateView;
}


================================================
FILE: v2rayN/ServiceLib/Common/EmbedUtils.cs
================================================
namespace ServiceLib.Common;

public static class EmbedUtils
{
    private static readonly string _tag = "EmbedUtils";
    private static readonly ConcurrentDictionary<string, string> _dicEmbedCache = new();

    /// <summary>
    /// Get embedded text resources
    /// </summary>
    /// <param name="res"></param>
    /// <returns></returns>
    public static string GetEmbedText(string res)
    {
        if (_dicEmbedCache.TryGetValue(res, out var value))
        {
            return value;
        }
        var result = string.Empty;

        try
        {
            var assembly = Assembly.GetExecutingAssembly();
            using var stream = assembly.GetManifestResourceStream(res);
            ArgumentNullException.ThrowIfNull(stream);
            using StreamReader reader = new(stream);
            result = reader.ReadToEnd();
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }

        _dicEmbedCache.TryAdd(res, result);
        return result;
    }

    /// <summary>
    /// Get local storage resources
    /// </summary>
    /// <returns></returns>
    public static string? LoadResource(string? res)
    {
        try
        {
            if (File.Exists(res))
            {
                return File.ReadAllText(res);
            }
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }

        return null;
    }
}


================================================
FILE: v2rayN/ServiceLib/Common/Extension.cs
================================================
using System.Diagnostics.CodeAnalysis;

namespace ServiceLib.Common;

public static class Extension
{
    public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value)
    {
        return string.IsNullOrWhiteSpace(value) || string.IsNullOrEmpty(value);
    }

    public static bool IsNotEmpty([NotNullWhen(false)] this string? value)
    {
        return !string.IsNullOrWhiteSpace(value);
    }

    public static string? NullIfEmpty(this string? value)
    {
        return string.IsNullOrWhiteSpace(value) ? null : value;
    }

    public static bool BeginWithAny(this string s, IEnumerable<char> chars)
    {
        if (s.IsNullOrEmpty())
        {
            return false;
        }
        return chars.Contains(s.First());
    }

    private static bool IsWhiteSpace(this string value)
    {
        return value.All(char.IsWhiteSpace);
    }

    public static IEnumerable<string> NonWhiteSpaceLines(this TextReader reader)
    {
        while (reader.ReadLine() is { } line)
        {
            if (line.IsWhiteSpace())
            {
                continue;
            }
            yield return line;
        }
    }

    public static string TrimEx(this string? value)
    {
        return value == null ? string.Empty : value.Trim();
    }

    public static string RemovePrefix(this string value, char prefix)
    {
        return value.StartsWith(prefix) ? value[1..] : value;
    }

    public static string RemovePrefix(this string value, string prefix)
    {
        return value.StartsWith(prefix) ? value[prefix.Length..] : value;
    }

    public static string UpperFirstChar(this string value)
    {
        if (string.IsNullOrEmpty(value))
        {
            return string.Empty;
        }

        return char.ToUpper(value.First()) + value[1..];
    }

    public static string AppendQuotes(this string value)
    {
        return string.IsNullOrEmpty(value) ? string.Empty : $"\"{value}\"";
    }

    public static int ToInt(this string? value, int defaultValue = 0)
    {
        return int.TryParse(value, out var result) ? result : defaultValue;
    }

    public static List<string> AppendEmpty(this IEnumerable<string> source)
    {
        return source.Concat(new[] { string.Empty }).ToList();
    }

    public static bool IsGroupType(this EConfigType configType)
    {
        return configType is EConfigType.PolicyGroup or EConfigType.ProxyChain;
    }

    public static bool IsComplexType(this EConfigType configType)
    {
        return configType is EConfigType.Custom or EConfigType.PolicyGroup or EConfigType.ProxyChain;
    }

    /// <summary>
    /// Safely adds elements from a collection to the list. Does nothing if the source is null.
    /// </summary>
    public static void AddRangeSafe<T>(this ICollection<T> destination, IEnumerable<T>? source)
    {
        ArgumentNullException.ThrowIfNull(destination);

        if (source is null)
        {
            return;
        }

        if (destination is List<T> list)
        {
            list.AddRange(source);
            return;
        }

        foreach (var item in source)
        {
            destination.Add(item);
        }
    }
}


================================================
FILE: v2rayN/ServiceLib/Common/FileUtils.cs
================================================
using System.Formats.Tar;
using System.IO.Compression;

namespace ServiceLib.Common;

public static class FileUtils
{
    private static readonly string _tag = "FileManager";

    public static bool ByteArrayToFile(string fileName, byte[] content)
    {
        try
        {
            File.WriteAllBytes(fileName, content);
            return true;
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
        return false;
    }

    public static void DecompressFile(string fileName, byte[] content)
    {
        try
        {
            using var fs = File.Create(fileName);
            using GZipStream input = new(new MemoryStream(content), CompressionMode.Decompress, false);
            input.CopyTo(fs);
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
    }

    public static void DecompressFile(string fileName, string toPath, string? toName)
    {
        try
        {
            FileInfo fileInfo = new(fileName);
            using var originalFileStream = fileInfo.OpenRead();
            using var decompressedFileStream = File.Create(toName != null ? Path.Combine(toPath, toName) : toPath);
            using GZipStream decompressionStream = new(originalFileStream, CompressionMode.Decompress);
            decompressionStream.CopyTo(decompressedFileStream);
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
    }

    public static void DecompressTarFile(string fileName, string toPath)
    {
        try
        {
            using var fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
            using var gz = new GZipStream(fs, CompressionMode.Decompress, leaveOpen: true);
            TarFile.ExtractToDirectory(gz, toPath, overwriteFiles: true);
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
    }

    public static string NonExclusiveReadAllText(string path)
    {
        return NonExclusiveReadAllText(path, Encoding.Default);
    }

    private static string NonExclusiveReadAllText(string path, Encoding encoding)
    {
        try
        {
            using FileStream fs = new(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
            using StreamReader sr = new(fs, encoding);
            return sr.ReadToEnd();
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
            throw;
        }
    }

    public static bool ZipExtractToFile(string fileName, string toPath, string ignoredName)
    {
        try
        {
            using var archive = ZipFile.OpenRead(fileName);
            foreach (var entry in archive.Entries)
            {
                if (entry.Length == 0)
                {
                    continue;
                }
                try
                {
                    if (ignoredName.IsNotEmpty() && entry.Name.Contains(ignoredName))
                    {
                        continue;
                    }
                    entry.ExtractToFile(Path.Combine(toPath, entry.Name), true);
                }
                catch (IOException ex)
                {
                    Logging.SaveLog(_tag, ex);
                }
            }
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
            return false;
        }
        return true;
    }

    public static List<string>? GetFilesFromZip(string fileName)
    {
        if (!File.Exists(fileName))
        {
            return null;
        }
        try
        {
            using var archive = ZipFile.OpenRead(fileName);
            return archive.Entries.Select(entry => entry.FullName).ToList();
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
            return null;
        }
    }

    public static bool CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName)
    {
        try
        {
            if (File.Exists(destinationArchiveFileName))
            {
                File.Delete(destinationArchiveFileName);
            }

            ZipFile.CreateFromDirectory(sourceDirectoryName, destinationArchiveFileName, CompressionLevel.SmallestSize, true);
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
            return false;
        }
        return true;
    }

    public static void CopyDirectory(string sourceDir, string destinationDir, bool recursive, bool overwrite, string? ignoredName = null)
    {
        // Get information about the source directory
        var dir = new DirectoryInfo(sourceDir);

        // Check if the source directory exists
        if (!dir.Exists)
        {
            throw new DirectoryNotFoundException($"Source directory not found: {dir.FullName}");
        }

        // Cache directories before we start copying
        var dirs = dir.GetDirectories();

        // Create the destination directory
        _ = Directory.CreateDirectory(destinationDir);

        // Get the files in the source directory and copy to the destination directory
        foreach (var file in dir.GetFiles())
        {
            if (ignoredName.IsNotEmpty() && file.Name.Contains(ignoredName))
            {
                continue;
            }
            if (file.Extension == file.Name)
            {
                continue;
            }
            var targetFilePath = Path.Combine(destinationDir, file.Name);
            if (!overwrite && File.Exists(targetFilePath))
            {
                continue;
            }
            _ = file.CopyTo(targetFilePath, overwrite);
        }

        // If recursive and copying subdirectories, recursively call this method
        if (recursive)
        {
            foreach (var subDir in dirs)
            {
                var newDestinationDir = Path.Combine(destinationDir, subDir.Name);
                CopyDirectory(subDir.FullName, newDestinationDir, true, overwrite, ignoredName);
            }
        }
    }

    public static void DeleteExpiredFiles(string sourceDir, DateTime dtLine)
    {
        try
        {
            var files = Directory.GetFiles(sourceDir, "*.*");
            foreach (var filePath in files)
            {
                var file = new FileInfo(filePath);
                if (file.CreationTime >= dtLine)
                {
                    continue;
                }
                file.Delete();
            }
        }
        catch
        {
            // ignored
        }
    }

    /// <summary>
    /// Creates a Linux shell file with the specified contents.
    /// </summary>
    /// <param name="fileName"></param>
    /// <param name="contents"></param>
    /// <param name="overwrite"></param>
    /// <returns></returns>
    public static async Task<string> CreateLinuxShellFile(string fileName, string contents, bool overwrite)
    {
        var shFilePath = Utils.GetBinConfigPath(fileName);

        // Check if the file already exists and if we should overwrite it
        if (!overwrite && File.Exists(shFilePath))
        {
            return shFilePath;
        }

        File.Delete(shFilePath);
        await File.WriteAllTextAsync(shFilePath, contents);
        await Utils.SetLinuxChmod(shFilePath);

        return shFilePath;
    }
}


================================================
FILE: v2rayN/ServiceLib/Common/JsonUtils.cs
================================================
namespace ServiceLib.Common;

public class JsonUtils
{
    private static readonly string _tag = "JsonUtils";

    private static readonly JsonSerializerOptions _defaultDeserializeOptions = new()
    {
        PropertyNameCaseInsensitive = true,
        ReadCommentHandling = JsonCommentHandling.Skip
    };

    private static readonly JsonSerializerOptions _defaultSerializeOptions = new()
    {
        WriteIndented = true,
        DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
        Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
    };

    private static readonly JsonSerializerOptions _nullValueSerializeOptions = new()
    {
        WriteIndented = true,
        DefaultIgnoreCondition = JsonIgnoreCondition.Never,
        Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
    };

    private static readonly JsonDocumentOptions _defaultDocumentOptions = new()
    {
        CommentHandling = JsonCommentHandling.Skip
    };

    /// <summary>
    /// DeepCopy
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="obj"></param>
    /// <returns></returns>
    public static T? DeepCopy<T>(T? obj)
    {
        if (obj is null)
        {
            return default;
        }
        return Deserialize<T>(Serialize(obj, false));
    }

    /// <summary>
    /// Deserialize to object
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="strJson"></param>
    /// <returns></returns>
    public static T? Deserialize<T>(string? strJson)
    {
        try
        {
            if (string.IsNullOrWhiteSpace(strJson))
            {
                return default;
            }
            return JsonSerializer.Deserialize<T>(strJson, _defaultDeserializeOptions);
        }
        catch
        {
            return default;
        }
    }

    /// <summary>
    /// parse
    /// </summary>
    /// <param name="strJson"></param>
    /// <returns></returns>
    public static JsonNode? ParseJson(string? strJson)
    {
        try
        {
            if (string.IsNullOrWhiteSpace(strJson))
            {
                return null;
            }
            return JsonNode.Parse(strJson, nodeOptions: null, _defaultDocumentOptions);
        }
        catch
        {
            //SaveLog(ex.Message, ex);
            return null;
        }
    }

    /// <summary>
    /// Serialize Object to Json string
    /// </summary>
    /// <param name="obj"></param>
    /// <param name="indented"></param>
    /// <param name="nullValue"></param>
    /// <returns></returns>
    public static string Serialize(object? obj, bool indented = true, bool nullValue = false)
    {
        var result = string.Empty;
        try
        {
            if (obj == null)
            {
                return result;
            }
            var options = nullValue ? _nullValueSerializeOptions : _defaultSerializeOptions;
            result = JsonSerializer.Serialize(obj, options);
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
        return result;
    }

    /// <summary>
    /// Serialize Object to Json string
    /// </summary>
    /// <param name="obj"></param>
    /// <param name="options"></param>
    /// <returns></returns>
    public static string Serialize(object? obj, JsonSerializerOptions? options)
    {
        var result = string.Empty;
        try
        {
            if (obj == null)
            {
                return result;
            }
            result = JsonSerializer.Serialize(obj, options ?? _defaultSerializeOptions);
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
        return result;
    }

    /// <summary>
    /// SerializeToNode
    /// </summary>
    /// <param name="obj"></param>
    /// <returns></returns>
    public static JsonNode? SerializeToNode(object? obj, JsonSerializerOptions? options = null)
    {
        return JsonSerializer.SerializeToNode(obj, options);
    }
}


================================================
FILE: v2rayN/ServiceLib/Common/Logging.cs
================================================
using NLog;
using NLog.Config;
using NLog.Targets;

namespace ServiceLib.Common;

public class Logging
{
    private static readonly Logger _logger1 = LogManager.GetLogger("Log1");
    private static readonly Logger _logger2 = LogManager.GetLogger("Log2");

    public static void Setup()
    {
        LoggingConfiguration config = new();
        FileTarget fileTarget = new();
        config.AddTarget("file", fileTarget);
        fileTarget.Layout = "${longdate}-${level:uppercase=true} ${message}";
        fileTarget.FileName = Utils.GetLogPath("${shortdate}.txt");
        config.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, fileTarget));
        LogManager.Configuration = config;
    }

    public static void LoggingEnabled(bool enable)
    {
        if (!enable)
        {
            LogManager.SuspendLogging();
        }
    }

    public static void SaveLog(string strContent)
    {
        if (!LogManager.IsLoggingEnabled())
        {
            return;
        }

        _logger1.Info(strContent);
    }

    public static void SaveLog(string strTitle, Exception ex)
    {
        if (!LogManager.IsLoggingEnabled())
        {
            return;
        }

        _logger2.Debug($"{strTitle},{ex.Message}");
        _logger2.Debug(ex.StackTrace);
        if (ex?.InnerException != null)
        {
            _logger2.Error(ex.InnerException);
        }
    }
}


================================================
FILE: v2rayN/ServiceLib/Common/ProcUtils.cs
================================================
namespace ServiceLib.Common;

public static class ProcUtils
{
    private static readonly string _tag = "ProcUtils";

    public static void ProcessStart(string? fileName, string arguments = "")
    {
        _ = ProcessStart(fileName, arguments, null);
    }

    public static int? ProcessStart(string? fileName, string arguments, string? dir)
    {
        if (fileName.IsNullOrEmpty())
        {
            return null;
        }
        try
        {
            if (fileName.Contains(' '))
            {
                fileName = fileName.AppendQuotes();
            }
            if (arguments.Contains(' '))
            {
                arguments = arguments.AppendQuotes();
            }

            Process proc = new()
            {
                StartInfo = new ProcessStartInfo
                {
                    UseShellExecute = true,
                    FileName = fileName,
                    Arguments = arguments,
                    WorkingDirectory = dir ?? string.Empty
                }
            };
            _ = proc.Start();
            return dir is null ? null : proc.Id;
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
        return null;
    }

    public static void RebootAsAdmin(bool blAdmin = true)
    {
        try
        {
            ProcessStartInfo startInfo = new()
            {
                UseShellExecute = true,
                Arguments = Global.RebootAs,
                WorkingDirectory = Utils.StartupPath(),
                FileName = Utils.GetExePath().AppendQuotes(),
                Verb = blAdmin ? "runas" : null,
            };
            _ = Process.Start(startInfo);
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
    }
}


================================================
FILE: v2rayN/ServiceLib/Common/QRCodeUtils.cs
================================================
using QRCoder;
using QRCoder.Exceptions;
using SkiaSharp;
using ZXing.SkiaSharp;

namespace ServiceLib.Common;

public class QRCodeUtils
{
    public static byte[]? GenQRCode(string? url)
    {
        if (url.IsNullOrEmpty())
        {
            return null;
        }
        using QRCodeGenerator qrGenerator = new();
        DataTooLongException? lastDtle = null;

        var levels = new[]
        {
            QRCodeGenerator.ECCLevel.H,
            QRCodeGenerator.ECCLevel.Q,
            QRCodeGenerator.ECCLevel.M,
            QRCodeGenerator.ECCLevel.L
        };
        foreach (var level in levels)
        {
            try
            {
                using var qrCodeData = qrGenerator.CreateQrCode(url, level);
                using PngByteQRCode qrCode = new(qrCodeData);
                return qrCode.GetGraphic(20);
            }
            catch (DataTooLongException ex)
            {
                lastDtle = ex;
                continue;
            }
            catch
            {
                throw;
            }
        }

        if (lastDtle != null)
        {
            throw lastDtle;
        }

        return null;
    }

    public static string? ParseBarcode(string? fileName)
    {
        if (fileName == null || !File.Exists(fileName))
        {
            return null;
        }

        try
        {
            var image = SKImage.FromEncodedData(fileName);
            var bitmap = SKBitmap.FromImage(image);

            return ReaderBarcode(bitmap);
        }
        catch
        {
            // ignored
        }

        return null;
    }

    public static string? ParseBarcode(byte[]? bytes)
    {
        try
        {
            var bitmap = SKBitmap.Decode(bytes);
            //using var stream = new FileStream("test2.png", FileMode.Create, FileAccess.Write);
            //using var image = SKImage.FromBitmap(bitmap);
            //using var encodedImage = image.Encode();
            //encodedImage.SaveTo(stream);
            return ReaderBarcode(bitmap);
        }
        catch
        {
            // ignored
        }

        return null;
    }

    private static string? ReaderBarcode(SKBitmap? bitmap)
    {
        var reader = new BarcodeReader();
        var result = reader.Decode(bitmap);

        if (result != null && result.Text.IsNotEmpty())
        {
            return result.Text;
        }

        //FlipBitmap
        var result2 = reader.Decode(FlipBitmap(bitmap));
        return result2?.Text;
    }

    private static SKBitmap FlipBitmap(SKBitmap bmp)
    {
        // Create a bitmap (to return)
        var flipped = new SKBitmap(bmp.Width, bmp.Height, bmp.Info.ColorType, bmp.Info.AlphaType);

        // Create a canvas to draw into the bitmap
        using var canvas = new SKCanvas(flipped);

        // Set a transform matrix which moves the bitmap to the right,
        // and then "scales" it by -1, which just flips the pixels
        // horizontally
        canvas.Translate(bmp.Width, 0);
        canvas.Scale(-1, 1);
        canvas.DrawBitmap(bmp, 0, 0);
        return flipped;
    }
}


================================================
FILE: v2rayN/ServiceLib/Common/Utils.cs
================================================
using System.Collections.Specialized;
using System.Security.Principal;
using CliWrap;
using CliWrap.Buffered;

namespace ServiceLib.Common;

public class Utils
{
    private static readonly string _tag = "Utils";

    #region Conversion Functions

    /// <summary>
    /// Convert to comma-separated string
    /// </summary>
    /// <param name="lst"></param>
    /// <param name="wrap"></param>
    /// <returns></returns>
    public static string List2String(List<string>? lst, bool wrap = false)
    {
        if (lst == null || lst.Count == 0)
        {
            return string.Empty;
        }

        var separator = wrap ? "," + Environment.NewLine : ",";

        try
        {
            return string.Join(separator, lst);
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
            return string.Empty;
        }
    }

    /// <summary>
    /// Comma-separated string
    /// </summary>
    /// <param name="str"></param>
    /// <returns></returns>
    public static List<string>? String2List(string? str)
    {
        if (string.IsNullOrWhiteSpace(str))
        {
            return null;
        }

        try
        {
            str = str.Replace(Environment.NewLine, string.Empty);
            return new List<string>(str.Split(',', StringSplitOptions.RemoveEmptyEntries));
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
            return null;
        }
    }

    /// <summary>
    /// Comma-separated string, sorted and then converted to List
    /// </summary>
    /// <param name="str"></param>
    /// <returns></returns>
    public static List<string>? String2ListSorted(string str)
    {
        var lst = String2List(str);
        lst?.Sort();
        return lst;
    }

    /// <summary>
    /// Base64 Encode
    /// </summary>
    /// <param name="plainText"></param>
    /// <param name="removePadding"></param>
    /// <returns></returns>
    public static string Base64Encode(string plainText, bool removePadding = false)
    {
        try
        {
            var plainTextBytes = Encoding.UTF8.GetBytes(plainText);
            var base64 = Convert.ToBase64String(plainTextBytes);
            if (removePadding)
            {
                base64 = base64.TrimEnd('=');
            }
            return base64;
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }

        return string.Empty;
    }

    /// <summary>
    /// Base64 Decode
    /// </summary>
    /// <param name="plainText"></param>
    /// <returns></returns>
    public static string Base64Decode(string? plainText)
    {
        try
        {
            if (plainText.IsNullOrEmpty())
            {
                return string.Empty;
            }

            plainText = plainText.Trim()
                .Replace(Environment.NewLine, "")
                .Replace("\n", "")
                .Replace("\r", "")
                .Replace('_', '/')
                .Replace('-', '+')
                .Replace(" ", "");

            if (plainText.Length % 4 > 0)
            {
                plainText = plainText.PadRight(plainText.Length + 4 - (plainText.Length % 4), '=');
            }

            var data = Convert.FromBase64String(plainText);
            return Encoding.UTF8.GetString(data);
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }

        return string.Empty;
    }

    public static bool ToBool(object obj)
    {
        try
        {
            return Convert.ToBoolean(obj);
        }
        catch
        {
            return false;
        }
    }

    public static string ToString(object? obj)
    {
        try
        {
            return obj?.ToString() ?? string.Empty;
        }
        catch
        {
            return string.Empty;
        }
    }

    public static string HumanFy(long amount)
    {
        if (amount <= 0)
        {
            return $"{amount:f1} B";
        }

        string[] units = ["KB", "MB", "GB", "TB", "PB"];
        var unitIndex = 0;
        double size = amount;

        // Loop and divide by 1024 until a suitable unit is found
        while (size >= 1024 && unitIndex < units.Length - 1)
        {
            size /= 1024;
            unitIndex++;
        }

        return $"{size:f1} {units[unitIndex]}";
    }

    public static string UrlEncode(string url)
    {
        return Uri.EscapeDataString(url);
    }

    public static string UrlDecode(string url)
    {
        return Uri.UnescapeDataString(url);
    }

    public static NameValueCollection ParseQueryString(string query)
    {
        var result = new NameValueCollection(StringComparer.OrdinalIgnoreCase);
        if (query.IsNullOrEmpty())
        {
            return result;
        }

        var parts = query[1..].Split('&', StringSplitOptions.RemoveEmptyEntries);
        foreach (var part in parts)
        {
            var keyValue = part.Split('=');
            if (keyValue.Length != 2)
            {
                continue;
            }

            var key = Uri.UnescapeDataString(keyValue.First());
            var val = Uri.UnescapeDataString(keyValue.Last());

            if (result[key] is null)
            {
                result.Add(key, val);
            }
        }

        return result;
    }

    public static string GetMd5(string str)
    {
        if (string.IsNullOrEmpty(str))
        {
            return string.Empty;
        }

        try
        {
            var byteOld = Encoding.UTF8.GetBytes(str);
            var byteNew = MD5.HashData(byteOld);
            StringBuilder sb = new(32);
            foreach (var b in byteNew)
            {
                sb.Append(b.ToString("x2"));
            }

            return sb.ToString();
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
            return string.Empty;
        }
    }

    public static string GetFileHash(string filePath)
    {
        if (string.IsNullOrEmpty(filePath))
        {
            return string.Empty;
        }

        if (!File.Exists(filePath))
        {
            return string.Empty;
        }

        try
        {
            using var md5 = MD5.Create();
            using var stream = File.OpenRead(filePath);
            var hash = md5.ComputeHash(stream);
            return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
            return string.Empty;
        }
    }

    /// <summary>
    /// idn to idc
    /// </summary>
    /// <param name="url"></param>
    /// <returns></returns>
    public static string GetPunycode(string url)
    {
        if (url.IsNullOrEmpty())
        {
            return url;
        }

        try
        {
            Uri uri = new(url);
            if (uri.Host == uri.IdnHost || uri.Host == $"[{uri.IdnHost}]")
            {
                return url;
            }
            else
            {
                return url.Replace(uri.Host, uri.IdnHost);
            }
        }
        catch
        {
            return url;
        }
    }

    public static bool IsBase64String(string? plainText)
    {
        if (plainText.IsNullOrEmpty())
        {
            return false;
        }

        var buffer = new Span<byte>(new byte[plainText.Length]);
        return Convert.TryFromBase64String(plainText, buffer, out var _);
    }

    public static string Convert2Comma(string text)
    {
        if (text.IsNullOrEmpty())
        {
            return text;
        }

        return text.Replace(",", ",").Replace(Environment.NewLine, ",");
    }

    public static List<string> GetEnumNames<TEnum>() where TEnum : Enum
    {
        return Enum.GetValues(typeof(TEnum))
            .Cast<TEnum>()
            .Select(e => e.ToString())
            .ToList();
    }

    public static Dictionary<string, List<string>> ParseHostsToDictionary(string? hostsContent)
    {
        if (hostsContent.IsNullOrEmpty())
        {
            return new();
        }
        var userHostsMap = hostsContent
            .Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
            .Select(line => line.Trim())
            // skip full-line comments
            .Where(line => !string.IsNullOrWhiteSpace(line) && !line.StartsWith('#'))
            // ensure line still contains valid parts
            .Where(line => !string.IsNullOrWhiteSpace(line) && line.Contains(' '))
            .Select(line => line.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries))
            .Where(parts => parts.Length >= 2)
            .GroupBy(parts => parts[0])
            .ToDictionary(
                group => group.Key,
                group => group.SelectMany(parts => parts.Skip(1)).ToList()
            );

        return userHostsMap;
    }

    /// <summary>
    /// Parse a possibly non-standard URL into scheme, domain, port, and path.
    /// If parsing fails, the entire input is returned as domain, and others are empty or zero.
    /// </summary>
    /// <param name="url">Input URL or string</param>
    /// <returns>(domain, scheme, port, path)</returns>
    public static (string domain, string scheme, int port, string path) ParseUrl(string url)
    {
        if (string.IsNullOrWhiteSpace(url))
        {
            return ("", "", 0, "");
        }

        // 1. First, try to parse using the standard Uri class.
        if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && !string.IsNullOrEmpty(uri.Host))
        {
            var scheme = uri.Scheme;
            var domain = uri.Host;
            var port = uri.IsDefaultPort ? 0 : uri.Port;
            var path = uri.PathAndQuery;
            return (domain, scheme, port, path);
        }

        // 2. Try to handle more general cases with a regular expression, including non-standard schemes.
        // This regex captures the scheme (optional), authority (host+port), and path (optional).
        var match = Regex.Match(url, @"^(?:([a-zA-Z][a-zA-Z0-9+.-]*):/{2,})?([^/?#]+)([^?#]*)?.*$");

        if (match.Success)
        {
            var scheme = match.Groups[1].Value;
            var authority = match.Groups[2].Value;
            var path = match.Groups[3].Value;

            // Remove userinfo from the authority part.
            var atIndex = authority.LastIndexOf('@');
            if (atIndex > 0)
            {
                authority = authority.Substring(atIndex + 1);
            }

            var (domain, port) = ParseAuthority(authority);

            // If the parsed domain is empty, it means the authority part is malformed, so trigger the fallback.
            if (!string.IsNullOrEmpty(domain))
            {
                return (domain, scheme, port, path);
            }
        }

        // 3. If all of the above fails, execute the final fallback strategy.
        return (url, "", 0, "");
    }

    /// <summary>
    /// Helper function to parse domain and port from the authority part, with correct handling for IPv6.
    /// </summary>
    private static (string domain, int port) ParseAuthority(string authority)
    {
        if (string.IsNullOrEmpty(authority))
        {
            return ("", 0);
        }

        var port = 0;
        var domain = authority;

        // Handle IPv6 addresses, e.g., "[2001:db8::1]:443"
        if (authority.StartsWith('[') && authority.Contains(']'))
        {
            var closingBracketIndex = authority.LastIndexOf(']');
            if (closingBracketIndex < authority.Length - 1 && authority[closingBracketIndex + 1] == ':')
            {
                // Port exists
                var portStr = authority.Substring(closingBracketIndex + 2);
                if (int.TryParse(portStr, out var portNum))
                {
                    port = portNum;
                }
                domain = authority.Substring(0, closingBracketIndex + 1);
            }
            else
            {
                // No port
                domain = authority;
            }
        }
        else // Handle IPv4 or domain names
        {
            var lastColonIndex = authority.LastIndexOf(':');
            // Ensure there are digits after the colon and that this colon is not part of an IPv6 address.
            if (lastColonIndex > 0 && lastColonIndex < authority.Length - 1 && authority.Substring(lastColonIndex + 1).All(char.IsDigit))
            {
                var portStr = authority.Substring(lastColonIndex + 1);
                if (int.TryParse(portStr, out var portNum))
                {
                    port = portNum;
                    domain = authority.Substring(0, lastColonIndex);
                }
            }
        }

        return (domain, port);
    }

    public static string? DomainStrategy4Sbox(string? strategy)
    {
        return strategy switch
        {
            not null when strategy.StartsWith("UseIPv4") => "prefer_ipv4",
            not null when strategy.StartsWith("UseIPv6") => "prefer_ipv6",
            not null when strategy.StartsWith("ForceIPv4") => "ipv4_only",
            not null when strategy.StartsWith("ForceIPv6") => "ipv6_only",
            _ => null
        };
    }

    #endregion Conversion Functions

    #region Data Checks

    /// <summary>
    /// Determine if the input is a number
    /// </summary>
    /// <param name="oText"></param>
    /// <returns></returns>
    public static bool IsNumeric(string oText)
    {
        return oText.All(char.IsNumber);
    }

    /// <summary>
    /// Validate if the domain address is valid
    /// </summary>
    /// <param name="domain"></param>
    public static bool IsDomain(string? domain)
    {
        if (domain.IsNullOrEmpty())
        {
            return false;
        }

        var ext = Path.GetExtension(domain);
        if (ext.IsNotEmpty()
            && ext[1..].ToLowerInvariant() is "json" or "txt" or "xml" or "cfg" or "ini" or "log" or "yaml" or "yml" or "toml")
        {
            return false;
        }

        return Uri.CheckHostName(domain) == UriHostNameType.Dns;
    }

    public static bool IsIpv6(string ip)
    {
        if (IPAddress.TryParse(ip, out var address))
        {
            return address.AddressFamily switch
            {
                AddressFamily.InterNetwork => false,
                AddressFamily.InterNetworkV6 => true,
                _ => false,
            };
        }

        return false;
    }

    public static bool IsIpAddress(string? ip)
    {
        if (ip.IsNullOrEmpty())
        {
            return false;
        }

        ip = ip.Trim();

        // First, validate using built-in parser
        if (!IPAddress.TryParse(ip, out var address))
        {
            return false;
        }

        // For IPv4: ensure it has exactly 3 dots (meaning 4 parts)
        if (address.AddressFamily == AddressFamily.InterNetwork)
        {
            return ip.Count(c => c == '.') == 3;
        }

        // For IPv6: TryParse is already strict enough
        return address.AddressFamily == AddressFamily.InterNetworkV6;
    }

    public static Uri? TryUri(string url)
    {
        try
        {
            return new Uri(url);
        }
        catch (UriFormatException)
        {
            return null;
        }
    }

    public static bool IsPrivateNetwork(string ip)
    {
        if (IPAddress.TryParse(ip, out var address))
        {
            // Loopback address check (127.0.0.1 for IPv4, ::1 for IPv6)
            if (IPAddress.IsLoopback(address))
            {
                return true;
            }

            var ipBytes = address.GetAddressBytes();
            if (address.AddressFamily == AddressFamily.InterNetwork)
            {
                // IPv4 private address check
                if (ipBytes[0] == 10)
                {
                    return true;
                }

                if (ipBytes[0] == 172 && ipBytes[1] >= 16 && ipBytes[1] <= 31)
                {
                    return true;
                }

                if (ipBytes[0] == 192 && ipBytes[1] == 168)
                {
                    return true;
                }
            }
            else if (address.AddressFamily == AddressFamily.InterNetworkV6)
            {
                // IPv6 private address check
                // Link-local address fe80::/10
                if (ipBytes[0] == 0xfe && (ipBytes[1] & 0xc0) == 0x80)
                {
                    return true;
                }

                // Unique local address fc00::/7 (typically fd00::/8)
                if ((ipBytes[0] & 0xfe) == 0xfc)
                {
                    return true;
                }

                // Private portion in IPv4-mapped addresses ::ffff:0:0/96
                if (address.IsIPv4MappedToIPv6)
                {
                    var ipv4Bytes = ipBytes.Skip(12).ToArray();
                    if (ipv4Bytes[0] == 10)
                    {
                        return true;
                    }

                    if (ipv4Bytes[0] == 172 && ipv4Bytes[1] >= 16 && ipv4Bytes[1] <= 31)
                    {
                        return true;
                    }

                    if (ipv4Bytes[0] == 192 && ipv4Bytes[1] == 168)
                    {
                        return true;
                    }
                }
            }
        }

        return false;
    }

    #endregion Data Checks

    #region Speed Test

    private static bool PortInUse(int port)
    {
        try
        {
            var (lstIpEndPoints, lstTcpConns) = GetActiveNetworkInfo();

            if (lstIpEndPoints?.FindIndex(it => it.Port == port) >= 0)
            {
                return true;
            }

            if (lstTcpConns?.FindIndex(it => it.LocalEndPoint.Port == port) >= 0)
            {
                return true;
            }
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }

        return false;
    }

    public static int GetFreePort(int defaultPort = 0)
    {
        try
        {
            if (!(defaultPort == 0 || Utils.PortInUse(defaultPort)))
            {
                return defaultPort;
            }

            TcpListener l = new(IPAddress.Loopback, 0);
            l.Start();
            var port = ((IPEndPoint)l.LocalEndpoint).Port;
            l.Stop();
            return port;
        }
        catch
        {
        }

        return 59090;
    }

    public static (List<IPEndPoint> endpoints, List<TcpConnectionInformation> connections) GetActiveNetworkInfo()
    {
        var endpoints = new List<IPEndPoint>();
        var connections = new List<TcpConnectionInformation>();

        try
        {
            var ipGlobalProperties = IPGlobalProperties.GetIPGlobalProperties();

            endpoints.AddRange(ipGlobalProperties.GetActiveTcpListeners());
            endpoints.AddRange(ipGlobalProperties.GetActiveUdpListeners());
            connections.AddRange(ipGlobalProperties.GetActiveTcpConnections());
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }

        return (endpoints, connections);
    }

    #endregion Speed Test

    #region Miscellaneous

    public static bool UpgradeAppExists(out string upgradeFileName)
    {
        upgradeFileName = Path.Combine(GetBaseDirectory(), GetExeName("AmazTool"));
        return File.Exists(upgradeFileName);
    }

    /// <summary>
    /// Get version
    /// </summary>
    /// <returns></returns>
    public static string GetVersion(bool blFull = true)
    {
        try
        {
            return blFull
                ? $"{Global.AppName} - V{GetVersionInfo()} - {RuntimeInformation.ProcessArchitecture}"
                : $"{Global.AppName}/{GetVersionInfo()}";
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }

        return Global.AppName;
    }

    public static string GetVersionInfo()
    {
        try
        {
            return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString(3) ?? "0.0";
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
            return "0.0";
        }
    }

    public static string GetRuntimeInfo()
    {
        return $"{Utils.GetVersion()} | {Utils.StartupPath()} | {Utils.GetExePath()} | {Environment.OSVersion}";
    }

    /// <summary>
    /// GUID
    /// </summary>
    /// <returns></returns>
    public static string GetGuid(bool full = true)
    {
        try
        {
            if (full)
            {
                return Guid.NewGuid().ToString("D");
            }
            else
            {
                return BitConverter.ToInt64(Guid.NewGuid().ToByteArray(), 0).ToString();
            }
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }

        return string.Empty;
    }

    public static bool IsGuidByParse(string strSrc)
    {
        return Guid.TryParse(strSrc, out _);
    }

    private static Dictionary<string, string> GetSystemHosts(string hostFile)
    {
        var systemHosts = new Dictionary<string, string>();
        try
        {
            if (!File.Exists(hostFile))
            {
                return systemHosts;
            }
            var hosts = File.ReadAllText(hostFile).Replace("\r", "");
            var hostsList = hosts.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);

            foreach (var host in hostsList)
            {
                // Trim whitespace
                var line = host.Trim();

                // Skip comments and empty lines
                if (line.IsNullOrEmpty() || line.StartsWith("#"))
                {
                    continue;
                }

                // Strip inline comments
                var commentIndex = line.IndexOf('#');
                if (commentIndex >= 0)
                {
                    line = line.Substring(0, commentIndex).Trim();
                }
                if (line.IsNullOrEmpty())
                {
                    continue;
                }

                var hostItem = line.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
                if (hostItem.Length < 2)
                {
                    continue;
                }

                var ipAddress = hostItem[0];
                var domain = hostItem[1];

                // Validate IP address
                if (!IsIpAddress(ipAddress))
                {
                    continue;
                }

                // Validate domain name
                if (domain.IsNullOrEmpty() || domain.Length > 255)
                {
                    continue;
                }

                systemHosts[domain] = ipAddress;
            }

            return systemHosts;
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }

        return systemHosts;
    }

    public static Dictionary<string, string> GetSystemHosts()
    {
        var hosts = GetSystemHosts(@"C:\Windows\System32\drivers\etc\hosts");
        var hostsIcs = GetSystemHosts(@"C:\Windows\System32\drivers\etc\hosts.ics");

        foreach (var (key, value) in hostsIcs)
        {
            hosts[key] = value;
        }

        return hosts;
    }

    public static async Task<string?> GetCliWrapOutput(string filePath, string? arg)
    {
        return await GetCliWrapOutput(filePath, arg != null ? new List<string>() { arg } : null);
    }

    public static async Task<string?> GetCliWrapOutput(string filePath, IEnumerable<string>? args)
    {
        try
        {
            var cmd = Cli.Wrap(filePath);
            if (args != null)
            {
                if (args.Count() == 1)
                {
                    cmd = cmd.WithArguments(args.First());
                }
                else
                {
                    cmd = cmd.WithArguments(args);
                }
            }

            var result = await cmd.ExecuteBufferedAsync();
            if (result.IsSuccess)
            {
                return result.StandardOutput ?? "";
            }

            Logging.SaveLog(result.ToString() ?? "");
        }
        catch (Exception ex)
        {
            Logging.SaveLog("GetCliWrapOutput", ex);
        }

        return null;
    }

    #endregion Miscellaneous

    #region TempPath

    public static bool HasWritePermission()
    {
        try
        {
            var basePath = GetBaseDirectory();
            //When this file exists, it is equivalent to having no permission to read and write
            if (File.Exists(Path.Combine(basePath, "NotStoreConfigHere.txt")))
            {
                return false;
            }

            //Check if it is installed by Windows WinGet
            if (IsWindows() && basePath.Contains("Users") && basePath.Contains("WinGet"))
            {
                return false;
            }

            var tempPath = Path.Combine(basePath, "guiTemps");
            if (!Directory.Exists(tempPath))
            {
                Directory.CreateDirectory(tempPath);
            }
            var fileName = Path.Combine(tempPath, GetGuid());
            File.Create(fileName).Close();
            File.Delete(fileName);
        }
        catch (Exception)
        {
            return false;
        }

        return true;
    }

    public static string GetPath(string fileName)
    {
        var startupPath = StartupPath();
        if (fileName.IsNullOrEmpty())
        {
            return startupPath;
        }

        return Path.Combine(startupPath, fileName);
    }

    public static string GetBaseDirectory(string fileName = "")
    {
        return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName);
    }

    public static string GetExePath()
    {
        return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
    }

    public static string StartupPath()
    {
        if (Environment.GetEnvironmentVariable(Global.LocalAppData) == "1")
        {
            return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "v2rayN");
        }

        return GetBaseDirectory();
    }

    public static string GetTempPath(string filename = "")
    {
        var tempPath = Path.Combine(StartupPath(), "guiTemps");
        if (!Directory.Exists(tempPath))
        {
            Directory.CreateDirectory(tempPath);
        }

        if (filename.IsNullOrEmpty())
        {
            return tempPath;
        }
        else
        {
            return Path.Combine(tempPath, filename);
        }
    }

    public static string GetBackupPath(string filename)
    {
        var tempPath = Path.Combine(StartupPath(), "guiBackups");
        if (!Directory.Exists(tempPath))
        {
            Directory.CreateDirectory(tempPath);
        }

        return Path.Combine(tempPath, filename);
    }

    public static string GetConfigPath(string filename = "")
    {
        var tempPath = Path.Combine(StartupPath(), "guiConfigs");
        if (!Directory.Exists(tempPath))
        {
            Directory.CreateDirectory(tempPath);
        }

        if (filename.IsNullOrEmpty())
        {
            return tempPath;
        }
        else
        {
            return Path.Combine(tempPath, filename);
        }
    }

    public static string GetBinPath(string filename, string? coreType = null)
    {
        var tempPath = Path.Combine(StartupPath(), "bin");
        if (!Directory.Exists(tempPath))
        {
            Directory.CreateDirectory(tempPath);
        }

        if (coreType != null)
        {
            tempPath = Path.Combine(tempPath, coreType.ToLower().ToString());
            if (!Directory.Exists(tempPath))
            {
                Directory.CreateDirectory(tempPath);
            }
        }

        if (filename.IsNullOrEmpty())
        {
            return tempPath;
        }
        else
        {
            return Path.Combine(tempPath, filename);
        }
    }

    public static string GetLogPath(string filename = "")
    {
        var tempPath = Path.Combine(StartupPath(), "guiLogs");
        if (!Directory.Exists(tempPath))
        {
            Directory.CreateDirectory(tempPath);
        }

        if (filename.IsNullOrEmpty())
        {
            return tempPath;
        }
        else
        {
            return Path.Combine(tempPath, filename);
        }
    }

    public static string GetFontsPath(string filename = "")
    {
        var tempPath = Path.Combine(StartupPath(), "guiFonts");
        if (!Directory.Exists(tempPath))
        {
            Directory.CreateDirectory(tempPath);
        }

        if (filename.IsNullOrEmpty())
        {
            return tempPath;
        }
        else
        {
            return Path.Combine(tempPath, filename);
        }
    }

    public static string GetBinConfigPath(string filename = "")
    {
        var tempPath = Path.Combine(StartupPath(), "binConfigs");
        if (!Directory.Exists(tempPath))
        {
            Directory.CreateDirectory(tempPath);
        }

        if (filename.IsNullOrEmpty())
        {
            return tempPath;
        }
        else
        {
            return Path.Combine(tempPath, filename);
        }
    }

    #endregion TempPath

    #region Platform

    public static bool IsWindows() => OperatingSystem.IsWindows();

    public static bool IsLinux() => OperatingSystem.IsLinux();

    public static bool IsMacOS() => OperatingSystem.IsMacOS();

    public static bool IsNonWindows() => !OperatingSystem.IsWindows();

    public static string GetExeName(string name)
    {
        if (name.IsNullOrEmpty() || IsNonWindows())
        {
            return name;
        }

        if (name.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
        {
            return name;
        }
        else
        {
            return $"{name}.exe";
        }
    }

    public static bool IsAdministrator()
    {
        if (IsWindows())
        {
            return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);
        }
        return false;
    }

    public static bool IsPackagedInstall()
    {
        try
        {
            if (IsWindows() || IsMacOS())
            {
                return false;
            }

            var exePath = GetExePath();
            var baseDir = string.IsNullOrEmpty(exePath) ? StartupPath() : Path.GetDirectoryName(exePath) ?? "";
            var p = baseDir.Replace('\\', '/');

            if (string.IsNullOrEmpty(p))
            {
                return false;
            }

            if (p.StartsWith("/opt/v2rayN", StringComparison.OrdinalIgnoreCase))
            {
                return true;
            }

            if (p.StartsWith("/usr/lib/v2rayN", StringComparison.OrdinalIgnoreCase))
            {
                return true;
            }

            if (p.StartsWith("/usr/share/v2rayN", StringComparison.OrdinalIgnoreCase))
            {
                return true;
            }
        }
        catch
        {
        }
        return false;
    }

    private static async Task<string?> GetLinuxUserId()
    {
        var arg = new List<string>() { "-c", "id -u" };
        return await GetCliWrapOutput(Global.LinuxBash, arg);
    }

    public static async Task<string?> SetLinuxChmod(string? fileName)
    {
        if (fileName.IsNullOrEmpty())
        {
            return null;
        }
        if (SetUnixFileMode(fileName))
        {
            Logging.SaveLog($"Successfully set the file execution permission, {fileName}");
            return string.Empty;
        }

        if (fileName.Contains(' '))
        {
            fileName = fileName.AppendQuotes();
        }
        var arg = new List<string>() { "-c", $"chmod +x {fileName}" };
        return await GetCliWrapOutput(Global.LinuxBash, arg);
    }

    public static bool SetUnixFileMode(string? fileName)
    {
        try
        {
            if (fileName.IsNullOrEmpty())
            {
                return false;
            }

            if (File.Exists(fileName))
            {
                var currentMode = File.GetUnixFileMode(fileName);
                File.SetUnixFileMode(fileName, currentMode | UnixFileMode.UserExecute | UnixFileMode.GroupExecute | UnixFileMode.OtherExecute);
                return true;
            }
        }
        catch (Exception ex)
        {
            Logging.SaveLog("SetUnixFileMode", ex);
        }
        return false;
    }

    public static async Task<string?> GetLinuxFontFamily(string lang)
    {
        // var arg = new List<string>() { "-c", $"fc-list :lang={lang} family" };
        var arg = new List<string>() { "-c", $"fc-list : family" };
        return await GetCliWrapOutput(Global.LinuxBash, arg);
    }

    public static string? GetHomePath()
    {
        return IsWindows()
            ? Environment.ExpandEnvironmentVariables("%HOMEDRIVE%%HOMEPATH%")
            : Environment.GetEnvironmentVariable("HOME");
    }

    #endregion Platform
}


================================================
FILE: v2rayN/ServiceLib/Common/WindowsUtils.cs
================================================
using Microsoft.Win32;

namespace ServiceLib.Common;

internal static class WindowsUtils
{
    private static readonly string _tag = "WindowsUtils";

    public static string? RegReadValue(string path, string name, string def)
    {
        RegistryKey? regKey = null;
        try
        {
            regKey = Registry.CurrentUser.OpenSubKey(path, false);
            var value = regKey?.GetValue(name) as string;
            return value.IsNullOrEmpty() ? def : value;
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
        finally
        {
            regKey?.Close();
        }
        return def;
    }

    public static void RegWriteValue(string path, string name, object value)
    {
        RegistryKey? regKey = null;
        try
        {
            regKey = Registry.CurrentUser.CreateSubKey(path);
            if (value.ToString().IsNullOrEmpty())
            {
                regKey?.DeleteValue(name, false);
            }
            else
            {
                regKey?.SetValue(name, value);
            }
        }
        catch (Exception ex)
        {
            Logging.SaveLog(_tag, ex);
        }
        finally
        {
            regKey?.Close();
        }
    }

    public static async Task RemoveTunDevice()
    {
        try
        {
            var sum = MD5.HashData(Encoding.UTF8.GetBytes("wintunsingbox_tun"));
         
Download .txt
gitextract_8wam50gz/

├── .editorconfig
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── 01_bug_report.yml
│   │   ├── 02_feature_request.yml
│   │   └── config.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── build-all.yml
│       ├── build-linux.yml
│       ├── build-osx.yml
│       ├── build-windows-desktop.yml
│       ├── build-windows.yml
│       └── winget-publish.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── package-debian.sh
├── package-osx.sh
├── package-release-zip.sh
├── package-rhel.sh
└── v2rayN/
    ├── AmazTool/
    │   ├── AmazTool.csproj
    │   ├── Program.cs
    │   ├── Resx/
    │   │   ├── Resource.Designer.cs
    │   │   ├── Resource.resx
    │   │   ├── Resource.zh-Hans.resx
    │   │   └── Resource.zh-Hant.resx
    │   ├── UpgradeApp.cs
    │   └── Utils.cs
    ├── Directory.Build.props
    ├── Directory.Packages.props
    ├── ServiceLib/
    │   ├── Base/
    │   │   └── MyReactiveObject.cs
    │   ├── Common/
    │   │   ├── EmbedUtils.cs
    │   │   ├── Extension.cs
    │   │   ├── FileUtils.cs
    │   │   ├── JsonUtils.cs
    │   │   ├── Logging.cs
    │   │   ├── ProcUtils.cs
    │   │   ├── QRCodeUtils.cs
    │   │   ├── Utils.cs
    │   │   ├── WindowsUtils.cs
    │   │   └── YamlUtils.cs
    │   ├── Enums/
    │   │   ├── EConfigType.cs
    │   │   ├── ECoreType.cs
    │   │   ├── EGirdOrientation.cs
    │   │   ├── EGlobalHotkey.cs
    │   │   ├── EInboundProtocol.cs
    │   │   ├── EMove.cs
    │   │   ├── EMultipleLoad.cs
    │   │   ├── EPresetType.cs
    │   │   ├── ERuleMode.cs
    │   │   ├── ERuleType.cs
    │   │   ├── EServerColName.cs
    │   │   ├── ESpeedActionType.cs
    │   │   ├── ESysProxyType.cs
    │   │   ├── ETheme.cs
    │   │   ├── ETransport.cs
    │   │   └── EViewAction.cs
    │   ├── Events/
    │   │   ├── AppEvents.cs
    │   │   └── EventChannel.cs
    │   ├── FodyWeavers.xml
    │   ├── Global.cs
    │   ├── GlobalUsings.cs
    │   ├── Handler/
    │   │   ├── AutoStartupHandler.cs
    │   │   ├── Builder/
    │   │   │   ├── CoreConfigContextBuilder.cs
    │   │   │   └── NodeValidator.cs
    │   │   ├── ConfigHandler.cs
    │   │   ├── ConnectionHandler.cs
    │   │   ├── CoreConfigHandler.cs
    │   │   ├── Fmt/
    │   │   │   ├── AnytlsFmt.cs
    │   │   │   ├── BaseFmt.cs
    │   │   │   ├── ClashFmt.cs
    │   │   │   ├── FmtHandler.cs
    │   │   │   ├── HtmlPageFmt.cs
    │   │   │   ├── Hysteria2Fmt.cs
    │   │   │   ├── ShadowsocksFmt.cs
    │   │   │   ├── SingboxFmt.cs
    │   │   │   ├── SocksFmt.cs
    │   │   │   ├── TrojanFmt.cs
    │   │   │   ├── TuicFmt.cs
    │   │   │   ├── V2rayFmt.cs
    │   │   │   ├── VLESSFmt.cs
    │   │   │   ├── VmessFmt.cs
    │   │   │   └── WireguardFmt.cs
    │   │   ├── SubscriptionHandler.cs
    │   │   └── SysProxy/
    │   │       ├── ProxySettingLinux.cs
    │   │       ├── ProxySettingOSX.cs
    │   │       ├── ProxySettingWindows.cs
    │   │       └── SysProxyHandler.cs
    │   ├── Helper/
    │   │   ├── DownloaderHelper.cs
    │   │   ├── HttpClientHelper.cs
    │   │   └── SqliteHelper.cs
    │   ├── Manager/
    │   │   ├── AppManager.cs
    │   │   ├── CertPemManager.cs
    │   │   ├── ClashApiManager.cs
    │   │   ├── CoreAdminManager.cs
    │   │   ├── CoreInfoManager.cs
    │   │   ├── CoreManager.cs
    │   │   ├── GroupProfileManager.cs
    │   │   ├── NoticeManager.cs
    │   │   ├── PacManager.cs
    │   │   ├── ProfileExManager.cs
    │   │   ├── StatisticsManager.cs
    │   │   ├── TaskManager.cs
    │   │   └── WebDavManager.cs
    │   ├── Models/
    │   │   ├── CheckUpdateModel.cs
    │   │   ├── ClashConnectionModel.cs
    │   │   ├── ClashConnections.cs
    │   │   ├── ClashProviders.cs
    │   │   ├── ClashProxies.cs
    │   │   ├── ClashProxyModel.cs
    │   │   ├── CmdItem.cs
    │   │   ├── ComboItem.cs
    │   │   ├── Config.cs
    │   │   ├── ConfigItems.cs
    │   │   ├── CoreConfigContext.cs
    │   │   ├── CoreInfo.cs
    │   │   ├── DNSItem.cs
    │   │   ├── FullConfigTemplateItem.cs
    │   │   ├── GitHubRelease.cs
    │   │   ├── IPAPIInfo.cs
    │   │   ├── ProfileExItem.cs
    │   │   ├── ProfileGroupItem.cs
    │   │   ├── ProfileItem.cs
    │   │   ├── ProfileItemModel.cs
    │   │   ├── ProtocolExtraItem.cs
    │   │   ├── RetResult.cs
    │   │   ├── RoutingItem.cs
    │   │   ├── RoutingItemModel.cs
    │   │   ├── RoutingTemplate.cs
    │   │   ├── RulesItem.cs
    │   │   ├── RulesItemModel.cs
    │   │   ├── SemanticVersion.cs
    │   │   ├── ServerSpeedItem.cs
    │   │   ├── ServerStatItem.cs
    │   │   ├── ServerTestItem.cs
    │   │   ├── SingboxConfig.cs
    │   │   ├── SpeedTestResult.cs
    │   │   ├── SsSIP008.cs
    │   │   ├── SubItem.cs
    │   │   ├── UpdateResult.cs
    │   │   ├── V2rayConfig.cs
    │   │   ├── V2rayMetricsVars.cs
    │   │   ├── V2rayTcpRequest.cs
    │   │   └── VmessQRCode.cs
    │   ├── Resx/
    │   │   ├── ResUI.Designer.cs
    │   │   ├── ResUI.fa-Ir.resx
    │   │   ├── ResUI.fr.resx
    │   │   ├── ResUI.hu.resx
    │   │   ├── ResUI.resx
    │   │   ├── ResUI.ru.resx
    │   │   ├── ResUI.zh-Hans.resx
    │   │   └── ResUI.zh-Hant.resx
    │   ├── Sample/
    │   │   ├── SampleClientConfig
    │   │   ├── SampleHttpRequest
    │   │   ├── SampleHttpResponse
    │   │   ├── SampleInbound
    │   │   ├── SampleOutbound
    │   │   ├── SingboxSampleClientConfig
    │   │   ├── SingboxSampleOutbound
    │   │   ├── clash_mixin_yaml
    │   │   ├── clash_tun_yaml
    │   │   ├── custom_routing_black
    │   │   ├── custom_routing_global
    │   │   ├── custom_routing_white
    │   │   ├── dns_singbox_normal
    │   │   ├── dns_v2ray_normal
    │   │   ├── kill_as_sudo_linux_sh
    │   │   ├── kill_as_sudo_osx_sh
    │   │   ├── linux_autostart_config
    │   │   ├── pac
    │   │   ├── proxy_set_linux_sh
    │   │   ├── proxy_set_osx_sh
    │   │   ├── singbox_fakeip_filter
    │   │   ├── tun_singbox_dns
    │   │   ├── tun_singbox_inbound
    │   │   └── tun_singbox_rules
    │   ├── ServiceLib.csproj
    │   ├── Services/
    │   │   ├── CoreConfig/
    │   │   │   ├── CoreConfigClashService.cs
    │   │   │   ├── Singbox/
    │   │   │   │   ├── CoreConfigSingboxService.cs
    │   │   │   │   ├── SingboxConfigTemplateService.cs
    │   │   │   │   ├── SingboxDnsService.cs
    │   │   │   │   ├── SingboxInboundService.cs
    │   │   │   │   ├── SingboxLogService.cs
    │   │   │   │   ├── SingboxOutboundService.cs
    │   │   │   │   ├── SingboxRoutingService.cs
    │   │   │   │   ├── SingboxRulesetService.cs
    │   │   │   │   └── SingboxStatisticService.cs
    │   │   │   └── V2ray/
    │   │   │       ├── CoreConfigV2rayService.cs
    │   │   │       ├── V2rayBalancerService.cs
    │   │   │       ├── V2rayConfigTemplateService.cs
    │   │   │       ├── V2rayDnsService.cs
    │   │   │       ├── V2rayInboundService.cs
    │   │   │       ├── V2rayLogService.cs
    │   │   │       ├── V2rayOutboundService.cs
    │   │   │       ├── V2rayRoutingService.cs
    │   │   │       └── V2rayStatisticService.cs
    │   │   ├── DownloadService.cs
    │   │   ├── ProcessService.cs
    │   │   ├── SpeedtestService.cs
    │   │   ├── Statistics/
    │   │   │   ├── StatisticsSingboxService.cs
    │   │   │   └── StatisticsXrayService.cs
    │   │   ├── UpdateService.cs
    │   │   └── WindowsJobService.cs
    │   └── ViewModels/
    │       ├── AddGroupServerViewModel.cs
    │       ├── AddServer2ViewModel.cs
    │       ├── AddServerViewModel.cs
    │       ├── BackupAndRestoreViewModel.cs
    │       ├── CheckUpdateViewModel.cs
    │       ├── ClashConnectionsViewModel.cs
    │       ├── ClashProxiesViewModel.cs
    │       ├── DNSSettingViewModel.cs
    │       ├── FullConfigTemplateViewModel.cs
    │       ├── GlobalHotkeySettingViewModel.cs
    │       ├── MainWindowViewModel.cs
    │       ├── MsgViewModel.cs
    │       ├── OptionSettingViewModel.cs
    │       ├── ProfilesSelectViewModel.cs
    │       ├── ProfilesViewModel.cs
    │       ├── RoutingRuleDetailsViewModel.cs
    │       ├── RoutingRuleSettingViewModel.cs
    │       ├── RoutingSettingViewModel.cs
    │       ├── StatusBarViewModel.cs
    │       ├── SubEditViewModel.cs
    │       └── SubSettingViewModel.cs
    ├── v2rayN/
    │   ├── App.xaml
    │   ├── App.xaml.cs
    │   ├── AssemblyInfo.cs
    │   ├── Base/
    │   │   ├── MyDGTextColumn.cs
    │   │   └── WindowBase.cs
    │   ├── Common/
    │   │   ├── QRCodeWindowsUtils.cs
    │   │   ├── UI.cs
    │   │   └── WindowsUtils.cs
    │   ├── Converters/
    │   │   ├── DelayColorConverter.cs
    │   │   ├── InverseBooleanConverter.cs
    │   │   └── MaterialDesignFonts.cs
    │   ├── FodyWeavers.xml
    │   ├── GlobalUsings.cs
    │   ├── Manager/
    │   │   ├── HotkeyManager.cs
    │   │   └── WindowsManager.cs
    │   ├── Properties/
    │   │   ├── Resources.Designer.cs
    │   │   └── Resources.resx
    │   ├── ViewModels/
    │   │   └── ThemeSettingViewModel.cs
    │   ├── Views/
    │   │   ├── AddGroupServerWindow.xaml
    │   │   ├── AddGroupServerWindow.xaml.cs
    │   │   ├── AddServer2Window.xaml
    │   │   ├── AddServer2Window.xaml.cs
    │   │   ├── AddServerWindow.xaml
    │   │   ├── AddServerWindow.xaml.cs
    │   │   ├── BackupAndRestoreView.xaml
    │   │   ├── BackupAndRestoreView.xaml.cs
    │   │   ├── CheckUpdateView.xaml
    │   │   ├── CheckUpdateView.xaml.cs
    │   │   ├── ClashConnectionsView.xaml
    │   │   ├── ClashConnectionsView.xaml.cs
    │   │   ├── ClashProxiesView.xaml
    │   │   ├── ClashProxiesView.xaml.cs
    │   │   ├── DNSSettingWindow.xaml
    │   │   ├── DNSSettingWindow.xaml.cs
    │   │   ├── FullConfigTemplateWindow.xaml
    │   │   ├── FullConfigTemplateWindow.xaml.cs
    │   │   ├── GlobalHotkeySettingWindow.xaml
    │   │   ├── GlobalHotkeySettingWindow.xaml.cs
    │   │   ├── MainWindow.xaml
    │   │   ├── MainWindow.xaml.cs
    │   │   ├── MsgView.xaml
    │   │   ├── MsgView.xaml.cs
    │   │   ├── OptionSettingWindow.xaml
    │   │   ├── OptionSettingWindow.xaml.cs
    │   │   ├── ProfilesSelectWindow.xaml
    │   │   ├── ProfilesSelectWindow.xaml.cs
    │   │   ├── ProfilesView.xaml
    │   │   ├── ProfilesView.xaml.cs
    │   │   ├── QrcodeView.xaml
    │   │   ├── QrcodeView.xaml.cs
    │   │   ├── RoutingRuleDetailsWindow.xaml
    │   │   ├── RoutingRuleDetailsWindow.xaml.cs
    │   │   ├── RoutingRuleSettingWindow.xaml
    │   │   ├── RoutingRuleSettingWindow.xaml.cs
    │   │   ├── RoutingSettingWindow.xaml
    │   │   ├── RoutingSettingWindow.xaml.cs
    │   │   ├── StatusBarView.xaml
    │   │   ├── StatusBarView.xaml.cs
    │   │   ├── SubEditWindow.xaml
    │   │   ├── SubEditWindow.xaml.cs
    │   │   ├── SubSettingWindow.xaml
    │   │   ├── SubSettingWindow.xaml.cs
    │   │   ├── ThemeSettingView.xaml
    │   │   └── ThemeSettingView.xaml.cs
    │   ├── app.manifest
    │   └── v2rayN.csproj
    ├── v2rayN.Desktop/
    │   ├── App.axaml
    │   ├── App.axaml.cs
    │   ├── Assets/
    │   │   ├── GlobalResources.axaml
    │   │   └── GlobalStyles.axaml
    │   ├── Base/
    │   │   └── WindowBase.cs
    │   ├── Common/
    │   │   ├── AppBuilderExtension.cs
    │   │   ├── AvaUtils.cs
    │   │   ├── TextEditorKeywordHighlighter.cs
    │   │   └── UI.cs
    │   ├── Converters/
    │   │   └── DelayColorConverter.cs
    │   ├── FodyWeavers.xml
    │   ├── GlobalUsings.cs
    │   ├── Manager/
    │   │   └── HotkeyManager.cs
    │   ├── Program.cs
    │   ├── ViewModels/
    │   │   └── ThemeSettingViewModel.cs
    │   ├── Views/
    │   │   ├── AddGroupServerWindow.axaml
    │   │   ├── AddGroupServerWindow.axaml.cs
    │   │   ├── AddServer2Window.axaml
    │   │   ├── AddServer2Window.axaml.cs
    │   │   ├── AddServerWindow.axaml
    │   │   ├── AddServerWindow.axaml.cs
    │   │   ├── BackupAndRestoreView.axaml
    │   │   ├── BackupAndRestoreView.axaml.cs
    │   │   ├── CheckUpdateView.axaml
    │   │   ├── CheckUpdateView.axaml.cs
    │   │   ├── ClashConnectionsView.axaml
    │   │   ├── ClashConnectionsView.axaml.cs
    │   │   ├── ClashProxiesView.axaml
    │   │   ├── ClashProxiesView.axaml.cs
    │   │   ├── DNSSettingWindow.axaml
    │   │   ├── DNSSettingWindow.axaml.cs
    │   │   ├── FullConfigTemplateWindow.axaml
    │   │   ├── FullConfigTemplateWindow.axaml.cs
    │   │   ├── GlobalHotkeySettingWindow.axaml
    │   │   ├── GlobalHotkeySettingWindow.axaml.cs
    │   │   ├── MainWindow.axaml
    │   │   ├── MainWindow.axaml.cs
    │   │   ├── MsgView.axaml
    │   │   ├── MsgView.axaml.cs
    │   │   ├── OptionSettingWindow.axaml
    │   │   ├── OptionSettingWindow.axaml.cs
    │   │   ├── ProfilesSelectWindow.axaml
    │   │   ├── ProfilesSelectWindow.axaml.cs
    │   │   ├── ProfilesView.axaml
    │   │   ├── ProfilesView.axaml.cs
    │   │   ├── QrcodeView.axaml
    │   │   ├── QrcodeView.axaml.cs
    │   │   ├── RoutingRuleDetailsWindow.axaml
    │   │   ├── RoutingRuleDetailsWindow.axaml.cs
    │   │   ├── RoutingRuleSettingWindow.axaml
    │   │   ├── RoutingRuleSettingWindow.axaml.cs
    │   │   ├── RoutingSettingWindow.axaml
    │   │   ├── RoutingSettingWindow.axaml.cs
    │   │   ├── StatusBarView.axaml
    │   │   ├── StatusBarView.axaml.cs
    │   │   ├── SubEditWindow.axaml
    │   │   ├── SubEditWindow.axaml.cs
    │   │   ├── SubSettingWindow.axaml
    │   │   ├── SubSettingWindow.axaml.cs
    │   │   ├── SudoPasswordInputView.axaml
    │   │   ├── SudoPasswordInputView.axaml.cs
    │   │   ├── ThemeSettingView.axaml
    │   │   └── ThemeSettingView.axaml.cs
    │   ├── v2rayN.Desktop.csproj
    │   └── v2rayN.icns
    ├── v2rayN.sln
    └── v2rayN.slnx
Download .txt
SYMBOL INDEX (1623 symbols across 234 files)

FILE: v2rayN/AmazTool/Program.cs
  class Program (line 3) | internal static class Program
    method Main (line 5) | [STAThread]
    method ShowHelp (line 59) | private static void ShowHelp()
    method HandleRebootAsync (line 71) | private static void HandleRebootAsync()
    method HandleUpgrade (line 82) | private static void HandleUpgrade(string upgradeData)

FILE: v2rayN/AmazTool/Resx/Resource.Designer.cs
  class Resource (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
    method Resource (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...

FILE: v2rayN/AmazTool/UpgradeApp.cs
  class UpgradeApp (line 7) | internal class UpgradeApp
    method Upgrade (line 9) | public static void Upgrade(string fileName)
    method TryExtractToFile (line 109) | private static bool TryExtractToFile(ZipArchiveEntry entry, string out...

FILE: v2rayN/AmazTool/Utils.cs
  class Utils (line 5) | internal class Utils
    method GetExePath (line 7) | public static string GetExePath()
    method StartupPath (line 12) | public static string StartupPath()
    method GetPath (line 17) | public static string GetPath(string fileName)
    method StartV2RayN (line 29) | public static void StartV2RayN()
    method Waiting (line 43) | public static void Waiting(int second)

FILE: v2rayN/ServiceLib/Base/MyReactiveObject.cs
  class MyReactiveObject (line 3) | public class MyReactiveObject : ReactiveObject

FILE: v2rayN/ServiceLib/Common/EmbedUtils.cs
  class EmbedUtils (line 3) | public static class EmbedUtils
    method GetEmbedText (line 13) | public static string GetEmbedText(string res)
    method LoadResource (line 42) | public static string? LoadResource(string? res)

FILE: v2rayN/ServiceLib/Common/Extension.cs
  class Extension (line 5) | public static class Extension
    method IsNullOrEmpty (line 7) | public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value)
    method IsNotEmpty (line 12) | public static bool IsNotEmpty([NotNullWhen(false)] this string? value)
    method NullIfEmpty (line 17) | public static string? NullIfEmpty(this string? value)
    method BeginWithAny (line 22) | public static bool BeginWithAny(this string s, IEnumerable<char> chars)
    method IsWhiteSpace (line 31) | private static bool IsWhiteSpace(this string value)
    method NonWhiteSpaceLines (line 36) | public static IEnumerable<string> NonWhiteSpaceLines(this TextReader r...
    method TrimEx (line 48) | public static string TrimEx(this string? value)
    method RemovePrefix (line 53) | public static string RemovePrefix(this string value, char prefix)
    method RemovePrefix (line 58) | public static string RemovePrefix(this string value, string prefix)
    method UpperFirstChar (line 63) | public static string UpperFirstChar(this string value)
    method AppendQuotes (line 73) | public static string AppendQuotes(this string value)
    method ToInt (line 78) | public static int ToInt(this string? value, int defaultValue = 0)
    method AppendEmpty (line 83) | public static List<string> AppendEmpty(this IEnumerable<string> source)
    method IsGroupType (line 88) | public static bool IsGroupType(this EConfigType configType)
    method IsComplexType (line 93) | public static bool IsComplexType(this EConfigType configType)
    method AddRangeSafe (line 101) | public static void AddRangeSafe<T>(this ICollection<T> destination, IE...

FILE: v2rayN/ServiceLib/Common/FileUtils.cs
  class FileUtils (line 6) | public static class FileUtils
    method ByteArrayToFile (line 10) | public static bool ByteArrayToFile(string fileName, byte[] content)
    method DecompressFile (line 24) | public static void DecompressFile(string fileName, byte[] content)
    method DecompressFile (line 38) | public static void DecompressFile(string fileName, string toPath, stri...
    method DecompressTarFile (line 54) | public static void DecompressTarFile(string fileName, string toPath)
    method NonExclusiveReadAllText (line 68) | public static string NonExclusiveReadAllText(string path)
    method NonExclusiveReadAllText (line 73) | private static string NonExclusiveReadAllText(string path, Encoding en...
    method ZipExtractToFile (line 88) | public static bool ZipExtractToFile(string fileName, string toPath, st...
    method GetFilesFromZip (line 121) | public static List<string>? GetFilesFromZip(string fileName)
    method CreateFromDirectory (line 139) | public static bool CreateFromDirectory(string sourceDirectoryName, str...
    method CopyDirectory (line 158) | public static void CopyDirectory(string sourceDir, string destinationD...
    method DeleteExpiredFiles (line 205) | public static void DeleteExpiredFiles(string sourceDir, DateTime dtLine)
    method CreateLinuxShellFile (line 233) | public static async Task<string> CreateLinuxShellFile(string fileName,...

FILE: v2rayN/ServiceLib/Common/JsonUtils.cs
  class JsonUtils (line 3) | public class JsonUtils
    method DeepCopy (line 38) | public static T? DeepCopy<T>(T? obj)
    method Deserialize (line 53) | public static T? Deserialize<T>(string? strJson)
    method ParseJson (line 74) | public static JsonNode? ParseJson(string? strJson)
    method Serialize (line 98) | public static string Serialize(object? obj, bool indented = true, bool...
    method Serialize (line 123) | public static string Serialize(object? obj, JsonSerializerOptions? opt...
    method SerializeToNode (line 146) | public static JsonNode? SerializeToNode(object? obj, JsonSerializerOpt...

FILE: v2rayN/ServiceLib/Common/Logging.cs
  class Logging (line 7) | public class Logging
    method Setup (line 12) | public static void Setup()
    method LoggingEnabled (line 23) | public static void LoggingEnabled(bool enable)
    method SaveLog (line 31) | public static void SaveLog(string strContent)
    method SaveLog (line 41) | public static void SaveLog(string strTitle, Exception ex)

FILE: v2rayN/ServiceLib/Common/ProcUtils.cs
  class ProcUtils (line 3) | public static class ProcUtils
    method ProcessStart (line 7) | public static void ProcessStart(string? fileName, string arguments = "")
    method ProcessStart (line 12) | public static int? ProcessStart(string? fileName, string arguments, st...
    method RebootAsAdmin (line 49) | public static void RebootAsAdmin(bool blAdmin = true)

FILE: v2rayN/ServiceLib/Common/QRCodeUtils.cs
  class QRCodeUtils (line 8) | public class QRCodeUtils
    method GenQRCode (line 10) | public static byte[]? GenQRCode(string? url)
    method ParseBarcode (line 53) | public static string? ParseBarcode(string? fileName)
    method ParseBarcode (line 75) | public static string? ParseBarcode(byte[]? bytes)
    method ReaderBarcode (line 94) | private static string? ReaderBarcode(SKBitmap? bitmap)
    method FlipBitmap (line 109) | private static SKBitmap FlipBitmap(SKBitmap bmp)

FILE: v2rayN/ServiceLib/Common/Utils.cs
  class Utils (line 8) | public class Utils
    method List2String (line 20) | public static string List2String(List<string>? lst, bool wrap = false)
    method String2List (line 45) | public static List<string>? String2List(string? str)
    method String2ListSorted (line 69) | public static List<string>? String2ListSorted(string str)
    method Base64Encode (line 82) | public static string Base64Encode(string plainText, bool removePadding...
    method Base64Decode (line 107) | public static string Base64Decode(string? plainText)
    method ToBool (line 140) | public static bool ToBool(object obj)
    method ToString (line 152) | public static string ToString(object? obj)
    method HumanFy (line 164) | public static string HumanFy(long amount)
    method UrlEncode (line 185) | public static string UrlEncode(string url)
    method UrlDecode (line 190) | public static string UrlDecode(string url)
    method ParseQueryString (line 195) | public static NameValueCollection ParseQueryString(string query)
    method GetMd5 (line 224) | public static string GetMd5(string str)
    method GetFileHash (line 250) | public static string GetFileHash(string filePath)
    method GetPunycode (line 281) | public static string GetPunycode(string url)
    method IsBase64String (line 306) | public static bool IsBase64String(string? plainText)
    method Convert2Comma (line 317) | public static string Convert2Comma(string text)
    method GetEnumNames (line 327) | public static List<string> GetEnumNames<TEnum>() where TEnum : Enum
    method ParseHostsToDictionary (line 335) | public static Dictionary<string, List<string>> ParseHostsToDictionary(...
    method ParseUrl (line 365) | public static (string domain, string scheme, int port, string path) Pa...
    method ParseAuthority (line 415) | private static (string domain, int port) ParseAuthority(string authority)
    method DomainStrategy4Sbox (line 463) | public static string? DomainStrategy4Sbox(string? strategy)
    method IsNumeric (line 484) | public static bool IsNumeric(string oText)
    method IsDomain (line 493) | public static bool IsDomain(string? domain)
    method IsIpv6 (line 510) | public static bool IsIpv6(string ip)
    method IsIpAddress (line 525) | public static bool IsIpAddress(string? ip)
    method TryUri (line 550) | public static Uri? TryUri(string url)
    method IsPrivateNetwork (line 562) | public static bool IsPrivateNetwork(string ip)
    method PortInUse (line 635) | private static bool PortInUse(int port)
    method GetFreePort (line 659) | public static int GetFreePort(int defaultPort = 0)
    method GetActiveNetworkInfo (line 681) | public static (List<IPEndPoint> endpoints, List<TcpConnectionInformati...
    method UpgradeAppExists (line 706) | public static bool UpgradeAppExists(out string upgradeFileName)
    method GetVersion (line 716) | public static string GetVersion(bool blFull = true)
    method GetVersionInfo (line 732) | public static string GetVersionInfo()
    method GetRuntimeInfo (line 745) | public static string GetRuntimeInfo()
    method GetGuid (line 754) | public static string GetGuid(bool full = true)
    method IsGuidByParse (line 775) | public static bool IsGuidByParse(string strSrc)
    method GetSystemHosts (line 780) | private static Dictionary<string, string> GetSystemHosts(string hostFile)
    method GetSystemHosts (line 848) | public static Dictionary<string, string> GetSystemHosts()
    method GetCliWrapOutput (line 861) | public static async Task<string?> GetCliWrapOutput(string filePath, st...
    method GetCliWrapOutput (line 866) | public static async Task<string?> GetCliWrapOutput(string filePath, IE...
    method HasWritePermission (line 903) | public static bool HasWritePermission()
    method GetPath (line 937) | public static string GetPath(string fileName)
    method GetBaseDirectory (line 948) | public static string GetBaseDirectory(string fileName = "")
    method GetExePath (line 953) | public static string GetExePath()
    method StartupPath (line 958) | public static string StartupPath()
    method GetTempPath (line 968) | public static string GetTempPath(string filename = "")
    method GetBackupPath (line 986) | public static string GetBackupPath(string filename)
    method GetConfigPath (line 997) | public static string GetConfigPath(string filename = "")
    method GetBinPath (line 1015) | public static string GetBinPath(string filename, string? coreType = null)
    method GetLogPath (line 1042) | public static string GetLogPath(string filename = "")
    method GetFontsPath (line 1060) | public static string GetFontsPath(string filename = "")
    method GetBinConfigPath (line 1078) | public static string GetBinConfigPath(string filename = "")
    method IsWindows (line 1100) | public static bool IsWindows() => OperatingSystem.IsWindows();
    method IsLinux (line 1102) | public static bool IsLinux() => OperatingSystem.IsLinux();
    method IsMacOS (line 1104) | public static bool IsMacOS() => OperatingSystem.IsMacOS();
    method IsNonWindows (line 1106) | public static bool IsNonWindows() => !OperatingSystem.IsWindows();
    method GetExeName (line 1108) | public static string GetExeName(string name)
    method IsAdministrator (line 1125) | public static bool IsAdministrator()
    method IsPackagedInstall (line 1134) | public static bool IsPackagedInstall()
    method GetLinuxUserId (line 1173) | private static async Task<string?> GetLinuxUserId()
    method SetLinuxChmod (line 1179) | public static async Task<string?> SetLinuxChmod(string? fileName)
    method SetUnixFileMode (line 1199) | public static bool SetUnixFileMode(string? fileName)
    method GetLinuxFontFamily (line 1222) | public static async Task<string?> GetLinuxFontFamily(string lang)
    method GetHomePath (line 1229) | public static string? GetHomePath()

FILE: v2rayN/ServiceLib/Common/WindowsUtils.cs
  class WindowsUtils (line 5) | internal static class WindowsUtils
    method RegReadValue (line 9) | public static string? RegReadValue(string path, string name, string def)
    method RegWriteValue (line 29) | public static void RegWriteValue(string path, string name, object value)
    method RemoveTunDevice (line 54) | public static async Task RemoveTunDevice()

FILE: v2rayN/ServiceLib/Common/YamlUtils.cs
  class YamlUtils (line 7) | public class YamlUtils
    method FromYaml (line 19) | public static T FromYaml<T>(string str)
    method ToYaml (line 41) | public static string ToYaml(object? obj)
    method PreprocessYaml (line 63) | public static string? PreprocessYaml(string str)

FILE: v2rayN/ServiceLib/Enums/EConfigType.cs
  type EConfigType (line 3) | public enum EConfigType

FILE: v2rayN/ServiceLib/Enums/ECoreType.cs
  type ECoreType (line 3) | public enum ECoreType

FILE: v2rayN/ServiceLib/Enums/EGirdOrientation.cs
  type EGirdOrientation (line 3) | public enum EGirdOrientation

FILE: v2rayN/ServiceLib/Enums/EGlobalHotkey.cs
  type EGlobalHotkey (line 3) | public enum EGlobalHotkey

FILE: v2rayN/ServiceLib/Enums/EInboundProtocol.cs
  type EInboundProtocol (line 3) | public enum EInboundProtocol

FILE: v2rayN/ServiceLib/Enums/EMove.cs
  type EMove (line 3) | public enum EMove

FILE: v2rayN/ServiceLib/Enums/EMultipleLoad.cs
  type EMultipleLoad (line 3) | public enum EMultipleLoad

FILE: v2rayN/ServiceLib/Enums/EPresetType.cs
  type EPresetType (line 3) | public enum EPresetType

FILE: v2rayN/ServiceLib/Enums/ERuleMode.cs
  type ERuleMode (line 3) | public enum ERuleMode

FILE: v2rayN/ServiceLib/Enums/ERuleType.cs
  type ERuleType (line 3) | public enum ERuleType

FILE: v2rayN/ServiceLib/Enums/EServerColName.cs
  type EServerColName (line 3) | public enum EServerColName

FILE: v2rayN/ServiceLib/Enums/ESpeedActionType.cs
  type ESpeedActionType (line 3) | public enum ESpeedActionType

FILE: v2rayN/ServiceLib/Enums/ESysProxyType.cs
  type ESysProxyType (line 3) | public enum ESysProxyType

FILE: v2rayN/ServiceLib/Enums/ETheme.cs
  type ETheme (line 3) | public enum ETheme

FILE: v2rayN/ServiceLib/Enums/ETransport.cs
  type ETransport (line 3) | public enum ETransport

FILE: v2rayN/ServiceLib/Enums/EViewAction.cs
  type EViewAction (line 3) | public enum EViewAction

FILE: v2rayN/ServiceLib/Events/AppEvents.cs
  class AppEvents (line 3) | public static class AppEvents

FILE: v2rayN/ServiceLib/Events/EventChannel.cs
  class EventChannel (line 5) | public sealed class EventChannel<T>
    method AsObservable (line 9) | public IObservable<T> AsObservable()
    method Publish (line 14) | public void Publish(T value)
    method Publish (line 19) | public void Publish()

FILE: v2rayN/ServiceLib/Global.cs
  class Global (line 3) | public class Global

FILE: v2rayN/ServiceLib/Handler/AutoStartupHandler.cs
  class AutoStartupHandler (line 5) | public static class AutoStartupHandler
    method UpdateTask (line 9) | public static async Task<bool> UpdateTask(Config config)
    method ClearTaskWindows (line 44) | private static async Task ClearTaskWindows()
    method SetTaskWindows (line 56) | private static async Task SetTaskWindows()
    method AutoStartTaskService (line 85) | public static void AutoStartTaskService(string taskName, string fileNa...
    method GetAutoRunNameWindows (line 118) | private static string GetAutoRunNameWindows()
    method ClearTaskLinux (line 127) | private static async Task ClearTaskLinux()
    method SetTaskLinux (line 140) | private static async Task SetTaskLinux()
    method GetHomePathLinux (line 160) | private static string GetHomePathLinux()
    method ClearTaskOSX (line 171) | private static async Task ClearTaskOSX()
    method SetTaskOSX (line 190) | private static async Task SetTaskOSX()
    method GetLaunchAgentPathMacOS (line 207) | private static string GetLaunchAgentPathMacOS()
    method GenerateLaunchAgentPlist (line 215) | private static string GenerateLaunchAgentPlist()

FILE: v2rayN/ServiceLib/Handler/Builder/CoreConfigContextBuilder.cs
  type CoreConfigContextBuilderResult (line 3) | public record CoreConfigContextBuilderResult(CoreConfigContext Context, ...
  type CoreConfigContextBuilderAllResult (line 12) | public record CoreConfigContextBuilderAllResult(
  class CoreConfigContextBuilder (line 41) | public class CoreConfigContextBuilder
    method Build (line 47) | public static async Task<CoreConfigContextBuilderResult> Build(Config ...
    method BuildAll (line 116) | public static async Task<CoreConfigContextBuilderAllResult> BuildAll(C...
    method BuildPreSocksIfNeeded (line 132) | private static async Task<CoreConfigContextBuilderResult?> BuildPreSoc...
    method ResolveNodeAsync (line 188) | public static async Task<(ProfileItem, NodeValidatorResult)> ResolveNo...
    method BuildSubscriptionChainNodeAsync (line 226) | private static async Task<(ProfileItem? ChainNode, NodeValidatorResult...
    method RegisterNodeAsync (line 288) | private static async Task<NodeValidatorResult> RegisterNodeAsync(CoreC...
    method RegisterSingleNodeAsync (line 304) | private static NodeValidatorResult RegisterSingleNodeAsync(CoreConfigC...
    method RegisterGroupNodeAsync (line 348) | private static async Task<NodeValidatorResult> RegisterGroupNodeAsync(...
    method TraverseGroupNodeAsync (line 366) | private static async Task<NodeValidatorResult> TraverseGroupNodeAsync(

FILE: v2rayN/ServiceLib/Handler/Builder/NodeValidator.cs
  type NodeValidatorResult (line 3) | public record NodeValidatorResult(List<string> Errors, List<string> Warn...
  class NodeValidator (line 13) | public class NodeValidator
    method Validate (line 25) | public static NodeValidatorResult Validate(ProfileItem item, ECoreType...
    class ValidationContext (line 32) | private class ValidationContext
      method Error (line 37) | public void Error(string message)
      method Warning (line 42) | public void Warning(string message)
      method Assert (line 47) | public void Assert(bool condition, string errorMsg)
      method ToResult (line 55) | public NodeValidatorResult ToResult()
    method ValidateNodeAndCoreSupport (line 61) | private static void ValidateNodeAndCoreSupport(ProfileItem item, ECore...
    method ValidateSingboxTransport (line 153) | private static string? ValidateSingboxTransport(EConfigType configType...

FILE: v2rayN/ServiceLib/Handler/ConfigHandler.cs
  class ConfigHandler (line 5) | public static class ConfigHandler
    method LoadConfig (line 19) | public static Config? LoadConfig()
    method SaveConfig (line 180) | public static async Task<int> SaveConfig(Config config)
    method AddServer (line 218) | public static async Task<int> AddServer(Config config, ProfileItem pro...
    method AddVMessServer (line 285) | public static async Task<int> AddVMessServer(Config config, ProfileIte...
    method RemoveServers (line 321) | public static async Task<int> RemoveServers(Config config, List<Profil...
    method CopyServer (line 342) | public static async Task<int> CopyServer(Config config, List<ProfileIt...
    method SetDefaultServerIndex (line 379) | public static async Task<int> SetDefaultServerIndex(Config config, str...
    method SetDefaultServer (line 400) | public static async Task<int> SetDefaultServer(Config config, List<Pro...
    method GetDefaultServer (line 426) | public static async Task<ProfileItem?> GetDefaultServer(Config config)
    method MoveServer (line 449) | public static async Task<int> MoveServer(Config config, List<ProfileIt...
    method AddCustomServer (line 523) | public static async Task<int> AddCustomServer(Config config, ProfileIt...
    method EditCustomServer (line 567) | public static async Task<int> EditCustomServer(Config config, ProfileI...
    method AddShadowsocksServer (line 603) | public static async Task<int> AddShadowsocksServer(Config config, Prof...
    method AddSocksServer (line 636) | public static async Task<int> AddSocksServer(Config config, ProfileIte...
    method AddHttpServer (line 655) | public static async Task<int> AddHttpServer(Config config, ProfileItem...
    method AddTrojanServer (line 674) | public static async Task<int> AddTrojanServer(Config config, ProfileIt...
    method AddHysteria2Server (line 703) | public static async Task<int> AddHysteria2Server(Config config, Profil...
    method AddTuicServer (line 740) | public static async Task<int> AddTuicServer(Config config, ProfileItem...
    method AddWireguardServer (line 781) | public static async Task<int> AddWireguardServer(Config config, Profil...
    method AddAnytlsServer (line 814) | public static async Task<int> AddAnytlsServer(Config config, ProfileIt...
    method SortServers (line 843) | public static async Task<int> SortServers(Config config, string subId,...
    method AddVlessServer (line 958) | public static async Task<int> AddVlessServer(Config config, ProfileIte...
    method DedupServerList (line 995) | public static async Task<Tuple<int, int>> DedupServerList(Config confi...
    method AddServerCommon (line 1034) | public static async Task<int> AddServerCommon(Config config, ProfileIt...
    method CompareProfileItem (line 1094) | private static bool CompareProfileItem(ProfileItem? o, ProfileItem? n,...
    method FindMatchedProfileItem (line 1143) | private static ProfileItem? FindMatchedProfileItem(IEnumerable<Profile...
    method RemoveProfileItem (line 1217) | private static async Task<int> RemoveProfileItem(Config config, string...
    method AddGroupAllServer (line 1248) | public static async Task<RetResult> AddGroupAllServer(Config config, S...
    method CombineWithDefaultAllFilter (line 1287) | private static string CombineWithDefaultAllFilter(string regionPattern)
    method AddGroupRegionServer (line 1313) | public static async Task<RetResult> AddGroupRegionServer(Config config...
    method GetPreSocksItem (line 1381) | public static ProfileItem? GetPreSocksItem(Config config, ProfileItem ...
    method RemoveInvalidServerResult (line 1406) | public static async Task<int> RemoveInvalidServerResult(Config config,...
    method AddBatchServersCommon (line 1438) | private static async Task<int> AddBatchServersCommon(Config config, st...
    method AddBatchServers4Custom (line 1527) | private static async Task<int> AddBatchServers4Custom(Config config, s...
    method AddBatchServers4SsSIP008 (line 1630) | private static async Task<int> AddBatchServers4SsSIP008(Config config,...
    method AddBatchServers (line 1671) | public static async Task<int> AddBatchServers(Config config, string st...
    method AddSubItem (line 1749) | public static async Task<int> AddSubItem(Config config, string url)
    method AddSubItem (line 1788) | public static async Task<int> AddSubItem(Config config, SubItem subItem)
    method RemoveServersViaSubid (line 1845) | public static async Task<int> RemoveServersViaSubid(Config config, str...
    method DeleteSubItem (line 1874) | public static async Task<int> DeleteSubItem(Config config, string id)
    method MoveToGroup (line 1894) | public static async Task<int> MoveToGroup(Config config, List<ProfileI...
    method SaveRoutingItem (line 1915) | public static async Task<int> SaveRoutingItem(Config config, RoutingIt...
    method AddBatchRoutingRules (line 1938) | public static async Task<int> AddBatchRoutingRules(RoutingItem routing...
    method MoveRoutingRule (line 1982) | public static async Task<int> MoveRoutingRule(List<RulesItem> rules, i...
    method SetDefaultRouting (line 2058) | public static async Task<int> SetDefaultRouting(Config config, Routing...
    method GetDefaultRouting (line 2089) | public static async Task<RoutingItem> GetDefaultRouting(Config config)
    method InitRouting (line 2108) | public static async Task<int> InitRouting(Config config, bool blImport...
    method InitExternalRouting (line 2129) | public static async Task<int> InitExternalRouting(Config config, bool ...
    method InitBuiltinRouting (line 2192) | public static async Task<int> InitBuiltinRouting(Config config, bool b...
    method RemoveRoutingItem (line 2261) | public static async Task RemoveRoutingItem(RoutingItem routingItem)
    method InitBuiltinDNS (line 2277) | public static async Task<int> InitBuiltinDNS(Config config)
    method SaveDNSItems (line 2326) | public static async Task<int> SaveDNSItems(Config config, DNSItem item)
    method GetExternalDNSItem (line 2355) | public static async Task<DNSItem> GetExternalDNSItem(ECoreType type, s...
    method InitBuiltinSimpleDNS (line 2394) | public static SimpleDNSItem InitBuiltinSimpleDNS()
    method GetExternalSimpleDNSItem (line 2409) | public static async Task<SimpleDNSItem> GetExternalSimpleDNSItem(strin...
    method InitBuiltinFullConfigTemplate (line 2431) | public static async Task<int> InitBuiltinFullConfigTemplate(Config con...
    method SaveFullConfigTemplate (line 2454) | public static async Task<int> SaveFullConfigTemplate(Config config, Fu...
    method ApplyRegionalPreset (line 2487) | public static async Task<bool> ApplyRegionalPreset(Config config, EPre...
    method GetWindowSizeItem (line 2556) | public static WindowSizeItem? GetWindowSizeItem(Config config, string ...
    method SaveWindowSizeItem (line 2567) | public static int SaveWindowSizeItem(Config config, string typeName, d...
    method SaveMainGirdHeight (line 2582) | public static int SaveMainGirdHeight(Config config, double height1, do...

FILE: v2rayN/ServiceLib/Handler/ConnectionHandler.cs
  class ConnectionHandler (line 3) | public static class ConnectionHandler
    method RunAvailabilityCheck (line 7) | public static async Task<string> RunAvailabilityCheck()
    method GetIPInfo (line 15) | private static async Task<string?> GetIPInfo()
    method GetRealPingTimeInfo (line 42) | private static async Task<int> GetRealPingTimeInfo()
    method GetRealPingTime (line 69) | public static async Task<int> GetRealPingTime(string url, IWebProxy? w...

FILE: v2rayN/ServiceLib/Handler/CoreConfigHandler.cs
  class CoreConfigHandler (line 6) | public static class CoreConfigHandler
    method GenerateClientConfig (line 10) | public static async Task<RetResult> GenerateClientConfig(CoreConfigCon...
    method GenerateClientCustomConfig (line 44) | private static async Task<RetResult> GenerateClientCustomConfig(Profil...
    method GenerateClientSpeedtestConfig (line 93) | public static async Task<RetResult> GenerateClientSpeedtestConfig(Conf...
    method GenerateClientSpeedtestConfig (line 128) | public static async Task<RetResult> GenerateClientSpeedtestConfig(Conf...

FILE: v2rayN/ServiceLib/Handler/Fmt/AnytlsFmt.cs
  class AnytlsFmt (line 3) | public class AnytlsFmt : BaseFmt
    method Resolve (line 5) | public static ProfileItem? Resolve(string str, out string msg)
    method ToUri (line 31) | public static string? ToUri(ProfileItem? item)

FILE: v2rayN/ServiceLib/Handler/Fmt/BaseFmt.cs
  class BaseFmt (line 5) | public class BaseFmt
    method GetIpv6 (line 9) | protected static string GetIpv6(string address)
    method ToUriQuery (line 22) | protected static int ToUriQuery(ProfileItem item, string? securityDef,...
    method ToUriQueryLite (line 184) | protected static int ToUriQueryLite(ProfileItem item, ref Dictionary<s...
    method ToUriQueryAllowInsecure (line 200) | private static int ToUriQueryAllowInsecure(ProfileItem item, ref Dicti...
    method ResolveUriQuery (line 217) | protected static int ResolveUriQuery(NameValueCollection query, ref Pr...
    method Contains (line 326) | protected static bool Contains(string str, params string[] s)
    method WriteAllText (line 331) | protected static string WriteAllText(string strData, string ext = "json")
    method ToUri (line 338) | protected static string ToUri(EConfigType eConfigType, string address,...
    method GetQueryValue (line 348) | protected static string GetQueryValue(NameValueCollection query, strin...
    method GetQueryDecoded (line 353) | protected static string GetQueryDecoded(NameValueCollection query, str...

FILE: v2rayN/ServiceLib/Handler/Fmt/ClashFmt.cs
  class ClashFmt (line 3) | public class ClashFmt : BaseFmt
    method ResolveFull (line 5) | public static ProfileItem? ResolveFull(string strData, string? subRema...

FILE: v2rayN/ServiceLib/Handler/Fmt/FmtHandler.cs
  class FmtHandler (line 3) | public class FmtHandler
    method GetShareUri (line 7) | public static string? GetShareUri(ProfileItem item)
    method ResolveConfig (line 34) | public static ProfileItem? ResolveConfig(string config, out string msg)

FILE: v2rayN/ServiceLib/Handler/Fmt/HtmlPageFmt.cs
  class HtmlPageFmt (line 3) | public class HtmlPageFmt : BaseFmt
    method IsHtmlPage (line 5) | public static bool IsHtmlPage(string strData)

FILE: v2rayN/ServiceLib/Handler/Fmt/Hysteria2Fmt.cs
  class Hysteria2Fmt (line 3) | public class Hysteria2Fmt : BaseFmt
    method Resolve (line 5) | public static ProfileItem? Resolve(string str, out string msg)
    method ToUri (line 39) | public static string? ToUri(ProfileItem? item)
    method ResolveFull2 (line 80) | public static ProfileItem? ResolveFull2(string strData, string? subRem...

FILE: v2rayN/ServiceLib/Handler/Fmt/ShadowsocksFmt.cs
  class ShadowsocksFmt (line 3) | public class ShadowsocksFmt : BaseFmt
    method Resolve (line 5) | public static ProfileItem? Resolve(string str, out string msg)
    method ToUri (line 26) | public static string? ToUri(ProfileItem? item)
    method ResolveSSLegacy (line 112) | private static ProfileItem? ResolveSSLegacy(string result)
    method ResolveSip002 (line 147) | private static ProfileItem? ResolveSip002(string result)
    method ResolveSip008 (line 282) | public static List<ProfileItem>? ResolveSip008(string result)

FILE: v2rayN/ServiceLib/Handler/Fmt/SingboxFmt.cs
  class SingboxFmt (line 3) | public class SingboxFmt : BaseFmt
    method ResolveFullArray (line 5) | public static List<ProfileItem>? ResolveFullArray(string strData, stri...
    method ResolveFull (line 26) | public static ProfileItem? ResolveFull(string strData, string? subRema...

FILE: v2rayN/ServiceLib/Handler/Fmt/SocksFmt.cs
  class SocksFmt (line 3) | public class SocksFmt : BaseFmt
    method Resolve (line 5) | public static ProfileItem? Resolve(string str, out string msg)
    method ToUri (line 24) | public static string? ToUri(ProfileItem? item)
    method ResolveSocks (line 40) | private static ProfileItem? ResolveSocks(string result)
    method ResolveSocksNew (line 86) | private static ProfileItem? ResolveSocksNew(string result)

FILE: v2rayN/ServiceLib/Handler/Fmt/TrojanFmt.cs
  class TrojanFmt (line 3) | public class TrojanFmt : BaseFmt
    method Resolve (line 5) | public static ProfileItem? Resolve(string str, out string msg)
    method ToUri (line 32) | public static string? ToUri(ProfileItem? item)

FILE: v2rayN/ServiceLib/Handler/Fmt/TuicFmt.cs
  class TuicFmt (line 3) | public class TuicFmt : BaseFmt
    method Resolve (line 5) | public static ProfileItem? Resolve(string str, out string msg)
    method ToUri (line 38) | public static string? ToUri(ProfileItem? item)

FILE: v2rayN/ServiceLib/Handler/Fmt/V2rayFmt.cs
  class V2rayFmt (line 3) | public class V2rayFmt : BaseFmt
    method ResolveFullArray (line 5) | public static List<ProfileItem>? ResolveFullArray(string strData, stri...
    method ResolveFull (line 27) | public static ProfileItem? ResolveFull(string strData, string? subRema...

FILE: v2rayN/ServiceLib/Handler/Fmt/VLESSFmt.cs
  class VLESSFmt (line 3) | public class VLESSFmt : BaseFmt
    method Resolve (line 5) | public static ProfileItem? Resolve(string str, out string msg)
    method ToUri (line 37) | public static string? ToUri(ProfileItem? item)

FILE: v2rayN/ServiceLib/Handler/Fmt/VmessFmt.cs
  class VmessFmt (line 3) | public class VmessFmt : BaseFmt
    method Resolve (line 5) | public static ProfileItem? Resolve(string str, out string msg)
    method ToUri (line 20) | public static string? ToUri(ProfileItem? item)
    method ResolveVmess (line 54) | private static ProfileItem? ResolveVmess(string result, out string msg)
    method ResolveStdVmess (line 105) | public static ProfileItem? ResolveStdVmess(string str)

FILE: v2rayN/ServiceLib/Handler/Fmt/WireguardFmt.cs
  class WireguardFmt (line 3) | public class WireguardFmt : BaseFmt
    method Resolve (line 5) | public static ProfileItem? Resolve(string str, out string msg)
    method ToUri (line 38) | public static string? ToUri(ProfileItem? item)

FILE: v2rayN/ServiceLib/Handler/SubscriptionHandler.cs
  class SubscriptionHandler (line 3) | public static class SubscriptionHandler
    method UpdateProcess (line 5) | public static async Task UpdateProcess(Config config, string subId, bo...
    method IsValidSubscription (line 60) | private static bool IsValidSubscription(SubItem item, string subId)
    method CreateDownloadHandler (line 83) | private static DownloadService CreateDownloadHandler(string hashCode, ...
    method DownloadSubscriptionContent (line 93) | private static async Task<string> DownloadSubscriptionContent(Download...
    method DownloadAllSubscriptions (line 106) | private static async Task<string> DownloadAllSubscriptions(Config conf...
    method DownloadMainSubscription (line 120) | private static async Task<string> DownloadMainSubscription(Config conf...
    method DownloadAdditionalSubscriptions (line 149) | private static async Task<string> DownloadAdditionalSubscriptions(SubI...
    method ProcessDownloadResult (line 188) | private static async Task<bool> ProcessDownloadResult(Config config, s...

FILE: v2rayN/ServiceLib/Handler/SysProxy/ProxySettingLinux.cs
  class ProxySettingLinux (line 3) | public static class ProxySettingLinux
    method SetProxy (line 7) | public static async Task SetProxy(string host, int port, string except...
    method UnsetProxy (line 13) | public static async Task UnsetProxy()
    method ExecCmd (line 19) | private static async Task ExecCmd(List<string> args)

FILE: v2rayN/ServiceLib/Handler/SysProxy/ProxySettingOSX.cs
  class ProxySettingOSX (line 3) | public static class ProxySettingOSX
    method SetProxy (line 7) | public static async Task SetProxy(string host, int port, string except...
    method UnsetProxy (line 18) | public static async Task UnsetProxy()
    method ExecCmd (line 24) | private static async Task ExecCmd(List<string> args)

FILE: v2rayN/ServiceLib/Handler/SysProxy/ProxySettingWindows.cs
  class ProxySettingWindows (line 5) | public static class ProxySettingWindows
    method SetProxyFallback (line 9) | private static bool SetProxyFallback(string? strProxy, string? excepti...
    method UnsetProxy (line 39) | public static bool UnsetProxy()
    method SetProxy (line 57) | public static bool SetProxy(string? strProxy, string? exceptions, int ...
    method SetConnectionProxy (line 78) | private static bool SetConnectionProxy(string? connectionName, string?...
    method EnumerateRasEntries (line 204) | private static IEnumerable<string> EnumerateRasEntries()
    type InternetPerConnOptionList (line 239) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    type InternetConnectionOption (line 251) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
      method InternetConnectionOption (line 258) | static InternetConnectionOption()
      type InternetConnectionOptionValue (line 264) | [StructLayout(LayoutKind.Explicit)]
      type RASENTRYNAME (line 278) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    type InternetOption (line 305) | public enum InternetOption : uint
    type PerConnOption (line 315) | public enum PerConnOption
    type PerConnFlags (line 326) | [Flags]
    type ErrorCode (line 335) | public enum ErrorCode : uint
    class NativeMethods (line 343) | internal static class NativeMethods
      method InternetSetOption (line 345) | [DllImport("WinInet.dll", SetLastError = true, CharSet = CharSet.Auto)]
      method RasEnumEntries (line 349) | [DllImport("Rasapi32.dll", CharSet = CharSet.Auto)]

FILE: v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs
  class SysProxyHandler (line 3) | public static class SysProxyHandler
    method UpdateSysProxy (line 7) | public static async Task<bool> UpdateSysProxy(Config config, bool forc...
    method GetWindowsProxyString (line 69) | private static void GetWindowsProxyString(Config config, int port, out...
    method SetWindowsProxyPac (line 91) | private static async Task SetWindowsProxyPac(int port)

FILE: v2rayN/ServiceLib/Helper/DownloaderHelper.cs
  class DownloaderHelper (line 5) | public class DownloaderHelper
    method DownloadStringAsync (line 10) | public async Task<string?> DownloadStringAsync(IWebProxy? webProxy, st...
    method DownloadDataAsync4Speed (line 56) | public async Task DownloadDataAsync4Speed(IWebProxy webProxy, string u...
    method DownloadFileAsync (line 125) | public async Task DownloadFileAsync(IWebProxy? webProxy, string url, s...

FILE: v2rayN/ServiceLib/Helper/HttpClientHelper.cs
  class HttpClientHelper (line 8) | public class HttpClientHelper
    method HttpClientHelper (line 20) | private HttpClientHelper(HttpClient httpClient)
    method TryGetAsync (line 25) | public async Task<string?> TryGetAsync(string url)
    method GetAsync (line 43) | public async Task<string?> GetAsync(string url)
    method PutAsync (line 52) | public async Task PutAsync(string url, Dictionary<string, string> head...
    method PatchAsync (line 60) | public async Task PatchAsync(string url, Dictionary<string, string> he...
    method DeleteAsync (line 70) | public async Task DeleteAsync(string url)

FILE: v2rayN/ServiceLib/Helper/SqliteHelper.cs
  class SQLiteHelper (line 5) | public sealed class SQLiteHelper
    method SQLiteHelper (line 14) | public SQLiteHelper()
    method CreateTable (line 21) | public CreateTableResult CreateTable<T>()
    method InsertAllAsync (line 26) | public async Task<int> InsertAllAsync(IEnumerable models)
    method InsertAsync (line 31) | public async Task<int> InsertAsync(object model)
    method ReplaceAsync (line 36) | public async Task<int> ReplaceAsync(object model)
    method UpdateAsync (line 41) | public async Task<int> UpdateAsync(object model)
    method UpdateAllAsync (line 46) | public async Task<int> UpdateAllAsync(IEnumerable models)
    method DeleteAsync (line 51) | public async Task<int> DeleteAsync(object model)
    method DeleteAllAsync (line 56) | public async Task<int> DeleteAllAsync<T>()
    method ExecuteAsync (line 61) | public async Task<int> ExecuteAsync(string sql)
    method QueryAsync (line 66) | public async Task<List<T>> QueryAsync<T>(string sql) where T : new()
    method TableAsync (line 71) | public AsyncTableQuery<T> TableAsync<T>() where T : new()
    method DisposeDbConnectionAsync (line 76) | public async Task DisposeDbConnectionAsync()

FILE: v2rayN/ServiceLib/Manager/AppManager.cs
  class AppManager (line 3) | public sealed class AppManager
    method IsRunningCore (line 38) | public bool IsRunningCore(ECoreType type)
    method InitApp (line 55) | public bool InitApp()
    method InitComponents (line 90) | public bool InitComponents()
    method Reset (line 107) | public bool Reset()
    method AppExitAsync (line 114) | public async Task AppExitAsync(bool needShutdown)
    method Shutdown (line 142) | public void Shutdown(bool byUser)
    method RebootAsAdmin (line 147) | public async Task RebootAsAdmin()
    method GetLocalPort (line 157) | public int GetLocalPort(EInboundProtocol protocol)
    method SubItems (line 167) | public async Task<List<SubItem>?> SubItems()
    method GetSubItem (line 172) | public async Task<SubItem?> GetSubItem(string? subid)
    method ProfileItems (line 177) | public async Task<List<ProfileItem>?> ProfileItems(string subid)
    method ProfileItemIndexes (line 189) | public async Task<List<string>?> ProfileItemIndexes(string subid)
    method ProfileModels (line 194) | public async Task<List<ProfileItemModel>?> ProfileModels(string subid,...
    method GetProfileItem (line 224) | public async Task<ProfileItem?> GetProfileItem(string indexId)
    method GetProfileItemsByIndexIds (line 233) | public async Task<List<ProfileItem>> GetProfileItemsByIndexIds(IEnumer...
    method GetProfileItemsByIndexIdsAsMap (line 245) | public async Task<Dictionary<string, ProfileItem>> GetProfileItemsByIn...
    method GetProfileItemsOrderedByIndexIds (line 251) | public async Task<List<ProfileItem>> GetProfileItemsOrderedByIndexIds(...
    method GetProfileItemViaRemarks (line 269) | public async Task<ProfileItem?> GetProfileItemViaRemarks(string? remarks)
    method RoutingItems (line 278) | public async Task<List<RoutingItem>?> RoutingItems()
    method GetRoutingItem (line 283) | public async Task<RoutingItem?> GetRoutingItem(string id)
    method DNSItems (line 288) | public async Task<List<DNSItem>?> DNSItems()
    method GetDNSItem (line 293) | public async Task<DNSItem?> GetDNSItem(ECoreType eCoreType)
    method FullConfigTemplateItem (line 298) | public async Task<List<FullConfigTemplateItem>?> FullConfigTemplateItem()
    method GetFullConfigTemplateItem (line 303) | public async Task<FullConfigTemplateItem?> GetFullConfigTemplateItem(E...
    method MigrateProfileExtra (line 308) | public async Task MigrateProfileExtra()
    method MigrateProfileExtraSub (line 340) | private async Task<int> MigrateProfileExtraSub(List<ProfileItem> batch)
    method MigrateProfileExtraGroup (line 437) | private async Task<bool> MigrateProfileExtraGroup()
    method GetShadowsocksSecurities (line 511) | public List<string> GetShadowsocksSecurities(ProfileItem profileItem)
    method GetCoreType (line 528) | public ECoreType GetCoreType(ProfileItem profileItem, EConfigType eCon...

FILE: v2rayN/ServiceLib/Manager/CertPemManager.cs
  class CertPemManager (line 9) | public class CertPemManager
    method GetCertPemAsync (line 206) | public async Task<(string?, string?)> GetCertPemAsync(string target, s...
    method GetCertChainPemAsync (line 252) | public async Task<(List<string>, string?)> GetCertChainPemAsync(string...
    method ValidateServerCertificate (line 302) | private bool ValidateServerCertificate(
    method ExportCertToPem (line 342) | public static string ExportCertToPem(X509Certificate2 cert)
    method ParsePemChain (line 355) | public static List<string> ParsePemChain(string pemChain)
    method ConcatenatePemChain (line 407) | public static string ConcatenatePemChain(IEnumerable<string> pemList)
    method GetCertSha256Thumbprint (line 417) | public static string GetCertSha256Thumbprint(string pemCert, bool incl...

FILE: v2rayN/ServiceLib/Manager/ClashApiManager.cs
  class ClashApiManager (line 5) | public sealed class ClashApiManager
    method GetClashProxiesAsync (line 14) | public async Task<Tuple<ClashProxies, ClashProviders>?> GetClashProxie...
    method ClashProxiesDelayTest (line 38) | public void ClashProxiesDelayTest(bool blAll, List<ClashProxyModel> ls...
    method GetClashProxyGroups (line 91) | public List<ProxiesItem>? GetClashProxyGroups()
    method ClashSetActiveProxy (line 109) | public async Task ClashSetActiveProxy(string name, string nameNode)
    method ClashConfigUpdate (line 124) | public async Task ClashConfigUpdate(Dictionary<string, string> headers)
    method ClashConfigReload (line 136) | public async Task ClashConfigReload(string filePath)
    method GetClashConnectionsAsync (line 152) | public async Task<ClashConnections?> GetClashConnectionsAsync()
    method ClashConnectionClose (line 170) | public async Task ClashConnectionClose(string id)
    method GetApiUrl (line 183) | private string GetApiUrl()

FILE: v2rayN/ServiceLib/Manager/CoreAdminManager.cs
  class CoreAdminManager (line 6) | public class CoreAdminManager
    method Init (line 15) | public async Task Init(Config config, Func<bool, string, Task> updateF...
    method UpdateFunc (line 27) | private async Task UpdateFunc(bool notify, string msg)
    method RunProcessAsLinuxSudo (line 32) | public async Task<ProcessService?> RunProcessAsLinuxSudo(string fileNa...
    method KillProcessAsLinuxSudo (line 61) | public async Task KillProcessAsLinuxSudo()

FILE: v2rayN/ServiceLib/Manager/CoreInfoManager.cs
  class CoreInfoManager (line 3) | public sealed class CoreInfoManager
    method CoreInfoManager (line 9) | public CoreInfoManager()
    method GetCoreInfo (line 14) | public CoreInfo? GetCoreInfo(ECoreType coreType)
    method GetCoreInfo (line 23) | public List<CoreInfo> GetCoreInfo()
    method GetCoreExecFile (line 32) | public string GetCoreExecFile(CoreInfo? coreInfo, out string msg)
    method InitCoreInfo (line 53) | private void InitCoreInfo()
    method PortableMode (line 242) | private static string PortableMode()
    method GetCoreUrl (line 247) | private static string GetCoreUrl(ECoreType eCoreType)
    method GetMihomoCoreExes (line 252) | private static List<string>? GetMihomoCoreExes()

FILE: v2rayN/ServiceLib/Manager/CoreManager.cs
  class CoreManager (line 6) | public class CoreManager
    method Init (line 18) | public async Task Init(Config config, Func<bool, string, Task> updateF...
    method LoadCore (line 62) | public async Task LoadCore(CoreConfigContext? mainContext, CoreConfigC...
    method LoadCoreConfigSpeedtest (line 99) | public async Task<ProcessService?> LoadCoreConfigSpeedtest(List<Server...
    method LoadCoreConfigSpeedtest (line 118) | public async Task<ProcessService?> LoadCoreConfigSpeedtest(ServerTestI...
    method CoreStop (line 140) | public async Task CoreStop()
    method CoreStart (line 172) | private async Task CoreStart(CoreConfigContext context)
    method CoreStartPreService (line 187) | private async Task CoreStartPreService(CoreConfigContext? preContext)
    method UpdateFunc (line 207) | private async Task UpdateFunc(bool notify, string msg)
    method RunProcess (line 216) | private async Task<ProcessService?> RunProcess(CoreInfo? coreInfo, str...
    method RunProcessNormal (line 247) | private async Task<ProcessService?> RunProcessNormal(string fileName, ...
    method AddProcessJob (line 278) | private void AddProcessJob(nint processHandle)

FILE: v2rayN/ServiceLib/Manager/GroupProfileManager.cs
  class GroupProfileManager (line 3) | public class GroupProfileManager
    method HasCycle (line 5) | public static async Task<bool> HasCycle(ProfileItem item)
    method HasCycle (line 10) | public static async Task<bool> HasCycle(string? indexId, ProtocolExtra...
    method HasCycle (line 15) | private static async Task<bool> HasCycle(string? indexId, ProtocolExtr...
    method GetChildProfileItems (line 72) | public static async Task<(List<ProfileItem> Items, ProtocolExtraItem? ...
    method GetChildProfileItemsByProtocolExtra (line 78) | public static async Task<List<ProfileItem>> GetChildProfileItemsByProt...
    method GetSelectedChildProfileItems (line 92) | private static async Task<List<ProfileItem>> GetSelectedChildProfileIt...
    method GetSubChildProfileItems (line 110) | private static async Task<List<ProfileItem>> GetSubChildProfileItems(P...
    method GetAllChildProfileItems (line 127) | public static async Task<Dictionary<string, ProfileItem>> GetAllChildP...
    method CollectChildItems (line 137) | private static async Task CollectChildItems(ProfileItem profileItem, D...

FILE: v2rayN/ServiceLib/Manager/NoticeManager.cs
  class NoticeManager (line 3) | public class NoticeManager
    method Enqueue (line 8) | public void Enqueue(string? content)
    method SendMessage (line 17) | public void SendMessage(string? content)
    method SendMessageEx (line 26) | public void SendMessageEx(string? content)
    method SendMessageAndEnqueue (line 36) | public void SendMessageAndEnqueue(string? msg)
    method NotifyValidatorResult (line 48) | public bool NotifyValidatorResult(NodeValidatorResult validatorResult)

FILE: v2rayN/ServiceLib/Manager/PacManager.cs
  class PacManager (line 3) | public class PacManager
    method StartAsync (line 15) | public async Task StartAsync(int httpPort, int pacPort)
    method InitText (line 31) | private async Task InitText()
    method RunListener (line 60) | private void RunListener()
    method WriteContent (line 88) | private void WriteContent(TcpClient client)
    method Stop (line 95) | public void Stop()

FILE: v2rayN/ServiceLib/Manager/ProfileExManager.cs
  class ProfileExManager (line 5) | public class ProfileExManager
    method ProfileExManager (line 13) | public ProfileExManager()
    method Init (line 18) | public async Task Init()
    method GetProfileExs (line 23) | public async Task<ConcurrentBag<ProfileExItem>> GetProfileExs()
    method InitData (line 28) | private async Task InitData()
    method IndexIdEnqueue (line 35) | private void IndexIdEnqueue(string indexId)
    method SaveQueueIndexIds (line 43) | private async Task SaveQueueIndexIds()
    method AddProfileEx (line 91) | private ProfileExItem AddProfileEx(string indexId)
    method GetProfileExItem (line 106) | private ProfileExItem GetProfileExItem(string? indexId)
    method ClearAll (line 111) | public async Task ClearAll()
    method SaveTo (line 117) | public async Task SaveTo()
    method SetTestDelay (line 129) | public void SetTestDelay(string indexId, int delay)
    method SetTestSpeed (line 137) | public void SetTestSpeed(string indexId, decimal speed)
    method SetTestMessage (line 145) | public void SetTestMessage(string indexId, string message)
    method SetSort (line 153) | public void SetSort(string indexId, int sort)
    method GetSort (line 161) | public int GetSort(string indexId)
    method GetMaxSort (line 171) | public int GetMaxSort()

FILE: v2rayN/ServiceLib/Manager/StatisticsManager.cs
  class StatisticsManager (line 3) | public class StatisticsManager
    method Init (line 18) | public async Task Init(Config config, Func<ServerSpeedItem, Task> upda...
    method Close (line 31) | public void Close()
    method ClearAllServerStatistics (line 44) | public async Task ClearAllServerStatistics()
    method SaveTo (line 51) | public async Task SaveTo()
    method CloneServerStatItem (line 66) | public async Task CloneServerStatItem(string indexId, string toIndexId)
    method InitData (line 90) | private async Task InitData()
    method UpdateServerStatHandler (line 100) | private async Task UpdateServerStatHandler(ServerSpeedItem server)
    method UpdateServerStat (line 105) | private async Task UpdateServerStat(ServerSpeedItem server)
    method GetServerStatItem (line 129) | private async Task GetServerStatItem(string indexId)

FILE: v2rayN/ServiceLib/Manager/TaskManager.cs
  class TaskManager (line 3) | public class TaskManager
    method RegUpdateTask (line 10) | public void RegUpdateTask(Config config, Func<bool, string, Task> upda...
    method ScheduledTasks (line 18) | private async Task ScheduledTasks()
    method UpdateTaskRunSubscription (line 77) | private async Task UpdateTaskRunSubscription()
    method UpdateTaskRunGeo (line 108) | private async Task UpdateTaskRunGeo(int hours)

FILE: v2rayN/ServiceLib/Manager/WebDavManager.cs
  class WebDavManager (line 5) | public sealed class WebDavManager
    method WebDavManager (line 17) | public WebDavManager()
    method GetClient (line 22) | private async Task<bool> GetClient()
    method TryCreateDir (line 64) | private async Task<bool> TryCreateDir()
    method SaveLog (line 86) | private void SaveLog(string desc)
    method SaveLog (line 92) | private void SaveLog(Exception ex)
    method CheckConnection (line 98) | public async Task<bool> CheckConnection()
    method PutFile (line 128) | public async Task<bool> PutFile(string fileName)
    method GetRawFile (line 154) | public async Task<bool> GetRawFile(string fileName)
    method GetLastError (line 182) | public string GetLastError() => _lastDescription ?? string.Empty;

FILE: v2rayN/ServiceLib/Models/CheckUpdateModel.cs
  class CheckUpdateModel (line 3) | public class CheckUpdateModel : ReactiveObject

FILE: v2rayN/ServiceLib/Models/ClashConnectionModel.cs
  class ClashConnectionModel (line 3) | public class ClashConnectionModel

FILE: v2rayN/ServiceLib/Models/ClashConnections.cs
  class ClashConnections (line 3) | public class ClashConnections
  class ConnectionItem (line 10) | public class ConnectionItem
  class MetadataItem (line 22) | public class MetadataItem

FILE: v2rayN/ServiceLib/Models/ClashProviders.cs
  class ClashProviders (line 5) | public class ClashProviders
    class ProvidersItem (line 9) | public class ProvidersItem

FILE: v2rayN/ServiceLib/Models/ClashProxies.cs
  class ClashProxies (line 3) | public class ClashProxies
    class ProxiesItem (line 7) | public class ProxiesItem
    class HistoryItem (line 18) | public class HistoryItem

FILE: v2rayN/ServiceLib/Models/ClashProxyModel.cs
  class ClashProxyModel (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/CmdItem.cs
  class CmdItem (line 3) | public class CmdItem

FILE: v2rayN/ServiceLib/Models/ComboItem.cs
  class ComboItem (line 3) | public class ComboItem

FILE: v2rayN/ServiceLib/Models/Config.cs
  class Config (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/ConfigItems.cs
  class CoreBasicItem (line 3) | [Serializable]
  class InItem (line 23) | [Serializable]
  class KcpItem (line 39) | [Serializable]
  class GrpcItem (line 57) | [Serializable]
  class GUIItem (line 66) | [Serializable]
  class MsgUIItem (line 79) | [Serializable]
  class UIItem (line 86) | [Serializable]
  class ConstItem (line 107) | [Serializable]
  class KeyEventItem (line 116) | [Serializable]
  class CoreTypeItem (line 130) | [Serializable]
  class TunModeItem (line 138) | [Serializable]
  class SpeedTestItem (line 149) | [Serializable]
  class RoutingBasicItem (line 159) | [Serializable]
  class ColumnItem (line 167) | [Serializable]
  class Mux4RayItem (line 175) | [Serializable]
  class Mux4SboxItem (line 183) | [Serializable]
  class HysteriaItem (line 191) | [Serializable]
  class ClashUIItem (line 199) | [Serializable]
  class SystemProxyItem (line 213) | [Serializable]
  class WebDavItem (line 224) | [Serializable]
  class CheckUpdateItem (line 233) | [Serializable]
  class Fragment4RayItem (line 240) | [Serializable]
  class WindowSizeItem (line 248) | [Serializable]
  class SimpleDNSItem (line 256) | [Serializable]

FILE: v2rayN/ServiceLib/Models/CoreConfigContext.cs
  type CoreConfigContext (line 3) | public record CoreConfigContext

FILE: v2rayN/ServiceLib/Models/CoreInfo.cs
  class CoreInfo (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/DNSItem.cs
  class DNSItem (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/FullConfigTemplateItem.cs
  class FullConfigTemplateItem (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/GitHubRelease.cs
  class GitHubReleaseAsset (line 3) | public class GitHubReleaseAsset
  class GitHubRelease (line 30) | public class GitHubRelease

FILE: v2rayN/ServiceLib/Models/IPAPIInfo.cs
  class IPAPIInfo (line 3) | internal class IPAPIInfo
  class LocationInfo (line 16) | public class LocationInfo

FILE: v2rayN/ServiceLib/Models/ProfileExItem.cs
  class ProfileExItem (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/ProfileGroupItem.cs
  class ProfileGroupItem (line 3) | [Obsolete("Use ProtocolExtraItem instead.")]
    method NotHasChild (line 18) | public bool NotHasChild()

FILE: v2rayN/ServiceLib/Models/ProfileItem.cs
  class ProfileItem (line 3) | [Serializable]
    method ProfileItem (line 8) | public ProfileItem()
    method GetSummary (line 29) | public string GetSummary()
    method GetAlpn (line 50) | public List<string>? GetAlpn()
    method GetNetwork (line 55) | public string GetNetwork()
    method IsComplex (line 64) | public bool IsComplex()
    method IsValid (line 69) | public bool IsValid()
    method SetProtocolExtra (line 129) | public void SetProtocolExtra(ProtocolExtraItem extraItem)
    method SetProtocolExtra (line 135) | public void SetProtocolExtra()
    method GetProtocolExtra (line 140) | public ProtocolExtraItem GetProtocolExtra()

FILE: v2rayN/ServiceLib/Models/ProfileItemModel.cs
  class ProfileItemModel (line 3) | [Serializable]
    method GetSummary (line 41) | public string GetSummary()

FILE: v2rayN/ServiceLib/Models/ProtocolExtraItem.cs
  type ProtocolExtraItem (line 3) | public record ProtocolExtraItem

FILE: v2rayN/ServiceLib/Models/RetResult.cs
  class RetResult (line 3) | public class RetResult
    method RetResult (line 9) | public RetResult(bool success = false)
    method RetResult (line 14) | public RetResult(bool success, string? msg)
    method RetResult (line 20) | public RetResult(bool success, string? msg, object? data)

FILE: v2rayN/ServiceLib/Models/RoutingItem.cs
  class RoutingItem (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/RoutingItemModel.cs
  class RoutingItemModel (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/RoutingTemplate.cs
  class RoutingTemplate (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/RulesItem.cs
  class RulesItem (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/RulesItemModel.cs
  class RulesItemModel (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/SemanticVersion.cs
  class SemanticVersion (line 3) | public class SemanticVersion
    method SemanticVersion (line 10) | public SemanticVersion(int major, int minor, int patch)
    method SemanticVersion (line 18) | public SemanticVersion(string? version)
    method Equals (line 57) | public override bool Equals(object? obj)
    method GetHashCode (line 69) | public override int GetHashCode()
    method ToString (line 78) | public override string ToString()
    method ToVersionString (line 83) | public string ToVersionString(string? prefix = null)
    method GreaterEquals (line 109) | private bool GreaterEquals(SemanticVersion other)
    method LessEquals (line 147) | private bool LessEquals(SemanticVersion other)

FILE: v2rayN/ServiceLib/Models/ServerSpeedItem.cs
  class ServerSpeedItem (line 3) | [Serializable]
  class TrafficItem (line 15) | [Serializable]

FILE: v2rayN/ServiceLib/Models/ServerStatItem.cs
  class ServerStatItem (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/ServerTestItem.cs
  class ServerTestItem (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/SingboxConfig.cs
  class SingboxConfig (line 3) | public class SingboxConfig
  class Log4Sbox (line 14) | public class Log4Sbox
  class Dns4Sbox (line 22) | public class Dns4Sbox
  class Route4Sbox (line 36) | public class Route4Sbox
  class Rule4Sbox (line 45) | [Serializable]
  class Inbound4Sbox (line 98) | [Serializable]
  class User4Sbox (line 115) | public class User4Sbox
  class Outbound4Sbox (line 121) | public class Outbound4Sbox : BaseServer4Sbox
  class Endpoints4Sbox (line 151) | public class Endpoints4Sbox : BaseServer4Sbox
  class Peer4Sbox (line 164) | public class Peer4Sbox
  class Tls4Sbox (line 175) | public class Tls4Sbox
  class Ech4Sbox (line 190) | public class Ech4Sbox
  class Multiplex4Sbox (line 197) | public class Multiplex4Sbox
  class Utls4Sbox (line 205) | public class Utls4Sbox
  class Reality4Sbox (line 211) | public class Reality4Sbox
  class Transport4Sbox (line 218) | public class Transport4Sbox
  class Headers4Sbox (line 233) | public class Headers4Sbox
  class HyObfs4Sbox (line 238) | public class HyObfs4Sbox
  class Server4Sbox (line 244) | public class Server4Sbox : BaseServer4Sbox
  class Experimental4Sbox (line 268) | public class Experimental4Sbox
  class V2ray_Api4Sbox (line 275) | public class V2ray_Api4Sbox
  class Clash_Api4Sbox (line 281) | public class Clash_Api4Sbox
  class Stats4Sbox (line 287) | public class Stats4Sbox
  class CacheFile4Sbox (line 295) | public class CacheFile4Sbox
  class Ruleset4Sbox (line 303) | public class Ruleset4Sbox
  class DialFields4Sbox (line 314) | public abstract class DialFields4Sbox
  class BaseServer4Sbox (line 338) | public abstract class BaseServer4Sbox : DialFields4Sbox

FILE: v2rayN/ServiceLib/Models/SpeedTestResult.cs
  class SpeedTestResult (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/SsSIP008.cs
  class SsSIP008 (line 3) | public class SsSIP008
  class SsServer (line 8) | [Serializable]

FILE: v2rayN/ServiceLib/Models/SubItem.cs
  class SubItem (line 3) | [Serializable]

FILE: v2rayN/ServiceLib/Models/UpdateResult.cs
  class UpdateResult (line 3) | public class UpdateResult
    method UpdateResult (line 10) | public UpdateResult(bool success, string? msg)
    method UpdateResult (line 16) | public UpdateResult(bool success, SemanticVersion? version)

FILE: v2rayN/ServiceLib/Models/V2rayConfig.cs
  class V2rayConfig (line 3) | public class V2rayConfig
  class Stats4Ray (line 18) | public class Stats4Ray
  class Metrics4Ray (line 21) | public class Metrics4Ray
  class Policy4Ray (line 26) | public class Policy4Ray
  class SystemPolicy4Ray (line 31) | public class SystemPolicy4Ray
  class Log4Ray (line 37) | public class Log4Ray
  class Inbounds4Ray (line 46) | public class Inbounds4Ray
  class Inboundsettings4Ray (line 61) | public class Inboundsettings4Ray
  class UsersItem4Ray (line 80) | public class UsersItem4Ray
  class Sniffing4Ray (line 95) | public class Sniffing4Ray
  class Outbounds4Ray (line 102) | public class Outbounds4Ray
  class Outboundsettings4Ray (line 117) | public class Outboundsettings4Ray
  class WireguardPeer4Ray (line 149) | public class WireguardPeer4Ray
  class VnextItem4Ray (line 155) | public class VnextItem4Ray
  class ServersItem4Ray (line 164) | public class ServersItem4Ray
  class SocksUsersItem4Ray (line 185) | public class SocksUsersItem4Ray
  class Mux4Ray (line 194) | public class Mux4Ray
  class Response4Ray (line 202) | public class Response4Ray
  class Dns4Ray (line 207) | public class Dns4Ray
  class DnsServer4Ray (line 216) | public class DnsServer4Ray
  class Routing4Ray (line 226) | public class Routing4Ray
  class RulesItem4Ray (line 235) | [Serializable]
  class BalancersItem4Ray (line 258) | public class BalancersItem4Ray
  class BalancersStrategy4Ray (line 265) | public class BalancersStrategy4Ray
  class BalancersStrategySettings4Ray (line 271) | public class BalancersStrategySettings4Ray
  class BalancersStrategySettingsCosts4Ray (line 280) | public class BalancersStrategySettingsCosts4Ray
  class Observatory4Ray (line 287) | public class Observatory4Ray
  class BurstObservatory4Ray (line 295) | public class BurstObservatory4Ray
  class BurstObservatoryPingConfig4Ray (line 301) | public class BurstObservatoryPingConfig4Ray
  class StreamSettings4Ray (line 310) | public class StreamSettings4Ray
  class TlsSettings4Ray (line 343) | public class TlsSettings4Ray
  class CertificateSettings4Ray (line 366) | public class CertificateSettings4Ray
  class TcpSettings4Ray (line 372) | public class TcpSettings4Ray
  class Header4Ray (line 377) | public class Header4Ray
  class KcpSettings4Ray (line 386) | public class KcpSettings4Ray
  class WsSettings4Ray (line 403) | public class WsSettings4Ray
  class Headers4Ray (line 411) | public class Headers4Ray
  class HttpupgradeSettings4Ray (line 417) | public class HttpupgradeSettings4Ray
  class XhttpSettings4Ray (line 424) | public class XhttpSettings4Ray
  class HttpSettings4Ray (line 432) | public class HttpSettings4Ray
  class QuicSettings4Ray (line 439) | public class QuicSettings4Ray
  class GrpcSettings4Ray (line 448) | public class GrpcSettings4Ray
  class HysteriaSettings4Ray (line 459) | public class HysteriaSettings4Ray
  class HysteriaUdpHop4Ray (line 468) | public class HysteriaUdpHop4Ray
  class Finalmask4Ray (line 474) | public class Finalmask4Ray
  class Mask4Ray (line 480) | public class Mask4Ray
  class MaskSettings4Ray (line 486) | public class MaskSettings4Ray
  class AccountsItem4Ray (line 492) | public class AccountsItem4Ray
  class Sockopt4Ray (line 499) | public class Sockopt4Ray
  class FragmentItem4Ray (line 504) | public class FragmentItem4Ray

FILE: v2rayN/ServiceLib/Models/V2rayMetricsVars.cs
  class V2rayMetricsVars (line 5) | internal class V2rayMetricsVars
  class V2rayMetricsVarsStats (line 10) | public class V2rayMetricsVarsStats
  class V2rayMetricsVarsLink (line 15) | public class V2rayMetricsVarsLink

FILE: v2rayN/ServiceLib/Models/V2rayTcpRequest.cs
  class V2rayTcpRequest (line 3) | public class V2rayTcpRequest
  class RequestHeaders (line 11) | public class RequestHeaders

FILE: v2rayN/ServiceLib/Models/VmessQRCode.cs
  class VmessQRCode (line 6) | [Serializable]

FILE: v2rayN/ServiceLib/Resx/ResUI.Designer.cs
  class ResUI (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
    method ResUI (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...

FILE: v2rayN/ServiceLib/Services/CoreConfig/CoreConfigClashService.cs
  class CoreConfigClashService (line 6) | public class CoreConfigClashService
    method CoreConfigClashService (line 11) | public CoreConfigClashService(Config config)
    method GenerateClientCustomConfig (line 16) | public async Task<RetResult> GenerateClientCustomConfig(ProfileItem no...
    method MixinContent (line 157) | private async Task MixinContent(Dictionary<string, object> fileContent...
    method ModifyContentMerge (line 199) | private void ModifyContentMerge(Dictionary<string, object> fileContent...
    method GetLogLevel (line 251) | private string GetLogLevel(string level)

FILE: v2rayN/ServiceLib/Services/CoreConfig/Singbox/CoreConfigSingboxService.cs
  class CoreConfigSingboxService (line 3) | public partial class CoreConfigSingboxService(CoreConfigContext context)
    method GenerateClientConfigContent (line 13) | public RetResult GenerateClientConfigContent()
    method GenerateClientSpeedtestConfig (line 119) | public RetResult GenerateClientSpeedtestConfig(List<ServerTestItem> se...
    method GenerateClientSpeedtestConfig (line 228) | public RetResult GenerateClientSpeedtestConfig(int port)

FILE: v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxConfigTemplateService.cs
  class CoreConfigSingboxService (line 3) | public partial class CoreConfigSingboxService
    method ApplyFullConfigTemplate (line 5) | private string ApplyFullConfigTemplate()

FILE: v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs
  class CoreConfigSingboxService (line 3) | public partial class CoreConfigSingboxService
    method GenDns (line 5) | private void GenDns()
    method GenDnsServers (line 57) | private void GenDnsServers()
    method GenBootstrapDns (line 151) | private Server4Sbox GenBootstrapDns()
    method GenDnsRules (line 161) | private void GenDnsRules()
    method GenMinimizedDns (line 394) | private void GenMinimizedDns()
    method GenDnsCustom (line 411) | private void GenDnsCustom()
    method GenDnsProtectCustom (line 448) | private void GenDnsProtectCustom()
    method GenDnsProtectCustomLegacy (line 482) | private void GenDnsProtectCustomLegacy()
    method BuildProtectDomainRule (line 499) | private Rule4Sbox? BuildProtectDomainRule()
    method ParseDnsAddress (line 512) | private static Server4Sbox? ParseDnsAddress(string address)

FILE: v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxInboundService.cs
  class CoreConfigSingboxService (line 3) | public partial class CoreConfigSingboxService
    method GenInbounds (line 5) | private void GenInbounds()
    method BuildInbound (line 84) | private Inbound4Sbox BuildInbound(Inbound4Sbox inItem, EInboundProtoco...

FILE: v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxLogService.cs
  class CoreConfigSingboxService (line 3) | public partial class CoreConfigSingboxService
    method GenLog (line 5) | private void GenLog()

FILE: v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs
  class CoreConfigSingboxService (line 3) | public partial class CoreConfigSingboxService
    method GenOutbounds (line 5) | private void GenOutbounds()
    method BuildAllProxyOutbounds (line 11) | private List<BaseServer4Sbox> BuildAllProxyOutbounds(string baseTagNam...
    method BuildProxyOutbound (line 34) | private BaseServer4Sbox BuildProxyOutbound(string baseTagName = Global...
    method BuildGroupProxyOutbounds (line 41) | private List<BaseServer4Sbox> BuildGroupProxyOutbounds(string baseTagN...
    method BuildProxyServer (line 57) | private BaseServer4Sbox BuildProxyServer()
    method FillOutbound (line 82) | private void FillOutbound(Outbound4Sbox outbound)
    method FillEndpoint (line 290) | private void FillEndpoint(Endpoints4Sbox endpoint)
    method FillOutboundMux (line 326) | private void FillOutboundMux(Outbound4Sbox outbound)
    method FillOutboundTls (line 349) | private void FillOutboundTls(Outbound4Sbox outbound)
    method FillOutboundTransport (line 418) | private void FillOutboundTransport(Outbound4Sbox outbound)
    method BuildSelectorOutbounds (line 514) | private List<Outbound4Sbox> BuildSelectorOutbounds(List<string> proxyT...
    method BuildOutboundsList (line 543) | private List<BaseServer4Sbox> BuildOutboundsList(string baseTagName = ...
    method BuildChainOutboundsList (line 572) | private List<BaseServer4Sbox> BuildChainOutboundsList(string baseTagNa...
    method CloneOutbounds (line 658) | private static List<BaseServer4Sbox> CloneOutbounds(List<BaseServer4Sb...
    method FillRangeProxy (line 685) | private static void FillRangeProxy(List<BaseServer4Sbox> servers, Sing...
    method ParseEchParam (line 713) | private static (Ech4Sbox? ech, Server4Sbox? dnsServer) ParseEchParam(s...

FILE: v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxRoutingService.cs
  class CoreConfigSingboxService (line 3) | public partial class CoreConfigSingboxService
    method GenRouting (line 5) | private void GenRouting()
    method BuildRoutingDirectExe (line 207) | private static (List<string> lstDnsExe, List<string> lstDirectExe) Bui...
    method GenRoutingUserRule (line 237) | private void GenRoutingUserRule(RulesItem? item)
    method ParseV2Domain (line 374) | private static bool ParseV2Domain(string domain, Rule4Sbox rule)
    method ParseV2Address (line 418) | private static bool ParseV2Address(string address, Rule4Sbox rule)
    method GenRoutingUserRuleOutbound (line 451) | private string GenRoutingUserRuleOutbound(string outboundTag)

FILE: v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxRulesetService.cs
  class CoreConfigSingboxService (line 3) | public partial class CoreConfigSingboxService
    method ConvertGeo2Ruleset (line 5) | private void ConvertGeo2Ruleset()

FILE: v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxStatisticService.cs
  class CoreConfigSingboxService (line 3) | public partial class CoreConfigSingboxService
    method GenExperimental (line 5) | private void GenExperimental()

FILE: v2rayN/ServiceLib/Services/CoreConfig/V2ray/CoreConfigV2rayService.cs
  class CoreConfigV2rayService (line 3) | public partial class CoreConfigV2rayService(CoreConfigContext context)
    method GenerateClientConfigContent (line 13) | public RetResult GenerateClientConfigContent()
    method GenerateClientSpeedtestConfig (line 82) | public RetResult GenerateClientSpeedtestConfig(List<ServerTestItem> se...
    method GenerateClientSpeedtestConfig (line 208) | public RetResult GenerateClientSpeedtestConfig(int port)
    method GenerateClientProxyRelayConfig (line 269) | public RetResult GenerateClientProxyRelayConfig()

FILE: v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayBalancerService.cs
  class CoreConfigV2rayService (line 3) | public partial class CoreConfigV2rayService
    method GenObservatory (line 5) | private void GenObservatory(EMultipleLoad multipleLoad, string baseTag...
    method GenBalancer (line 84) | private void GenBalancer(EMultipleLoad multipleLoad, string selector =...

FILE: v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayConfigTemplateService.cs
  class CoreConfigV2rayService (line 3) | public partial class CoreConfigV2rayService
    method ApplyFullConfigTemplate (line 5) | private string ApplyFullConfigTemplate()

FILE: v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayDnsService.cs
  class CoreConfigV2rayService (line 3) | public partial class CoreConfigV2rayService
    method GenDns (line 5) | private void GenDns()
    method FillDnsServers (line 111) | private void FillDnsServers(Dns4Ray dnsItem)
    method FillDnsHosts (line 332) | private void FillDnsHosts(Dns4Ray dnsItem)
    method GenDnsCustom (line 368) | private void GenDnsCustom()
    method FillDnsDomainsCustom (line 448) | private void FillDnsDomainsCustom(JsonNode dns)

FILE: v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs
  class CoreConfigV2rayService (line 3) | public partial class CoreConfigV2rayService
    method GenInbounds (line 5) | private void GenInbounds()
    method BuildInbound (line 48) | private Inbounds4Ray BuildInbound(InItem inItem, EInboundProtocol prot...

FILE: v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayLogService.cs
  class CoreConfigV2rayService (line 3) | public partial class CoreConfigV2rayService
    method GenLog (line 5) | private void GenLog()

FILE: v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs
  class CoreConfigV2rayService (line 3) | public partial class CoreConfigV2rayService
    method GenOutbounds (line 5) | private void GenOutbounds()
    method BuildAllProxyOutbounds (line 17) | private List<Outbounds4Ray> BuildAllProxyOutbounds(string baseTagName ...
    method BuildGroupProxyOutbounds (line 63) | private List<Outbounds4Ray> BuildGroupProxyOutbounds(string baseTagNam...
    method BuildProxyOutbound (line 79) | private Outbounds4Ray BuildProxyOutbound(string baseTagName = Global.P...
    method FillOutbound (line 88) | private void FillOutbound(Outbounds4Ray outbound)
    method FillOutboundMux (line 317) | private void FillOutboundMux(Outbounds4Ray outbound, bool enabledTCP =...
    method FillBoundStreamSettings (line 342) | private void FillBoundStreamSettings(Outbounds4Ray outbound)
    method BuildOutboundsList (line 676) | private List<Outbounds4Ray> BuildOutboundsList(string baseTagName = Gl...
    method BuildChainOutboundsList (line 705) | private List<Outbounds4Ray> BuildChainOutboundsList(string baseTagName...

FILE: v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayRoutingService.cs
  class CoreConfigV2rayService (line 3) | public partial class CoreConfigV2rayService
    method GenRouting (line 5) | private void GenRouting()
    method GenRoutingUserRule (line 56) | private void GenRoutingUserRule(RulesItem4Ray? userRule)
    method GenRoutingUserRuleOutbound (line 151) | private string GenRoutingUserRuleOutbound(string outboundTag)
    method BuildFinalRule (line 185) | private RulesItem4Ray BuildFinalRule()

FILE: v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayStatisticService.cs
  class CoreConfigV2rayService (line 3) | public partial class CoreConfigV2rayService
    method GenStatistic (line 5) | private void GenStatistic()

FILE: v2rayN/ServiceLib/Services/DownloadService.cs
  class DownloadService (line 8) | public class DownloadService
    method DownloadDataAsync (line 16) | public async Task<int> DownloadDataAsync(string url, WebProxy webProxy...
    method DownloadFileAsync (line 39) | public async Task DownloadFileAsync(string url, string fileName, bool ...
    method UrlRedirectAsync (line 67) | public async Task<string?> UrlRedirectAsync(string url, bool blProxy)
    method TryDownloadString (line 89) | public async Task<string?> TryDownloadString(string url, bool blProxy,...
    method DownloadStringAsync (line 134) | private async Task<string?> DownloadStringAsync(string url, bool blPro...
    method DownloadStringViaDownloader (line 178) | private async Task<string?> DownloadStringViaDownloader(string url, bo...
    method GetWebProxy (line 203) | private async Task<WebProxy?> GetWebProxy(bool blProxy)
    method SocketCheck (line 218) | private async Task<bool> SocketCheck(string ip, int port)

FILE: v2rayN/ServiceLib/Services/ProcessService.cs
  class ProcessService (line 3) | public class ProcessService : IDisposable
    method ProcessService (line 13) | public ProcessService(
    method StartAsync (line 56) | public async Task StartAsync(string pwd = null)
    method StopAsync (line 73) | public async Task StopAsync()
    method RegisterEventHandlers (line 119) | private void RegisterEventHandlers()
    method Dispose (line 145) | public void Dispose()

FILE: v2rayN/ServiceLib/Services/SpeedtestService.cs
  class SpeedtestService (line 3) | public class SpeedtestService(Config config, Func<SpeedTestResult, Task>...
    method RunLoop (line 10) | public void RunLoop(ESpeedActionType actionType, List<ProfileItem> sel...
    method ExitLoop (line 20) | public void ExitLoop()
    method ShouldStopTest (line 30) | private static bool ShouldStopTest(string exitLoopKey)
    method RunAsync (line 35) | private async Task RunAsync(ESpeedActionType actionType, List<ProfileI...
    method GetClearItem (line 62) | private async Task<List<ServerTestItem>> GetClearItem(ESpeedActionType...
    method RunTcpingAsync (line 129) | private async Task RunTcpingAsync(List<ServerTestItem> selecteds)
    method RunRealPingBatchAsync (line 152) | private async Task RunRealPingBatchAsync(List<ServerTestItem> lstSelec...
    method RunRealPingAsync (line 194) | private async Task<bool> RunRealPingAsync(List<ServerTestItem> selecte...
    method RunMixedTestAsync (line 241) | private async Task RunMixedTestAsync(List<ServerTestItem> selecteds, i...
    method DoRealPing (line 305) | private async Task<int> DoRealPing(ServerTestItem it)
    method DoSpeedTest (line 315) | private async Task DoSpeedTest(DownloadService downloadHandle, ServerT...
    method GetTcpingTime (line 333) | private async Task<int> GetTcpingTime(string url, int port)
    method GetTestBatchItem (line 363) | private List<List<ServerTestItem>> GetTestBatchItem(List<ServerTestIte...
    method UpdateFunc (line 381) | private async Task UpdateFunc(string indexId, string delay, string spe...

FILE: v2rayN/ServiceLib/Services/Statistics/StatisticsSingboxService.cs
  class StatisticsSingboxService (line 5) | public class StatisticsSingboxService
    method StatisticsSingboxService (line 14) | public StatisticsSingboxService(Config config, Func<ServerSpeedItem, T...
    method Init (line 23) | private async Task Init()
    method Close (line 38) | public void Close()
    method Run (line 55) | private async Task Run()
    method ParseOutput (line 108) | private void ParseOutput(string source, out ulong up, out ulong down)

FILE: v2rayN/ServiceLib/Services/Statistics/StatisticsXrayService.cs
  class StatisticsXrayService (line 3) | public class StatisticsXrayService
    method StatisticsXrayService (line 12) | public StatisticsXrayService(Config config, Func<ServerSpeedItem, Task...
    method Close (line 21) | public void Close()
    method Run (line 26) | private async Task Run()
    method ParseOutput (line 52) | private ServerSpeedItem? ParseOutput(string result)

FILE: v2rayN/ServiceLib/Services/UpdateService.cs
  class UpdateService (line 3) | public class UpdateService(Config config, Func<bool, string, Task> updat...
    method CheckUpdateGuiN (line 10) | public async Task CheckUpdateGuiN(bool preRelease)
    method CheckUpdateCore (line 50) | public async Task CheckUpdateCore(ECoreType type, bool preRelease)
    method UpdateGeoFileAll (line 103) | public async Task UpdateGeoFileAll()
    method CheckUpdateAsync (line 113) | private async Task<UpdateResult> CheckUpdateAsync(DownloadService down...
    method GetRemoteVersion (line 132) | private async Task<UpdateResult> GetRemoteVersion(DownloadService down...
    method GetCoreVersion (line 164) | private async Task<SemanticVersion> GetCoreVersion(ECoreType type)
    method ParseDownloadUrl (line 216) | private async Task<UpdateResult> ParseDownloadUrl(ECoreType type, Upda...
    method GetUrlFromCore (line 278) | private async Task<string?> GetUrlFromCore(CoreInfo? coreInfo)
    method UpdateGeoFiles (line 327) | private async Task UpdateGeoFiles()
    method UpdateOtherFiles (line 344) | private async Task UpdateOtherFiles()
    method UpdateSrsFileAll (line 361) | private async Task UpdateSrsFileAll()
    method AddPrefixedItems (line 407) | private void AddPrefixedItems(List<string>? items, string prefix, List...
    method ExtractDnsRuleSets (line 423) | private void ExtractDnsRuleSets(string? dnsJson, List<string> geoipFil...
    method ExtractSrsRuleSets (line 444) | private void ExtractSrsRuleSets(Rule4Sbox? rule, List<string> geoipFil...
    method UpdateSrsFile (line 464) | private async Task UpdateSrsFile(string type, string srsName)
    method DownloadGeoFile (line 477) | private async Task DownloadGeoFile(string url, string fileName, string...
    method UpdateFunc (line 518) | private async Task UpdateFunc(bool notify, string msg)

FILE: v2rayN/ServiceLib/Services/WindowsJobService.cs
  class WindowsJobService (line 6) | public sealed class WindowsJobService : IDisposable
    method WindowsJobService (line 10) | public WindowsJobService()
    method AddProcess (line 46) | public bool AddProcess(nint processHandle)
    method AddProcess (line 58) | public bool AddProcess(int processId)
    method Dispose (line 67) | public void Dispose()
    method Dispose (line 73) | private void Dispose(bool disposing)
    method CreateJobObject (line 102) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
    method SetInformationJobObject (line 105) | [DllImport("kernel32.dll", SetLastError = true)]
    method AssignProcessToJobObject (line 108) | [DllImport("kernel32.dll", SetLastError = true)]
    method CloseHandle (line 111) | [DllImport("kernel32.dll", SetLastError = true)]
  type IO_COUNTERS (line 118) | [StructLayout(LayoutKind.Sequential)]
  type JOBOBJECT_BASIC_LIMIT_INFORMATION (line 129) | [StructLayout(LayoutKind.Sequential)]
  type SECURITY_ATTRIBUTES (line 143) | [StructLayout(LayoutKind.Sequential)]
  type JOBOBJECT_EXTENDED_LIMIT_INFORMATION (line 151) | [StructLayout(LayoutKind.Sequential)]
  type JobObjectInfoType (line 162) | public enum JobObjectInfoType

FILE: v2rayN/ServiceLib/ViewModels/AddGroupServerViewModel.cs
  class AddGroupServerViewModel (line 3) | public class AddGroupServerViewModel : MyReactiveObject
    method AddGroupServerViewModel (line 42) | public AddGroupServerViewModel(ProfileItem profileItem, Func<EViewActi...
    method Init (line 82) | public async Task Init()
    method ChildRemoveAsync (line 106) | public async Task ChildRemoveAsync()
    method MoveServer (line 123) | public async Task MoveServer(EMove eMove)
    method GetUpdatedProtocolExtra (line 180) | private ProtocolExtraItem GetUpdatedProtocolExtra()
    method UpdatePreviewList (line 200) | public async Task UpdatePreviewList()
    method SaveServerAsync (line 206) | private async Task SaveServerAsync()

FILE: v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs
  class AddServer2ViewModel (line 3) | public class AddServer2ViewModel : MyReactiveObject
    method AddServer2ViewModel (line 16) | public AddServer2ViewModel(ProfileItem profileItem, Func<EViewAction, ...
    method SaveServerAsync (line 39) | private async Task SaveServerAsync()
    method BrowseServer (line 66) | public async Task BrowseServer(string fileName)
    method EditServer (line 91) | private async Task EditServer()

FILE: v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs
  class AddServerViewModel (line 3) | public class AddServerViewModel : MyReactiveObject
    method AddServerViewModel (line 68) | public AddServerViewModel(ProfileItem profileItem, Func<EViewAction, o...
    method SaveServerAsync (line 128) | private async Task SaveServerAsync()
    method UpdateCertTip (line 201) | private void UpdateCertTip(string? errorMessage = null)
    method UpdateCertSha (line 208) | private void UpdateCertSha()
    method FetchCert (line 234) | private async Task FetchCert()
    method FetchCertChain (line 259) | private async Task FetchCertChain()

FILE: v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs
  class BackupAndRestoreViewModel (line 3) | public class BackupAndRestoreViewModel : MyReactiveObject
    method BackupAndRestoreViewModel (line 18) | public BackupAndRestoreViewModel(Func<EViewAction, object?, Task<bool>...
    method DisplayOperationMsg (line 39) | private void DisplayOperationMsg(string msg = "")
    method WebDavCheck (line 44) | private async Task WebDavCheck()
    method RemoteBackup (line 61) | private async Task RemoteBackup()
    method RemoteRestore (line 79) | private async Task RemoteRestore()
    method LocalBackup (line 93) | public async Task<bool> LocalBackup(string fileName)
    method LocalRestore (line 109) | public async Task LocalRestore(string fileName)
    method CreateZipFileFromDirectory (line 159) | private async Task<bool> CreateZipFileFromDirectory(string fileName)

FILE: v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs
  class CheckUpdateViewModel (line 3) | public class CheckUpdateViewModel : MyReactiveObject
    method CheckUpdateViewModel (line 14) | public CheckUpdateViewModel(Func<EViewAction, object?, Task<bool>>? up...
    method RefreshCheckUpdateItems (line 36) | private void RefreshCheckUpdateItems()
    method GetCheckUpdateModel (line 54) | private CheckUpdateModel GetCheckUpdateModel(string coreType)
    method SaveSelectedCoreTypes (line 74) | private async Task SaveSelectedCoreTypes()
    method CheckUpdate (line 80) | private async Task CheckUpdate()
    method CheckUpdateTask (line 85) | private async Task CheckUpdateTask()
    method UpdatedPlusPlus (line 127) | private void UpdatedPlusPlus(string coreType, string fileName)
    method CheckUpdateGeo (line 141) | private async Task CheckUpdateGeo()
    method CheckUpdateN (line 155) | private async Task CheckUpdateN(bool preRelease)
    method CheckUpdateCore (line 170) | private async Task CheckUpdateCore(CheckUpdateModel model, bool preRel...
    method UpdateFinished (line 187) | private async Task UpdateFinished()
    method UpdateFinishedSub (line 205) | private async Task UpdateFinishedSub(bool blReload)
    method UpdateFinishedResult (line 215) | public async Task UpdateFinishedResult(bool blReload)
    method UpgradeN (line 227) | private async Task UpgradeN()
    method UpgradeCore (line 256) | private async Task UpgradeCore()
    method UpdateView (line 312) | private async Task UpdateView(string coreType, string msg)
    method UpdateViewResult (line 328) | public async Task UpdateViewResult(CheckUpdateModel model)

FILE: v2rayN/ServiceLib/ViewModels/ClashConnectionsViewModel.cs
  class ClashConnectionsViewModel (line 3) | public class ClashConnectionsViewModel : MyReactiveObject
    method ClashConnectionsViewModel (line 19) | public ClashConnectionsViewModel(Func<EViewAction, object?, Task<bool>...
    method Init (line 46) | private async Task Init()
    method GetClashConnections (line 51) | private async Task GetClashConnections()
    method RefreshConnections (line 66) | public async Task RefreshConnections(List<ConnectionItem>? connections)
    method ClashConnectionClose (line 102) | public async Task ClashConnectionClose(bool all)
    method DelayTestTask (line 122) | public async Task DelayTestTask()

FILE: v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs
  class ClashProxiesViewModel (line 7) | public class ClashProxiesViewModel : MyReactiveObject
    method ClashProxiesViewModel (line 36) | public ClashProxiesViewModel(Func<EViewAction, object?, Task<bool>>? u...
    method Init (line 101) | private async Task Init()
    method DoRuleModeSelected (line 106) | private async Task DoRuleModeSelected(bool c)
    method SetRuleModeCheck (line 119) | public async Task SetRuleModeCheck(ERuleMode mode)
    method DoSortingSelected (line 128) | private void DoSortingSelected(bool c)
    method ProxiesReload (line 142) | public async Task ProxiesReload()
    method SetRuleMode (line 150) | private async Task SetRuleMode(ERuleMode mode)
    method GetClashProxies (line 164) | private async Task GetClashProxies(bool refreshUI)
    method RefreshProxyGroups (line 180) | public async Task RefreshProxyGroups()
    method RefreshProxyDetails (line 251) | private void RefreshProxyDetails(bool c)
    method TryGetProxy (line 309) | private ProxiesItem? TryGetProxy(string name)
    method SetActiveProxy (line 338) | public async Task SetActiveProxy()
    method ProxiesDelayTest (line 380) | private async Task ProxiesDelayTest(bool blAll = true)
    method ProxiesDelayTestResult (line 400) | public async Task ProxiesDelayTestResult(SpeedTestResult result)
    method DelayTestTask (line 431) | public async Task DelayTestTask()

FILE: v2rayN/ServiceLib/ViewModels/DNSSettingViewModel.cs
  class DNSSettingViewModel (line 3) | public class DNSSettingViewModel : MyReactiveObject
    method DNSSettingViewModel (line 37) | public DNSSettingViewModel(Func<EViewAction, object?, Task<bool>>? upd...
    method Init (line 63) | private async Task Init()
    method SaveSettingAsync (line 96) | private async Task SaveSettingAsync()

FILE: v2rayN/ServiceLib/ViewModels/FullConfigTemplateViewModel.cs
  class FullConfigTemplateViewModel (line 3) | public class FullConfigTemplateViewModel : MyReactiveObject
    method FullConfigTemplateViewModel (line 38) | public FullConfigTemplateViewModel(Func<EViewAction, object?, Task<boo...
    method Init (line 50) | private async Task Init()
    method SaveSettingAsync (line 66) | private async Task SaveSettingAsync()
    method SaveXrayConfigAsync (line 82) | private async Task<bool> SaveXrayConfigAsync()
    method SaveSingboxConfigAsync (line 97) | private async Task<bool> SaveSingboxConfigAsync()

FILE: v2rayN/ServiceLib/ViewModels/GlobalHotkeySettingViewModel.cs
  class GlobalHotkeySettingViewModel (line 3) | public class GlobalHotkeySettingViewModel : MyReactiveObject
    method GlobalHotkeySettingViewModel (line 9) | public GlobalHotkeySettingViewModel(Func<EViewAction, object?, Task<bo...
    method GetKeyEventItem (line 22) | public KeyEventItem GetKeyEventItem(EGlobalHotkey eg)
    method ResetKeyEventItem (line 43) | public void ResetKeyEventItem()
    method SaveSettingAsync (line 48) | private async Task SaveSettingAsync()

FILE: v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs
  class MainWindowViewModel (line 5) | public class MainWindowViewModel : MyReactiveObject
    method MainWindowViewModel (line 71) | public MainWindowViewModel(Func<EViewAction, object?, Task<bool>>? upd...
    method Init (line 254) | private async Task Init()
    method UpdateHandler (line 278) | private async Task UpdateHandler(bool notify, string msg)
    method UpdateTaskHandler (line 288) | private async Task UpdateTaskHandler(bool success, string msg)
    method UpdateStatisticsHandler (line 306) | private async Task UpdateStatisticsHandler(ServerSpeedItem update)
    method RefreshServers (line 320) | private async Task RefreshServers()
    method RefreshSubscriptions (line 327) | private void RefreshSubscriptions()
    method AddServerAsync (line 336) | public async Task AddServerAsync(EConfigType eConfigType)
    method AddServerViaClipboardAsync (line 368) | public async Task AddServerViaClipboardAsync(string? clipboardData)
    method AddServerViaScanAsync (line 388) | public async Task AddServerViaScanAsync()
    method ScanScreenResult (line 394) | public async Task ScanScreenResult(byte[]? bytes)
    method AddServerViaImageAsync (line 400) | public async Task AddServerViaImageAsync()
    method ScanImageResult (line 406) | public async Task ScanImageResult(string fileName)
    method AddScanResultAsync (line 417) | private async Task AddScanResultAsync(string? result)
    method SubSettingAsync (line 443) | private async Task SubSettingAsync()
    method UpdateSubscriptionProcess (line 451) | public async Task UpdateSubscriptionProcess(string subId, bool blProxy)
    method OptionSettingAsync (line 460) | private async Task OptionSettingAsync()
    method RoutingSettingAsync (line 470) | private async Task RoutingSettingAsync()
    method DNSSettingAsync (line 481) | private async Task DNSSettingAsync()
    method FullConfigTemplateAsync (line 490) | private async Task FullConfigTemplateAsync()
    method ClearServerStatistics (line 499) | private async Task ClearServerStatistics()
    method OpenTheFileLocation (line 505) | private async Task OpenTheFileLocation()
    method Reload (line 530) | public async Task Reload()
    method ReloadResult (line 584) | private void ReloadResult(bool showClashUI)
    method SetReloadEnabled (line 593) | private void SetReloadEnabled(bool enabled)
    method LoadCore (line 598) | private async Task LoadCore(CoreConfigContext? mainContext, CoreConfig...
    method ApplyRegionalPreset (line 607) | public async Task ApplyRegionalPreset(EPresetType type)

FILE: v2rayN/ServiceLib/ViewModels/MsgViewModel.cs
  class MsgViewModel (line 3) | public class MsgViewModel : MyReactiveObject
    method MsgViewModel (line 16) | public MsgViewModel(Func<EViewAction, object?, Task<bool>>? updateView)
    method AppendQueueMsg (line 38) | private async Task AppendQueueMsg(string msg)
    method EnqueueQueueMsg (line 75) | private void EnqueueQueueMsg(string msg)
    method EnqueueWithLimit (line 101) | private void EnqueueWithLimit(string item)
    method DoMsgFilter (line 116) | private void DoMsgFilter()

FILE: v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
  class OptionSettingViewModel (line 3) | public class OptionSettingViewModel : MyReactiveObject
    method OptionSettingViewModel (line 116) | public OptionSettingViewModel(Func<EViewAction, object?, Task<bool>>? ...
    method Init (line 133) | private async Task Init()
    method InitCoreType (line 227) | private async Task InitCoreType()
    method SaveSettingAsync (line 288) | private async Task SaveSettingAsync()
    method SaveCoreType (line 397) | private async Task SaveCoreType()

FILE: v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs
  class ProfilesSelectViewModel (line 3) | public class ProfilesSelectViewModel : MyReactiveObject
    method ProfilesSelectViewModel (line 53) | public ProfilesSelectViewModel(Func<EViewAction, object?, Task<bool>>?...
    method Init (line 85) | private async Task Init()
    method CanOk (line 109) | public bool CanOk()
    method SelectFinish (line 114) | public bool SelectFinish()
    method SubSelectedChangedAsync (line 128) | private async Task SubSelectedChangedAsync(bool c)
    method ServerFilterChanged (line 141) | private async Task ServerFilterChanged(bool c)
    method RefreshServers (line 154) | public async Task RefreshServers()
    method RefreshServersBiz (line 159) | private async Task RefreshServersBiz()
    method RefreshSubscriptions (line 181) | public async Task RefreshSubscriptions()
    method GetProfileItemsEx (line 196) | private async Task<List<ProfileItemModel>?> GetProfileItemsEx(string s...
    method GetProfileItem (line 231) | public async Task<ProfileItem?> GetProfileItem()
    method GetProfileItems (line 247) | public async Task<List<ProfileItem>?> GetProfileItems()
    method SortServer (line 262) | public void SortServer(string colName)
    method SetConfigTypeFilter (line 322) | public void SetConfigTypeFilter(IEnumerable<EConfigType> types, bool e...

FILE: v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs
  class ProfilesViewModel (line 3) | public class ProfilesViewModel : MyReactiveObject
    method ProfilesViewModel (line 83) | public ProfilesViewModel(Func<EViewAction, object?, Task<bool>>? updat...
    method Init (line 254) | private async Task Init()
    method Reload (line 268) | private void Reload()
    method SetSpeedTestResult (line 273) | public async Task SetSpeedTestResult(SpeedTestResult result)
    method UpdateStatistics (line 299) | public async Task UpdateStatistics(ServerSpeedItem update)
    method SubSelectedChangedAsync (line 329) | private async Task SubSelectedChangedAsync(bool c)
    method ServerFilterChanged (line 342) | private async Task ServerFilterChanged(bool c)
    method RefreshServers (line 355) | public async Task RefreshServers()
    method RefreshServersBiz (line 362) | private async Task RefreshServersBiz()
    method RefreshSubscriptions (line 384) | private async Task RefreshSubscriptions()
    method GetProfileItemsEx (line 399) | private async Task<List<ProfileItemModel>?> GetProfileItemsEx(string s...
    method GetProfileItems (line 443) | private async Task<List<ProfileItem>?> GetProfileItems(bool latest)
    method EditServerAsync (line 464) | public async Task EditServerAsync()
    method RemoveServerAsync (line 501) | public async Task RemoveServerAsync()
    method RemoveDuplicateServer (line 527) | private async Task RemoveDuplicateServer()
    method CopyServer (line 543) | private async Task CopyServer()
    method SetDefaultServer (line 557) | public async Task SetDefaultServer()
    method SetDefaultServer (line 566) | private async Task SetDefaultServer(string? indexId)
    method ShareServerAsync (line 590) | public async Task ShareServerAsync()
    method GenGroupAllServer (line 607) | private async Task GenGroupAllServer()
    method GenGroupRegionServer (line 619) | private async Task GenGroupRegionServer()
    method SortServer (line 632) | public async Task SortServer(string colName)
    method RemoveInvalidServerResult (line 649) | public async Task RemoveInvalidServerResult()
    method MoveToGroup (line 657) | private async Task MoveToGroup(bool c)
    method MoveServer (line 678) | public async Task MoveServer(EMove eMove)
    method MoveServerTo (line 698) | public async Task MoveServerTo(int startIndex, ProfileItemModel target...
    method ServerSpeedtest (line 710) | public async Task ServerSpeedtest(ESpeedActionType actionType)
    method ServerSpeedtestStop (line 740) | public void ServerSpeedtestStop()
    method Export2ClientConfigAsync (line 745) | private async Task Export2ClientConfigAsync(bool blClipboard)
    method Export2ClientConfigResult (line 779) | public async Task Export2ClientConfigResult(string fileName, ProfileIt...
    method Export2ShareUrlAsync (line 801) | public async Task Export2ShareUrlAsync(bool blEncode)
    method EditSubAsync (line 838) | private async Task EditSubAsync(bool blNew)
    method DeleteSubAsync (line 860) | private async Task DeleteSubAsync()

FILE: v2rayN/ServiceLib/ViewModels/RoutingRuleDetailsViewModel.cs
  class RoutingRuleDetailsViewModel (line 3) | public class RoutingRuleDetailsViewModel : MyReactiveObject
    method RoutingRuleDetailsViewModel (line 28) | public RoutingRuleDetailsViewModel(RulesItem rulesItem, Func<EViewActi...
    method SaveRulesAsync (line 56) | private async Task SaveRulesAsync()

FILE: v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs
  class RoutingRuleSettingViewModel (line 3) | public class RoutingRuleSettingViewModel : MyReactiveObject
    method RoutingRuleSettingViewModel (line 30) | public RoutingRuleSettingViewModel(RoutingItem routingItem, Func<EView...
    method RefreshRulesItems (line 94) | public void RefreshRulesItems()
    method RuleEditAsync (line 117) | public async Task RuleEditAsync(bool blNew)
    method RuleRemoveAsync (line 142) | public async Task RuleRemoveAsync()
    method RuleExportSelectedAsync (line 165) | public async Task RuleExportSelectedAsync()
    method MoveRule (line 196) | public async Task MoveRule(EMove eMove)
    method SaveRoutingAsync (line 216) | private async Task SaveRoutingAsync()
    method ImportRulesFromFileAsync (line 245) | public async Task ImportRulesFromFileAsync(string fileName)
    method ImportRulesFromClipboardAsync (line 265) | public async Task ImportRulesFromClipboardAsync(string? clipboardData)
    method ImportRulesFromUrl (line 280) | private async Task ImportRulesFromUrl()
    method AddBatchRoutingRulesAsync (line 299) | private async Task<int> AddBatchRoutingRulesAsync(RoutingItem routingI...

FILE: v2rayN/ServiceLib/ViewModels/RoutingSettingViewModel.cs
  class RoutingSettingViewModel (line 3) | public class RoutingSettingViewModel : MyReactiveObject
    method RoutingSettingViewModel (line 30) | public RoutingSettingViewModel(Func<EViewAction, object?, Task<bool>>?...
    method Init (line 64) | private async Task Init()
    method RefreshRoutingItems (line 77) | public async Task RefreshRoutingItems()
    method SaveRoutingAsync (line 99) | private async Task SaveRoutingAsync()
    method RoutingAdvancedEditAsync (line 117) | public async Task RoutingAdvancedEditAsync(bool blNew)
    method RoutingAdvancedRemoveAsync (line 139) | public async Task RoutingAdvancedRemoveAsync()
    method RoutingAdvancedSetDefault (line 163) | public async Task RoutingAdvancedSetDefault()
    method RoutingAdvancedImportRules (line 179) | private async Task RoutingAdvancedImportRules()

FILE: v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs
  class StatusBarViewModel (line 3) | public class StatusBarViewModel : MyReactiveObject
    method StatusBarViewModel (line 95) | public StatusBarViewModel(Func<EViewAction, object?, Task<bool>>? upda...
    method Init (line 231) | private async Task Init()
    method InitUpdateView (line 239) | public void InitUpdateView(Func<EViewAction, object?, Task<bool>>? upd...
    method CopyProxyCmdToClipboard (line 251) | private async Task CopyProxyCmdToClipboard()
    method AddServerViaClipboard (line 268) | private async Task AddServerViaClipboard()
    method AddServerViaScan (line 274) | private async Task AddServerViaScan()
    method UpdateSubscriptionProcess (line 280) | private async Task UpdateSubscriptionProcess(bool blProxy)
    method RefreshServersBiz (line 286) | private async Task RefreshServersBiz()
    method RefreshServersMenu (line 304) | private async Task RefreshServersMenu()
    method ServerSelectedChanged (line 330) | private void ServerSelectedChanged(bool c)
    method TestServerAvailability (line 347) | public async Task TestServerAvailability()
    method TestServerAvailabilitySub (line 363) | private async Task TestServerAvailabilitySub(string msg)
    method TestServerAvailabilityResult (line 373) | public async Task TestServerAvailabilityResult(string msg)
    method SetListenerType (line 381) | private async Task SetListenerType(ESysProxyType type)
    method ChangeSystemProxyAsync (line 395) | public async Task ChangeSystemProxyAsync(ESysProxyType type, bool blCh...
    method RefreshRoutingsMenu (line 410) | private async Task RefreshRoutingsMenu()
    method RoutingSelectedChangedAsync (line 426) | private async Task RoutingSelectedChangedAsync(bool c)
    method DoSystemProxySelected (line 452) | private async Task DoSystemProxySelected(bool c)
    method DoEnableTun (line 465) | private async Task DoEnableTun(bool c)
    method AllowEnableTun (line 497) | private bool AllowEnableTun()
    method InboundDisplayStatus (line 518) | private async Task InboundDisplayStatus()
    method UpdateStatistics (line 543) | public async Task UpdateStatistics(ServerSpeedItem update)

FILE: v2rayN/ServiceLib/ViewModels/SubEditViewModel.cs
  class SubEditViewModel (line 3) | public class SubEditViewModel : MyReactiveObject
    method SubEditViewModel (line 10) | public SubEditViewModel(SubItem subItem, Func<EViewAction, object?, Ta...
    method SaveSubAsync (line 23) | private async Task SaveSubAsync()

FILE: v2rayN/ServiceLib/ViewModels/SubSettingViewModel.cs
  class SubSettingViewModel (line 3) | public class SubSettingViewModel : MyReactiveObject
    method SubSettingViewModel (line 18) | public SubSettingViewModel(Func<EViewAction, object?, Task<bool>>? upd...
    method Init (line 47) | private async Task Init()
    method RefreshSubItems (line 54) | public async Task RefreshSubItems()
    method EditSubAsync (line 60) | public async Task EditSubAsync(bool blNew)
    method DeleteSubAsync (line 82) | private async Task DeleteSubAsync()

FILE: v2rayN/v2rayN.Desktop/App.axaml.cs
  class App (line 5) | public partial class App : Application
    method Initialize (line 7) | public override void Initialize()
    method OnFrameworkInitializationCompleted (line 15) | public override void OnFrameworkInitializationCompleted()
    method CurrentDomain_UnhandledException (line 32) | private void CurrentDomain_UnhandledException(object sender, Unhandled...
    method TaskScheduler_UnobservedTaskException (line 40) | private void TaskScheduler_UnobservedTaskException(object? sender, Uno...
    method OnExit (line 45) | private void OnExit(object? sender, ControlledApplicationLifetimeExitE...
    method MenuAddServerViaClipboardClick (line 49) | private async void MenuAddServerViaClipboardClick(object? sender, Even...
    method MenuExit_Click (line 61) | private async void MenuExit_Click(object? sender, EventArgs e)

FILE: v2rayN/v2rayN.Desktop/Base/WindowBase.cs
  class WindowBase (line 3) | public class WindowBase<TViewModel> : ReactiveWindow<TViewModel> where T...
    method WindowBase (line 5) | public WindowBase()
    method ReactiveWindowBase_Closed (line 10) | private void ReactiveWindowBase_Closed(object? sender, EventArgs e)
    method OnLoaded (line 15) | protected virtual void OnLoaded(object? sender, RoutedEventArgs e)
    method OnClosed (line 39) | protected override void OnClosed(EventArgs e)

FILE: v2rayN/v2rayN.Desktop/Common/AppBuilderExtension.cs
  class AppBuilderExtension (line 3) | public static class AppBuilderExtension
    method WithFontByDefault (line 5) | public static AppBuilder WithFontByDefault(this AppBuilder appBuilder)

FILE: v2rayN/v2rayN.Desktop/Common/AvaUtils.cs
  class AvaUtils (line 5) | internal class AvaUtils
    method GetClipboardData (line 7) | public static async Task<string?> GetClipboardData(Window owner)
    method SetClipboardData (line 25) | public static async Task SetClipboardData(Visual? visual, string strData)
    method GetAppIcon (line 42) | public static WindowIcon GetAppIcon(ESysProxyType sysProxyType)

FILE: v2rayN/v2rayN.Desktop/Common/TextEditorKeywordHighlighter.cs
  class KeywordColorizer (line 7) | public class KeywordColorizer : DocumentColorizingTransformer
    method KeywordColorizer (line 12) | public KeywordColorizer(IDictionary<string, IBrush> keywordBrushMap)
    method ColorizeLine (line 41) | protected override void ColorizeLine(DocumentLine line)
    method IsWordCharBefore (line 85) | private static bool IsWordCharBefore(string text, int idx)
    method IsWordCharAfter (line 96) | private static bool IsWordCharAfter(string text, int idx)
  class TextEditorKeywordHighlighter (line 108) | public static class TextEditorKeywordHighlighter
    method Attach (line 110) | public static void Attach(TextEditor editor, IDictionary<string, IBrus...

FILE: v2rayN/v2rayN.Desktop/Common/UI.cs
  class UI (line 6) | internal class UI
    method ShowYesNo (line 10) | public static async Task<ButtonResult> ShowYesNo(Window owner, string ...
    method OpenFileDialog (line 16) | public static async Task<string?> OpenFileDialog(Window owner, FilePic...
    method SaveFileDialog (line 34) | public static async Task<string?> SaveFileDialog(Window owner, string ...
    method GetStorageProvider (line 50) | private static IStorageProvider? GetStorageProvider(Window owner)

FILE: v2rayN/v2rayN.Desktop/Converters/DelayColorConverter.cs
  class DelayColorConverter (line 5) | public class DelayColorConverter : IValueConverter
    method Convert (line 7) | public object? Convert(object? value, Type targetType, object? paramet...
    method ConvertBack (line 19) | public object? ConvertBack(object? value, Type targetType, object? par...

FILE: v2rayN/v2rayN.Desktop/Manager/HotkeyManager.cs
  class HotkeyManager (line 6) | public sealed class HotkeyManager
    method Init (line 19) | public void Init(Config config, Action<EGlobalHotkey> updateFunc)
    method Dispose (line 27) | public void Dispose()
    method Register (line 32) | private void Register()
    method OnNext (line 75) | private void OnNext(HotKey key)

FILE: v2rayN/v2rayN.Desktop/Program.cs
  class Program (line 5) | internal class Program
    method Main (line 12) | [STAThread]
    method OnStartup (line 25) | private static bool OnStartup(string[]? Args)
    method BuildAvaloniaApp (line 55) | public static AppBuilder BuildAvaloniaApp()

FILE: v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs
  class ThemeSettingViewModel (line 8) | public class ThemeSettingViewModel : MyReactiveObject
    method ThemeSettingViewModel (line 16) | public ThemeSettingViewModel()
    method RestoreUI (line 24) | private void RestoreUI()
    method BindingUI (line 31) | private void BindingUI()
    method ModifyTheme (line 76) | private void ModifyTheme()
    method ModifyFontSize (line 94) | private void ModifyFontSize()
    method ModifyFontSizeEx (line 124) | private void ModifyFontSizeEx(double size)
    method ModifyFontFamily (line 133) | private void ModifyFontFamily()

FILE: v2rayN/v2rayN.Desktop/Views/AddGroupServerWindow.axaml.cs
  class AddGroupServerWindow (line 5) | public partial class AddGroupServerWindow : WindowBase<AddGroupServerVie...
    method AddGroupServerWindow (line 7) | public AddGroupServerWindow()
    method AddGroupServerWindow (line 12) | public AddGroupServerWindow(ProfileItem profileItem)
    method LstChild_LoadingRow (line 79) | private void LstChild_LoadingRow(object? sender, DataGridRowEventArgs e)
    method UpdateViewHandler (line 84) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 95) | private void Window_Loaded(object? sender, RoutedEventArgs e)
    method AddGroupServerWindow_KeyDown (line 100) | private void AddGroupServerWindow_KeyDown(object? sender, KeyEventArgs e)
    method MenuAddChild_Click (line 148) | private async void MenuAddChild_Click(object? sender, RoutedEventArgs e)
    method LstChild_SelectionChanged (line 161) | private void LstChild_SelectionChanged(object? sender, SelectionChange...
    method TabControl_SelectionChanged (line 169) | private async void TabControl_SelectionChanged(object? sender, Selecti...

FILE: v2rayN/v2rayN.Desktop/Views/AddServer2Window.axaml.cs
  class AddServer2Window (line 6) | public partial class AddServer2Window : WindowBase<AddServer2ViewModel>
    method AddServer2Window (line 8) | public AddServer2Window()
    method AddServer2Window (line 13) | public AddServer2Window(ProfileItem profileItem)
    method UpdateViewHandler (line 37) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 58) | private void Window_Loaded(object? sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs
  class AddServerWindow (line 5) | public partial class AddServerWindow : WindowBase<AddServerViewModel>
    method AddServerWindow (line 7) | public AddServerWindow()
    method AddServerWindow (line 12) | public AddServerWindow(ProfileItem profileItem)
    method UpdateViewHandler (line 209) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 220) | private void Window_Loaded(object? sender, RoutedEventArgs e)
    method CmbNetwork_SelectionChanged (line 225) | private void CmbNetwork_SelectionChanged(object? sender, SelectionChan...
    method CmbStreamSecurity_SelectionChanged (line 231) | private void CmbStreamSecurity_SelectionChanged(object? sender, Select...
    method btnGUID_Click (line 251) | private void btnGUID_Click(object? sender, RoutedEventArgs e)
    method SetHeaderType (line 257) | private void SetHeaderType()
    method SetTips (line 297) | private void SetTips()

FILE: v2rayN/v2rayN.Desktop/Views/BackupAndRestoreView.axaml.cs
  class BackupAndRestoreView (line 5) | public partial class BackupAndRestoreView : ReactiveUserControl<BackupAn...
    method BackupAndRestoreView (line 9) | public BackupAndRestoreView()
    method BackupAndRestoreView (line 14) | public BackupAndRestoreView(Window window)
    method MenuLocalBackup_Click (line 40) | private async void MenuLocalBackup_Click(object? sender, RoutedEventAr...
    method MenuLocalRestore_Click (line 51) | private async void MenuLocalRestore_Click(object? sender, RoutedEventA...
    method UpdateViewHandler (line 62) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...

FILE: v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml.cs
  class CheckUpdateView (line 3) | public partial class CheckUpdateView : ReactiveUserControl<CheckUpdateVi...
    method CheckUpdateView (line 5) | public CheckUpdateView()
    method UpdateViewHandler (line 20) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...

FILE: v2rayN/v2rayN.Desktop/Views/ClashConnectionsView.axaml.cs
  class ClashConnectionsView (line 3) | public partial class ClashConnectionsView : ReactiveUserControl<ClashCon...
    method ClashConnectionsView (line 8) | public ClashConnectionsView()
    method UpdateViewHandler (line 39) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method BtnAutofitColumnWidth_Click (line 44) | private void BtnAutofitColumnWidth_Click(object? sender, RoutedEventAr...
    method AutofitColumnWidth (line 49) | private void AutofitColumnWidth()
    method btnClose_Click (line 64) | private void btnClose_Click(object? sender, RoutedEventArgs e)
    method RestoreUI (line 71) | private void RestoreUI()
    method StorageUI (line 111) | private void StorageUI()

FILE: v2rayN/v2rayN.Desktop/Views/ClashProxiesView.axaml.cs
  class ClashProxiesView (line 3) | public partial class ClashProxiesView : ReactiveUserControl<ClashProxies...
    method ClashProxiesView (line 5) | public ClashProxiesView()
    method UpdateViewHandler (line 32) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method ClashProxiesView_KeyDown (line 37) | private void ClashProxiesView_KeyDown(object? sender, KeyEventArgs e)
    method LstProxyDetails_DoubleTapped (line 51) | private void LstProxyDetails_DoubleTapped(object? sender, Avalonia.Inp...

FILE: v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml.cs
  class DNSSettingWindow (line 5) | public partial class DNSSettingWindow : WindowBase<DNSSettingViewModel>
    method DNSSettingWindow (line 9) | public DNSSettingWindow()
    method UpdateViewHandler (line 75) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method linkDnsObjectDoc_Click (line 86) | private void linkDnsObjectDoc_Click(object? sender, RoutedEventArgs e)
    method linkDnsSingboxObjectDoc_Click (line 91) | private void linkDnsSingboxObjectDoc_Click(object? sender, RoutedEvent...
    method Window_Loaded (line 96) | private void Window_Loaded(object? sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/FullConfigTemplateWindow.axaml.cs
  class FullConfigTemplateWindow (line 5) | public partial class FullConfigTemplateWindow : WindowBase<FullConfigTem...
    method FullConfigTemplateWindow (line 9) | public FullConfigTemplateWindow()
    method UpdateViewHandler (line 34) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method linkFullConfigTemplateDoc_Click (line 45) | private void linkFullConfigTemplateDoc_Click(object sender, RoutedEven...
    method Window_Loaded (line 50) | private void Window_Loaded(object? sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/GlobalHotkeySettingWindow.axaml.cs
  class GlobalHotkeySettingWindow (line 6) | public partial class GlobalHotkeySettingWindow : WindowBase<GlobalHotkey...
    method GlobalHotkeySettingWindow (line 10) | public GlobalHotkeySettingWindow()
    method UpdateViewHandler (line 32) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Init (line 43) | private void Init()
    method TxtGlobalHotkey_PreviewKeyDown (line 63) | private void TxtGlobalHotkey_PreviewKeyDown(object? sender, KeyEventAr...
    method BindingData (line 82) | private void BindingData()
    method btnReset_Click (line 96) | private void btnReset_Click(object sender, RoutedEventArgs e)
    method KeyEventItemToString (line 102) | private string KeyEventItemToString(KeyEventItem? item)
    method Window_Loaded (line 133) | private void Window_Loaded(object? sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs
  class MainWindow (line 9) | public partial class MainWindow : WindowBase<MainWindowViewModel>
    method MainWindow (line 17) | public MainWindow()
    method OnProgramStarted (line 177) | private void OnProgramStarted(object state, bool timeout)
    method DelegateSnackMsg (line 184) | private async Task DelegateSnackMsg(string content)
    method UpdateViewHandler (line 190) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method OnHotkeyHandler (line 252) | private void OnHotkeyHandler(EGlobalHotkey e)
    method OnClosing (line 269) | protected override async void OnClosing(WindowClosingEventArgs e)
    method MainWindow_KeyDown (line 293) | private async void MainWindow_KeyDown(object? sender, KeyEventArgs e)
    method MenuPromotion_Click (line 317) | private void MenuPromotion_Click(object? sender, RoutedEventArgs e)
    method MenuSettingsSetUWP_Click (line 322) | private void MenuSettingsSetUWP_Click(object? sender, RoutedEventArgs e)
    method AddServerViaClipboardAsync (line 327) | public async Task AddServerViaClipboardAsync()
    method ScanScreenTaskAsync (line 336) | public async Task ScanScreenTaskAsync()
    method ScanImageTaskAsync (line 351) | private async Task ScanImageTaskAsync()
    method MenuCheckUpdate_Click (line 365) | private void MenuCheckUpdate_Click(object? sender, RoutedEventArgs e)
    method MenuBackupAndRestore_Click (line 371) | private void MenuBackupAndRestore_Click(object? sender, RoutedEventArg...
    method MenuClose_Click (line 377) | private async void MenuClose_Click(object? sender, RoutedEventArgs e)
    method Shutdown (line 390) | private void Shutdown(bool obj)
    method ShowHideWindow (line 408) | public void ShowHideWindow(bool? blShow)
    method OnLoaded (line 442) | protected override void OnLoaded(object? sender, RoutedEventArgs e)
    method RestoreUI (line 452) | private void RestoreUI()
    method StorageUI (line 469) | private void StorageUI()
    method AddHelpMenuItem (line 483) | private void AddHelpMenuItem()
    method MenuItem_Click (line 500) | private void MenuItem_Click(object? sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/MsgView.axaml.cs
  class MsgView (line 5) | public partial class MsgView : ReactiveUserControl<MsgViewModel>
    method MsgView (line 9) | public MsgView()
    method UpdateViewHandler (line 27) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method ShowMsg (line 44) | private void ShowMsg(object msg)
    method ClearMsg (line 64) | public void ClearMsg()
    method menuMsgViewSelectAll_Click (line 70) | private void menuMsgViewSelectAll_Click(object? sender, RoutedEventArg...
    method menuMsgViewCopy_Click (line 79) | private async void menuMsgViewCopy_Click(object? sender, RoutedEventAr...
    method menuMsgViewCopyAll_Click (line 85) | private async void menuMsgViewCopyAll_Click(object? sender, RoutedEven...
    method menuMsgViewClear_Click (line 91) | private void menuMsgViewClear_Click(object? sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs
  class OptionSettingWindow (line 6) | public partial class OptionSettingWindow : WindowBase<OptionSettingViewM...
    method OptionSettingWindow (line 10) | public OptionSettingWindow()
    method UpdateViewHandler (line 131) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method InitSettingFont (line 146) | private async Task InitSettingFont()
    method GetFonts (line 154) | private async Task<List<string>> GetFonts()
    method ClbdestOverride_SelectionChanged (line 187) | private void ClbdestOverride_SelectionChanged(object? sender, Selectio...
    method BtnBrowseCustomSystemProxyPacPath_Click (line 195) | private async void BtnBrowseCustomSystemProxyPacPath_Click(object? sen...
    method BtnBrowseCustomSystemProxyScriptPath_Click (line 206) | private async void BtnBrowseCustomSystemProxyScriptPath_Click(object? ...
    method Window_Loaded (line 217) | private void Window_Loaded(object? sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/ProfilesSelectWindow.axaml.cs
  class ProfilesSelectWindow (line 6) | public partial class ProfilesSelectWindow : WindowBase<ProfilesSelectVie...
    method ProfilesSelectWindow (line 14) | public ProfilesSelectWindow()
    method AllowMultiSelect (line 43) | public void AllowMultiSelect(bool allow)
    method SetConfigTypeFilter (line 64) | public void SetConfigTypeFilter(IEnumerable<EConfigType> types, bool e...
    method UpdateViewHandler (line 67) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method LstProfiles_SelectionChanged (line 78) | private void LstProfiles_SelectionChanged(object? sender, SelectionCha...
    method LstProfiles_LoadingRow (line 86) | private void LstProfiles_LoadingRow(object? sender, DataGridRowEventAr...
    method LstProfiles_DoubleTapped (line 91) | private void LstProfiles_DoubleTapped(object? sender, TappedEventArgs e)
    method LstProfiles_Sorting (line 111) | private void LstProfiles_Sorting(object? sender, DataGridColumnEventAr...
    method LstProfiles_KeyDown (line 121) | private void LstProfiles_KeyDown(object? sender, KeyEventArgs e)
    method BtnAutofitColumnWidth_Click (line 144) | private void BtnAutofitColumnWidth_Click(object? sender, RoutedEventAr...
    method AutofitColumnWidth (line 149) | private void AutofitColumnWidth()
    method TxtServerFilter_KeyDown (line 163) | private void TxtServerFilter_KeyDown(object? sender, KeyEventArgs e)
    method GetProfileItem (line 171) | public async Task<ProfileItem?> GetProfileItem()
    method GetProfileItems (line 177) | public async Task<List<ProfileItem>?> GetProfileItems()
    method BtnSave_Click (line 183) | private void BtnSave_Click(object sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs
  class ProfilesView (line 6) | public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
    method ProfilesView (line 12) | public ProfilesView()
    method ProfilesView (line 17) | public ProfilesView(Window window)
    method LstProfiles_Sorting (line 107) | private async void LstProfiles_Sorting(object? sender, DataGridColumnE...
    method UpdateViewHandler (line 121) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method ShareServer (line 208) | public async Task ShareServer(string url)
    method RefreshServersBiz (line 219) | public void RefreshServersBiz()
    method lstProfiles_SelectionChanged (line 227) | private void lstProfiles_SelectionChanged(object? sender, SelectionCha...
    method LstProfiles_DoubleTapped (line 235) | private void LstProfiles_DoubleTapped(object? sender, Avalonia.Input.T...
    method LstProfiles_LoadingRow (line 253) | private void LstProfiles_LoadingRow(object? sender, DataGridRowEventAr...
    method menuSelectAll_Click (line 270) | private void menuSelectAll_Click(object? sender, RoutedEventArgs e)
    method LstProfiles_KeyDown (line 275) | private void LstProfiles_KeyDown(object? sender, KeyEventArgs e)
    method BtnAutofitColumnWidth_Click (line 351) | private void BtnAutofitColumnWidth_Click(object? sender, RoutedEventAr...
    method AutofitColumnWidth (line 356) | private void AutofitColumnWidth()
    method TxtServerFilter_KeyDown (line 389) | private void TxtServerFilter_KeyDown(object? sender, KeyEventArgs e)
    method RestoreUI (line 401) | private void RestoreUI()
    method StorageUI (line 440) | private void StorageUI()

FILE: v2rayN/v2rayN.Desktop/Views/QrcodeView.axaml.cs
  class QrcodeView (line 3) | public partial class QrcodeView : UserControl
    method QrcodeView (line 5) | public QrcodeView()
    method QrcodeView (line 10) | public QrcodeView(string? url)
    method GetQRCode (line 20) | private Bitmap? GetQRCode(string? url)
    method ByteToBitmap (line 34) | private Bitmap? ByteToBitmap(byte[]? bytes)

FILE: v2rayN/v2rayN.Desktop/Views/RoutingRuleDetailsWindow.axaml.cs
  class RoutingRuleDetailsWindow (line 5) | public partial class RoutingRuleDetailsWindow : WindowBase<RoutingRuleDe...
    method RoutingRuleDetailsWindow (line 7) | public RoutingRuleDetailsWindow()
    method RoutingRuleDetailsWindow (line 12) | public RoutingRuleDetailsWindow(RulesItem rulesItem)
    method UpdateViewHandler (line 59) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 70) | private void Window_Loaded(object? sender, RoutedEventArgs e)
    method ClbProtocol_SelectionChanged (line 75) | private void ClbProtocol_SelectionChanged(object? sender, SelectionCha...
    method ClbInboundTag_SelectionChanged (line 83) | private void ClbInboundTag_SelectionChanged(object? sender, SelectionC...
    method linkRuleobjectDoc_Click (line 91) | private void linkRuleobjectDoc_Click(object? sender, RoutedEventArgs e)
    method BtnSelectProfile_Click (line 96) | private async void BtnSelectProfile_Click(object? sender, RoutedEventA...

FILE: v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml.cs
  class RoutingRuleSettingWindow (line 6) | public partial class RoutingRuleSettingWindow : WindowBase<RoutingRuleSe...
    method RoutingRuleSettingWindow (line 8) | public RoutingRuleSettingWindow()
    method RoutingRuleSettingWindow (line 13) | public RoutingRuleSettingWindow(RoutingItem routingItem)
    method UpdateViewHandler (line 62) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 123) | private void Window_Loaded(object? sender, RoutedEventArgs e)
    method RoutingRuleSettingWindow_KeyDown (line 128) | private void RoutingRuleSettingWindow_KeyDown(object? sender, KeyEvent...
    method lstRules_SelectionChanged (line 169) | private void lstRules_SelectionChanged(object? sender, SelectionChange...
    method LstRules_DoubleTapped (line 177) | private void LstRules_DoubleTapped(object? sender, Avalonia.Input.Tapp...
    method menuRuleSelectAll_Click (line 182) | private void menuRuleSelectAll_Click(object? sender, RoutedEventArgs e)
    method btnBrowseCustomRulesetPath4Singbox_ClickAsync (line 198) | private async void btnBrowseCustomRulesetPath4Singbox_ClickAsync(objec...
    method linkCustomRulesetPath4Singbox (line 209) | private void linkCustomRulesetPath4Singbox(object? sender, RoutedEvent...

FILE: v2rayN/v2rayN.Desktop/Views/RoutingSettingWindow.axaml.cs
  class RoutingSettingWindow (line 6) | public partial class RoutingSettingWindow : WindowBase<RoutingSettingVie...
    method RoutingSettingWindow (line 10) | public RoutingSettingWindow()
    method UpdateViewHandler (line 46) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method RoutingSettingWindow_KeyDown (line 72) | private void RoutingSettingWindow_KeyDown(object? sender, KeyEventArgs e)
    method menuRoutingAdvancedSelectAll_Click (line 100) | private void menuRoutingAdvancedSelectAll_Click(object? sender, Routed...
    method lstRoutings_SelectionChanged (line 105) | private void lstRoutings_SelectionChanged(object? sender, SelectionCha...
    method LstRoutings_DoubleTapped (line 113) | private void LstRoutings_DoubleTapped(object? sender, TappedEventArgs e)
    method linkdomainStrategy_Click (line 118) | private void linkdomainStrategy_Click(object? sender, RoutedEventArgs e)
    method linkdomainStrategy4Singbox_Click (line 123) | private void linkdomainStrategy4Singbox_Click(object? sender, RoutedEv...
    method btnCancel_Click (line 128) | private void btnCancel_Click(object? sender, RoutedEventArgs e)
    method RoutingSettingWindow_Closing (line 134) | private void RoutingSettingWindow_Closing(object? sender, WindowClosin...
    method Window_Loaded (line 145) | private void Window_Loaded(object? sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs
  class StatusBarView (line 6) | public partial class StatusBarView : ReactiveUserControl<StatusBarViewMo...
    method StatusBarView (line 10) | public StatusBarView()
    method UpdateViewHandler (line 45) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method RefreshIcon (line 72) | private void RefreshIcon()
    method PasswordInputAsync (line 83) | private async Task<bool> PasswordInputAsync()
    method TxtRunningServerDisplay_Tapped (line 99) | private void TxtRunningServerDisplay_Tapped(object? sender, Avalonia.I...

FILE: v2rayN/v2rayN.Desktop/Views/SubEditWindow.axaml.cs
  class SubEditWindow (line 5) | public partial class SubEditWindow : WindowBase<SubEditViewModel>
    method SubEditWindow (line 7) | public SubEditWindow()
    method SubEditWindow (line 12) | public SubEditWindow(SubItem subItem)
    method UpdateViewHandler (line 43) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 54) | private void Window_Loaded(object? sender, RoutedEventArgs e)
    method BtnSelectPrevProfile_Click (line 59) | private async void BtnSelectPrevProfile_Click(object? sender, RoutedEv...
    method BtnSelectNextProfile_Click (line 74) | private async void BtnSelectNextProfile_Click(object? sender, RoutedEv...

FILE: v2rayN/v2rayN.Desktop/Views/SubSettingWindow.axaml.cs
  class SubSettingWindow (line 7) | public partial class SubSettingWindow : WindowBase<SubSettingViewModel>
    method SubSettingWindow (line 11) | public SubSettingWindow()
    method UpdateViewHandler (line 40) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method ShareSub (line 77) | private async Task ShareSub(string url)
    method LstSubscription_DoubleTapped (line 87) | private void LstSubscription_DoubleTapped(object? sender, Avalonia.Inp...
    method LstSubscription_SelectionChanged (line 92) | private void LstSubscription_SelectionChanged(object? sender, Selectio...
    method menuClose_Click (line 100) | private void menuClose_Click(object? sender, RoutedEventArgs e)
    method SubSettingWindow_Closing (line 106) | private void SubSettingWindow_Closing(object? sender, WindowClosingEve...
    method SubSettingWindow_KeyDown (line 117) | private void SubSettingWindow_KeyDown(object? sender, KeyEventArgs e)
    method Window_Loaded (line 125) | private void Window_Loaded(object? sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN.Desktop/Views/SudoPasswordInputView.axaml.cs
  class SudoPasswordInputView (line 6) | public partial class SudoPasswordInputView : UserControl
    method SudoPasswordInputView (line 8) | public SudoPasswordInputView()
    method SavePasswordAsync (line 22) | private async Task SavePasswordAsync()
    method CheckSudoPasswordAsync (line 61) | private async Task<bool> CheckSudoPasswordAsync(string password)

FILE: v2rayN/v2rayN.Desktop/Views/ThemeSettingView.axaml.cs
  class ThemeSettingView (line 8) | public partial class ThemeSettingView : ReactiveUserControl<ThemeSetting...
    method ThemeSettingView (line 10) | public ThemeSettingView()

FILE: v2rayN/v2rayN/App.xaml.cs
  class App (line 6) | public partial class App : Application
    method App (line 10) | public App()
    method OnStartup (line 21) | protected override void OnStartup(StartupEventArgs e)
    method App_DispatcherUnhandledException (line 50) | private void App_DispatcherUnhandledException(object sender, Dispatche...
    method CurrentDomain_UnhandledException (line 56) | private void CurrentDomain_UnhandledException(object sender, Unhandled...
    method TaskScheduler_UnobservedTaskException (line 64) | private void TaskScheduler_UnobservedTaskException(object? sender, Uno...
    method OnExit (line 69) | protected override void OnExit(ExitEventArgs e)

FILE: v2rayN/v2rayN/Base/MyDGTextColumn.cs
  class MyDGTextColumn (line 5) | internal class MyDGTextColumn : DataGridTextColumn

FILE: v2rayN/v2rayN/Base/WindowBase.cs
  class WindowBase (line 3) | public class WindowBase<TViewModel> : ReactiveWindow<TViewModel> where T...
    method WindowBase (line 5) | public WindowBase()
    method OnLoaded (line 10) | protected virtual void OnLoaded(object? sender, RoutedEventArgs e)
    method OnClosed (line 29) | protected override void OnClosed(EventArgs e)

FILE: v2rayN/v2rayN/Common/QRCodeWindowsUtils.cs
  class QRCodeWindowsUtils (line 7) | public class QRCodeWindowsUtils
    method GetQRCode (line 9) | public static ImageSource? GetQRCode(string? strContent)
    method CaptureScreen (line 27) | public static byte[]? CaptureScreen(Window window)
    method GetDpi (line 51) | private static void GetDpi(Window window, out float x, out float y)
    method ByteToImage (line 60) | private static ImageSource? ByteToImage(IEnumerable imageData)
    method ImageToByte (line 65) | private static byte[]? ImageToByte(Image img)

FILE: v2rayN/v2rayN/Common/UI.cs
  class UI (line 5) | internal class UI
    method Show (line 9) | public static void Show(string msg)
    method ShowYesNo (line 14) | public static MessageBoxResult ShowYesNo(string msg)
    method OpenFileDialog (line 19) | public static bool? OpenFileDialog(out string fileName, string filter)
    method SaveFileDialog (line 38) | public static bool? SaveFileDialog(out string fileName, string filter)

FILE: v2rayN/v2rayN/Common/WindowsUtils.cs
  class WindowsUtils (line 8) | internal static class WindowsUtils
    method GetClipboardData (line 12) | public static string? GetClipboardData()
    method SetClipboardData (line 31) | public static void SetClipboardData(string strData)
    method DwmSetWindowAttribute (line 42) | [DllImport("dwmapi.dll")]
    method IconToImageSource (line 45) | public static ImageSource IconToImageSource(Icon icon)
    method SetDarkBorder (line 53) | public static void SetDarkBorder(Window window, string? theme)
    method SetDarkBorder (line 65) | private static void SetDarkBorder(Window window, bool dark)
    method IsDarkTheme (line 75) | private static bool IsDarkTheme()
    type DWMWINDOWATTRIBUTE (line 85) | [Flags]

FILE: v2rayN/v2rayN/Converters/DelayColorConverter.cs
  class DelayColorConverter (line 5) | public class DelayColorConverter : IValueConverter
    method Convert (line 7) | public object Convert(object value, Type targetType, object parameter,...
    method ConvertBack (line 19) | public object? ConvertBack(object value, Type targetType, object param...

FILE: v2rayN/v2rayN/Converters/InverseBooleanConverter.cs
  class InverseBooleanConverter (line 3) | [ValueConversion(typeof(bool), typeof(bool))]
    method Convert (line 6) | public object Convert(object value, Type targetType, object parameter,...
    method ConvertBack (line 16) | public object ConvertBack(object value, Type targetType, object parame...

FILE: v2rayN/v2rayN/Converters/MaterialDesignFonts.cs
  class MaterialDesignFonts (line 5) | public class MaterialDesignFonts
    method MaterialDesignFonts (line 9) | static MaterialDesignFonts()

FILE: v2rayN/v2rayN/Manager/HotkeyManager.cs
  class HotkeyManager (line 3) | public sealed class HotkeyManager
    method HotkeyManager (line 16) | public HotkeyManager()
    method Init (line 22) | private void Init()
    method Load (line 62) | public void Load()
    method ReLoad (line 90) | public void ReLoad()
    method GetHotkeyInfo (line 103) | private (int fsModifiers, int vKey, string hotkeyStr, List<string> Nam...
    method OnThreadPreProcessMessage (line 137) | private void OnThreadPreProcessMessage(ref MSG msg, ref bool handled)
    method RegisterHotKey (line 168) | [DllImport("user32.dll", SetLastError = true)]
    method UnregisterHotKey (line 171) | [DllImport("user32.dll", SetLastError = true)]
    type KeyModifiers (line 174) | [Flags]

FILE: v2rayN/v2rayN/Manager/WindowsManager.cs
  class WindowsManager (line 6) | public sealed class WindowsManager
    method GetNotifyIcon (line 12) | public async Task<Icon> GetNotifyIcon(Config config)
    method GetAppIcon (line 47) | public System.Windows.Media.ImageSource GetAppIcon(Config config)
    method GetNotifyIcon4Routing (line 53) | private async Task<Icon?> GetNotifyIcon4Routing(Config config)
    method RegisterGlobalHotkey (line 97) | public void RegisterGlobalHotkey(Config config, Action<EGlobalHotkey> ...

FILE: v2rayN/v2rayN/Properties/Resources.Designer.cs
  class Resources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
    method Resources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...

FILE: v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs
  class ThemeSettingViewModel (line 8) | public class ThemeSettingViewModel : MyReactiveObject
    method ThemeSettingViewModel (line 24) | public ThemeSettingViewModel()
    method RestoreUI (line 34) | private void RestoreUI()
    method BindingUI (line 50) | private void BindingUI()
    method ModifyTheme (line 122) | public void ModifyTheme()
    method ModifyFontSize (line 138) | private void ModifyFontSize()
    method ChangePrimaryColor (line 151) | public void ChangePrimaryColor(System.Windows.Media.Color color)
    method RegisterSystemColorSet (line 162) | public static void RegisterSystemColorSet(Config config, Action update...

FILE: v2rayN/v2rayN/Views/AddGroupServerWindow.xaml.cs
  class AddGroupServerWindow (line 3) | public partial class AddGroupServerWindow
    method AddGroupServerWindow (line 5) | public AddGroupServerWindow(ProfileItem profileItem)
    method UpdateViewHandler (line 70) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 81) | private void Window_Loaded(object sender, RoutedEventArgs e)
    method AddGroupServerWindow_PreviewKeyDown (line 86) | private void AddGroupServerWindow_PreviewKeyDown(object sender, KeyEve...
    method MenuAddChild_Click (line 128) | private async void MenuAddChild_Click(object sender, RoutedEventArgs e)
    method LstChild_SelectionChanged (line 140) | private void LstChild_SelectionChanged(object sender, System.Windows.C...
    method MenuSelectAllChild_Click (line 148) | private void MenuSelectAllChild_Click(object sender, RoutedEventArgs e)
    method TabControl_SelectionChanged (line 153) | private async void TabControl_SelectionChanged(object? sender, System....

FILE: v2rayN/v2rayN/Views/AddServer2Window.xaml.cs
  class AddServer2Window (line 3) | public partial class AddServer2Window
    method AddServer2Window (line 5) | public AddServer2Window(ProfileItem profileItem)
    method UpdateViewHandler (line 30) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 50) | private void Window_Loaded(object sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN/Views/AddServerWindow.xaml.cs
  class AddServerWindow (line 5) | public partial class AddServerWindow
    method AddServerWindow (line 7) | public AddServerWindow(ProfileItem profileItem)
    method UpdateViewHandler (line 206) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 217) | private void Window_Loaded(object sender, RoutedEventArgs e)
    method CmbNetwork_SelectionChanged (line 222) | private void CmbNetwork_SelectionChanged(object sender, SelectionChang...
    method CmbStreamSecurity_SelectionChanged (line 228) | private void CmbStreamSecurity_SelectionChanged(object sender, Selecti...
    method btnGUID_Click (line 248) | private void btnGUID_Click(object sender, RoutedEventArgs e)
    method SetHeaderType (line 254) | private void SetHeaderType()
    method SetTips (line 294) | private void SetTips()

FILE: v2rayN/v2rayN/Views/BackupAndRestoreView.xaml.cs
  class BackupAndRestoreView (line 3) | public partial class BackupAndRestoreView
    method BackupAndRestoreView (line 5) | public BackupAndRestoreView()
    method MenuLocalBackup_Click (line 29) | private void MenuLocalBackup_Click(object sender, RoutedEventArgs e)
    method MenuLocalRestore_Click (line 38) | private void MenuLocalRestore_Click(object sender, RoutedEventArgs e)
    method UpdateViewHandler (line 47) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...

FILE: v2rayN/v2rayN/Views/CheckUpdateView.xaml.cs
  class CheckUpdateView (line 3) | public partial class CheckUpdateView
    method CheckUpdateView (line 5) | public CheckUpdateView()
    method UpdateViewHandler (line 20) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...

FILE: v2rayN/v2rayN/Views/ClashConnectionsView.xaml.cs
  class ClashConnectionsView (line 9) | public partial class ClashConnectionsView
    method ClashConnectionsView (line 14) | public ClashConnectionsView()
    method UpdateViewHandler (line 44) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method BtnAutofitColumnWidth_Click (line 49) | private void BtnAutofitColumnWidth_Click(object sender, RoutedEventArg...
    method AutofitColumnWidth (line 54) | private void AutofitColumnWidth()
    method btnClose_Click (line 69) | private void btnClose_Click(object sender, System.Windows.RoutedEventA...
    method RestoreUI (line 76) | private void RestoreUI()
    method StorageUI (line 110) | private void StorageUI()

FILE: v2rayN/v2rayN/Views/ClashProxiesView.xaml.cs
  class ClashProxiesView (line 6) | public partial class ClashProxiesView
    method ClashProxiesView (line 8) | public ClashProxiesView()
    method UpdateViewHandler (line 34) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method ProxiesView_KeyDown (line 39) | private void ProxiesView_KeyDown(object sender, KeyEventArgs e)
    method lstProxyDetails_PreviewMouseDoubleClick (line 53) | private void lstProxyDetails_PreviewMouseDoubleClick(object sender, Mo...

FILE: v2rayN/v2rayN/Views/DNSSettingWindow.xaml.cs
  class DNSSettingWindow (line 3) | public partial class DNSSettingWindow
    method DNSSettingWindow (line 7) | public DNSSettingWindow()
    method UpdateViewHandler (line 76) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method linkDnsObjectDoc_Click (line 87) | private void linkDnsObjectDoc_Click(object sender, RoutedEventArgs e)
    method linkDnsSingboxObjectDoc_Click (line 92) | private void linkDnsSingboxObjectDoc_Click(object sender, RoutedEventA...

FILE: v2rayN/v2rayN/Views/FullConfigTemplateWindow.xaml.cs
  class FullConfigTemplateWindow (line 3) | public partial class FullConfigTemplateWindow
    method FullConfigTemplateWindow (line 7) | public FullConfigTemplateWindow()
    method UpdateViewHandler (line 33) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method linkFullConfigTemplateDoc_Click (line 44) | private void linkFullConfigTemplateDoc_Click(object sender, RoutedEven...

FILE: v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs
  class GlobalHotkeySettingWindow (line 6) | public partial class GlobalHotkeySettingWindow
    method GlobalHotkeySettingWindow (line 10) | public GlobalHotkeySettingWindow()
    method UpdateViewHandler (line 33) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Init (line 44) | private void Init()
    method TxtGlobalHotkey_PreviewKeyDown (line 64) | private void TxtGlobalHotkey_PreviewKeyDown(object? sender, KeyEventAr...
    method BindingData (line 83) | private void BindingData()
    method btnReset_Click (line 97) | private void btnReset_Click(object sender, RoutedEventArgs e)
    method KeyEventItemToString (line 103) | private string KeyEventItemToString(KeyEventItem? item)

FILE: v2rayN/v2rayN/Views/MainWindow.xaml.cs
  class MainWindow (line 8) | public partial class MainWindow
    method MainWindow (line 14) | public MainWindow()
    method OnProgramStarted (line 170) | private void OnProgramStarted(object state, bool timeout)
    method DelegateSnackMsg (line 178) | private async Task DelegateSnackMsg(string content)
    method UpdateViewHandler (line 184) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method OnHotkeyHandler (line 246) | private void OnHotkeyHandler(EGlobalHotkey e)
    method MainWindow_Closing (line 263) | private void MainWindow_Closing(object? sender, CancelEventArgs e)
    method Current_SessionEnding (line 269) | private async void Current_SessionEnding(object sender, SessionEndingC...
    method Shutdown (line 276) | private void Shutdown(bool obj)
    method MainWindow_PreviewKeyDown (line 281) | private void MainWindow_PreviewKeyDown(object sender, KeyEventArgs e)
    method MenuClose_Click (line 310) | private void MenuClose_Click(object sender, RoutedEventArgs e)
    method MenuPromotion_Click (line 316) | private void MenuPromotion_Click(object sender, RoutedEventArgs e)
    method MenuSettingsSetUWP_Click (line 321) | private void MenuSettingsSetUWP_Click(object sender, RoutedEventArgs e)
    method AddServerViaClipboardAsync (line 326) | public async Task AddServerViaClipboardAsync()
    method ScanScreenTaskAsync (line 335) | private async Task ScanScreenTaskAsync()
    method ScanImageTaskAsync (line 348) | private async Task ScanImageTaskAsync()
    method MenuCheckUpdate_Click (line 361) | private void MenuCheckUpdate_Click(object sender, RoutedEventArgs e)
    method MenuBackupAndRestore_Click (line 367) | private void MenuBackupAndRestore_Click(object sender, RoutedEventArgs e)
    method ShowHideWindow (line 377) | public void ShowHideWindow(bool? blShow)
    method OnLoaded (line 397) | protected override void OnLoaded(object? sender, RoutedEventArgs e)
    method RestoreUI (line 407) | private void RestoreUI()
    method StorageUI (line 424) | private void StorageUI()
    method AddHelpMenuItem (line 438) | private void AddHelpMenuItem()
    method MenuItem_Click (line 455) | private void MenuItem_Click(object sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN/Views/MsgView.xaml.cs
  class MsgView (line 3) | public partial class MsgView
    method MsgView (line 5) | public MsgView()
    method UpdateViewHandler (line 27) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method ShowMsg (line 46) | private void ShowMsg(object msg)
    method ClearMsg (line 60) | public void ClearMsg()
    method menuMsgViewSelectAll_Click (line 66) | private void menuMsgViewSelectAll_Click(object sender, System.Windows....
    method menuMsgViewCopy_Click (line 72) | private void menuMsgViewCopy_Click(object sender, System.Windows.Route...
    method menuMsgViewCopyAll_Click (line 78) | private void menuMsgViewCopyAll_Click(object sender, System.Windows.Ro...
    method menuMsgViewClear_Click (line 84) | private void menuMsgViewClear_Click(object sender, System.Windows.Rout...

FILE: v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs
  class OptionSettingWindow (line 5) | public partial class OptionSettingWindow
    method OptionSettingWindow (line 9) | public OptionSettingWindow()
    method UpdateViewHandler (line 137) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method InitSettingFont (line 152) | private async Task InitSettingFont()
    method GetFonts (line 158) | private async Task<List<string>> GetFonts(string path)
    method ClbdestOverride_SelectionChanged (line 209) | private void ClbdestOverride_SelectionChanged(object sender, System.Wi...
    method BtnBrowseCustomSystemProxyPacPath_Click (line 217) | private void BtnBrowseCustomSystemProxyPacPath_Click(object sender, Ro...

FILE: v2rayN/v2rayN/Views/ProfilesSelectWindow.xaml.cs
  class ProfilesSelectWindow (line 7) | public partial class ProfilesSelectWindow
    method ProfilesSelectWindow (line 15) | public ProfilesSelectWindow()
    method AllowMultiSelect (line 43) | public void AllowMultiSelect(bool allow)
    method SetConfigTypeFilter (line 64) | public void SetConfigTypeFilter(IEnumerable<EConfigType> types, bool e...
    method UpdateViewHandler (line 69) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method LstProfiles_SelectionChanged (line 80) | private void LstProfiles_SelectionChanged(object sender, System.Window...
    method LstProfiles_LoadingRow (line 88) | private void LstProfiles_LoadingRow(object? sender, DataGridRowEventAr...
    method LstProfiles_MouseDoubleClick (line 93) | private void LstProfiles_MouseDoubleClick(object sender, MouseButtonEv...
    method LstProfiles_ColumnHeader_Click (line 98) | private void LstProfiles_ColumnHeader_Click(object sender, RoutedEvent...
    method menuSelectAll_Click (line 109) | private void menuSelectAll_Click(object sender, RoutedEventArgs e)
    method LstProfiles_PreviewKeyDown (line 118) | private void LstProfiles_PreviewKeyDown(object sender, KeyEventArgs e)
    method BtnAutofitColumnWidth_Click (line 140) | private void BtnAutofitColumnWidth_Click(object sender, RoutedEventArg...
    method AutofitColumnWidth (line 145) | private void AutofitColumnWidth()
    method TxtServerFilter_PreviewKeyDown (line 160) | private void TxtServerFilter_PreviewKeyDown(object sender, KeyEventArg...
    method GetProfileItem (line 169) | public async Task<ProfileItem?> GetProfileItem()
    method GetProfileItems (line 175) | public async Task<List<ProfileItem>?> GetProfileItems()
    method BtnSave_Click (line 181) | private void BtnSave_Click(object sender, RoutedEventArgs e)

FILE: v2rayN/v2rayN/Views/ProfilesView.xaml.cs
  class ProfilesView (line 10) | public partial class ProfilesView
    method ProfilesView (line 15) | public ProfilesView()
    method UpdateViewHandler (line 103) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method ShareServer (line 189) | public async void ShareServer(string url)
    method RefreshServersBiz (line 201) | public void RefreshServersBiz()
    method LstProfiles_SelectionChanged (line 209) | private void LstProfiles_SelectionChanged(object sender, System.Window...
    method LstProfiles_LoadingRow (line 217) | private void LstProfiles_LoadingRow(object? sender, DataGridRowEventAr...
    method LstProfiles_MouseDoubleClick (line 222) | private void LstProfiles_MouseDoubleClick(object sender, MouseButtonEv...
    method LstProfiles_ColumnHeader_Click (line 234) | private void LstProfiles_ColumnHeader_Click(object sender, RoutedEvent...
    method menuSelectAll_Click (line 245) | private void menuSelectAll_Click(object sender, RoutedEventArgs e)
    method LstProfiles_PreviewKeyDown (line 250) | private void LstProfiles_PreviewKeyDown(object sender, KeyEventArgs e)
    method BtnAutofitColumnWidth_Click (line 326) | private void BtnAutofitColumnWidth_Click(object sender, RoutedEventArg...
    method AutofitColumnWidth (line 331) | private void AutofitColumnWidth()
    method TxtServerFilter_PreviewKeyDown (line 346) | private void TxtServerFilter_PreviewKeyDown(object sender, KeyEventArg...
    method RestoreUI (line 358) | private void RestoreUI()
    method StorageUI (line 393) | private void StorageUI()
    method FindAncestor (line 429) | private static T? FindAncestor<T>(DependencyObject current) where T : ...
    method LstProfiles_PreviewMouseLeftButtonDown (line 443) | private void LstProfiles_PreviewMouseLeftButtonDown(object sender, Mou...
    method LstProfiles_MouseMove (line 449) | private void LstProfiles_MouseMove(object sender, MouseEventArgs e)
    method LstProfiles_DragEnter (line 483) | private void LstProfiles_DragEnter(object sender, DragEventArgs e)
    method LstProfiles_Drop (line 491) | private void LstProfiles_Drop(object sender, DragEventArgs e)

FILE: v2rayN/v2rayN/Views/QrcodeView.xaml.cs
  class QrcodeView (line 5) | public partial class QrcodeView : UserControl
    method QrcodeView (line 7) | public QrcodeView()

FILE: v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml.cs
  class RoutingRuleDetailsWindow (line 3) | public partial class RoutingRuleDetailsWindow
    method RoutingRuleDetailsWindow (line 5) | public RoutingRuleDetailsWindow(RulesItem rulesItem)
    method UpdateViewHandler (line 52) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 63) | private void Window_Loaded(object sender, RoutedEventArgs e)
    method ClbProtocol_SelectionChanged (line 68) | private void ClbProtocol_SelectionChanged(object sender, System.Window...
    method ClbInboundTag_SelectionChanged (line 76) | private void ClbInboundTag_SelectionChanged(object sender, System.Wind...
    method linkRuleobjectDoc_Click (line 84) | private void linkRuleobjectDoc_Click(object sender, RoutedEventArgs e)
    method BtnSelectProfile_Click (line 89) | private async void BtnSelectProfile_Click(object sender, RoutedEventAr...

FILE: v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml.cs
  class RoutingRuleSettingWindow (line 3) | public partial class RoutingRuleSettingWindow
    method RoutingRuleSettingWindow (line 5) | public RoutingRuleSettingWindow(RoutingItem routingItem)
    method UpdateViewHandler (line 55) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 118) | private void Window_Loaded(object sender, RoutedEventArgs e)
    method RoutingRuleSettingWindow_PreviewKeyDown (line 123) | private void RoutingRuleSettingWindow_PreviewKeyDown(object sender, Ke...
    method lstRules_SelectionChanged (line 169) | private void lstRules_SelectionChanged(object sender, System.Windows.C...
    method LstRules_MouseDoubleClick (line 177) | private void LstRules_MouseDoubleClick(object sender, MouseButtonEvent...
    method menuRuleSelectAll_Click (line 182) | private void menuRuleSelectAll_Click(object sender, System.Windows.Rou...
    method btnBrowseCustomIcon_Click (line 187) | private void btnBrowseCustomIcon_Click(object sender, System.Windows.R...
    method btnBrowseCustomRulesetPath4Singbox_Click (line 198) | private void btnBrowseCustomRulesetPath4Singbox_Click(object sender, R...
    method linkCustomRulesetPath4Singbox (line 209) | private void linkCustomRulesetPath4Singbox(object sender, RoutedEventA...

FILE: v2rayN/v2rayN/Views/RoutingSettingWindow.xaml.cs
  class RoutingSettingWindow (line 3) | public partial class RoutingSettingWindow
    method RoutingSettingWindow (line 5) | public RoutingSettingWindow()
    method UpdateViewHandler (line 42) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method RoutingSettingWindow_Closing (line 69) | private void RoutingSettingWindow_Closing(object? sender, System.Compo...
    method RoutingSettingWindow_PreviewKeyDown (line 77) | private void RoutingSettingWindow_PreviewKeyDown(object sender, KeyEve...
    method menuRoutingAdvancedSelectAll_Click (line 105) | private void menuRoutingAdvancedSelectAll_Click(object sender, System....
    method lstRoutings_SelectionChanged (line 110) | private void lstRoutings_SelectionChanged(object sender, System.Window...
    method LstRoutings_MouseDoubleClick (line 118) | private void LstRoutings_MouseDoubleClick(object sender, MouseButtonEv...
    method linkdomainStrategy_Click (line 123) | private void linkdomainStrategy_Click(object sender, System.Windows.Ro...
    method linkdomainStrategy4Singbox_Click (line 128) | private void linkdomainStrategy4Singbox_Click(object sender, RoutedEve...
    method btnCancel_Click (line 133) | private void btnCancel_Click(object sender, System.Windows.RoutedEvent...

FILE: v2rayN/v2rayN/Views/StatusBarView.xaml.cs
  class StatusBarView (line 5) | public partial class StatusBarView
    method StatusBarView (line 9) | public StatusBarView()
    method UpdateViewHandler (line 69) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method menuExit_Click (line 93) | private async void menuExit_Click(object sender, RoutedEventArgs e)
    method txtRunningInfoDisplay_MouseDoubleClick (line 99) | private void txtRunningInfoDisplay_MouseDoubleClick(object sender, Mou...

FILE: v2rayN/v2rayN/Views/SubEditWindow.xaml.cs
  class SubEditWindow (line 3) | public partial class SubEditWindow
    method SubEditWindow (line 5) | public SubEditWindow(SubItem subItem)
    method UpdateViewHandler (line 37) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method Window_Loaded (line 48) | private void Window_Loaded(object sender, RoutedEventArgs e)
    method BtnSelectPrevProfile_Click (line 53) | private async void BtnSelectPrevProfile_Click(object sender, RoutedEve...
    method BtnSelectNextProfile_Click (line 67) | private async void BtnSelectNextProfile_Click(object sender, RoutedEve...

FILE: v2rayN/v2rayN/Views/SubSettingWindow.xaml.cs
  class SubSettingWindow (line 5) | public partial class SubSettingWindow
    method SubSettingWindow (line 7) | public SubSettingWindow()
    method UpdateViewHandler (line 37) | private async Task<bool> UpdateViewHandler(EViewAction action, object?...
    method ShareSub (line 72) | private async void ShareSub(string url)
    method SubSettingWindow_Closing (line 88) | private void SubSettingWindow_Closing(object? sender, CancelEventArgs e)
    method LstSubscription_MouseDoubleClick (line 96) | private void LstSubscription_MouseDoubleClick(object sender, MouseButt...
    method LstSubscription_SelectionChanged (line 101) | private void LstSubscription_SelectionChanged(object sender, System.Wi...
    method menuClose_Click (line 109) | private void menuClose_Click(object sender, System.Windows.RoutedEvent...

FILE: v2rayN/v2rayN/Views/ThemeSettingView.xaml.cs
  class ThemeSettingView (line 8) | public partial class ThemeSettingView
    method ThemeSettingView (line 10) | public ThemeSettingView()
Condensed preview — 357 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,001K chars).
[
  {
    "path": ".editorconfig",
    "chars": 9034,
    "preview": "root = true\n\n[*]\ncharset = utf-8\nindent_style = space\ntab_width = 4\nindent_size = 4\nend_of_line = crlf\ntrim_trailing_whi"
  },
  {
    "path": ".gitattributes",
    "chars": 2518,
    "preview": "###############################################################################\n# Set default behavior to automatically "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/01_bug_report.yml",
    "chars": 2033,
    "preview": "name: Bug 报告\ndescription: 在提出问题前请先自行排除服务器端问题和升级到最新客户端,同时也请通过搜索确认是否有人提出过相同问题。\ntitle: \"[Bug]: \"\nlabels: [\"bug\"]\nbody:\n  - "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/02_feature_request.yml",
    "chars": 651,
    "preview": "name: Feature 请求\ndescription: \"为这个项目提出一个建议\"\ntitle: \"[Feature request]: \"\nlabels: ['enhancement']\nbody: \n- type: input\n  "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 254,
    "preview": "blank_issues_enabled: false\n\ncontact_links:\n  - name: Discussions / 讨论区\n    url: https://github.com/2dust/v2rayN/discuss"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 206,
    "preview": "version: 2\nupdates:\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n\n  "
  },
  {
    "path": ".github/workflows/build-all.yml",
    "chars": 2412,
    "preview": "name: release all platforms\n\non:\n  workflow_dispatch:\n    inputs:\n      release_tag:\n        required: false\n        typ"
  },
  {
    "path": ".github/workflows/build-linux.yml",
    "chars": 6549,
    "preview": "name: release Linux\n\non:\n  workflow_dispatch:\n    inputs:\n      release_tag:\n        required: false\n        type: strin"
  },
  {
    "path": ".github/workflows/build-osx.yml",
    "chars": 2760,
    "preview": "name: release macOS\n\non:\n  workflow_dispatch:\n    inputs:\n      release_tag:\n        required: false\n        type: strin"
  },
  {
    "path": ".github/workflows/build-windows-desktop.yml",
    "chars": 2414,
    "preview": "name: release Windows desktop (Avalonia UI)\n\non:\n  workflow_dispatch:\n    inputs:\n      release_tag:\n        required: f"
  },
  {
    "path": ".github/workflows/build-windows.yml",
    "chars": 2125,
    "preview": "name: release Windows\n\non:\n  workflow_dispatch:\n    inputs:\n      release_tag:\n        required: false\n        type: str"
  },
  {
    "path": ".github/workflows/winget-publish.yml",
    "chars": 1761,
    "preview": "name: WinGet submission on release\n# based off of https://github.com/nushell/nushell/blob/main/.github/workflows/winget-"
  },
  {
    "path": ".gitignore",
    "chars": 6968,
    "preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## "
  },
  {
    "path": ".gitmodules",
    "chars": 110,
    "preview": "[submodule \"v2rayN/GlobalHotKeys\"]\n\tpath = v2rayN/GlobalHotKeys\n\turl = https://github.com/2dust/GlobalHotKeys\n"
  },
  {
    "path": "LICENSE",
    "chars": 35134,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "README.md",
    "chars": 905,
    "preview": "# v2rayN\n\nA GUI client for Windows, Linux and macOS, support [Xray](https://github.com/XTLS/Xray-core)\nand [sing-box](ht"
  },
  {
    "path": "package-debian.sh",
    "chars": 2258,
    "preview": "#!/bin/bash\n\nArch=\"$1\"\nOutputPath=\"$2\"\nVersion=\"$3\"\n\nFileName=\"v2rayN-${Arch}.zip\"\nwget -nv -O $FileName \"https://github"
  },
  {
    "path": "package-osx.sh",
    "chars": 1899,
    "preview": "#!/bin/bash\n\nArch=\"$1\"\nOutputPath=\"$2\"\nVersion=\"$3\"\n\nFileName=\"v2rayN-${Arch}.zip\"\nwget -nv -O $FileName \"https://github"
  },
  {
    "path": "package-release-zip.sh",
    "chars": 335,
    "preview": "#!/bin/bash\n\nArch=\"$1\"\nOutputPath=\"$2\"\n\nOutputArch=\"v2rayN-${Arch}\"\nFileName=\"v2rayN-${Arch}.zip\"\n\nwget -nv -O $FileName"
  },
  {
    "path": "package-rhel.sh",
    "chars": 19042,
    "preview": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Require Red Hat base branch\n. /etc/os-release\n\ncase \"${ID:-}\" in\n  rhel|rocky|a"
  },
  {
    "path": "v2rayN/AmazTool/AmazTool.csproj",
    "chars": 484,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n\t<PropertyGroup>\n\t\t<OutputType>Exe</OutputType>\n\t</PropertyGroup>\n\n\t<ItemGroup>\n\t\t<E"
  },
  {
    "path": "v2rayN/AmazTool/Program.cs",
    "chars": 2600,
    "preview": "namespace AmazTool;\n\ninternal static class Program\n{\n    [STAThread]\n    private static void Main(string[] args)\n    {\n "
  },
  {
    "path": "v2rayN/AmazTool/Resx/Resource.Designer.cs",
    "chars": 5943,
    "preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n//     此代码由工具生成。\n/"
  },
  {
    "path": "v2rayN/AmazTool/Resx/Resource.resx",
    "chars": 7086,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prim"
  },
  {
    "path": "v2rayN/AmazTool/Resx/Resource.zh-Hans.resx",
    "chars": 6814,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prima"
  },
  {
    "path": "v2rayN/AmazTool/Resx/Resource.zh-Hant.resx",
    "chars": 6817,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prima"
  },
  {
    "path": "v2rayN/AmazTool/UpgradeApp.cs",
    "chars": 3764,
    "preview": "using System.Diagnostics;\nusing System.IO.Compression;\nusing System.Text;\n\nnamespace AmazTool;\n\ninternal class UpgradeAp"
  },
  {
    "path": "v2rayN/AmazTool/Utils.cs",
    "chars": 1128,
    "preview": "using System.Diagnostics;\n\nnamespace AmazTool;\n\ninternal class Utils\n{\n    public static string GetExePath()\n    {\n     "
  },
  {
    "path": "v2rayN/Directory.Build.props",
    "chars": 1423,
    "preview": "<Project>\n\n    <PropertyGroup>\n        <Version>7.19.4</Version>\n    </PropertyGroup>\n\n    <PropertyGroup>\n        <Targ"
  },
  {
    "path": "v2rayN/Directory.Packages.props",
    "chars": 1881,
    "preview": "<Project>\n  <PropertyGroup>\n    <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>\n    <CentralPackag"
  },
  {
    "path": "v2rayN/ServiceLib/Base/MyReactiveObject.cs",
    "chars": 184,
    "preview": "namespace ServiceLib.Base;\n\npublic class MyReactiveObject : ReactiveObject\n{\n    protected static Config? _config;\n    p"
  },
  {
    "path": "v2rayN/ServiceLib/Common/EmbedUtils.cs",
    "chars": 1436,
    "preview": "namespace ServiceLib.Common;\n\npublic static class EmbedUtils\n{\n    private static readonly string _tag = \"EmbedUtils\";\n "
  },
  {
    "path": "v2rayN/ServiceLib/Common/Extension.cs",
    "chars": 3176,
    "preview": "using System.Diagnostics.CodeAnalysis;\n\nnamespace ServiceLib.Common;\n\npublic static class Extension\n{\n    public static "
  },
  {
    "path": "v2rayN/ServiceLib/Common/FileUtils.cs",
    "chars": 7361,
    "preview": "using System.Formats.Tar;\nusing System.IO.Compression;\n\nnamespace ServiceLib.Common;\n\npublic static class FileUtils\n{\n  "
  },
  {
    "path": "v2rayN/ServiceLib/Common/JsonUtils.cs",
    "chars": 4020,
    "preview": "namespace ServiceLib.Common;\n\npublic class JsonUtils\n{\n    private static readonly string _tag = \"JsonUtils\";\n\n    priva"
  },
  {
    "path": "v2rayN/ServiceLib/Common/Logging.cs",
    "chars": 1392,
    "preview": "using NLog;\nusing NLog.Config;\nusing NLog.Targets;\n\nnamespace ServiceLib.Common;\n\npublic class Logging\n{\n    private sta"
  },
  {
    "path": "v2rayN/ServiceLib/Common/ProcUtils.cs",
    "chars": 1802,
    "preview": "namespace ServiceLib.Common;\n\npublic static class ProcUtils\n{\n    private static readonly string _tag = \"ProcUtils\";\n\n  "
  },
  {
    "path": "v2rayN/ServiceLib/Common/QRCodeUtils.cs",
    "chars": 3109,
    "preview": "using QRCoder;\nusing QRCoder.Exceptions;\nusing SkiaSharp;\nusing ZXing.SkiaSharp;\n\nnamespace ServiceLib.Common;\n\npublic c"
  },
  {
    "path": "v2rayN/ServiceLib/Common/Utils.cs",
    "chars": 33330,
    "preview": "using System.Collections.Specialized;\nusing System.Security.Principal;\nusing CliWrap;\nusing CliWrap.Buffered;\n\nnamespace"
  },
  {
    "path": "v2rayN/ServiceLib/Common/WindowsUtils.cs",
    "chars": 1799,
    "preview": "using Microsoft.Win32;\n\nnamespace ServiceLib.Common;\n\ninternal static class WindowsUtils\n{\n    private static readonly s"
  },
  {
    "path": "v2rayN/ServiceLib/Common/YamlUtils.cs",
    "chars": 1911,
    "preview": "using YamlDotNet.Core;\nusing YamlDotNet.Serialization;\nusing YamlDotNet.Serialization.NamingConventions;\n\nnamespace Serv"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/EConfigType.cs",
    "chars": 284,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum EConfigType\n{\n    VMess = 1,\n    Custom = 2,\n    Shadowsocks = 3,\n    SOCKS = 4"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/ECoreType.cs",
    "chars": 318,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum ECoreType\n{\n    v2fly = 1,\n    Xray = 2,\n    v2fly_v5 = 4,\n    mihomo = 13,\n   "
  },
  {
    "path": "v2rayN/ServiceLib/Enums/EGirdOrientation.cs",
    "chars": 101,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum EGirdOrientation\n{\n    Horizontal,\n    Vertical,\n    Tab,\n}\n"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/EGlobalHotkey.cs",
    "chars": 181,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum EGlobalHotkey\n{\n    ShowForm = 0,\n    SystemProxyClear = 1,\n    SystemProxySet "
  },
  {
    "path": "v2rayN/ServiceLib/Enums/EInboundProtocol.cs",
    "chars": 159,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum EInboundProtocol\n{\n    socks = 0,\n    socks2,\n    socks3,\n    pac,\n    api,\n   "
  },
  {
    "path": "v2rayN/ServiceLib/Enums/EMove.cs",
    "chars": 123,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum EMove\n{\n    Top = 1,\n    Up = 2,\n    Down = 3,\n    Bottom = 4,\n    Position = 5"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/EMultipleLoad.cs",
    "chars": 130,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum EMultipleLoad\n{\n    LeastPing,\n    Fallback,\n    Random,\n    RoundRobin,\n    Le"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/EPresetType.cs",
    "chars": 104,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum EPresetType\n{\n    Default = 0,\n    Russia = 1,\n    Iran = 2,\n}\n"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/ERuleMode.cs",
    "chars": 119,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum ERuleMode\n{\n    Rule = 0,\n    Global = 1,\n    Direct = 2,\n    Unchanged = 3\n}\n"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/ERuleType.cs",
    "chars": 98,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum ERuleType\n{\n    ALL = 0,\n    Routing = 1,\n    DNS = 2,\n}\n"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/EServerColName.cs",
    "chars": 258,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum EServerColName\n{\n    Def = 0,\n    ConfigType,\n    Remarks,\n    Address,\n    Por"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/ESpeedActionType.cs",
    "chars": 135,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum ESpeedActionType\n{\n    Tcping,\n    Realping,\n    Speedtest,\n    Mixedtest,\n    "
  },
  {
    "path": "v2rayN/ServiceLib/Enums/ESysProxyType.cs",
    "chars": 133,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum ESysProxyType\n{\n    ForcedClear = 0,\n    ForcedChange = 1,\n    Unchanged = 2,\n "
  },
  {
    "path": "v2rayN/ServiceLib/Enums/ETheme.cs",
    "chars": 139,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum ETheme\n{\n    FollowSystem,\n    Dark,\n    Light,\n    Aquatic,\n    Desert,\n    Du"
  },
  {
    "path": "v2rayN/ServiceLib/Enums/ETransport.cs",
    "chars": 147,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum ETransport\n{\n    tcp,\n    kcp,\n    ws,\n    httpupgrade,\n    xhttp,\n    h2,\n    "
  },
  {
    "path": "v2rayN/ServiceLib/Enums/EViewAction.cs",
    "chars": 778,
    "preview": "namespace ServiceLib.Enums;\n\npublic enum EViewAction\n{\n    CloseWindow,\n    ShowYesNo,\n    SaveFileDialog,\n    AddBatchR"
  },
  {
    "path": "v2rayN/ServiceLib/Events/AppEvents.cs",
    "chars": 1607,
    "preview": "namespace ServiceLib.Events;\n\npublic static class AppEvents\n{\n    public static readonly EventChannel<Unit> ReloadReques"
  },
  {
    "path": "v2rayN/ServiceLib/Events/EventChannel.cs",
    "chars": 620,
    "preview": "using System.Reactive.Subjects;\n\nnamespace ServiceLib.Events;\n\npublic sealed class EventChannel<T>\n{\n    private readonl"
  },
  {
    "path": "v2rayN/ServiceLib/FodyWeavers.xml",
    "chars": 140,
    "preview": "<Weavers xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"FodyWeavers.xsd\">\n  <Reac"
  },
  {
    "path": "v2rayN/ServiceLib/Global.cs",
    "chars": 21499,
    "preview": "namespace ServiceLib;\n\npublic class Global\n{\n    #region const\n\n    public const string AppName = \"v2rayN\";\n    public c"
  },
  {
    "path": "v2rayN/ServiceLib/GlobalUsings.cs",
    "chars": 1303,
    "preview": "global using System.Collections.Concurrent;\nglobal using System.Diagnostics;\nglobal using System.Net;\nglobal using Syste"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/AutoStartupHandler.cs",
    "chars": 6984,
    "preview": "using System.Security.Principal;\n\nnamespace ServiceLib.Handler;\n\npublic static class AutoStartupHandler\n{\n    private st"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Builder/CoreConfigContextBuilder.cs",
    "chars": 18357,
    "preview": "namespace ServiceLib.Handler.Builder;\n\npublic record CoreConfigContextBuilderResult(CoreConfigContext Context, NodeValid"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Builder/NodeValidator.cs",
    "chars": 6290,
    "preview": "namespace ServiceLib.Handler.Builder;\n\npublic record NodeValidatorResult(List<string> Errors, List<string> Warnings)\n{\n "
  },
  {
    "path": "v2rayN/ServiceLib/Handler/ConfigHandler.cs",
    "chars": 91620,
    "preview": "using System.Data;\n\nnamespace ServiceLib.Handler;\n\npublic static class ConfigHandler\n{\n    private static readonly strin"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/ConnectionHandler.cs",
    "chars": 2995,
    "preview": "namespace ServiceLib.Handler;\n\npublic static class ConnectionHandler\n{\n    private static readonly string _tag = \"Connec"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/CoreConfigHandler.cs",
    "chars": 5241,
    "preview": "namespace ServiceLib.Handler;\n\n/// <summary>\n/// Core configuration file processing class\n/// </summary>\npublic static c"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/AnytlsFmt.cs",
    "chars": 1334,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class AnytlsFmt : BaseFmt\n{\n    public static ProfileItem? Resolve(string str,"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/BaseFmt.cs",
    "chars": 13188,
    "preview": "using System.Collections.Specialized;\n\nnamespace ServiceLib.Handler.Fmt;\n\npublic class BaseFmt\n{\n    private static read"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/ClashFmt.cs",
    "chars": 566,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class ClashFmt : BaseFmt\n{\n    public static ProfileItem? ResolveFull(string s"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/FmtHandler.cs",
    "chars": 3204,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class FmtHandler\n{\n    private static readonly string _tag = \"FmtHandler\";\n\n  "
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/HtmlPageFmt.cs",
    "chars": 206,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class HtmlPageFmt : BaseFmt\n{\n    public static bool IsHtmlPage(string strData"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/Hysteria2Fmt.cs",
    "chars": 2846,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class Hysteria2Fmt : BaseFmt\n{\n    public static ProfileItem? Resolve(string s"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/ShadowsocksFmt.cs",
    "chars": 11212,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class ShadowsocksFmt : BaseFmt\n{\n    public static ProfileItem? Resolve(string"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/SingboxFmt.cs",
    "chars": 1334,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class SingboxFmt : BaseFmt\n{\n    public static List<ProfileItem>? ResolveFullA"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/SocksFmt.cs",
    "chars": 3015,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class SocksFmt : BaseFmt\n{\n    public static ProfileItem? Resolve(string str, "
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/TrojanFmt.cs",
    "chars": 1472,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class TrojanFmt : BaseFmt\n{\n    public static ProfileItem? Resolve(string str,"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/TuicFmt.cs",
    "chars": 1608,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class TuicFmt : BaseFmt\n{\n    public static ProfileItem? Resolve(string str, o"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/V2rayFmt.cs",
    "chars": 1327,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class V2rayFmt : BaseFmt\n{\n    public static List<ProfileItem>? ResolveFullArr"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/VLESSFmt.cs",
    "chars": 1811,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class VLESSFmt : BaseFmt\n{\n    public static ProfileItem? Resolve(string str, "
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/VmessFmt.cs",
    "chars": 4015,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class VmessFmt : BaseFmt\n{\n    public static ProfileItem? Resolve(string str, "
  },
  {
    "path": "v2rayN/ServiceLib/Handler/Fmt/WireguardFmt.cs",
    "chars": 2200,
    "preview": "namespace ServiceLib.Handler.Fmt;\n\npublic class WireguardFmt : BaseFmt\n{\n    public static ProfileItem? Resolve(string s"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/SubscriptionHandler.cs",
    "chars": 7801,
    "preview": "namespace ServiceLib.Handler;\n\npublic static class SubscriptionHandler\n{\n    public static async Task UpdateProcess(Conf"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/SysProxy/ProxySettingLinux.cs",
    "chars": 1183,
    "preview": "namespace ServiceLib.Handler.SysProxy;\n\npublic static class ProxySettingLinux\n{\n    private static readonly string _prox"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/SysProxy/ProxySettingOSX.cs",
    "chars": 1271,
    "preview": "namespace ServiceLib.Handler.SysProxy;\n\npublic static class ProxySettingOSX\n{\n    private static readonly string _proxyS"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/SysProxy/ProxySettingWindows.cs",
    "chars": 14066,
    "preview": "using static ServiceLib.Handler.SysProxy.ProxySettingWindows.InternetConnectionOption;\n\nnamespace ServiceLib.Handler.Sys"
  },
  {
    "path": "v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs",
    "chars": 3498,
    "preview": "namespace ServiceLib.Handler.SysProxy;\n\npublic static class SysProxyHandler\n{\n    private static readonly string _tag = "
  },
  {
    "path": "v2rayN/ServiceLib/Helper/DownloaderHelper.cs",
    "chars": 5978,
    "preview": "using Downloader;\n\nnamespace ServiceLib.Helper;\n\npublic class DownloaderHelper\n{\n    private static readonly Lazy<Downlo"
  },
  {
    "path": "v2rayN/ServiceLib/Helper/HttpClientHelper.cs",
    "chars": 1963,
    "preview": "using System.Net.Http.Headers;\nusing System.Net.Mime;\n\nnamespace ServiceLib.Helper;\n\n/// <summary>\n/// </summary>\npublic"
  },
  {
    "path": "v2rayN/ServiceLib/Helper/SqliteHelper.cs",
    "chars": 2330,
    "preview": "using System.Collections;\n\nnamespace ServiceLib.Helper;\n\npublic sealed class SQLiteHelper\n{\n    private static readonly "
  },
  {
    "path": "v2rayN/ServiceLib/Manager/AppManager.cs",
    "chars": 17368,
    "preview": "namespace ServiceLib.Manager;\n\npublic sealed class AppManager\n{\n    #region Property\n\n    private static readonly Lazy<A"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/CertPemManager.cs",
    "chars": 28094,
    "preview": "using System.Net.Security;\nusing System.Security.Cryptography.X509Certificates;\n\nnamespace ServiceLib.Manager;\n\n/// <sum"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/ClashApiManager.cs",
    "chars": 5746,
    "preview": "using static ServiceLib.Models.ClashProxies;\n\nnamespace ServiceLib.Manager;\n\npublic sealed class ClashApiManager\n{\n    p"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/CoreAdminManager.cs",
    "chars": 2929,
    "preview": "using CliWrap;\nusing CliWrap.Buffered;\n\nnamespace ServiceLib.Manager;\n\npublic class CoreAdminManager\n{\n    private stati"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/CoreInfoManager.cs",
    "chars": 10858,
    "preview": "namespace ServiceLib.Manager;\n\npublic sealed class CoreInfoManager\n{\n    private static readonly Lazy<CoreInfoManager> _"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/CoreManager.cs",
    "chars": 10044,
    "preview": "namespace ServiceLib.Manager;\n\n/// <summary>\n/// Core process processing class\n/// </summary>\npublic class CoreManager\n{"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/GroupProfileManager.cs",
    "chars": 4580,
    "preview": "namespace ServiceLib.Manager;\n\npublic class GroupProfileManager\n{\n    public static async Task<bool> HasCycle(ProfileIte"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/NoticeManager.cs",
    "chars": 1723,
    "preview": "namespace ServiceLib.Manager;\n\npublic class NoticeManager\n{\n    private static readonly Lazy<NoticeManager> _instance = "
  },
  {
    "path": "v2rayN/ServiceLib/Manager/PacManager.cs",
    "chars": 3192,
    "preview": "namespace ServiceLib.Manager;\n\npublic class PacManager\n{\n    private static readonly Lazy<PacManager> _instance = new(()"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/ProfileExManager.cs",
    "chars": 4626,
    "preview": "//using System.Reactive.Linq;\n\nnamespace ServiceLib.Manager;\n\npublic class ProfileExManager\n{\n    private static readonl"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/StatisticsManager.cs",
    "chars": 4902,
    "preview": "namespace ServiceLib.Manager;\n\npublic class StatisticsManager\n{\n    private static readonly Lazy<StatisticsManager> inst"
  },
  {
    "path": "v2rayN/ServiceLib/Manager/TaskManager.cs",
    "chars": 3680,
    "preview": "namespace ServiceLib.Manager;\n\npublic class TaskManager\n{\n    private static readonly Lazy<TaskManager> _instance = new("
  },
  {
    "path": "v2rayN/ServiceLib/Manager/WebDavManager.cs",
    "chars": 4745,
    "preview": "using WebDav;\n\nnamespace ServiceLib.Manager;\n\npublic sealed class WebDavManager\n{\n    private static readonly Lazy<WebDa"
  },
  {
    "path": "v2rayN/ServiceLib/Models/CheckUpdateModel.cs",
    "chars": 301,
    "preview": "namespace ServiceLib.Models;\n\npublic class CheckUpdateModel : ReactiveObject\n{\n    public bool? IsSelected { get; set; }"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ClashConnectionModel.cs",
    "chars": 512,
    "preview": "namespace ServiceLib.Models;\n\npublic class ClashConnectionModel\n{\n    public string? Id { get; set; }\n    public string?"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ClashConnections.cs",
    "chars": 1119,
    "preview": "namespace ServiceLib.Models;\n\npublic class ClashConnections\n{\n    public ulong downloadTotal { get; set; }\n    public ul"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ClashProviders.cs",
    "chars": 411,
    "preview": "using static ServiceLib.Models.ClashProxies;\n\nnamespace ServiceLib.Models;\n\npublic class ClashProviders\n{\n    public Dic"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ClashProxies.cs",
    "chars": 596,
    "preview": "namespace ServiceLib.Models;\n\npublic class ClashProxies\n{\n    public Dictionary<string, ProxiesItem>? proxies { get; set"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ClashProxyModel.cs",
    "chars": 352,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class ClashProxyModel : ReactiveObject\n{\n    public string? Name { g"
  },
  {
    "path": "v2rayN/ServiceLib/Models/CmdItem.cs",
    "chars": 141,
    "preview": "namespace ServiceLib.Models;\n\npublic class CmdItem\n{\n    public string? Cmd { get; set; }\n    public List<string>? Argum"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ComboItem.cs",
    "chars": 164,
    "preview": "namespace ServiceLib.Models;\n\npublic class ComboItem\n{\n    public string? ID\n    {\n        get; set;\n    }\n\n    public s"
  },
  {
    "path": "v2rayN/ServiceLib/Models/Config.cs",
    "chars": 1362,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class Config\n{\n    #region property\n\n    public string IndexId { get"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ConfigItems.cs",
    "chars": 7352,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class CoreBasicItem\n{\n    public bool LogEnabled { get; set; }\n\n    "
  },
  {
    "path": "v2rayN/ServiceLib/Models/CoreConfigContext.cs",
    "chars": 1131,
    "preview": "namespace ServiceLib.Models;\n\npublic record CoreConfigContext\n{\n    public required ProfileItem Node { get; init; }\n    "
  },
  {
    "path": "v2rayN/ServiceLib/Models/CoreInfo.cs",
    "chars": 832,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class CoreInfo\n{\n    public ECoreType CoreType { get; set; }\n    pub"
  },
  {
    "path": "v2rayN/ServiceLib/Models/DNSItem.cs",
    "chars": 488,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class DNSItem\n{\n    [PrimaryKey]\n    public string Id { get; set; }\n"
  },
  {
    "path": "v2rayN/ServiceLib/Models/FullConfigTemplateItem.cs",
    "chars": 450,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class FullConfigTemplateItem\n{\n    [PrimaryKey]\n    public string Id"
  },
  {
    "path": "v2rayN/ServiceLib/Models/GitHubRelease.cs",
    "chars": 2225,
    "preview": "namespace ServiceLib.Models;\n\npublic class GitHubReleaseAsset\n{\n    [JsonPropertyName(\"url\")] public string? Url { get; "
  },
  {
    "path": "v2rayN/ServiceLib/Models/IPAPIInfo.cs",
    "chars": 520,
    "preview": "namespace ServiceLib.Models;\n\ninternal class IPAPIInfo\n{\n    public string? ip { get; set; }\n    public string? clientIp"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ProfileExItem.cs",
    "chars": 283,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class ProfileExItem\n{\n    [PrimaryKey]\n    public string IndexId { g"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ProfileGroupItem.cs",
    "chars": 535,
    "preview": "namespace ServiceLib.Models;\n\n[Obsolete(\"Use ProtocolExtraItem instead.\")]\n[Serializable]\npublic class ProfileGroupItem\n"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ProfileItem.cs",
    "chars": 5656,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class ProfileItem\n{\n    private ProtocolExtraItem? _protocolExtraCac"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ProfileItemModel.cs",
    "chars": 1199,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class ProfileItemModel : ReactiveObject\n{\n    public bool IsActive {"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ProtocolExtraItem.cs",
    "chars": 1162,
    "preview": "namespace ServiceLib.Models;\n\npublic record ProtocolExtraItem\n{\n    // vmess\n    public string? AlterId { get; init; }\n "
  },
  {
    "path": "v2rayN/ServiceLib/Models/RetResult.cs",
    "chars": 502,
    "preview": "namespace ServiceLib.Models;\n\npublic class RetResult\n{\n    public bool Success { get; set; }\n    public string? Msg { ge"
  },
  {
    "path": "v2rayN/ServiceLib/Models/RoutingItem.cs",
    "chars": 639,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class RoutingItem\n{\n    [PrimaryKey]\n    public string Id { get; set"
  },
  {
    "path": "v2rayN/ServiceLib/Models/RoutingItemModel.cs",
    "chars": 93,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class RoutingItemModel : RoutingItem\n{\n}\n"
  },
  {
    "path": "v2rayN/ServiceLib/Models/RoutingTemplate.cs",
    "chars": 170,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class RoutingTemplate\n{\n    public string Version { get; set; }\n    "
  },
  {
    "path": "v2rayN/ServiceLib/Models/RulesItem.cs",
    "chars": 634,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class RulesItem\n{\n    public string Id { get; set; }\n    public stri"
  },
  {
    "path": "v2rayN/ServiceLib/Models/RulesItemModel.cs",
    "chars": 296,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class RulesItemModel : RulesItem\n{\n    public string InboundTags { g"
  },
  {
    "path": "v2rayN/ServiceLib/Models/SemanticVersion.cs",
    "chars": 4341,
    "preview": "namespace ServiceLib.Models;\n\npublic class SemanticVersion\n{\n    private readonly int major;\n    private readonly int mi"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ServerSpeedItem.cs",
    "chars": 372,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class ServerSpeedItem : ServerStatItem\n{\n    public long ProxyUp { g"
  },
  {
    "path": "v2rayN/ServiceLib/Models/ServerStatItem.cs",
    "chars": 333,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class ServerStatItem\n{\n    [PrimaryKey]\n    public string IndexId { "
  },
  {
    "path": "v2rayN/ServiceLib/Models/ServerTestItem.cs",
    "chars": 408,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class ServerTestItem\n{\n    public string? IndexId { get; set; }\n    "
  },
  {
    "path": "v2rayN/ServiceLib/Models/SingboxConfig.cs",
    "chars": 11271,
    "preview": "namespace ServiceLib.Models;\n\npublic class SingboxConfig\n{\n    public Log4Sbox log { get; set; }\n    public Dns4Sbox? dn"
  },
  {
    "path": "v2rayN/ServiceLib/Models/SpeedTestResult.cs",
    "chars": 199,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class SpeedTestResult\n{\n    public string? IndexId { get; set; }\n\n  "
  },
  {
    "path": "v2rayN/ServiceLib/Models/SsSIP008.cs",
    "chars": 395,
    "preview": "namespace ServiceLib.Models;\n\npublic class SsSIP008\n{\n    public List<SsServer>? servers { get; set; }\n}\n\n[Serializable]"
  },
  {
    "path": "v2rayN/ServiceLib/Models/SubItem.cs",
    "chars": 737,
    "preview": "namespace ServiceLib.Models;\n\n[Serializable]\npublic class SubItem\n{\n    [PrimaryKey]\n    public string Id { get; set; }\n"
  },
  {
    "path": "v2rayN/ServiceLib/Models/UpdateResult.cs",
    "chars": 463,
    "preview": "namespace ServiceLib.Models;\n\npublic class UpdateResult\n{\n    public bool Success { get; set; }\n    public string? Msg {"
  },
  {
    "path": "v2rayN/ServiceLib/Models/V2rayConfig.cs",
    "chars": 11484,
    "preview": "namespace ServiceLib.Models;\n\npublic class V2rayConfig\n{\n    public Log4Ray log { get; set; }\n    public object dns { ge"
  },
  {
    "path": "v2rayN/ServiceLib/Models/V2rayMetricsVars.cs",
    "chars": 347,
    "preview": "using System.Collections;\n\nnamespace ServiceLib.Models;\n\ninternal class V2rayMetricsVars\n{\n    public V2rayMetricsVarsSt"
  },
  {
    "path": "v2rayN/ServiceLib/Models/V2rayTcpRequest.cs",
    "chars": 277,
    "preview": "namespace ServiceLib.Models;\n\npublic class V2rayTcpRequest\n{\n    /// <summary>\n    ///\n    /// </summary>\n    public Req"
  },
  {
    "path": "v2rayN/ServiceLib/Models/VmessQRCode.cs",
    "chars": 1264,
    "preview": "namespace ServiceLib.Models;\n\n/// <summary>\n/// https://github.com/2dust/v2rayN/wiki/\n/// </summary>\n[Serializable]\npubl"
  },
  {
    "path": "v2rayN/ServiceLib/Resx/ResUI.Designer.cs",
    "chars": 153663,
    "preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n//     此代码由工具生成。\n/"
  },
  {
    "path": "v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx",
    "chars": 64940,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!--\n    Microsoft ResX Schema\n\n    Version 2.0\n\n    The primary goals o"
  },
  {
    "path": "v2rayN/ServiceLib/Resx/ResUI.fr.resx",
    "chars": 68163,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!--\n    Microsoft ResX Schema\n\n    Version 2.0\n\n    The primary goals o"
  },
  {
    "path": "v2rayN/ServiceLib/Resx/ResUI.hu.resx",
    "chars": 66891,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!--\n    Microsoft ResX Schema\n\n    Version 2.0\n\n    The primary goals o"
  },
  {
    "path": "v2rayN/ServiceLib/Resx/ResUI.resx",
    "chars": 64466,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!--\n    Microsoft ResX Schema\n\n    Version 2.0\n\n    The primary goals o"
  },
  {
    "path": "v2rayN/ServiceLib/Resx/ResUI.ru.resx",
    "chars": 66093,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!--\n    Microsoft ResX Schema\n\n    Version 2.0\n\n    The primary goals o"
  },
  {
    "path": "v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx",
    "chars": 56188,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!--\n    Microsoft ResX Schema\n\n    Version 2.0\n\n    The primary goals o"
  },
  {
    "path": "v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx",
    "chars": 56238,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!--\n    Microsoft ResX Schema\n\n    Version 2.0\n\n    The primary goals o"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/SampleClientConfig",
    "chars": 402,
    "preview": "{\n\t\"log\": {\n\t\t\"access\": \"Vaccess.log\",\n\t\t\"error\": \"Verror.log\",\n\t\t\"loglevel\": \"warning\"\n\t},\n\t\"inbounds\": [],\n\t\"outbounds"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/SampleHttpRequest",
    "chars": 209,
    "preview": "{\"version\":\"1.1\",\"method\":\"GET\",\"path\":[$requestPath$],\"headers\":{\"Host\":[$requestHost$],\"User-Agent\":[$requestUserAgen"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/SampleHttpResponse",
    "chars": 196,
    "preview": "{\"version\":\"1.1\",\"status\":\"200\",\"reason\":\"OK\",\"headers\":{\"Content-Type\":[\"application/octet-stream\",\"video/mpeg\"],\"Tran"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/SampleInbound",
    "chars": 246,
    "preview": "{\n\t\"tag\": \"tag1\",\n\t\"port\": 10808,\n\t\"protocol\": \"socks\",\n\t\"listen\": \"127.0.0.1\",\n\t\"settings\": {\n\t\t\"auth\": \"noauth\",\n\t\t\"u"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/SampleOutbound",
    "chars": 488,
    "preview": "{\n\t\"tag\": \"proxy\",\n\t\"protocol\": \"vmess\",\n\t\"settings\": {\n\t\t\"vnext\": [\n\t\t\t{\n\t\t\t\t\"address\": \"v2ray.cool\",\n\t\t\t\t\"port\": 1008"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/SingboxSampleClientConfig",
    "chars": 171,
    "preview": "{\n\t\"log\": {\n\t\t\"level\": \"debug\",\n\t\t\"timestamp\": true\n\t},\n\t\"inbounds\": [],\n\t\"outbounds\": [\n\t\t{\n\t\t\t\"type\": \"direct\",\n\t\t\t\"ta"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/SingboxSampleOutbound",
    "chars": 74,
    "preview": "{\n\t\"type\": \"vless\",\n\t\"tag\": \"proxy\",\n\t\"server\": \"\",\n\t\"server_port\": 443\n}"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/clash_mixin_yaml",
    "chars": 908,
    "preview": "#\n# 配置文件内容不会被修改,混合行为只会发生在内存中\n#\n# 注意下面缩进,请用支持yaml显示的编辑器打开\n#\n# 使用clash配置文件关键字则覆盖原配置\n#\n# removed-rules    循环匹配rules数组每行,符合则"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/clash_tun_yaml",
    "chars": 114,
    "preview": "tun:\n  enable: true\n  stack: gvisor\n  dns-hijack:\n  - 0.0.0.0:53\n  auto-route: true\n  auto-detect-interface: true\n"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/custom_routing_black",
    "chars": 2903,
    "preview": "[\n  {\n    \"remarks\": \"绕过bittorrent\",\n    \"outboundTag\": \"direct\",\n    \"protocol\": [\n      \"bittorrent\"\n    ]\n  },\n  {\n  "
  },
  {
    "path": "v2rayN/ServiceLib/Sample/custom_routing_global",
    "chars": 359,
    "preview": "[\n\t{\n\t\t\"remarks\": \"阻断udp443\",\n\t\t\"outboundTag\": \"block\",\n\t\t\"port\": \"443\",\n\t\t\"network\": \"udp\"\n\t},\n\t{\n\t\t\"remarks\": \"绕过局域网IP"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/custom_routing_white",
    "chars": 1742,
    "preview": "[\n  {\n    \"remarks\": \"阻断udp443\",\n    \"outboundTag\": \"block\",\n    \"port\": \"443\",\n    \"network\": \"udp\"\n  },\n  {\n    \"remar"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/dns_singbox_normal",
    "chars": 526,
    "preview": "{\n  \"servers\": [\n    {\n      \"tag\": \"remote\",\n      \"type\": \"tcp\",\n      \"server\": \"8.8.8.8\",\n      \"detour\": \"proxy\"\n  "
  },
  {
    "path": "v2rayN/ServiceLib/Sample/dns_v2ray_normal",
    "chars": 460,
    "preview": "{\n  \"hosts\": {\n    \"dns.google\": \"8.8.8.8\",\n    \"proxy.example.com\": \"127.0.0.1\"\n  },\n  \"servers\": [\n    {\n      \"addres"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/kill_as_sudo_linux_sh",
    "chars": 1986,
    "preview": "#!/bin/bash\n#\n# Process Terminator Script for Linux\n# This script forcibly terminates a process and all its child proces"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/kill_as_sudo_osx_sh",
    "chars": 2019,
    "preview": "#!/bin/bash\n#\n# Process Terminator Script for macOS\n# This script forcibly terminates a process and all its descendant p"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/linux_autostart_config",
    "chars": 177,
    "preview": "[Desktop Entry]\nType=Application\nExec=$ExecPath$\nHidden=false\nNoDisplay=false\nX-GNOME-Autostart-enabled=true\nName[en_US]"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/pac",
    "chars": 192429,
    "preview": "var proxy = '__PROXY__';\nvar rules = [\n    [\n        [],\n        [\n            \"000webhost.com\",\n            \"030buy.com"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/proxy_set_linux_sh",
    "chars": 5038,
    "preview": "#!/bin/bash\n\n# Function to set proxy for GNOME\nset_gnome_proxy() {\n    local MODE=$1\n    local PROXY_IP=$2\n    local PRO"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/proxy_set_osx_sh",
    "chars": 2351,
    "preview": "#!/bin/bash\n\n# Function to set proxy\nset_proxy() {\n    PROXY_IP=$1\n    PROXY_PORT=$2\n\n    shift 2\n    BYPASS_DOMAINS=(\"$"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/singbox_fakeip_filter",
    "chars": 2013,
    "preview": "{\n  \"domain\": [\n    \"amobile.music.tc.qq.com\",\n    \"api-jooxtt.sanook.com\",\n    \"api.joox.com\",\n    \"aqqmusic.tc.qq.com\""
  },
  {
    "path": "v2rayN/ServiceLib/Sample/tun_singbox_dns",
    "chars": 525,
    "preview": "{\n  \"servers\": [\n    {\n      \"tag\": \"remote\",\n      \"type\": \"tcp\",\n      \"server\": \"8.8.8.8\",\n      \"detour\": \"proxy\"\n  "
  },
  {
    "path": "v2rayN/ServiceLib/Sample/tun_singbox_inbound",
    "chars": 242,
    "preview": "{\n  \"type\": \"tun\",\n  \"tag\": \"tun-in\",\n  \"interface_name\": \"singbox_tun\",\n  \"address\": [\n    \"172.18.0.1/30\",\n    \"fdfe:d"
  },
  {
    "path": "v2rayN/ServiceLib/Sample/tun_singbox_rules",
    "chars": 226,
    "preview": "[\n  {\n    \"network\": \"udp\",\n    \"port\": [\n      135,\n      137,\n      138,\n      139,\n      5353\n    ],\n    \"action\": \"r"
  },
  {
    "path": "v2rayN/ServiceLib/ServiceLib.csproj",
    "chars": 3435,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n\t<PropertyGroup>\n\t\t<OutputType>Library</OutputType>\n\t</PropertyGroup>\n\n\t<ItemGroup>\n"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/CoreConfigClashService.cs",
    "chars": 7673,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\n/// <summary>\n/// Core configuration file processing class\n/// </summary>\npub"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/Singbox/CoreConfigSingboxService.cs",
    "chars": 9811,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigSingboxService(CoreConfigContext context)\n{\n  "
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxConfigTemplateService.cs",
    "chars": 2353,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigSingboxService\n{\n    private string ApplyFullC"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs",
    "chars": 19261,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigSingboxService\n{\n    private void GenDns()\n   "
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxInboundService.cs",
    "chars": 3529,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigSingboxService\n{\n    private void GenInbounds("
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxLogService.cs",
    "chars": 1039,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigSingboxService\n{\n    private void GenLog()\n   "
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs",
    "chars": 29358,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigSingboxService\n{\n    private void GenOutbounds"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxRoutingService.cs",
    "chars": 16159,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigSingboxService\n{\n    private void GenRouting()"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxRulesetService.cs",
    "chars": 4461,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigSingboxService\n{\n    private void ConvertGeo2R"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxStatisticService.cs",
    "chars": 862,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigSingboxService\n{\n    private void GenExperimen"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/V2ray/CoreConfigV2rayService.cs",
    "chars": 12720,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigV2rayService(CoreConfigContext context)\n{\n    "
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayBalancerService.cs",
    "chars": 4134,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigV2rayService\n{\n    private void GenObservatory"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayConfigTemplateService.cs",
    "chars": 5438,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigV2rayService\n{\n    private string ApplyFullCon"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayDnsService.cs",
    "chars": 17188,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigV2rayService\n{\n    private void GenDns()\n    {"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs",
    "chars": 2432,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigV2rayService\n{\n    private void GenInbounds()\n"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayLogService.cs",
    "chars": 843,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigV2rayService\n{\n    private void GenLog()\n    {"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs",
    "chars": 33233,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigV2rayService\n{\n    private void GenOutbounds()"
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayRoutingService.cs",
    "chars": 6799,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigV2rayService\n{\n    private void GenRouting()\n "
  },
  {
    "path": "v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayStatisticService.cs",
    "chars": 1786,
    "preview": "namespace ServiceLib.Services.CoreConfig;\n\npublic partial class CoreConfigV2rayService\n{\n    private void GenStatistic()"
  },
  {
    "path": "v2rayN/ServiceLib/Services/DownloadService.cs",
    "chars": 7114,
    "preview": "using System.Net.Http.Headers;\n\nnamespace ServiceLib.Services;\n\n/// <summary>\n///Download\n/// </summary>\npublic class Do"
  },
  {
    "path": "v2rayN/ServiceLib/Services/ProcessService.cs",
    "chars": 4316,
    "preview": "namespace ServiceLib.Services;\n\npublic class ProcessService : IDisposable\n{\n    private readonly Process _process;\n    p"
  },
  {
    "path": "v2rayN/ServiceLib/Services/SpeedtestService.cs",
    "chars": 13161,
    "preview": "namespace ServiceLib.Services;\n\npublic class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateFunc)\n{\n "
  },
  {
    "path": "v2rayN/ServiceLib/Services/Statistics/StatisticsSingboxService.cs",
    "chars": 3508,
    "preview": "using System.Net.WebSockets;\n\nnamespace ServiceLib.Services.Statistics;\n\npublic class StatisticsSingboxService\n{\n    pri"
  }
]

// ... and 157 more files (download for full content)

About this extraction

This page contains the full source code of the 2dust/v2rayN GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 357 files (2.7 MB), approximately 727.7k tokens, and a symbol index with 1623 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!