summaryrefslogtreecommitdiffhomepage
path: root/ios/PacketTunnel
AgeCommit message (Collapse)AuthorFilesLines
2023-08-24Return RESTTransport from TransportProviderAndrej Mihajlov1-2/+2
Ensures that RESTTransport returns consistent values throughout execution and solves the following issues: - Dynamic implementation of RESTTransport implemented by TransportProvider may yield different values (i.e RESTTransport.name) when accessed at different times during network operation execution - Current implementation of RESTTransport on TransportProvider yields "TransportProvider" before the first call to sendRequest() which is not correct behavior becuase we always log the name of transport that's being used before sending request. - When starting the app with network link conditioner blocking traffic, TransportProvider seems to print "TransportProvider" indefinitely even after the first call to sendRequest().
2023-08-17PacketTunnel: refactor parsing of start optionsAndrej Mihajlov2-32/+70
2023-08-16Introduce PacketTunnelCore frameworkAndrej Mihajlov10-1265/+158
- Move TunnelMonitor, Pinger, WgStats into new framework - Add TunnelMonitorProtocol, TunnelDeviceInfoProtocol, PingerProtocol protocols to improve testing/mocking - Rework TunnelMonitor and Pinger to use block-based event handler instead of delegate - Drop Objective-C bridging header from PacketTunnel - Add tests for Pinger
2023-08-08PacketTunnel: fix missing call to completion handler in onSleep()Andrej Mihajlov2-4/+3
2023-08-08Add a generic version of tunnel settingsBug Magnet1-1/+1
2023-07-10Enable Shadowsocks bridges selection via RelaySelectorBug Magnet1-1/+6
2023-06-27New swiftformat rule, enable google swift guidelinesBug Magnet6-15/+12
2023-06-13Replace Caching type with FileCache<Content: Codable>Andrej Mihajlov1-4/+4
2023-06-13Cache the last used shadowsocks configuration and reuse it subsequentlyBug Magnet1-5/+9
2023-06-09Formalize application targetsAndrej Mihajlov2-16/+5
2023-06-08PacketTunnel: rotate private key on mismatch with serverAndrej Mihajlov6-150/+460
2023-05-29Introduce MullvadTransport and move Shadowsocks there, share ↵Bug Magnet2-60/+3
TransportProvider implementation
2023-05-25Pass the API endpoint to Shadowsocks instead of hardcoding itBug Magnet2-3/+7
2023-05-22Reformat the code for Swift 5.8Andrej Mihajlov6-36/+36
2023-05-22Add shadowsocks-proxy crateEmīls2-4/+65
2023-05-12Simplify the AddressCache logic, it now filters results to only keep the ↵Bug Magnet1-3/+4
first one, does not rotate addresses anymore, and has tests written for.
2023-05-09Fix port selection algorithmJon Petersson1-2/+4
2023-05-03Pass closure to block operations instead of the entire operationAndrej Mihajlov1-13/+14
Block operations receive (Error?) -> Void Result block operations receive (Result<Output, Error>) -> Void Transform operations receive (Input, (Result<Output, Error>) -> Void) -> Void
2023-05-03Adapt codebase to use cancellable initializerAndrej Mihajlov1-35/+13
2023-03-29Delay tunnel reconnection after private key rotationJon Petersson1-1/+64
2023-03-27Fix many typosAlexander Seiler1-1/+1
Signed-off-by: Alexander Seiler <seileralex@gmail.com>
2023-03-22Add coordinators and app routerAndrej Mihajlov1-0/+53
Fixes IOS-10
2023-03-08PacketTunnel: wrap start/stop in dispatch queueAndrej Mihajlov1-79/+81
2023-03-03Fix typoAndrej Mihajlov1-1/+1
2023-03-03Add additional guard to restrict connectivity check to connecting and ↵Andrej Mihajlov1-3/+3
connected state only
2023-03-03Use NEPacketTunnelProvider.defaultPath instead of path monitorAndrej Mihajlov2-52/+52
Seems to be more reliable than using path monitor directly. Also understands airplane mode so no need for any kind of heuristics.
2023-03-03PacketTunnel: ignore all requests to reconnect after the first call to ↵Andrej Mihajlov1-0/+8
stopTunnel()
2023-03-03TunnelMonitor: rework to use locks and introduce .recovering stateAndrej Mihajlov3-118/+137
2023-03-03Serialize calls to reconnect tunnelAndrej Mihajlov1-4/+36
2023-03-02Pinger: lock send(to:)Andrej Mihajlov1-2/+2
2023-02-28Replace OperationCompletion with ResultAndrej Mihajlov1-18/+24
Error is set to OperationError.cancelled if operation is cancelled.
2023-02-15PacketTunnel: tune down error verbosityAndrej Mihajlov1-3/+3
2023-02-15TunnelMonitor: move happy path into do {} block to avoid return in catch.Andrej Mihajlov1-5/+3
2023-02-15TunnelMonitor: tune down log levelsAndrej Mihajlov1-17/+19
2023-02-15Pinger: remove loggerAndrej Mihajlov1-13/+1
2023-02-03Extract URLRequestProxy implementationAndrej Mihajlov1-37/+19
2023-02-03Add missing call to completion in response to .cancelURLRequest(id)Andrej Mihajlov1-0/+1
2023-02-03Keep the tunnel process running if it had failed to read configuration on ↵Andrej Mihajlov1-68/+83
startup Restart it internally at 2s interval. This should keep the VPN running on boot but block all networking until device is locked and the process gained access to configuration stored in Keychain.
2023-02-03Rework logging configurator into builderAndrej Mihajlov1-6/+13
2023-02-03Exit tunnel when keychain is locked (solves boot issue)Andrej Mihajlov1-0/+18
2023-02-03Add configuration failure causeAndrej Mihajlov1-13/+36
2022-12-09Handle application updates with settings migrationsajacl1-6/+48
1. Block all the traffic when tunnel cannot read the settings (Introduced empty tunnel in `TunnelConfiguration`). 2. Introduce proper error enum, wrap WireGuard error and settings migration error. 3. Report possible errors to GUI.
2022-11-30Wait for utun to appear before reporting network statusAndrej Mihajlov1-34/+31
2022-11-30Start tunnel monitoring upon receiving the first path updateAndrej Mihajlov1-15/+19
2022-11-17REST: replace transport registry with transport provider closureAndrej Mihajlov1-4/+4
2022-11-09PacketTunnel: fix error messageAndrej Mihajlov1-1/+1
2022-11-09Remove shared instancesAndrej Mihajlov1-9/+20
2022-11-07Check if device revoked or time expired after couple of failed attemptssajacl1-1/+199
Check if device is revoked or account has expired when the tunnel fails to connect on each second failed attempt.
2022-11-07Add exponential backoff with jitterAndrej Mihajlov1-1/+1
2022-11-07Move FixedWidthInteger arithmetics to MullvadTypesAndrej Mihajlov2-65/+1