kext: fast-track split-tunnel proxy packets on loopback

Add PM_SPLIT_TUN_PORT (719) to fast_track_pm_packets so that redirected
packets arriving at the local split-tunnel proxy are permitted immediately
by the kext, matching the existing behaviour for the SPN port (717) and
the DNS port (53). This prevents internal proxy connections from being
reported to Portmaster and appearing in the connection monitor UI.

Also simplify fast_track_pm_packets by removing the redundant
match-on-direction branches, which were identical for Outbound and
Inbound.

Bump kext interface patch version to 2.1.1.0.
This commit is contained in:
Alexandr Stelnykovych
2026-05-07 13:46:16 +03:00
parent 485b19f241
commit 0fd3665ac0
2 changed files with 5 additions and 14 deletions
+4 -13
View File
@@ -7,7 +7,7 @@ use wdk::filter_engine::packet::InjectInfo;
use crate::connection::{
Connection, ConnectionV4, ConnectionV6, Direction, RedirectInfo, Verdict, PM_DNS_PORT,
PM_SPN_PORT,
PM_SPN_PORT, PM_SPLIT_TUN_PORT,
};
use crate::connection_cache::ConnectionCache;
use crate::connection_map::Key;
@@ -88,18 +88,9 @@ impl ConnectionInfo {
}
}
fn fast_track_pm_packets(key: &Key, direction: Direction) -> bool {
match direction {
Direction::Outbound => {
if key.local_port == PM_DNS_PORT || key.local_port == PM_SPN_PORT {
return key.local_address == key.remote_address;
}
}
Direction::Inbound => {
if key.local_port == PM_DNS_PORT || key.local_port == PM_SPN_PORT {
return key.local_address == key.remote_address;
}
}
fn fast_track_pm_packets(key: &Key, _: Direction) -> bool {
if key.local_port == PM_DNS_PORT || key.local_port == PM_SPN_PORT || key.local_port == PM_SPLIT_TUN_PORT {
return key.local_address == key.remote_address;
}
return false;
+1 -1
View File
@@ -1 +1 @@
[2, 1, 0, 0]
[2, 1, 1, 0]