Commit Graph

432 Commits

Author SHA1 Message Date
angt 9ff87109f9 Add buffer-size option 2015-11-17 21:19:16 +01:00
angt bfcf38f380 Try to be more robust on restart but accept some lost for now 2015-11-17 21:04:26 +01:00
angt 286f54aed4 Try to close nicely, waiting for a real proto v0.0.2 2015-11-17 13:10:09 +01:00
angt 6ef8ca45d7 Merge pull request #9 from jedisct1/pointer-arith
Avoid pointer arithmetic on void *
2015-11-17 07:58:19 +01:00
Frank Denis 85ddb8a8d6 Avoid pointer arithmetic on void * 2015-11-17 07:38:11 +01:00
angt a261f1a8b1 Code cleanup 2015-11-17 07:15:59 +01:00
angt 53a55e83c4 Merge pull request #8 from jedisct1/scalarmult-check
Check crypto_scalarmult() return code
2015-11-17 06:40:13 +01:00
Frank Denis 20bdaa22e8 Check crypto_scalarmult() return code 2015-11-17 01:31:52 +01:00
angt 246f1bd7c0 Add a very simple client and server authentication 2015-11-16 16:35:43 +01:00
angt 6095cc021a Include missing uio.h in tun.c 2015-11-16 16:08:44 +01:00
angt 2ad21e9375 Include missing ip-static.h in tun.c 2015-11-16 16:05:05 +01:00
angt 21ae1f34c3 Add common.c 2015-11-16 16:00:33 +01:00
angt a8ebefbef3 Add tun.[ch] 2015-11-16 15:44:16 +01:00
angt 14c0c2edb1 Add ip-static.h 2015-11-16 12:53:47 +01:00
angt b8148600f2 Add keepalive option 2015-11-16 11:44:28 +01:00
angt 164c32c23c Code cleanup 2015-11-16 11:42:53 +01:00
angt a5e415736d Merge pull request #7 from jedisct1/keepalive
Set `SO_KEEPALIVE` on the socket
2015-11-16 10:50:50 +01:00
angt 0359c21643 Merge pull request #6 from jedisct1/dd
Use /dev/urandom
2015-11-16 10:50:39 +01:00
angt 725a8e2fd0 Merge pull request #5 from jedisct1/bsd-osx
Complete support for OSX & BSD
2015-11-16 10:50:22 +01:00
Frank Denis dae5d4a800 Set SO_KEEPALIVE on the socket so that we don't hang forever 2015-11-16 09:56:11 +01:00
Frank Denis 704e663d6a Use /dev/urandom
http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/
https://speakerdeck.com/filosottile/the-plain-simple-reality-of-entropy

Also remove the iflag=fullblock GNUism that doesn't exist on BSD and OSX
2015-11-16 02:06:21 +01:00
Frank Denis c63885a748 Add support for the native OSX utun interface 2015-11-16 01:52:33 +01:00
Frank Denis 8530e4c378 On OSX and BSD, packets sent to the tun interface have to be prefixed
by the protocol family
2015-11-16 00:43:16 +01:00
angt 4944e76f97 Fix last commit 2015-11-15 18:38:43 +01:00
angt 5865e61fd2 Use select() in the main loop (macos is full of sh!t) 2015-11-15 18:23:29 +01:00
angt 8855ce75fc Code cleanup 2015-11-15 17:42:18 +01:00
angt 3e1809a608 Version 0.0.2 2015-11-15 16:27:03 +01:00
angt 04370f0aa0 Code cleanup 2015-11-15 10:51:28 +01:00
angt e2a6aeced7 Be more paranoid: generate 2 keys v0.0.1 2015-11-13 17:57:21 +01:00
angt ef0561764f Add debug option 2015-11-13 11:49:44 +01:00
angt 1f2f697946 Update README.md 2015-11-12 16:18:44 +01:00
angt b21e4ecea9 Update README.md 2015-11-12 16:07:23 +01:00
angt 44e61295e5 Update .gitignore 2015-11-11 14:09:27 +01:00
angt 78713006b8 Do not poll forever in fd_*_all() 2015-11-11 10:42:03 +01:00
angt a744de7ef2 Fix option_usage() 2015-11-11 10:31:15 +01:00
angt eb3dd064cf Enable nodelay by default 2015-11-11 09:56:27 +01:00
angt 3a7ba82d59 Update configure.ac 2015-11-11 09:36:19 +01:00
angt 9cf4c97468 Move code in src 2015-11-11 09:14:35 +01:00
angt e122d76a32 Code cleanup 2015-11-10 21:51:02 +01:00
angt e9cad43bee Simplify dump_ip_header() 2015-11-10 21:50:31 +01:00
angt b686dd845c Dump ip header when something looks wrong 2015-11-10 17:28:44 +01:00
angt ff8372c70e Hash public data with skey and check it 2015-11-09 21:31:44 +01:00
angt 8fb452de82 Warn if IFF_MULTI_QUEUE is not supported 2015-11-09 12:47:04 +01:00
angt aee6a48da4 Warn if TCP_CONGESTION is not supported 2015-11-09 12:36:53 +01:00
angt a406fb6096 Add the multiqueue option 2015-11-09 12:33:35 +01:00
angt 55275038c3 Add the nodelay option to disable nagle 2015-11-09 12:22:30 +01:00
angt 8c441b1221 Fix option_usage() 2015-11-09 10:24:52 +01:00
angt df8a199bee Add the keyfile option to load a secret key 2015-11-09 10:10:29 +01:00
angt 3a64658eaf Do not allow the same option multiple times 2015-11-09 08:58:57 +01:00
angt f7db7e0c45 Use gettimeofday() instead of clock_gettime() 2015-11-09 08:47:56 +01:00