Skip to content

Commit f35efa3

Browse files
committed
fix: improve VPN detection diagnostic logging
1 parent 82306de commit f35efa3

6 files changed

Lines changed: 23 additions & 6 deletions

File tree

Casks/vpn-bypass.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Or if using local tap: brew install --cask --no-quarantine ./Casks/vpn-bypass.rb
44

55
cask "vpn-bypass" do
6-
version "1.6.6"
6+
version "1.6.7"
77
sha256 "37b127a55aec0bdb80e824e59e840ce5b529c09086aac7fc24dc4616abb817bd"
88

99
url "https://github.com/GeiserX/VPN-Bypass/releases/download/v#{version}/VPN-Bypass-#{version}.dmg"

Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>1.6.4</string>
2121
<key>CFBundleVersion</key>
22-
<string>15</string>
22+
<string>16</string>
2323
<key>LSMinimumSystemVersion</key>
2424
<string>13.0</string>
2525
<key>LSUIElement</key>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<p align="center">
1212
<img src="https://img.shields.io/badge/macOS-13%2B-blue" alt="macOS 13+">
1313
<img src="https://img.shields.io/badge/Swift-5.9-orange" alt="Swift 5.9">
14-
<a href="https://github.com/GeiserX/vpn-macos-bypass/releases"><img src="https://img.shields.io/badge/version-1.6.6-green" alt="Version"></a>
14+
<a href="https://github.com/GeiserX/vpn-macos-bypass/releases"><img src="https://img.shields.io/badge/version-1.6.7-green" alt="Version"></a>
1515
</p>
1616

1717
## Why?

Sources/RouteManager.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ final class RouteManager: ObservableObject {
653653
private func detectVPNViaIfconfig(hintType: VPNType?) async -> (connected: Bool, interface: String?, type: VPNType?) {
654654
guard let result = await runProcessAsync("/sbin/ifconfig", timeout: 5.0) else {
655655
// Command failed/timed out - don't change VPN status (return current state)
656+
await MainActor.run { log(.warning, "ifconfig command failed/timed out") }
656657
return (isVPNConnected, vpnInterface, vpnType)
657658
}
658659

@@ -662,6 +663,7 @@ final class RouteManager: ObservableObject {
662663
var currentInterface: String?
663664
var hasValidIP = false
664665
var hasUpFlag = false
666+
var debugInfo: [(iface: String, ip: String?, isVPN: Bool, validIP: Bool)] = []
665667

666668
for line in output.components(separatedBy: "\n") {
667669
// New interface starts with interface name (no leading whitespace)
@@ -687,7 +689,11 @@ final class RouteManager: ObservableObject {
687689
let parts = trimmed.components(separatedBy: " ")
688690
if parts.count >= 2 {
689691
let ip = parts[1]
690-
if await isCorporateVPNIP(ip) {
692+
let isValidCorporateIP = await isCorporateVPNIP(ip)
693+
if let iface = currentInterface {
694+
debugInfo.append((iface: iface, ip: ip, isVPN: isVPNInterface(iface), validIP: isValidCorporateIP))
695+
}
696+
if isValidCorporateIP {
691697
hasValidIP = true
692698
}
693699
}
@@ -702,6 +708,12 @@ final class RouteManager: ObservableObject {
702708
return (true, iface, vpnType)
703709
}
704710

711+
// Debug: log what we found
712+
if !debugInfo.isEmpty {
713+
let summary = debugInfo.map { "\($0.iface):\($0.ip ?? "?") vpn=\($0.isVPN) valid=\($0.validIP)" }.joined(separator: ", ")
714+
await MainActor.run { log(.info, "VPN scan: \(summary)") }
715+
}
716+
705717
return (false, nil, nil)
706718
}
707719

Sources/SettingsView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ struct GeneralTab: View {
12631263
HStack {
12641264
VStack(alignment: .leading, spacing: 2) {
12651265
BrandedAppName(fontSize: 13)
1266-
Text("Version 1.6.6")
1266+
Text("Version 1.6.7")
12671267
.font(.system(size: 11))
12681268
.foregroundColor(Color(hex: "6B7280"))
12691269
}
@@ -1721,7 +1721,7 @@ struct InfoTab: View {
17211721
// App name with branded colors
17221722
BrandedAppName(fontSize: 24)
17231723

1724-
Text("v1.6.6")
1724+
Text("v1.6.7")
17251725
.font(.system(size: 12, design: .monospaced))
17261726
.foregroundColor(Color(hex: "6B7280"))
17271727

docs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to VPN Bypass will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.6.7] - 2026-01-26
9+
10+
### Fixed
11+
- **Improved VPN Detection Logging** - Better diagnostic logging when VPN detection fails
12+
813
## [1.6.6] - 2026-01-23
914

1015
### Changed

0 commit comments

Comments
 (0)