diff options
| author | David Lönnhager <david.l@mullvad.net> | 2024-04-23 13:30:52 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2024-04-23 15:25:05 +0200 |
| commit | d63e491cacd6836954dbc2ecb6497037ae4077d9 (patch) | |
| tree | c8ca8900a6a89111dc10871d243c710340d9e571 | |
| parent | 7f0fd241d1b3817bc7378f0fcce49490756b8b09 (diff) | |
| download | mullvadvpn-d63e491cacd6836954dbc2ecb6497037ae4077d9.tar.xz mullvadvpn-d63e491cacd6836954dbc2ecb6497037ae4077d9.zip | |
Add TODO comment about removing symlink monitor
| -rw-r--r-- | talpid-core/src/split_tunnel/windows/path_monitor.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/talpid-core/src/split_tunnel/windows/path_monitor.rs b/talpid-core/src/split_tunnel/windows/path_monitor.rs index 8843909fd8..5dfff9dfb9 100644 --- a/talpid-core/src/split_tunnel/windows/path_monitor.rs +++ b/talpid-core/src/split_tunnel/windows/path_monitor.rs @@ -1,3 +1,20 @@ +//! This module detects changes to paths that are symlinks, resolves them and updates paths used by +//! the split tunnel driver accordingly. + +// TODO: Consider whether this code can be removed if paths are handled differently in the driver. +// The driver takes currently paths to the actual files on actual volumes (such as +// \Device\HarddiskVolume1\test.exe), not symlinks or DOS paths (such as C:\test.exe). If it +// instead accepted DOS paths and resolved them to NT/real paths when handling process +// arrivals/departures, then perhaps symlinks could be resolved when processes started, so any +// changes to symlinks would immediately be reflected (in new processes) without any config +// update. +// This would still have the limitation that changes to symlinks would not be detected without +// any monitoring. Assume that C:\a.exe is a symlink that points to +// \Device\HarddiskVolume1\test.exe. If C:\a.exe were deleted or replaced with a symlink pointing +// to \Device\HarddiskVolume2\lol.exe instead, then those old processes whose image is +// \Device\HarddiskVolume1\test.exe would still be excluded from the tunnel. This might be an +// acceptable limitation. + use std::{ collections::HashSet, ffi::{OsStr, OsString}, |
