Class VpnServiceFolders
- Namespace
- VpnHood.Core.Client.VpnServices.Abstractions
- Assembly
- VpnHood.Core.Client.VpnServices.Abstractions.dll
Provides the VPN service's two folders (IDevice): the config folder, on this device only, and the data
folder, which travels with a backup and holds only the person's proxies.
public static class VpnServiceFolders
- Inheritance
-
VpnServiceFolders
- Inherited Members
Remarks
On a desktop, where nothing backs up the app's data, the two are one folder.
Methods
GetProxyStoreFilePath(string)
Gets the path of the store of the proxies the app and the VPN service share, in the data folder, so they travel.
public static string GetProxyStoreFilePath(string dataFolder)
Parameters
dataFolderstringThe data folder.
Returns
- string
The store's path:
proxies/proxies.dbunderdataFolder.
MigrateServiceFiles(string, string)
Moves the VPN service's own files, all but the proxies, from the data folder, where it kept them, to the config folder, once.
[Obsolete("Migration (2026-10): drop a few months after it ships, with its calls in VpnServiceManager and VpnServiceHost and VpnServiceFoldersTest.")]
public static void MigrateServiceFiles(string dataFolder, string configFolder)
Parameters
dataFolderstringThe data folder, which travels with a backup.
configFolderstringThe config folder, on this device only.
Remarks
Either process may come here first — always-on starts the service before the app — so both call it. A file the config folder has already is deleted rather than moved, and one that cannot go is logged and left.