PORTS 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. OpenVPN
  2. Copyright (C) 2002-2018 OpenVPN Inc <sales@openvpn.net>
  3. OpenVPN has been written to try to avoid features
  4. that are not standardized well across different
  5. OSes, so porting OpenVPN itself will probably be
  6. straightforward if a tun or tap driver already exists.
  7. Where special OS features are used, they are usually
  8. bracketed with #ifdef HAVE_SOME_FUNCTION.
  9. PLATFORM STATUS:
  10. * Linux 2.2+ (supported)
  11. * Solaris (supported)
  12. * OpenBSD 3.0 (supported but pthreads are broken)
  13. * Max OS X Darwin
  14. * FreeBSD
  15. * NetBSD
  16. * Windows
  17. * 64 bit platforms -- I have heard reports that
  18. OpenVPN runs on Alpha Linux and FreeBSD.
  19. * ARM -- I have heard of at least one case
  20. where OpenVPN was successfully built and
  21. run on the ARM architecture.
  22. PORTING NOTES:
  23. * Make sure that OpenSSL will build on your
  24. platform.
  25. * Make sure that a tun or tap virtual device
  26. driver exists for your platform. See
  27. http://vtun.sourceforge.net/tun/ for examples
  28. of tun and tap drivers that have been written
  29. for Linux, Solaris, and FreeBSD.
  30. * Make sure you have autoconf 2.50+ and
  31. automake 1.6+.
  32. * Edit configure.ac, adding platform specific
  33. config code, and a TARGET_YOUROS define.
  34. * Add platform-specific includes to syshead.h.
  35. * Add an #ifdef TARGET_YOUROS to the do_ifconfig()
  36. function in tun.c to generate a correct "ifconfig"
  37. command for your platform. Note that OpenVPN
  38. determines the ifconfig path at ./configure time.
  39. * Add an ifconfig_order() variant for your OS so
  40. openvpn knows whether to call ifconfig before
  41. or after tun/tap dev open.
  42. * Add an #ifdef TARGET_YOUROS block in tun.c and define
  43. the open_tun, close_tun, read_tun, and write_tun
  44. functions. If your tun/tap virtual device is
  45. sufficiently generic, you may be able to use the
  46. default case.
  47. * Add appropriate code to route.c to handle
  48. the route command on your platform. This
  49. is necessary for the --route option to
  50. work correctly.
  51. * After you successfully build OpenVPN, run
  52. the loopback tests as described in INSTALL.
  53. * For the next test, confirm that the UDP socket
  54. functionality is working independently of the
  55. tun device, by doing something like:
  56. ./openvpn --remote localhost --verb 9 --ping 1 --dev null
  57. * Now try with --remote [a real host]
  58. * Now try with a real tun/tap device, you will
  59. need to figure out the appropriate ifconfig
  60. command to use once openvpn has opened the tun/tap
  61. device.
  62. * Once you have simple tests working on the tun device,
  63. try more complex tests such as using TLS mode.
  64. * Stress test the link by doing ping -f across it.
  65. * Make sure that packet fragmenting is happening
  66. correctly by doing a ping -s 2000 or higher.
  67. * Ensure that OpenVPN on your platform will talk
  68. to OpenVPN on other platforms such as Linux.
  69. Some tun/tap driver implementations will prepend
  70. unnecessary stuff onto the datagram that must be
  71. disabled with an explicit ioctl call if cross-platform
  72. compatibility is to be preserved. You can see some
  73. examples of this in tun.c.
  74. * If your system supports pthreads, try building
  75. with ./configure --enable-pthread and do a stress
  76. test in TLS mode.
  77. * Try the ultimate stress test which is --gremlin
  78. --reneg-sec 10 in TLS mode (preferably with pthreads
  79. enabled), then do a flood ping across the tunnel
  80. (ping -f remote-endpoint) in both directions and let
  81. it run overnight. --gremlin will induce massive
  82. corruption and packet loss, but you win if you
  83. wake up the next morning and both peers are still
  84. running and occasionally even succeeding in their
  85. attempted once-per-10-seconds TLS handshake.
  86. * When it's working, submit your patch to
  87. <openvpn-devel@lists.sourceforge.net>
  88. and rejoice :)