Commit Graph

253 Commits

Author SHA1 Message Date
Davide De Rosa
1904687a22 Upgrade to TunnelKit 1.6.0
- Make cipher/digest/compressionFraming optional
- Move endpointProtocols inside SessionProxy.Configuration
- Rename OptionsError to ConfigurationError
2019-04-04 19:03:53 +02:00
Davide De Rosa
a98ddbb224 Add Windscribe provider 2019-04-01 09:55:57 +02:00
Davide De Rosa
3197f49368 Add down/up indication of data count
Other improvements:

- TunnelKit reports 0 rather than nil upon connection.
- Fall back to "Unavailable" rather than empty string.
2019-03-30 23:38:06 +01:00
Davide De Rosa
921e57557d Render data count with closest unit
Set a 10% boundary (e.g. 100MB = 0.1GB).
2019-03-30 20:10:04 +01:00
Davide De Rosa
2e142680c3 Fetch current data count on VPN status update 2019-03-30 20:10:04 +01:00
Davide De Rosa
bc0a0d40dc Observe tunnel data count periodically (5s)
Use Timer as KVO is not possible on App Group defaults.

Be tolerant about missing sections, return type is optional.

Also reword data count cell caption.
2019-03-30 20:10:04 +01:00
Davide De Rosa
487b0c07ca Present add shortcut modally 2019-03-28 08:28:50 +01:00
Davide De Rosa
e2cd0bc7e1 Reuse intent creation code from IntentDispatcher 2019-03-27 23:47:35 +01:00
Davide De Rosa
d24295295a Drop unnecessary downcast 2019-03-27 23:03:19 +01:00
Davide De Rosa
77658e5cc6 Show shortcut add on viewDidAppear 2019-03-27 22:36:23 +01:00
Davide De Rosa
c9d170768a Create shortcuts from manager
Delegate Intents callbacks to a single place.
2019-03-27 22:22:32 +01:00
Davide De Rosa
ae88fdfad6 Rename shortcut manager vc 2019-03-27 22:09:08 +01:00
Davide De Rosa
d29aafe08e Propagate addShortcut delegation in ConnectTo 2019-03-27 21:08:51 +01:00
Davide De Rosa
05ba654b2f Reload in the background on edit 2019-03-27 21:08:51 +01:00
Davide De Rosa
f0d0eb5ed3 Sort shortcuts by phrase 2019-03-27 21:08:51 +01:00
Davide De Rosa
5ee18071b0 Add shortcut and delegate to manager 2019-03-27 21:08:51 +01:00
Davide De Rosa
0d619ffd62 Pack Siri controllers to simplify @available 2019-03-27 21:08:51 +01:00
Davide De Rosa
e1638d1c73 Link add shortcut to manager 2019-03-27 21:08:51 +01:00
Davide De Rosa
d5b7a1e576 Show existing Siri shortcuts as first controller 2019-03-27 21:08:51 +01:00
Davide De Rosa
b459495e90 Reuse controller title 2019-03-27 21:08:36 +01:00
Davide De Rosa
400cea0f7b Show EKU and random endpoint in configuration 2019-03-27 17:07:29 +01:00
Davide De Rosa
250c3399da Reuse enabled/disabled strings in configuration 2019-03-27 17:04:06 +01:00
Davide De Rosa
f3e6c34bd1 Customize block on passphrase input cancellation
Do not delete .ovpn file when importing from iTunes.
2019-03-25 20:33:17 +01:00
Davide De Rosa
8f0e28e315 Forward input passphrase to parser 2019-03-25 20:33:17 +01:00
Davide De Rosa
dc81356b31 Retry import after passphrase input
Isolate .ovpn parsing routines.

- AppDelegate (external URL)
- ImportedHosts

Only delete URL if error is not encryption passphrase.
2019-03-25 20:33:07 +01:00
Davide De Rosa
34fc10eef8 Split guidance and referral footers
Handle tap per footer.
2019-03-25 20:26:03 +01:00
Davide De Rosa
54f7779c45 Add Mullvad provider 2019-03-22 19:29:55 +01:00
Davide De Rosa
8a855bf538 Show app version in About cell 2019-03-22 19:29:15 +01:00
Davide De Rosa
3b5207dc8f Better reconnect than disconnect 2019-03-22 19:25:12 +01:00
Davide De Rosa
c45e741750 Disconnect on masking change
To ensure that the stale log is erased immediately.
2019-03-22 19:23:32 +01:00
Davide De Rosa
fdc3869d29 Move baseVPNConfiguration to TransientStore
Simplifies configuration update.
2019-03-22 19:09:52 +01:00
Davide De Rosa
c391663d11 Persist masking flag 2019-03-22 19:09:52 +01:00
Davide De Rosa
e4c1ea4def Delete log on masking change
It may contain stale and either sensitive or irrelevant data.
2019-03-22 18:54:54 +01:00
Davide De Rosa
96f5210c7c Control debug masking via diagnostics
Be clear about NOT logging any sensitive data. In fact, the
variable name masksPrivateData is potentially misleading.
2019-03-22 18:54:54 +01:00
Davide De Rosa
15f23dd448 Retain Pool.name internally but show .localizedName
Use name from API if available (XXX: not localized).

