diff --git a/v2rayN/v2rayN.Desktop/App.axaml.cs b/v2rayN/v2rayN.Desktop/App.axaml.cs
index 5619e7e0..fcebaf66 100644
--- a/v2rayN/v2rayN.Desktop/App.axaml.cs
+++ b/v2rayN/v2rayN.Desktop/App.axaml.cs
@@ -15,6 +15,9 @@ public partial class App : Application
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
+
+ AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
+ TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
}
public override void OnFrameworkInitializationCompleted()
@@ -71,6 +74,19 @@ public partial class App : Application
}
}
+ private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
+ {
+ if (e.ExceptionObject != null)
+ {
+ Logging.SaveLog("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject!);
+ }
+ }
+
+ private void TaskScheduler_UnobservedTaskException(object? sender, UnobservedTaskExceptionEventArgs e)
+ {
+ Logging.SaveLog("TaskScheduler_UnobservedTaskException", e.Exception);
+ }
+
private void OnExit(object? sender, ControlledApplicationLifetimeExitEventArgs e)
{
}
diff --git a/v2rayN/v2rayN.Desktop/Views/SubEditWindow.axaml b/v2rayN/v2rayN.Desktop/Views/SubEditWindow.axaml
index 9c8ce129..a8a05b1b 100644
--- a/v2rayN/v2rayN.Desktop/Views/SubEditWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/SubEditWindow.axaml
@@ -49,6 +49,7 @@
+
@@ -213,13 +214,30 @@
+
+
+
vm.SelectedSource.convertTarget, v => v.cmbConvertTarget.SelectedValue).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SelectedSource.prevProfile, v => v.txtPrevProfile.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SelectedSource.nextProfile, v => v.txtNextProfile.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.SelectedSource.preSocksPort, v => v.txtPreSocksPort.Text).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
});
diff --git a/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj b/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj
index b0fc246c..c5496803 100644
--- a/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj
+++ b/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj
@@ -4,6 +4,7 @@
net8.0
enable
enable
+ v2rayN.ico
true
true
6.55
@@ -35,5 +36,11 @@
+
+
+ Never
+
+
+
diff --git a/v2rayN/v2rayN.Desktop/v2rayN.ico b/v2rayN/v2rayN.Desktop/v2rayN.ico
new file mode 100644
index 00000000..a978e0a8
Binary files /dev/null and b/v2rayN/v2rayN.Desktop/v2rayN.ico differ