Davide De Rosa
bb40404a51
Fix routing tests
...
Broken in 7a278dba69
2020-05-24 00:42:32 +02:00
Davide De Rosa
9095ea250e
Address concerns from Guido Vranken fuzzers ( #141 )
...
* 002: Assert return value of snprintf/getnameinfo
* 003: Address OOB reads on decrypted data
* 004: Handle boundary prefixes in .partitioned()
* 005: Fix OOB read in matchesDestination()
* 006: Fix parsing in netname6()
* 007: Fix incorrect use of sizeof()
* 008: Add safety checks in MSSFix()
* 009: Fix bad usage of minilzo calls
* Add checks after RoutingTableEntryAddress4/6
2020-05-16 15:10:07 +02:00
Davide De Rosa
4bdf6b7006
Redefine endpoint strategy according to IPv4/6
2020-04-14 22:57:23 +02:00
Davide De Rosa
c7595ed295
Rewrite IPv4-to-String conversion
...
Flaky Swift pointer API.
2020-04-14 21:54:19 +02:00
Davide De Rosa
deff855bbc
Fix pointers to local buffers
2020-04-05 17:30:17 +02:00
Davide De Rosa
a7aa78141e
Update copyright clause
2020-01-11 09:26:41 +01:00
Davide De Rosa
714b5e56d4
Fix search domains unit test
2019-10-25 19:22:53 +02:00
Davide De Rosa
7d0cba8df8
Merge pull request #125 from ThinkChaos/proxy_auto_conf
...
Add Proxy Auto-Configuration (PAC) support
2019-10-22 21:55:29 +02:00
ThinkChaos
26d7b9fe0f
Address review comments
2019-10-22 21:03:25 +02:00
ThinkChaos
c6cb5a646a
Add Proxy Auto-Configuration (PAC) support
2019-10-21 21:47:45 +02:00
Robert Patchett
55f7e64f19
Allow keep alive timeout to be configured by the server or client
2019-09-30 11:54:29 -07:00
Davide De Rosa
eb56a9a56c
Optimize [Data].flatCount
2019-06-05 14:14:15 +02:00
Davide De Rosa
334613401b
Organize tests by subspec
...
Split TestUtils.
2019-05-24 10:59:20 +02:00
Davide De Rosa
a85404e951
Rename provider class to OpenVPNTunnelProvider
2019-05-24 10:41:30 +02:00
Davide De Rosa
821cf66d79
Restore tests with recent changes
2019-05-19 15:50:30 +02:00
Davide De Rosa
465e08e42f
Wrap OpenVPN entities in pseudonamespace
...
Temporarily exclude AppExtension and tests.
2019-05-19 14:05:02 +02:00
Davide De Rosa
9da7fa9667
Split Core into Core+OpenVPN
...
Two Obj-C modules:
- __TunnelKitCore
- __TunnelKitOpenVPN
Seems the only way to do it in multiple module maps.
Move OpenVPN specifics out of CoreConfiguration.
2019-05-19 12:22:32 +02:00
Davide De Rosa
491092f2a3
Drop extra header lines
2019-05-19 12:21:44 +02:00
Davide De Rosa
59e2c04aea
Fix a couple tests
2019-05-19 11:36:21 +02:00
Davide De Rosa
713a46d817
Update GitHub URL
...
Move to passepartoutvpn org.
2019-05-14 10:58:47 +02:00
Davide De Rosa
13cae06a49
Add method to partition a subnet
2019-05-03 15:14:25 +02:00
Davide De Rosa
03a1eb2203
Return IPv4 network mask for a route
2019-05-03 15:14:25 +02:00
Davide De Rosa
4295e63c98
Read relevant routing table
2019-05-03 15:14:25 +02:00
Davide De Rosa
31d9019f1a
Read system-wide DNS servers
...
Add libresolv to podspec.
2019-04-25 16:36:16 +02:00
Davide De Rosa
224a76ac58
Parse --redirect-gateway from configuration
...
FIXME: for now only redirects ALL traffic when the option is found
in the configuration file, whatever the arguments.
Also drop unnecessary base options in tests as everything was made
optional recently.
2019-04-25 14:39:23 +02:00
Davide De Rosa
1b8647bcac
Convert PacketSteram to Obj-C
...
For better TCP efficiency.
2019-04-25 12:42:29 +02:00
Davide De Rosa
88cd62064a
Handle continuation in PUSH_REPLY
2019-04-16 23:59:56 +02:00
Davide De Rosa
0a956f5b9f
Handle dhcp-option PROXY_BYPASS
2019-04-13 19:23:02 +02:00
Davide De Rosa
5fb70b5bab
Parse dhcp-option PROXY_HTTP* into Configuration
2019-04-12 08:10:47 +02:00
Davide De Rosa
4af8305f7a
Fix unit tests
2019-04-11 16:47:55 +02:00
Davide De Rosa
55534df6fa
Work around cipher/digest/framing issues
...
- Make them optional
- Set default values inside SessionProxy
Fallback is not needed anywhere else.
2019-04-04 18:51:06 +02:00
Davide De Rosa
a2250686b6
Merge OptionsBundle into Configuration
...
FIXME: issues with non-optional .cipher and .compressionFraming
Because:
- No pushed cipher (nil) is NOT .aes128cbc
- No pushed framing (nil) is NOT .disabled
Breaks conditions on pushed cipher/framing via PUSH_REPLY.
2019-04-04 18:51:06 +02:00
Davide De Rosa
7aec0637b2
Move endpoints inside SessionProxy.Configuration
...
Make optional.
TunnelKitProvider still gets hostname from .serverAddress rather
than SessionProxy.Configuration
Also drop useless Equatable implementations.
2019-04-04 13:09:50 +02:00
Davide De Rosa
370e68aa3f
Parse search domain from dhcp-option DOMAIN
2019-04-03 14:29:09 +02:00
Davide De Rosa
b48575a13a
Split tests related to options parsing
2019-04-03 13:22:55 +02:00
Davide De Rosa
9876c81de5
Parse PUSH_REPLY options in OptionsBundle
...
- auth-token
- peer-id
- Routing
Reorganize options by semantic.
Reuse OptionsBundle in PushReply.
2019-04-03 13:19:21 +02:00
Davide De Rosa
d22420c06b
Rearrange some unit tests
2019-04-02 18:58:35 +02:00
Davide De Rosa
11fd418f82
Extend encrypted private key quick test
...
Test .ovpn didn't use an PKCS#8 key due to a slip-up. Fixing it
unveiled that isEncrypted returned false for PKCS#8 keys.
Fixes #80
2019-04-02 11:41:18 +02:00
Davide De Rosa
22f80735ca
Strip certificate preamble
...
Fixes #78
2019-04-02 00:55:58 +02:00
Davide De Rosa
559bb6607c
Add and test PKCS#8 decryption
...
Fixes #80
2019-04-02 00:34:23 +02:00
Davide De Rosa
47b80d5361
Refactor to decrypt generic key
2019-04-02 00:31:54 +02:00
Davide De Rosa
0bfc1e08eb
Fix retarded Swift pointer API somehow
2019-03-30 23:18:45 +01:00
Davide De Rosa
7b59276875
Comment out deprecated methods used in perf tests
2019-03-30 23:18:45 +01:00
Davide De Rosa
207a4f063a
Replace deprecated Data(bytes:)
2019-03-30 23:18:45 +01:00
Davide De Rosa
596ec00943
Fix a wrong compression test
...
--compress lzo is indeed supported.
2019-03-30 23:18:45 +01:00
Davide De Rosa
b07ec88ff2
Add passphrase parameter to ConfigurationParser
...
Use it to decrypt encrypted PEMs.
2019-03-25 18:48:59 +01:00
Davide De Rosa
e5393f81b8
Test decrypt .pem with encrypted private key
2019-03-25 18:45:01 +01:00
Davide De Rosa
0eb0e3e478
Parse compression from several places
...
- PUSH_REPLY
- .ovpn configuration
- TunnelKitProvider
2019-03-19 15:14:29 +01:00
Davide De Rosa
197679057d
Return NSData from parsePayloadWithBlock
...
More friendly to (de)compression stage.
2019-03-19 15:12:56 +01:00
Davide De Rosa
5cc32b1060
Wrap minilzo into dynamic Obj-C plugin
...
Handle library errors to some extent.
2019-03-19 15:12:46 +01:00