Add custom outbound support (#9817)

* Add custom outbound support

* Add test

* Add inner fmt support

* Full config to outbounds

* Rename to `Outbound`

* AI optimized

* Fix

* Add bind interface placeholder

---------

Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com>
This commit is contained in:
DHR60
2026-08-05 06:25:16 +00:00
committed by GitHub
parent ccf18ba0fb
commit eff584597f
43 changed files with 1364 additions and 367 deletions

View File

@@ -33,6 +33,7 @@ public partial class MainWindowViewModel : MyReactiveObject
public ReactiveCommand<RxVoid, RxVoid> AddAnytlsServerCmd { get; }
public ReactiveCommand<RxVoid, RxVoid> AddNaiveServerCmd { get; }
public ReactiveCommand<RxVoid, RxVoid> AddCustomServerCmd { get; }
public ReactiveCommand<RxVoid, RxVoid> AddCustomOutboundServerCmd { get; }
public ReactiveCommand<RxVoid, RxVoid> AddPolicyGroupServerCmd { get; }
public ReactiveCommand<RxVoid, RxVoid> AddProxyChainServerCmd { get; }
public ReactiveCommand<RxVoid, RxVoid> AddServerViaClipboardCmd { get; }
@@ -145,6 +146,10 @@ public partial class MainWindowViewModel : MyReactiveObject
{
await AddServerAsync(EConfigType.Custom);
});
AddCustomOutboundServerCmd = ReactiveCommand.CreateFromTask(async () =>
{
await AddServerAsync(EConfigType.Outbound);
});
AddPolicyGroupServerCmd = ReactiveCommand.CreateFromTask(async () =>
{
await AddServerAsync(EConfigType.PolicyGroup);
@@ -432,7 +437,7 @@ public partial class MainWindowViewModel : MyReactiveObject
};
bool? ret = false;
if (eConfigType == EConfigType.Custom)
if (eConfigType is EConfigType.Custom or EConfigType.Outbound)
{
var addServer2ViewModel = new AddServer2ViewModel(item);
ret = await AppManager.Instance.WindowDialog.ShowDialogAsync(addServer2ViewModel);