Make it private to avoid unintended use in app.
2019-03-21 22:21:42 +01:00
Davide De Rosa
3eb9c6ae98 Localize Pool via country code + area 2019-03-21 22:21:42 +01:00
Davide De Rosa
af51911536 Replace Cancel with X to exit shortcuts
Misleading!
2019-03-19 18:01:15 +01:00
Davide De Rosa
63d74b6feb Reorganize shortcut sections 2019-03-19 18:01:15 +01:00
Davide De Rosa
c0be33dacc Add descriptive footer to Siri section 2019-03-19 18:01:15 +01:00
Davide De Rosa
03c8e43ce7 Tweak intent donations
- Activate -> EnableVPN
- Connect -> ConnectVPN/MoveToLocation
- Disconnect -> DisableVPN
2019-03-19 18:01:15 +01:00
Davide De Rosa
fbbd0b33f2 Reorganize compression section
- Show algorithm.
- Make framing readonly.

Easy way to prevent combination of LZO with new framing.
2019-03-19 15:23:45 +01:00
Davide De Rosa
88a1e39a6e Add a Done button to exit connect shortcuts 2019-03-18 22:40:06 +01:00
Davide De Rosa
15602f7dc9 Pick profile/location for connection intent
- Host: ConnectVPN intent
- Provider: requires Pool selection
2019-03-18 22:13:36 +01:00
Davide De Rosa
98160fdccb Split shortcuts into VPN and Trust 2019-03-18 21:00:07 +01:00
Davide De Rosa
8f3d2f0b15 Add basic cells for any possible shortcut 2019-03-18 20:54:47 +01:00
Davide De Rosa
1c103c639d Add shortcuts view controller stub 2019-03-18 20:54:47 +01:00
Davide De Rosa
c3e6e1ecd5 Move intents to Core target
Suppress responses for consistency.
2019-03-18 17:06:35 +01:00
Davide De Rosa
5237aa3916 Import Core framework into iOS target 2019-03-18 11:52:19 +01:00
Davide De Rosa
1eca19e96f Update whole views when back from backgorund 2019-03-11 09:55:25 +01:00
Davide De Rosa
1dd3ad18aa Use updateViewsIfNeeded() for consistency 2019-03-11 09:55:25 +01:00
Davide De Rosa
f50cf44bab Switch to active profile on intent update
Better user experience.
2019-03-11 09:55:25 +01:00
Davide De Rosa
439c9c0b0f Set profile directly in GracefulVPN
No need to pass through prepare(). Couple with setProfile() for
robustness.
2019-03-11 09:55:25 +01:00
Davide De Rosa
c8be5d0de6 Donate enable+disable on VPN on/off 2019-03-10 14:14:07 +01:00
Davide De Rosa
9dcd6de873 Always donate a MoveTo when provider 2019-03-10 14:13:30 +01:00
Davide De Rosa
7a21338042 Update copyright 2019-03-09 11:44:44 +01:00
Davide De Rosa
77c40cb169 Notify intent updates to ServiceVC
Postpone notification until VPN updates.

Fixes the following scenario:

1. Use <foo> profile
2. Send to background
3. Connect to <foo> via shortcut
4. Toggle stays disabled (too early)
2019-03-09 11:24:03 +01:00
Davide De Rosa
5d2450b985 Donate interactions
- Connect on add profile (covers first profile)
- Connect on activate profile
- Disable on connect to VPN
- Trust on add current Wi-Fi
- Trust on cellular network
- MoveTo on first connected location (if provider)
- MoveTo on location change (if provider)
2019-03-09 11:23:50 +01:00
Davide De Rosa
2e4d2162ac Define custom intents
- Connect
- Disable
- (Un)Trust current network
- (Un)Trust cellular network
- Move to location
2019-03-09 11:23:47 +01:00
Davide De Rosa
5ccdece72b Do not reload views on profile renaming
Use explicit accessor, implicit didSet is worrisome.

