VPN Functionality
How the PRIV mobile VPN works, data collected while connected, privacy protections, and earnings calculation.
VPN Functionality
The PRIV mobile app includes a full-featured VPN built on the WireGuard protocol. Learn how it protects your privacy while enabling you to earn.
How the VPN Works
WireGuard Protocol
PRIV uses the WireGuard VPN protocol, known for:
- Speed - Minimal overhead, fast connections
- Security - Modern cryptography (ChaCha20, Curve25519)
- Simplicity - ~4,000 lines of code vs 100,000+ for OpenVPN
- Audited - Formally verified cryptographic implementations
Connection Flow
1. App generates WireGuard key pair (on first use)
2. Public key sent to PRIV server
3. Server returns configuration (endpoint, allowed IPs)
4. Native VPN module establishes tunnel
5. All traffic routed through encrypted tunnel
6. Session tracking begins for earningsTechnical Details
interface VpnConfig {
// Client private key (generated locally, never leaves device)
privateKey: string
// Client IP assigned by server
address: string
// DNS servers (PRIV-operated, no logging)
dns: string
// Server's public key
peerPublicKey: string
// Server endpoint (host:port)
peerEndpoint: string
// Traffic routing (0.0.0.0/0 for full tunnel)
allowedIPs: string
// Keep connection alive
persistentKeepalive: 25
}Server Network
Global Coverage
PRIV operates VPN servers in multiple regions:
| Region | Locations | Features |
|---|---|---|
| North America | US (East, West, Central), Canada | Low latency |
| Europe | UK, Germany, Netherlands, France | GDPR compliant |
| Asia Pacific | Japan, Singapore, Australia | Regional content |
| South America | Brazil | Emerging market |
Server Selection
Automatic Mode (Default)
The app automatically selects the best server based on:
- Ping latency to each server
- Current server load
- Your geographic location
Manual Mode
Select a specific server when you need:
- Access to region-specific content
- Consistent IP address
- Lower load servers
Server Information
Each server displays:
interface ServerInfo {
id: string // Unique identifier
name: string // Display name
country: string // ISO country code
city: string // City location
load: number // Current load (0-100%)
latency: number // Measured ping (ms)
features: string[] // ['streaming', 'p2p', etc.]
isPremium: boolean // Premium tier only
isAvailable: boolean
}Data Collected While Connected
What We Collect
When you use the PRIV VPN, we collect minimal metadata for:
- Earnings calculation
- Service quality monitoring
- Aggregate analytics (anonymized)
| Data | Purpose | Retained |
|---|---|---|
| Session duration | Earnings calculation | 90 days |
| Bytes transferred | Earnings calculation | 90 days |
| Server used | Load balancing | 30 days |
| Connection times | Service quality | 30 days |
| Error events | Debugging | 7 days |
What We Never Collect
The VPN is designed with privacy first. We structurally cannot access your traffic.
We do NOT collect:
- Browsing history or URLs visited
- DNS queries
- Traffic content or payloads
- IP addresses of sites you visit
- Personal communications
- Login credentials
- Financial transactions
Zero-Knowledge Architecture
Our servers are configured to:
- Not log traffic data
- Not store connection logs beyond session
- Not correlate users to destinations
- Not share data with third parties
Privacy Protections
Encryption
All traffic is encrypted with:
- ChaCha20 - Stream cipher for data
- Poly1305 - Message authentication
- Curve25519 - Key exchange
- BLAKE2s - Hashing
This is the same encryption used by leading security tools and recommended by cryptographers.
DNS Privacy
When connected, DNS queries go through:
- PRIV-operated DNS servers
- Encrypted DNS (DoH/DoT)
- No query logging
This prevents:
- ISP DNS snooping
- DNS-based tracking
- DNS hijacking attacks
IP Protection
Your real IP address is:
- Hidden from websites you visit
- Not logged on our servers
- Replaced with shared VPN exit IP
Leak Protection
The app includes:
- IPv6 leak protection - Blocks IPv6 to prevent leaks
- DNS leak protection - Forces DNS through tunnel
- WebRTC protection - Prevents WebRTC IP leaks (browser)
Starting and Stopping Sessions
Connecting
- Open the VPN tab
- Tap the large shield button
- Approve VPN permission (first time only)
- Wait for "Connected" status
- Session tracking begins automatically
Connection States
type ConnectionStatus =
| 'disconnected' // Not connected
| 'connecting' // Establishing tunnel
| 'connected' // Fully protected
| 'disconnecting' // Closing tunnel
| 'error' // Connection failedVisual feedback:
- Gray shield - Disconnected
- Yellow pulse - Connecting
- Green glow - Connected
- Red alert - Error
Disconnecting
- Tap the shield button while connected
- Connection closes gracefully
- Final session data recorded
- Earnings credited to your account
Background Behavior
When the app is backgrounded:
- VPN remains connected
- Session continues earning
- Notifications show connection status
- iOS may disconnect after extended background time
On iOS, if you force-quit the app, the VPN will disconnect. Use the disconnect button instead.
Earnings Calculation
How VPN Earnings Work
You earn PRIV tokens based on:
Session Earnings = (Hours * Hourly Rate) + (MB * Data Rate)
* Regional Multiplier
* Peak Hours MultiplierCurrent Rates
| Component | Rate |
|---|---|
| Base hourly rate | ~0.05 PRIV/hour |
| Data transfer rate | ~0.001 PRIV/MB |
| Peak hours bonus | 1.5x (varies by region) |
| Underserved region bonus | Up to 2x |
Earnings Example
Session: 2 hours, 500 MB transferred, US East, peak hours
Base: 2 hours * 0.05 = 0.10 PRIV
Data: 500 MB * 0.001 = 0.50 PRIV
Subtotal: 0.60 PRIV
Peak: 0.60 * 1.5 = 0.90 PRIV
Session Earnings: 0.90 PRIVEarnings Limits
To ensure fair distribution:
- Daily cap: 10 PRIV per day per account
- Minimum session: 5 minutes to earn
- Maximum rate: Adjusted based on network demand
Real-Time Display
While connected, the app shows:
- Estimated current session earnings
- Progress toward hourly milestone
- Live updating balance
Session Management
Session Lifecycle
1. CONNECT
- Create session on server
- Get session ID
- Start local tracking
2. HEARTBEAT (every 60 seconds)
- Send bytes transferred
- Update session on server
- Receive earnings update
3. DISCONNECT
- Send final stats
- Session marked complete
- Earnings finalizedSession Data Structure
interface VpnSession {
sessionId: string // Unique identifier
startedAt: Date // Connection time
endedAt?: Date // Disconnection time
bytesTransferred: number
earnings: number // PRIV earned
serverId: string // Server used
status: 'active' | 'ended' | 'error'
deviceType: string // 'ios' | 'android'
}Handling Disconnections
If connection drops unexpectedly:
- App detects disconnection
- Session paused on server
- Auto-reconnect attempted (3 times)
- If reconnect fails, session ends
- Earnings for completed time credited
Troubleshooting
Connection Issues
"Connection Failed"
1. Check internet connectivity
2. Try a different server
3. Disable any other VPN apps
4. Restart the app
5. Check VPN permissions in settings"Server Unreachable"
1. Server may be under maintenance
2. Select a different server
3. Try the "Auto" server option
4. Check if your network blocks VPN ports"Authentication Failed"
1. Sign out and sign back in
2. Check your account status
3. Reinstall the app if persistsPerformance Issues
Slow Speeds
- Try a server closer to your location
- Check if server load is high
- Ensure you have good signal strength
- Some networks throttle VPN traffic
High Battery Usage
- Normal: VPN uses some battery
- If excessive, check for app updates
- Reduce keepalive frequency in settings
Session Not Recording
If earnings are not showing:
1. Ensure you're signed in
2. Check internet connectivity
3. Wait 5 minutes for sync
4. Pull to refresh earnings screen
5. Contact support if persistsBest Practices
Maximize Earnings
- Stay connected longer - Hourly rate compounds
- Connect during peak hours - Bonus multipliers
- Use data while connected - Data transfer bonuses
- Keep app updated - Latest earning rates
Maximize Security
- Always use VPN on public WiFi
- Enable auto-connect for untrusted networks
- Don't share your account credentials
- Keep your device OS updated
Battery Optimization
- Use WiFi when possible - Less battery than cellular
- Close unused apps - Reduce background data
- Choose nearby servers - Lower latency = less overhead
Next Steps
- Data Collection - Full data transparency
- Earnings Guide - Maximize and claim earnings
- Development Guide - Build and contribute