Private Internet Access - PIA VPN for iOS

Overview

PIA logo

Private Internet Access

Private Internet Access is the world's leading consumer VPN service. At Private Internet Access we believe in unfettered access for all, and as a firm supporter of the open source ecosystem we have made the decision to open source our VPN clients. For more information about the PIA service, please visit our website privateinternetaccess.com or check out the Wiki.

PIA VPN for iOS

With the Private Internet Access VPN app for iOS, you can access our network of VPN servers across the world from your iPhone, iPad or iPod touch (64-bit only). Choose among many available countries and connect to them easily. Features include kill switch, multiple VPN protocols, DNS/IPv6 leak protection and Safari Content Blocker for ad-blocking while browsing with Safari.

Getting started

The PIA VPN app features:

  • Plenty of countries to connect to (28 as of today)
  • IKEv2, OpenVPN and WireGuard VPN Protocols
  • Kill switch
  • Multiple VPN protocols
  • Fine-grained VPN settings
  • DNS leak protection
  • IPv6 leak protection
  • Safari Content Blocker
  • Dark theme
  • Hotspot Helper

Installation

Requirements

  • iOS 11.0+ / macOS 10.11+
  • Xcode 9+ (Swift 4)
  • Git (preinstalled with Xcode Command Line Tools)
  • Ruby (preinstalled with macOS)
  • CocoaPods 1.5.0
  • SwiftGen

It's highly recommended to use the Git and Ruby packages provided by Homebrew.

Testing

Download the app codebase locally:

$ git clone https://github.com/pia-foss/vpn-ios.git

Assuming you have a working CocoaPods environment, setting up the app workspace only requires installing the pod dependencies:

$ pod install

After that, open PIA VPN.xcworkspace in Xcode and run the PIA VPN target.

For the VPN to work properly, the app requires:

  • App Groups and Keychain Sharing capabilities
  • App IDs with Packet Tunnel entitlements

both in the main app and the tunnel extension target.

Hotspot Helper API