Fixes #37
2019-03-08 12:57:51 +01:00
Davide De Rosa
7774143e17 Activate profile before any action
Otherwise GracefulVPN.vpn will always return nil.

Fixes #38
2019-03-08 12:32:45 +01:00
Davide De Rosa
ccf7a68ba8 Show raw debug log in beta 2019-03-07 23:00:14 +01:00
Davide De Rosa
9441a31fd1 Add button to test app termination
Might help reproducing #19
2019-03-06 17:46:06 +01:00
Davide De Rosa
c5c670b086 Add TunnelBear provider 2019-03-05 23:02:22 +01:00
Davide De Rosa
c0fcb59233 Set account fields content type 2019-03-05 23:01:25 +01:00
Davide De Rosa
4eeca4c63c Forgive a nil statusIndexPath
Also drop a few unused and potentially dangerous similar methods.

Fixes #36
2019-03-05 10:32:13 +01:00
Davide De Rosa
0b7bd41636 Add provider referrals 2019-03-03 14:17:09 +01:00
Davide De Rosa
3ddfa87b58 Disconnect before switching active profile
Make sure that completionHandler is ALWAYS called, despite vpn
object being nil.
2019-03-03 13:04:27 +01:00
Davide De Rosa
a9e16c5335 Show custom DNS addresses in configuration UI 2019-03-03 10:40:12 +01:00
Davide De Rosa
fedea91087 Add FAQ in About 2019-02-03 22:08:24 +01:00
Davide De Rosa
d2186678de Report reviewer event on successful connection 2018-12-10 12:47:53 +01:00
Davide De Rosa
afcb45c614 Cache fetched license content
And show an error message when unable to fetch license URL.
2018-12-04 10:45:12 +01:00
Davide De Rosa
534f1e2094 Show activity indicator while loading license 2018-12-04 10:34:38 +01:00
Davide De Rosa
8270c20179 Fetch license content via URL 2018-12-04 10:33:19 +01:00
Davide De Rosa
a486cb4265 List licenses/notices in full table 2018-12-04 10:33:19 +01:00
Davide De Rosa
3d5c2bb8f5 Move .ovpn parser to TunnelKit 2018-11-10 11:39:36 +01:00
Davide De Rosa
c7cb00f679 Move ProfileKey to separate file 2018-11-06 11:16:34 +01:00
Davide De Rosa
e7d2dde972 Add/remove profile to/from filesystem immediately
Save unnecessary serialization of unaffected profiles.
2018-11-04 15:06:53 +01:00
Davide De Rosa
bc0568cc38 Do not re-save profiles on (de)activate
Only service JSON is affected.
2018-11-04 14:55:25 +01:00
Davide De Rosa
2dafe9f1f2 Invert caption/logic about trusted network policy
Looks more intuitive (default ON).
2018-11-04 12:02:02 +01:00
Davide De Rosa
c1065751b6 Add method to parse configuration from [String]
With an optional original URL. Helps testing. Take the chance to
also disambiguate method overloads.
2018-11-04 11:45:19 +01:00
Davide De Rosa
9e7c4960e5 Update GitHub URL in license preamble 2018-11-04 10:53:16 +01:00
Davide De Rosa
1522774c98 Temporarily remove "Test connectivity"
The action does an HTTP GET to a random well-known home page
among the following:

- Google
- Facebook
- Twitter
- Instagram
- Amazon

This was acceptable for development and beta testing. Not so much
for a release. Omit the option until more transparent.
2018-11-04 10:52:43 +01:00
Davide De Rosa
76a3e48242 Make serialize() the very first call in delegate 2018-11-04 10:49:40 +01:00
Davide De Rosa
3f5d23a34c Drop redundant table/model updates on remove
Already done in commit row, and also breaks animation.
2018-11-04 10:49:40 +01:00
Davide De Rosa
8e445e90b3 Move profile reactions to delegate
- Activation
- Removal
2018-11-04 10:49:40 +01:00
Davide De Rosa
2525467fe9 Hide "Edit" in provider profiles 2018-11-03 22:23:26 +01:00
Davide De Rosa
860750332f Handle keyboard return in rename alert 2018-11-02 16:23:34 +01:00
Davide De Rosa
b051f8118f Add "Edit" item to rename host profile
Disabled in network profiles. Reuse same title style/constraints
and message strings in host wizard.

