A simple SwiftUI macOS application designed for network testing and VPN split tunneling validation. ShaNet provides three identical application bundles (BarApp, FooApp, WaldoApp) with different bundle IDs to test split tunneling scenarios.
ShaNet was created to test VPN split tunneling capabilities, allowing developers and network administrators to:
- Validate VPN Routing: Test which traffic goes through VPN vs. direct connection
- IP Location Testing: Verify geolocation and IP address changes across different network paths
- Download Performance: Measure download speeds under various network conditions
The project contains three separate application targets with identical functionality but different bundle IDs:
- Identical Features: All three apps have the same functionality
- Different Bundle IDs: Each app has a unique bundle identifier
- Purpose: Test VPN split tunneling with different app identifiers
- Use Case: Configure VPN to route traffic differently based on bundle ID
- TCP/IP Testing: HTTP requests, image loading, file downloads
- UDP Testing: STUN protocol for public IP detection
- Custom UDP: Direct communication with custom servers
- Real-time IP Detection: Get current public IP address
- Geolocation Data: Country, city, ISP information
- Download Speed Measurement: Real-time bandwidth testing
- Concurrent Downloads: Test multiple simultaneous file transfers
- macOS 12.0 or later
- Xcode 14.0 or later
- Network connectivity for testing
-
Clone the repository:
git clone <repository-url> cd ShaNet
-
Open in Xcode:
open ShaNet.xcodeproj
-
Select your target:
- Choose BarApp, FooApp, or WaldoApp (all identical)
- Each has a different bundle ID for split tunneling testing
-
Build and run:
- Press
Cmd+Ror click the Run button - The app will launch and display network information
- Press
If you downloaded the apps from a GitHub release and see a security warning:
Option 1: System Preferences → Security & Privacy → "Allow Anyway"
Option 2: Terminal: sudo xattr -rd com.apple.quarantine /path/to/AppName.app
The app uses various public URLs for testing. You can modify most of these in ShaNet/URLs.swift:
// IP Location Services
static let ipLocationAPI = "https://ipapi.co/json/"
// Download Testing
static let randomImageAPI = "https://picsum.photos/200"
static let largeFileDownload = "https://downloads.raspberrypi.com/..."
// UDP Testing
static let stunServer = "stun.l.google.com"The custom UDP server address and port can be configured directly in the app's UI and will be saved between sessions.
The app requires network permissions configured in ShaNet.entitlements:
- Outbound network connections
- UDP/TCP protocol access
- Baseline Test: Run app without VPN to establish baseline metrics
- VPN Test: Connect to VPN and run same tests
- Split Tunnel Test: Configure VPN to exclude specific bundle IDs
- Compare Results: Analyze IP changes and download speed differences
- Direct Connection: Test download speeds on direct internet
- VPN Connection: Test speeds through VPN tunnel
- Concurrent Testing: Run multiple apps simultaneously
- Performance Comparison: Compare download speeds and bandwidth
- IP Location Check: Verify current public IP and location
- VPN IP Check: Confirm IP changes when VPN is active
- Split Tunnel IP: Test IP routing with split tunneling enabled
Contributions are welcome! Feel free to submit issues and pull requests.
This project is open source.
Disclaimer: The public URLs found in this project are gathered from the internet for testing purposes. Users are responsible for the results and fair usage of these services.