We use a special entitlement to participate in the process of joining Wi-Fi/hotspot networks (https://developer.apple.com/documentation/networkextension/nehotspothelper)

You need to request this entitlement to Apple or remove the call to configureHotspotHelper() in AppDelegate.swift and adapt the entitlements file to your needs.

Contributing

By contributing to this project you are agreeing to the terms stated in the Contributor License Agreement (CLA) here.

For more details please see CONTRIBUTING.

Issues and Pull Requests should use these templates: ISSUE and PULL REQUEST.

Authors

  • Jose Blaya - ueshiba
  • Davide De Rosa
  • Amir Malik (before 2016)

License

This project is licensed under the MIT (Expat) license, which can be found here.

Acknowledgements

© 2002-2018 OpenVPN Inc. - OpenVPN is a registered trademark of OpenVPN Inc.

Comments
  • Pod install error OpenSSL-Apple

    Pod install error OpenSSL-Apple

    Summary

    Steps to reproduce

    (Please provide detail steps). cd repo pod install

    What is the current bug behaviour?

    (What actually happens). [!] Error installing OpenSSL-Apple [!] /usr/bin/git clone https://github.com/keeshux/OpenSSL-Apple /var/folders/sr/_bc9hcvx6211v60tyvtjcg_80000gp/T/d20190721-57906-1m78xko --template= --single-branch --depth 1 --branch 1.0

    Cloning into '/var/folders/sr/_bc9hcvx6211v60tyvtjcg_80000gp/T/d20190721-57906-1m78xko'... warning: Could not find remote branch 1.0 to clone. fatal: Remote branch 1.0 not found in upstream origin

    pod repo update not solve the problem

    What is the expected correct behaviour?

    (What you should see instead). pod install success

    Relevant logs and/or screenshots

    Possible fixes suggested re-mediation

    change branch?

    Assignees and labels

    ( please add labels as applicable )

    • [ ] Patched
    • [ ] Verified patch
    opened by DonsWayo 20
  • Build errors:

    Build errors: "Server has no member 'dipToken'"

    Summary

    Steps to reproduce

    • clone the vpn-ios repo
    • update Podfile to stop pointing to local paths (here is the Podfile I used)
    • pod install
    • open 'PIA VPN.xcworkspace' -> Product -> Build
    • it fails initially because of some outstanding pod integration issues; the following is a workaround
    • pod install
    • open 'PIA VPN.xcworkspace' -> Product -> Build

    What is the current bug behaviour?

    Results in build errors, mostly about Server not having dipToken member.

    What is the expected correct behaviour?

    Build succeeds.

    Relevant logs and/or screenshots

    Screen Shot 2020-12-12 at 3 17 26 PM

    Build PIA VPN_2020-12-12T15-07-17.txt

    Possible fixes suggested re-mediation

    Don't know, but I suspect something about those local Pod paths is not picked up in the git references.

    Assignees and labels

    ( please add labels as applicable )

    • [ ] Patched
    • [ ] Verified patch
    opened by t0mmar 9
  • Build fails: No such module 'Regions'

    Build fails: No such module 'Regions'

    Summary

    Steps to reproduce

    • clone this repo
    • pod install
    • update plists, entitlements, etc. with custom Apple identifiers
    • build

    What is the current bug behaviour?

    I get one error building the PIARegions pod. It claims that 'Regions' module is not defined.

    What is the expected correct behaviour?

    I'm expecting the build to succeed.

    Relevant logs and/or screenshots

    Screen Shot 2020-12-11 at 4 20 12 PM

    Possible fixes suggested re-mediation

    ??? (don't have any)

    Assignees and labels

    ( please add labels as applicable )

    • [ ] Patched
    • [ ] Verified patch
    opened by t0mmar 5
  • `pod install` fails after cloning from github

    `pod install` fails after cloning from github

    Summary

    pod install fails after cloning from github

    Steps to reproduce

    • clone repository
    • run pod install

    What is the current bug behaviour?

    pod install fails to install PIAAccountModule

    What is the expected correct behaviour?

    pod install succeeds after a fresh clone from github

    Relevant logs and/or screenshots

    Error message I receive when running pod install:

    toms-MBP:t0mmar tom$ pod install
    Analyzing dependencies
    [!] No podspec found for `PIAAccountModule` in `/Users/jose/Projects/PIA/account`
    

    Possible fixes suggested re-mediation

    Update paths in Podfile:

    def shared_main_pods
        pod 'AlamofireImage'
        pod "PIAAccountModule", :path => "/Users/jose/Projects/PIA/account"
        pod "PIARegions", :git => "#{$git_root}/#{$regions_repo}"
        library_by_path('/Users/jose/Projects/PIA')
        #library_by_git('ba3cd1f')
        #library_by_version('~> 1.1.3')
    end
    

    Assignees and labels

    ( please add labels as applicable )

    • [ ] Patched
    • [ ] Verified patch
    opened by t0mmar 5
  • Fails to log in with valid PIA credentials

    Fails to log in with valid PIA credentials

    Summary

    App build from these sources fails to authenticate a valid PIA user whose credentials do work on the official PIA app from the App Store.

    Steps to reproduce

    • build the app from these sources
    • start running it on a device
    • type in username and password, one that works on the official PIA app
    • press Login button

    What is the current bug behaviour?

    The call to log in fails with error "unauthorized"

    What is the expected correct behaviour?

    Login succeeds because the credentials are good

    Relevant logs and/or screenshots

    image

    Network calls:

    POST /api/client/v2/token HTTP/1.1
    Host: www.privateinternetaccess.com
    Content-Type: application/x-www-form-urlencoded; charset=utf-8
    Cookie: _pia_lm=en_en; u=6lch1c4z0562usuevnnp7wz1l
    Connection: keep-alive
    Accept: */*
    User-Agent: PIA VPN/0.1.0 (*****; build:1; iOS 12.1.0) Alamofire/4.8.0
    Accept-Language: en;q=1.0
    Content-Length: 37
    Accept-Encoding: gzip;q=1.0, compress;q=0.5
    
    password=******&username=******
    
    ---
    
    HTTP/1.1 200 OK
    Server: Apache
    Cache-Control: max-age=0, private, must-revalidate
    X-XSS-Protection: 1; mode=block
    X-Request-Id: 56eff9c2-a218-4b1f-8b2a-67a0f1f8eec4
    X-Frame-Options: SAMEORIGIN
    X-Runtime: 0.024810
    X-Content-Type-Options: nosniff
    ETag: W/"fdf66f0fb9f39970417c701cbbf81dbc"
    Status: 200 OK
    Cache-Control: max-age=3600
    Expires: Sat, 09 Mar 2019 23:15:00 GMT
    X-Content-Type-Options: nosniff
    X-Frame-Options: sameorigin
    Strict-Transport-Security: max-age=15768000; includeSubdomains; preload
    Content-Type: application/json; charset=utf-8
    Date: Sat, 09 Mar 2019 22:15:00 GMT
    Content-Length: 140
    Connection: keep-alive
    
    {"token":"66cb2b*****dca4194"}
    
    ---
    
    GET /api/client/v2/account HTTP/1.1
    Host: www.privateinternetaccess.com
    Accept: */*
    Cookie: _pia_lm=en_en; u=6lch1c4z0562usuevnnp7wz1l
    User-Agent: PIA VPN/0.1.0 (*****; build:1; iOS 12.1.0) Alamofire/4.8.0
    Accept-Language: en;q=1.0
    Accept-Encoding: gzip;q=1.0, compress;q=0.5
    Connection: keep-alive
    
    ---
    
    HTTP/1.1 401 Unauthorized
    Server: Apache
    Cache-Control: no-cache
    X-XSS-Protection: 1; mode=block
    WWW-Authenticate: Token realm="Application"
    X-Request-Id: 5275ed0a-863a-4e3d-9700-b498046d1423
    X-Runtime: 0.005148
    X-Frame-Options: SAMEORIGIN
    X-Content-Type-Options: nosniff
    Status: 401 Unauthorized
    Cache-Control: max-age=3600
    Expires: Sat, 09 Mar 2019 23:15:00 GMT
    X-Content-Type-Options: nosniff
    X-Frame-Options: sameorigin
    Strict-Transport-Security: max-age=15768000; includeSubdomains; preload
    Content-Type: text/html; charset=utf-8
    Date: Sat, 09 Mar 2019 22:15:00 GMT
    Connection: close
    
    HTTP Token: Access denied.
    
    
    

    Possible fixes suggested re-mediation

    Assignees and labels

    ( please add labels as applicable )

    • [ ] Patched
    • [ ] Verified patch
    opened by t0mmar 5
  • Xcode resports errors and fails to build

    Xcode resports errors and fails to build "PIA VPN" scheme

    Summary

    Steps to reproduce

    Building from scratch as described in the README file.

    What is the current bug behaviour?

    Xcode reports errors and fails to build "PIA VPN" scheme.

    What is the expected correct behaviour?

    Xcode should successfully build the app when build directions are followed.

    Relevant logs and/or screenshots

    Showing Recent Messages
    :-1: /Users/tom/Projects/vpn-ios/Pods/Target Support Files/Pods-PIA VPN Tunnel/Pods-PIA VPN Tunnel.debug.xcconfig: unable to open file (in target "PIA VPN Tunnel" in project "PIA VPN") (in target 'PIA VPN Tunnel')
    
    screen shot 2018-12-14 at 6 09 38 pm

    Possible fixes suggested re-mediation

    The error is complaining about a missing file: Pods-PIA VPN Tunnel.debug.xcconfig That file is indeed missing on the filesystem.

    If this is a private file with secrets, can you update the build instructions explaining what should go in that file and provide a dummy file with example values that result in a successful build?

    Or is the error possibly caused by the spaces in the PATH?

    Assignees and labels

    ( please add labels as applicable )

    • [ ] Patched
    • [ ] Verified patch
    opened by t0mmar 4
  • Please provide code for App Store release version 3.1.0

    Please provide code for App Store release version 3.1.0

    I see a new version 3.1.0 has been released on the app store but I don't see any code updates here. I would really appreciate if you could release the new code soon. Can you let me know when that might happen?

    opened by t0mmar 3
  • No longer open source?

    No longer open source?

    Version 3 of this app was released on the iOS App Store on May 22, but this repository hasn't been updated past version 2.8.1. Is this app no longer open source?

    opened by parcelcat 2
  • Pod installing error

    Pod installing error

    veer@Veers-iMac vpn-ios % pod install Analyzing dependencies [!] No podspec found for PIAAccountModule in /Users/jose/Projects/PIA/account

    How can fix this one?

    opened by pethanihiten 1
  • Pod install shows

    Pod install shows "Failed to download 'PIAWireguard'

    Summary

    Steps to reproduce

    pod install

    What is the current bug behaviour?

    After running pod install command it shows Failed to download 'PIAWireguard' and after some time it shows no space left on device. I had 24 gb space on my device. Do i really need more space to run this coammnd? Screenshot 2020-10-25 at 2 21 16 PM Screenshot 2020-10-25 at 2 22 28 PM

    opened by siam009 1
  • Allow Hotspot Helper notice to be hidden

    Allow Hotspot Helper notice to be hidden

    Summary

    Allow Hotspot Helper notice to be hidden

    Steps to reproduce

    1. open Settings.app
    2. go to wifi settings
    3. look for any open wifi network

    What is the current bug behaviour?

    311F92D9-66E7-44FA-B528-E8D2FABE429C This happens regardless of whether "network management" is on or off.

    What is the expected correct behaviour?

    Allow the notice to be hidden.

    opened by dot-gov 1
  • Error installing PIAKPIModule

    Error installing PIAKPIModule

    pod install error :

    [!] Error installing PIAKPIModule
    [!] Failed to download 'PIAKPIModule': [!] /usr/bin/git clone [email protected]:pia-mobile/shared/kpi.git /var/folders/pf/jwjt8jq5349dd24d6f0mb_sc0000gp/T/d20221113-10943-6526ya --template=
    
    Cloning into '/var/folders/pf/jwjt8jq5349dd24d6f0mb_sc0000gp/T/d20221113-10943-6526ya'...
    ssh: connect to host gitlab.kape.com port 22: Operation timed out
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    
    
    

    how can I solve this ?

    opened by AMJ-7 0
  • Pod Install Issue

    Pod Install Issue

    Hello, i keep getting this error.

    [!] Error installing PIAAccountModule [!] Failed to download 'PIAAccountModule': [!] /usr/local/bin/git clone [email protected]:pia-mobile/shared/account.git /var/folders/0d/wfnhw6qd1573tf3zy5c1tws80000gn/T/d20210722-30783-nfpspg --template=

    Cloning into '/var/folders/0d/wfnhw6qd1573tf3zy5c1tws80000gn/T/d20210722-30783-nfpspg'... ssh: connect to host gitlab.kape.com port 22: Operation timed out fatal: Could not read from remote repository.

    Please make sure you have the correct access rights and the repository exists.

    opened by vaifllc 5
  • Hotspot Helper causes Wi-Fi network to not connect for 45 seconds

    Hotspot Helper causes Wi-Fi network to not connect for 45 seconds

    Summary

    When connecting to a captive portal hotspot, the Wi-Fi will try to connect for 45 seconds before showing the captive portal, regardless of settings in the app.

    Steps to reproduce

    • Install the app
    • connect to an insecure captive portal wi-fi network ( eg. starbucks )

    What is the current bug behaviour?

    connection to the network takes ~45 seconds

    What is the expected correct behaviour?

    captive portal interface should be shown

    bug 
    opened by Markko 2
Owner
Private Internet Access - Free and Open Source Software
Free and Open Source Software from Private Internet Access - Made With Love
Private Internet Access - Free and Open Source Software
iOS implementation of OmniEdge VPN

Overview This repository contains the open source OmniEdge Evalution Version iOS Client code. No

OmniEdge 50 Nov 22, 2022
Indicates VPN state in status bar

VPNIndicator Indicates VPN state in status bar. Turn WiFi or cell signal icon to blue when VPN is active, intended for X-series iphones. Compatibility

udevs 5 Aug 24, 2022
Mullvad VPN desktop and mobile app

Mullvad VPN desktop and mobile app Welcome to the Mullvad VPN client app. This repository contains all the source code for the desktop and mobile vers

Mullvad VPN 3k Jan 3, 2023
A simple class to check for internet connection availability in Swift.

Reach A simple class to check for internet connection availability in Swift. Works for both 3G and WiFi connections. Install Manually Add the Reach.sw

Isuru Nanayakkara 459 Dec 29, 2022
StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It supports apps which hide the status bar and The Notch

StatusBarOverlay StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It support

Idle Hands Apps 160 Nov 2, 2022
❌📱 A little swift Internet error status indicator using ReachabilitySwift

EFInternetIndicator Requirements Xcode 8.0+ iOS 8.3+ WARNING : It's not work on simulator. #1 Installation CocoaPods You can use CocoaPods to install

Ezequiel França 131 Dec 14, 2022
A modern Swift wrapper for Instagram Private API.

Swiftagram is a wrapper for Instagram Private API, written entirely in (modern) Swift. Instagram's official APIs, both the Instagram Basic Display API

Stefano Bertagno 217 Dec 27, 2022
Access the native iOS / macOS reminders (get, update, delete) in TiDev / Titanium.

Titanium iOS Reminders API Access the native iOS reminders (get, update, delete) in TiDev / Titanium. Requirements The NSRemindersUsageDescription pri

Hans Knöchel 5 Nov 28, 2021
This generic SOAP client allows you to access web services using a your iOS app, Mac OS X app and AppleTV app.

This generic SOAP client allows you to access web services using a your iOS app, Mac OS X app and Apple TV app. With this Framework you can create iPh

Prioregroup.com 479 Nov 22, 2022
Kiwix for offline access on iOS and macOS

Kiwix for iOS & macOS This is the home for Kiwix apps on iOS and macOS. Mobile app for iPads & iPhones Download the iOS mobile app on iTunes App Store

Kiwix 299 Dec 21, 2022
Access Xcode Server API with native Swift objects.

Xcode Server SDK Use Xcode Server's API with native Swift objects. First brought to you in Buildasaur, now in an independent project. This is an unoff

Buildasaurs 401 Dec 29, 2022
Simplified access to Apple's CloudKit

EVCloudKitDao Discuss EVCloudKitDao : What is this With Apple CloudKit, you can focus on your client-side app development and let iCloud eliminate the

Edwin Vermeer 632 Dec 29, 2022
Shawn Frank 2 Aug 31, 2022
Approov-service-ios-swift-grpc - Approov service layer for iOS clients using GRPC

Approov Service for GRPC A wrapper for the Approov SDK to enable easy integratio

Approov Integration Examples 0 Jan 21, 2022
Approov Integration Examples 0 Jan 26, 2022
iONess is HTTP Request Helper for iOS platform used by HCI iOS App

iONess iONess (iOS Network Session) is HTTP Request Helper for the iOS platform used by Home Credit Indonesia iOS App. It uses Ergo as a concurrent he

OSFE Homecredit Indonesia 1 Mar 28, 2022
🌸 Powerful Codable API requests builder and manager for iOS.

This lib is about network requests with blackjack, roulette and craps! Using it you will be able to convert your massive API layer code into an awesom

CodyFire 251 Jan 8, 2023
Easy to use OAuth 2 library for iOS, written in Swift.

Heimdallr Heimdallr is an OAuth 2.0 client specifically designed for easy usage. It currently supports the resource owner password credentials grant f

trivago N.V. 628 Oct 17, 2022
A lightweight, one line setup, iOS / OSX network debugging library! 🦊

Netfox provides a quick look on all executed network requests performed by your iOS or OSX app. It grabs all requests - of course yours, requests from

Christos Kasketis 3.4k Dec 28, 2022