For consistency, rename activate() to activateProfile(). And it's
not even an IBAction.
2018-11-02 15:52:36 +01:00
Davide De Rosa
3f1e98f8ac Delegate profile management from ConnectionService
Makes much more sense than dumb wizard notifications. Organizer is
already a ConnectionServiceDelegate.
2018-11-02 15:20:37 +01:00
Davide De Rosa
88124f5588 Replace source section with web section 2018-10-30 20:44:58 +01:00
Davide De Rosa
2564f2446d Show disclaimer from website 2018-10-29 21:25:22 +01:00
Davide De Rosa
fe85677e68 Add privacy policy 2018-10-29 21:25:08 +01:00
Davide De Rosa
17ebaccbad Add title to version screen 2018-10-29 21:25:08 +01:00
Davide De Rosa
fec2f02df5 Move Credits inside Version 2018-10-29 21:25:06 +01:00
Davide De Rosa
cced9b018f Fix provider name ordering
Define intrinsecally with Comparable.
2018-10-29 17:48:17 +01:00
Davide De Rosa
c6d632ede4 Add title to configuration parameter selector 2018-10-27 22:21:20 +02:00
Davide De Rosa
3d62728a95 Fix detail replacement in compact mode
Do not push created profile onto presented profile or any other
screen deeper inside (e.g. Parameters).
2018-10-27 22:17:53 +02:00
Davide De Rosa
06ecd3367f Overwrite pending profile when reimporting
- Overwrite title field
- Remove old .ovpn

useSuggestedTitle() is only called on load, it will never
overwrite user input unless there's a new import.
2018-10-27 20:41:47 +02:00
Davide De Rosa
326c5b823d Observe wizard creation via notifications
Flow is too scattered to safely maintain delegation.
2018-10-27 20:11:26 +02:00
Davide De Rosa
b7dc72a5e9 Sort hosts ignoring case 2018-10-27 16:56:41 +02:00
Davide De Rosa
33849c8ec8 Retain credentials of replaced host profile 2018-10-27 16:00:34 +02:00
Davide De Rosa
ad063965da Retain back button in import flow 2018-10-27 15:01:51 +02:00
Davide De Rosa
0f43255676 Show warning alert before continuing import
Fixes #16
2018-10-27 15:01:51 +02:00
Davide De Rosa
42c94c3a14 Delete openURL .ovpn on Cancel 2018-10-27 13:35:21 +02:00
Davide De Rosa
9f951fc68b Delete .ovpn after import 2018-10-27 13:35:21 +02:00
Davide De Rosa
4098a15172 Allow deletion of imported profiles 2018-10-27 12:43:26 +02:00
Davide De Rosa
5dcc9ff970 Sort imported profiles alphabetically 2018-10-27 12:43:26 +02:00
Davide De Rosa
7b7804091b Deselect profile row on parsing error 2018-10-27 12:43:26 +02:00
Davide De Rosa
663764177a Forward wizard delegate after import
Necessary to delegate adding to organizer.
2018-10-27 12:43:26 +02:00
Davide De Rosa
0e7c0b6388 List imported .ovpn if any, fall back to alert
Use .formSheet presentation (iPad).
2018-10-27 12:43:26 +02:00
Davide De Rosa
25523b5f61 Add stubs for imported hosts 2018-10-27 12:43:26 +02:00
Davide De Rosa
013eaaabd4 Don't touch refresh if can communicate w/ original 2018-10-27 12:33:30 +02:00
Davide De Rosa
8c1e6d00ca Parse .ovpn file outside of wizard context 2018-10-27 12:33:17 +02:00
Davide De Rosa
422c4da09c Move ParsedFile out of WizardHostVC 2018-10-27 12:08:44 +02:00
Davide De Rosa
0d14349bca Move filename charset to extensions 2018-10-27 12:08:44 +02:00
Davide De Rosa
4bcb1fe2ad Convert some warnings to errors 2018-10-27 12:08:44 +02:00
Davide De Rosa
4b075bcc95 Improve alerts on configuration import error
Issue reporting is currently disabled because un unparsed .ovpn
may contain sensitive data.
2018-10-27 09:43:57 +02:00
Davide De Rosa
dfde9c51e3 Fine-grain report attachments
- Debug log
- .ovpn profile (if any)
2018-10-27 09:42:41 +02:00
Davide De Rosa
821393af70 Refactor configurations in service extension
Reuse same directories of ConnectionService for storing
configuration files.
2018-10-27 09:42:41 +02:00
Davide De Rosa
52ec2bebd5 Restrict charset for host profile title
It's used now as a filename. Remember to also normalize pre-filled
title from imported filename by replacing illegal characters.
2018-10-26 18:57:07 +02:00
Davide De Rosa
b5347e04b2 Move Context to ConnectionProfile
Fix an id conflict in credentials.
2018-10-26 18:57:07 +02:00
Davide De Rosa
78abb8c764 Refactor service to use external profile JSONs
- Store only profile key/metadata into service.

