├── .idea
└── .idea.Coder.Desktop
│ └── .idea
│ ├── .name
│ ├── codeStyles
│ ├── codeStyleConfig.xml
│ └── Project.xml
│ ├── vcs.xml
│ ├── indexLayout.xml
│ └── projectSettingsUpdater.xml
├── Tests.Vpn.Service
├── testdata
│ ├── .gitignore
│ ├── hello.exe
│ ├── coder-ev.crt
│ ├── google-llc-ev.crt
│ ├── hello-self-signed.exe
│ ├── mozilla-corporation.crt
│ ├── hello-invalid-version.exe
│ ├── hello-versioned-signed.exe
│ ├── self-signed.crt
│ ├── gen-certs.sh
│ ├── winres.json
│ ├── README.md
│ ├── self-signed-ev.crt
│ └── Build-Assets.ps1
├── TelemetryEnricherTest.cs
└── Tests.Vpn.Service.csproj
├── .gitattributes
├── App
├── coder.ico
├── Assets
│ ├── coder_icon_32_dark.ico
│ └── coder_icon_32_light.ico
├── Properties
│ ├── launchSettings.json
│ └── PublishProfiles
│ │ ├── win-x64.pubxml
│ │ ├── win-x86.pubxml
│ │ └── win-arm64.pubxml
├── Services
│ ├── DispatcherQueueManager.cs
│ ├── RdpConnector.cs
│ └── StartupManager.cs
├── Utils
│ ├── TitleBarIcon.cs
│ ├── ForegroundWindow.cs
│ └── DisplayScale.cs
├── Controls
│ ├── HorizontalRule.xaml.cs
│ ├── ExpandChevron.xaml.cs
│ ├── HorizontalRule.xaml
│ ├── ExpandChevron.xaml
│ ├── TrayIcon.xaml.cs
│ ├── ExpandContent.xaml.cs
│ ├── SizedFrame.cs
│ └── ExpandContent.xaml
├── Views
│ ├── Pages
│ │ ├── TrayWindowLoadingPage.xaml.cs
│ │ ├── SettingsMainPage.xaml.cs
│ │ ├── TrayWindowDisconnectedPage.xaml.cs
│ │ ├── TrayWindowLoginRequiredPage.xaml.cs
│ │ ├── UpdaterDownloadProgressMainPage.xaml.cs
│ │ ├── UpdaterUpdateAvailableMainPage.xaml.cs
│ │ ├── DirectoryPickerMainPage.xaml.cs
│ │ ├── FileSyncListMainPage.xaml.cs
│ │ ├── SignInUrlPage.xaml.cs
│ │ ├── TrayWindowLoadingPage.xaml
│ │ ├── SignInTokenPage.xaml.cs
│ │ ├── TrayWindowMainPage.xaml.cs
│ │ ├── TrayWindowLoginRequiredPage.xaml
│ │ ├── UpdaterDownloadProgressMainPage.xaml
│ │ ├── TrayWindowDisconnectedPage.xaml
│ │ ├── SignInUrlPage.xaml
│ │ └── SettingsMainPage.xaml
│ ├── SettingsWindow.xaml.cs
│ ├── SignInWindow.xaml
│ ├── FileSyncListWindow.xaml.cs
│ ├── SettingsWindow.xaml
│ ├── FileSyncListWindow.xaml
│ ├── DirectoryPickerWindow.xaml
│ ├── UpdaterDownloadProgressWindow.xaml
│ ├── UpdaterUpdateAvailableWindow.xaml
│ ├── UpdaterCheckingForUpdatesWindow.xaml.cs
│ ├── MessageWindow.xaml.cs
│ ├── TrayWindow.xaml
│ ├── UpdaterCheckingForUpdatesWindow.xaml
│ ├── MessageWindow.xaml
│ ├── SignInWindow.xaml.cs
│ ├── UpdaterDownloadProgressWindow.xaml.cs
│ └── UpdaterUpdateAvailableWindow.xaml.cs
├── Converters
│ ├── BoolToVisibilityConverter.cs
│ ├── InverseBoolToVisibilityConverter.cs
│ ├── InverseBoolConverter.cs
│ ├── BoolToObjectConverter.cs
│ ├── VpnLifecycleToBoolConverter.cs
│ └── FriendlyByteConverter.cs
├── App.xaml
├── app.manifest
├── ViewModels
│ ├── TrayWindowLoginRequiredViewModel.cs
│ ├── TrayWindowDisconnectedViewModel.cs
│ ├── SyncSessionViewModel.cs
│ └── SettingsViewModel.cs
└── Models
│ ├── CredentialModel.cs
│ ├── SyncSessionControllerStateModel.cs
│ └── Settings.cs
├── scripts
├── files
│ ├── .gitignore
│ ├── logo.png
│ ├── WixUIBannerBmp.bmp
│ ├── WixUIDialogBmp.bmp
│ ├── wintun-0.14.1-x64.dll
│ └── wintun-0.14.1-arm64.dll
├── Create-AppCastSigningKey.ps1
├── Release.ps1
└── Get-Mutagen.ps1
├── CoderSdk
├── packages.lock.json
├── CoderSdk.csproj
├── Coder
│ ├── Deployment.cs
│ ├── Users.cs
│ └── WorkspaceAgents.cs
├── Agent
│ ├── AgentApiClient.cs
│ └── ListDirectory.cs
└── JsonHttpClient.cs
├── Vpn.Service
├── coder.ico
├── Rebuild-Service.ps1
├── Stop-Service.ps1
├── Restart-Service.ps1
├── ManagerRpcService.cs
├── Delete-Service.ps1
├── ManagerConfig.cs
├── ManagerService.cs
├── Create-Service.ps1
├── TelemetryEnricher.cs
└── Vpn.Service.csproj
├── Vpn.Proto
├── packages.lock.json
├── Vpn.Proto.csproj
└── RpcHeader.cs
├── Vpn.DebugClient
├── Vpn.DebugClient.csproj
└── packages.lock.json
├── Vpn
├── Vpn.csproj
├── Utilities
│ ├── RaiiSemaphoreSlim.cs
│ ├── ServerVersionUtilities.cs
│ └── TaskUtilities.cs
├── RegistryConfigurationSource.cs
└── packages.lock.json
├── Installer
└── Installer.csproj
├── MutagenSdk
├── MutagenSdk.csproj
├── NamedPipesConnectionFactory.cs
├── packages.lock.json
└── Proto
│ ├── synchronization
│ ├── core
│ │ ├── problem.proto
│ │ ├── change.proto
│ │ ├── ignore
│ │ │ ├── syntax.proto
│ │ │ └── ignore_vcs_mode.proto
│ │ ├── permissions_mode.proto
│ │ ├── conflict.proto
│ │ └── symbolic_link_mode.proto
│ ├── version.proto
│ ├── scan_mode.proto
│ ├── hashing
│ │ └── algorithm.proto
│ ├── compression
│ │ └── algorithm.proto
│ ├── stage_mode.proto
│ ├── watch_mode.proto
│ └── rsync
│ │ └── receive.proto
│ ├── service
│ └── daemon
│ │ └── daemon.proto
│ ├── selection
│ └── selection.proto
│ └── filesystem
│ └── behavior
│ └── probe_mode.proto
├── Tests.App
├── Services
│ ├── RdpConnectorTest.cs
│ └── SettingsManagerTest.cs
├── Converters
│ └── FriendlyByteConverterTest.cs
└── Tests.App.csproj
├── Tests.Vpn.Proto
├── RpcMessageTest.cs
├── Tests.Vpn.Proto.csproj
└── RpcHeaderTest.cs
├── Tests.CoderSdk
└── Tests.CoderSdk.csproj
├── README.md
├── Tests.Vpn
├── Tests.Vpn.csproj
└── Utilities
│ └── ServerVersionUtilitiesTest.cs
└── .github
└── workflows
└── ci.yaml
/.idea/.idea.Coder.Desktop/.idea/.name:
--------------------------------------------------------------------------------
1 | Coder.Desktop
--------------------------------------------------------------------------------
/Tests.Vpn.Service/testdata/.gitignore:
--------------------------------------------------------------------------------
1 | *.go
2 | *.pfx
3 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | MutagenSdk/Proto/**/*.proto linguist-generated=true
2 |
--------------------------------------------------------------------------------
/App/coder.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/App/coder.ico
--------------------------------------------------------------------------------
/scripts/files/.gitignore:
--------------------------------------------------------------------------------
1 | mutagen-*.tar.gz
2 | mutagen-*.exe
3 | *.etag
4 | windows-app-sdk-*.exe
--------------------------------------------------------------------------------
/CoderSdk/packages.lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "dependencies": {
4 | "net8.0": {}
5 | }
6 | }
--------------------------------------------------------------------------------
/Vpn.Service/coder.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/Vpn.Service/coder.ico
--------------------------------------------------------------------------------
/scripts/files/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/scripts/files/logo.png
--------------------------------------------------------------------------------
/scripts/files/WixUIBannerBmp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/scripts/files/WixUIBannerBmp.bmp
--------------------------------------------------------------------------------
/scripts/files/WixUIDialogBmp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/scripts/files/WixUIDialogBmp.bmp
--------------------------------------------------------------------------------
/App/Assets/coder_icon_32_dark.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/App/Assets/coder_icon_32_dark.ico
--------------------------------------------------------------------------------
/App/Assets/coder_icon_32_light.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/App/Assets/coder_icon_32_light.ico
--------------------------------------------------------------------------------
/scripts/files/wintun-0.14.1-x64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/scripts/files/wintun-0.14.1-x64.dll
--------------------------------------------------------------------------------
/Tests.Vpn.Service/testdata/hello.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/Tests.Vpn.Service/testdata/hello.exe
--------------------------------------------------------------------------------
/scripts/files/wintun-0.14.1-arm64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/scripts/files/wintun-0.14.1-arm64.dll
--------------------------------------------------------------------------------
/Tests.Vpn.Service/testdata/coder-ev.crt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/Tests.Vpn.Service/testdata/coder-ev.crt
--------------------------------------------------------------------------------
/App/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "App (Unpackaged)": {
4 | "commandName": "Project"
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Tests.Vpn.Service/testdata/google-llc-ev.crt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/Tests.Vpn.Service/testdata/google-llc-ev.crt
--------------------------------------------------------------------------------
/Vpn.Service/Rebuild-Service.ps1:
--------------------------------------------------------------------------------
1 | & $PSScriptRoot/Stop-Service.ps1
2 | dotnet build -c Debug ./Vpn.Service.csproj
3 | & $PSScriptRoot/Restart-Service.ps1
4 |
--------------------------------------------------------------------------------
/Tests.Vpn.Service/testdata/hello-self-signed.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/Tests.Vpn.Service/testdata/hello-self-signed.exe
--------------------------------------------------------------------------------
/Tests.Vpn.Service/testdata/mozilla-corporation.crt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/Tests.Vpn.Service/testdata/mozilla-corporation.crt
--------------------------------------------------------------------------------
/Tests.Vpn.Service/testdata/hello-invalid-version.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/Tests.Vpn.Service/testdata/hello-invalid-version.exe
--------------------------------------------------------------------------------
/Tests.Vpn.Service/testdata/hello-versioned-signed.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder/coder-desktop-windows/HEAD/Tests.Vpn.Service/testdata/hello-versioned-signed.exe
--------------------------------------------------------------------------------
/.idea/.idea.Coder.Desktop/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/.idea.Coder.Desktop/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/App/Services/DispatcherQueueManager.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Dispatching;
2 |
3 | namespace Coder.Desktop.App.Services;
4 |
5 | public interface IDispatcherQueueManager
6 | {
7 | public void RunInUiThread(DispatcherQueueHandler action);
8 | }
9 |
--------------------------------------------------------------------------------
/.idea/.idea.Coder.Desktop/.idea/indexLayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/.idea.Coder.Desktop/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/App/Utils/TitleBarIcon.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 |
3 | namespace Coder.Desktop.App.Utils;
4 |
5 | public static class TitleBarIcon
6 | {
7 | public static void SetTitlebarIcon(Window window)
8 | {
9 | window.AppWindow.SetIcon("coder.ico");
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/App/Controls/HorizontalRule.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml.Controls;
2 |
3 | namespace Coder.Desktop.App.Controls;
4 |
5 | public sealed partial class HorizontalRule : UserControl
6 | {
7 | public HorizontalRule()
8 | {
9 | InitializeComponent();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/App/Views/Pages/TrayWindowLoadingPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml.Controls;
2 |
3 | namespace Coder.Desktop.App.Views.Pages;
4 |
5 | public sealed partial class TrayWindowLoadingPage : Page
6 | {
7 | public TrayWindowLoadingPage()
8 | {
9 | InitializeComponent();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Vpn.Service/Stop-Service.ps1:
--------------------------------------------------------------------------------
1 | $name = "Coder Desktop (Debug)"
2 |
3 | try {
4 | Stop-Service -Name $name -Force
5 | Write-Host "Service '$name' stopped successfully"
6 | } catch {
7 | Write-Host $_ -ForegroundColor Red
8 | Write-Host "Press Return to exit..."
9 | Read-Host
10 | }
11 |
--------------------------------------------------------------------------------
/App/Converters/BoolToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 |
3 | namespace Coder.Desktop.App.Converters;
4 |
5 | public partial class BoolToVisibilityConverter : BoolToObjectConverter
6 | {
7 | public BoolToVisibilityConverter()
8 | {
9 | TrueValue = Visibility.Visible;
10 | FalseValue = Visibility.Collapsed;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/.idea/.idea.Coder.Desktop/.idea/projectSettingsUpdater.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/App/Converters/InverseBoolToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 |
3 | namespace Coder.Desktop.App.Converters;
4 |
5 | public partial class InverseBoolToVisibilityConverter : BoolToObjectConverter
6 | {
7 | public InverseBoolToVisibilityConverter()
8 | {
9 | TrueValue = Visibility.Collapsed;
10 | FalseValue = Visibility.Visible;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/App/Views/Pages/SettingsMainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Coder.Desktop.App.ViewModels;
2 | using Microsoft.UI.Xaml.Controls;
3 |
4 | namespace Coder.Desktop.App.Views.Pages;
5 |
6 | public sealed partial class SettingsMainPage : Page
7 | {
8 | public SettingsViewModel ViewModel;
9 |
10 | public SettingsMainPage(SettingsViewModel viewModel)
11 | {
12 | ViewModel = viewModel;
13 | InitializeComponent();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Vpn.Service/Restart-Service.ps1:
--------------------------------------------------------------------------------
1 | $name = "Coder Desktop (Debug)"
2 |
3 | try {
4 | Restart-Service -Name $name -Force
5 | if ((Get-Service -Name $name -ErrorAction Stop).Status -ne "Running") {
6 | throw "Service '$name' is not running"
7 | }
8 | Write-Host "Service '$name' restarted successfully"
9 | } catch {
10 | Write-Host $_ -ForegroundColor Red
11 | Write-Host "Press Return to exit..."
12 | Read-Host
13 | }
14 |
--------------------------------------------------------------------------------
/CoderSdk/CoderSdk.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Coder.Desktop.CoderSdk
4 | Coder.Desktop.CoderSdk
5 | net8.0
6 | enable
7 | enable
8 | true
9 |
10 |
11 |
--------------------------------------------------------------------------------
/App/Views/Pages/TrayWindowDisconnectedPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Coder.Desktop.App.ViewModels;
2 | using Microsoft.UI.Xaml.Controls;
3 |
4 | namespace Coder.Desktop.App.Views.Pages;
5 |
6 | public sealed partial class TrayWindowDisconnectedPage : Page
7 | {
8 | public TrayWindowDisconnectedViewModel ViewModel { get; }
9 |
10 | public TrayWindowDisconnectedPage(TrayWindowDisconnectedViewModel viewModel)
11 | {
12 | InitializeComponent();
13 | ViewModel = viewModel;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/App/Views/Pages/TrayWindowLoginRequiredPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Coder.Desktop.App.ViewModels;
2 | using Microsoft.UI.Xaml.Controls;
3 |
4 | namespace Coder.Desktop.App.Views.Pages;
5 |
6 | public sealed partial class TrayWindowLoginRequiredPage : Page
7 | {
8 | public TrayWindowLoginRequiredViewModel ViewModel { get; }
9 |
10 | public TrayWindowLoginRequiredPage(TrayWindowLoginRequiredViewModel viewModel)
11 | {
12 | InitializeComponent();
13 | ViewModel = viewModel;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/App/Views/Pages/UpdaterDownloadProgressMainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml.Controls;
2 | using Coder.Desktop.App.ViewModels;
3 |
4 | namespace Coder.Desktop.App.Views.Pages;
5 |
6 | public sealed partial class UpdaterDownloadProgressMainPage : Page
7 | {
8 | public readonly UpdaterDownloadProgressViewModel ViewModel;
9 | public UpdaterDownloadProgressMainPage(UpdaterDownloadProgressViewModel viewModel)
10 | {
11 | ViewModel = viewModel;
12 | InitializeComponent();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/App/Views/Pages/UpdaterUpdateAvailableMainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml.Controls;
2 | using Coder.Desktop.App.ViewModels;
3 |
4 | namespace Coder.Desktop.App.Views.Pages;
5 |
6 | public sealed partial class UpdaterUpdateAvailableMainPage : Page
7 | {
8 | public readonly UpdaterUpdateAvailableViewModel ViewModel;
9 |
10 | public UpdaterUpdateAvailableMainPage(UpdaterUpdateAvailableViewModel viewModel)
11 | {
12 | ViewModel = viewModel;
13 | InitializeComponent();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/App/Converters/InverseBoolConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.UI.Xaml.Data;
3 |
4 | namespace Coder.Desktop.App.Converters;
5 |
6 | public class InverseBoolConverter : IValueConverter
7 | {
8 | public object Convert(object value, Type targetType, object parameter, string language)
9 | {
10 | return value is false;
11 | }
12 |
13 | public object ConvertBack(object value, Type targetType, object parameter, string language)
14 | {
15 | throw new NotImplementedException();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/CoderSdk/Coder/Deployment.cs:
--------------------------------------------------------------------------------
1 | namespace Coder.Desktop.CoderSdk.Coder;
2 |
3 | public partial interface ICoderApiClient
4 | {
5 | public Task GetBuildInfo(CancellationToken ct = default);
6 | }
7 |
8 | public class BuildInfo
9 | {
10 | public string Version { get; set; } = "";
11 | }
12 |
13 | public partial class CoderApiClient
14 | {
15 | public Task GetBuildInfo(CancellationToken ct = default)
16 | {
17 | return SendRequestNoBodyAsync(HttpMethod.Get, "/api/v2/buildinfo", ct);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/App/Properties/PublishProfiles/win-x64.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | FileSystem
8 | x64
9 | win-x64
10 | bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
11 |
12 |
13 |
--------------------------------------------------------------------------------
/App/Properties/PublishProfiles/win-x86.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | FileSystem
8 | x86
9 | win-x86
10 | bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
11 |
12 |
13 |
--------------------------------------------------------------------------------
/App/Properties/PublishProfiles/win-arm64.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | FileSystem
8 | ARM64
9 | win-arm64
10 | bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\
11 |
12 |
13 |
--------------------------------------------------------------------------------
/App/Controls/ExpandChevron.xaml.cs:
--------------------------------------------------------------------------------
1 | using DependencyPropertyGenerator;
2 | using Microsoft.UI.Xaml.Controls;
3 |
4 | namespace Coder.Desktop.App.Controls;
5 |
6 | [DependencyProperty("IsOpen", DefaultValue = false)]
7 | public sealed partial class ExpandChevron : UserControl
8 | {
9 | public ExpandChevron()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | partial void OnIsOpenChanged(bool oldValue, bool newValue)
15 | {
16 | var newState = newValue ? "NormalOn" : "NormalOff";
17 | AnimatedIcon.SetState(ChevronIcon, newState);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CoderSdk/Coder/Users.cs:
--------------------------------------------------------------------------------
1 | namespace Coder.Desktop.CoderSdk.Coder;
2 |
3 | public partial interface ICoderApiClient
4 | {
5 | public Task GetUser(string user, CancellationToken ct = default);
6 | }
7 |
8 | public class User
9 | {
10 | public const string Me = "me";
11 |
12 | public string Username { get; set; } = "";
13 | }
14 |
15 | public partial class CoderApiClient
16 | {
17 | public Task GetUser(string user, CancellationToken ct = default)
18 | {
19 | return SendRequestNoBodyAsync(HttpMethod.Get, $"/api/v2/users/{user}", ct);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Vpn.Proto/packages.lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "dependencies": {
4 | "net8.0": {
5 | "Google.Protobuf": {
6 | "type": "Direct",
7 | "requested": "[3.29.3, )",
8 | "resolved": "3.29.3",
9 | "contentHash": "t7nZFFUFwigCwZ+nIXHDLweXvwIpsOXi+P7J7smPT/QjI3EKxnCzTQOhBqyEh6XEzc/pNH+bCFOOSjatrPt6Tw=="
10 | },
11 | "Grpc.Tools": {
12 | "type": "Direct",
13 | "requested": "[2.69.0, )",
14 | "resolved": "2.69.0",
15 | "contentHash": "W5hW4R1h19FCzKb8ToqIJMI5YxnQqGmREEpV8E5XkfCtLPIK5MSHztwQ8gZUfG8qu9fg5MhItjzyPRqQBjnrbA=="
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/App/Controls/HorizontalRule.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/App/Utils/ForegroundWindow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using Microsoft.UI;
4 | using Microsoft.UI.Xaml;
5 | using WinRT.Interop;
6 |
7 | namespace Coder.Desktop.App.Utils;
8 |
9 | public static class ForegroundWindow
10 | {
11 |
12 | [DllImport("user32.dll")]
13 | private static extern bool SetForegroundWindow(IntPtr hwnd);
14 |
15 | public static void MakeForeground(Window window)
16 | {
17 | var hwnd = WindowNative.GetWindowHandle(window);
18 | var windowId = Win32Interop.GetWindowIdFromWindow(hwnd);
19 | _ = SetForegroundWindow(hwnd);
20 | // Not a big deal if it fails.
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/App/Views/SettingsWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Coder.Desktop.App.Utils;
2 | using Coder.Desktop.App.ViewModels;
3 | using Coder.Desktop.App.Views.Pages;
4 | using Microsoft.UI.Xaml.Media;
5 | using WinUIEx;
6 |
7 | namespace Coder.Desktop.App.Views;
8 |
9 | public sealed partial class SettingsWindow : WindowEx
10 | {
11 | public readonly SettingsViewModel ViewModel;
12 |
13 | public SettingsWindow(SettingsViewModel viewModel)
14 | {
15 | ViewModel = viewModel;
16 | InitializeComponent();
17 | TitleBarIcon.SetTitlebarIcon(this);
18 |
19 | RootFrame.Content = new SettingsMainPage(ViewModel);
20 |
21 | this.CenterOnScreen();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/App/Views/SignInWindow.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Vpn.DebugClient/Vpn.DebugClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Coder.Desktop.Vpn.DebugClient
5 | Coder.Desktop.Vpn.DebugClient
6 | Exe
7 | net8.0-windows
8 | enable
9 | enable
10 | true
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Vpn.Service/ManagerRpcService.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.Hosting;
2 |
3 | namespace Coder.Desktop.Vpn.Service;
4 |
5 | public class ManagerRpcService : BackgroundService
6 | {
7 | private readonly IManagerRpc _managerRpc;
8 |
9 | // ReSharper disable once ConvertToPrimaryConstructor
10 | public ManagerRpcService(IManagerRpc managerRpc)
11 | {
12 | _managerRpc = managerRpc;
13 | }
14 |
15 | public override async Task StopAsync(CancellationToken cancellationToken)
16 | {
17 | await _managerRpc.StopAsync(cancellationToken);
18 | }
19 |
20 | protected override async Task ExecuteAsync(CancellationToken stoppingToken)
21 | {
22 | await _managerRpc.ExecuteAsync(stoppingToken);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/App/Views/FileSyncListWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Coder.Desktop.App.Utils;
2 | using Coder.Desktop.App.ViewModels;
3 | using Coder.Desktop.App.Views.Pages;
4 | using Microsoft.UI.Xaml.Media;
5 | using WinUIEx;
6 |
7 | namespace Coder.Desktop.App.Views;
8 |
9 | public sealed partial class FileSyncListWindow : WindowEx
10 | {
11 | public readonly FileSyncListViewModel ViewModel;
12 |
13 | public FileSyncListWindow(FileSyncListViewModel viewModel)
14 | {
15 | ViewModel = viewModel;
16 | InitializeComponent();
17 | TitleBarIcon.SetTitlebarIcon(this);
18 |
19 | ViewModel.Initialize(this, DispatcherQueue);
20 | RootFrame.Content = new FileSyncListMainPage(ViewModel);
21 |
22 | this.CenterOnScreen();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/App/Views/SettingsWindow.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/App/Views/FileSyncListWindow.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Vpn.Service/Delete-Service.ps1:
--------------------------------------------------------------------------------
1 | # Elevate to administrator
2 | if (-not ([Security.Principal.WindowsPrincipal]([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
3 | Write-Host "Elevating script to run as administrator..."
4 | Start-Process powershell.exe -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$($MyInvocation.MyCommand.Path)`"" -Verb RunAs
5 | exit
6 | }
7 |
8 | $name = "Coder Desktop (Debug)"
9 |
10 | try {
11 | Stop-Service -Name $name -Force -ErrorAction SilentlyContinue
12 | sc.exe delete $name
13 | Write-Host "Service '$name' deleted"
14 | } catch {
15 | Write-Host $_ -ForegroundColor Red
16 | Write-Host "Press Return to exit..."
17 | Read-Host
18 | }
19 |
--------------------------------------------------------------------------------
/App/Views/DirectoryPickerWindow.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/App/Converters/BoolToObjectConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using DependencyPropertyGenerator;
3 | using Microsoft.UI.Xaml;
4 | using Microsoft.UI.Xaml.Data;
5 |
6 | namespace Coder.Desktop.App.Converters;
7 |
8 | [DependencyProperty