Last Updated 2025-03-22
Install dependencies.
| <Application xmlns="https://github.com/avaloniaui" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:local="using:AvaloniaTest" | |
| xmlns:v="using:AvaloniaTest.Views" | |
| x:Class="AvaloniaTest.App"> | |
| <Application.DataTemplates> | |
| <local:ViewLocator/> | |
| </Application.DataTemplates> | |
| <Application.Styles> |
| // Check http://pinvoke.net/default.aspx/advapi32/LogonUser.html for Win32 functions and structures. | |
| // Code based on answer on SO: https://stackoverflow.com/a/11672293/315151 | |
| // Impersonates as a user like "runas /netonly" feature. | |
| public static void Impersonate(string userName, string password, string domain, Action action) | |
| { | |
| if (action == null) | |
| { | |
| return; |
| # source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
| # A list of available STUN server. | |
| stun.l.google.com:19302 | |
| stun1.l.google.com:19302 | |
| stun2.l.google.com:19302 | |
| stun3.l.google.com:19302 | |
| stun4.l.google.com:19302 | |
| stun01.sipphone.com | |
| stun.ekiga.net |