- Map profiles by (context, id), context being either provider
or host.

- Initialize cache with a placeholder profile, lazily load full
profile (e.g. after opening profile).

- Only serialize non-placeholder profiles (opened once).

- Do not load full profiles for organizer listing

WARNING: always load active profile as non-placeholder.
2018-10-26 18:30:37 +02:00
Davide De Rosa
8e1b67d151 Infer profile id uniqueness by context
Drop "(provider|host)." prefix, reuse as title.
2018-10-26 17:37:52 +02:00
Davide De Rosa
52cf733948 Only make host editable if original cfg available 2018-10-25 22:57:42 +02:00
Davide De Rosa
542a3e3721 Upgrade TunnelKit with configuration refactoring 2018-10-25 22:45:44 +02:00
Davide De Rosa
f1f09dde2f Rename support request to join community 2018-10-24 21:57:27 +02:00
Davide De Rosa
8375fc58fc Do not confirm trusted policy change while offline 2018-10-23 23:56:53 +02:00
Davide De Rosa
8fe29cf924 Fix original configuration not really saved
Added in #10 but partially broken.
2018-10-23 18:51:18 +02:00
Davide De Rosa
d781d9c8e0 Add share section with generic activity
To invite a friend.
2018-10-23 12:59:06 +02:00
Davide De Rosa
39c053bd54 Add tweet cell to About 2018-10-23 12:59:06 +02:00
Davide De Rosa
4bd339d456 Remove "Report issue" from About
Will bind report to current profile.
2018-10-23 12:59:06 +02:00
Davide De Rosa
0f374fa8c9 Rename "Submit debug log" to "Report issue" 2018-10-23 12:59:06 +02:00
Davide De Rosa
9d94d59aab Use a better section name 2018-10-23 12:57:41 +02:00
Davide De Rosa
edc513f6cc Drop password confirmation field 2018-10-23 12:57:41 +02:00
Davide De Rosa
6ee9f37880 Revert to original configuration on tap 2018-10-23 12:57:11 +02:00
Davide De Rosa
be17f57a5e Add reset cell to revert to original configuration
When a backing .ovpn is available.
2018-10-23 12:57:11 +02:00
Davide De Rosa
346a9490ec Save .ovpn internally associated to host profile 2018-10-23 12:57:11 +02:00
Davide De Rosa
a59d16077b Drop annoying table animations 2018-10-23 12:55:11 +02:00
Davide De Rosa
9292919816 Update VPN status after profile reinstall
Should now cover all scenarios.
2018-10-23 12:54:40 +02:00
Davide De Rosa
e8f2aaaf08 Show tunnel failure reason in VPN status 2018-10-22 21:49:43 +02:00
Davide De Rosa
2e764ec14d Only show Reconnect if VPN is enabled 2018-10-21 10:19:42 +02:00
Davide De Rosa
6ed70feb77 Reconnect with a specific action cell 2018-10-21 10:19:42 +02:00
Davide De Rosa
0954de3322 Support TLS wrapping via TunnelKit
tls-auth and tls-crypt.
2018-10-19 17:25:39 +02:00
Davide De Rosa
5e0590184b Require credentials for providers only
Not always the case, but PIA certainly requires them. Will make it
an infrastructure option later. Only require credentials as a
configuration check, everything else has defaults.
2018-10-19 01:29:44 +02:00
Davide De Rosa
ef2061de0a Update profile screen accordingly 2018-10-18 17:02:06 +02:00
Davide De Rosa
23e27535c6 Split support requests
- Generic support on Reddit
- Debug log via email
2018-10-18 16:40:58 +02:00
Davide De Rosa
b93000819b Reuse Credits VC to add a Disclaimer 2018-10-18 10:19:08 +02:00
Davide De Rosa
62d1c2d882 Add promoting alert for subreddit 2018-10-18 10:04:23 +02:00
Davide De Rosa
b6d430f106 Add link to Reddit 2018-10-18 09:37:18 +02:00
Davide De Rosa
f3df03de9b Disclose organizer profiles
Use text instead of checkmark to mark active profile. Allows
restoring disclosure indicator.
2018-10-17 23:58:49 +02:00