Skip to content

Commit 16be0ce

Browse files
authored
Add Wintun support (slackhq#289)
1 parent 0577c09 commit 16be0ce

File tree

17 files changed

+1263
-82
lines changed

17 files changed

+1263
-82
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
- Build with CGO_ENABLED=0 set, to create more portable binaries. This could
3030
have an affect on DNS resolution if you rely on anything non-standard. (#421)
3131

32+
- Windows now uses the [wintun](https://www.wintun.net/) driver which does not require installation. This driver
33+
is a large improvement over the TAP driver that was used in previous versions. If you had a previous version
34+
of `nebula` running, you will want to disable the tap driver in Control Panel, or uninstall the `tap0901` driver
35+
before running this version. (#289)
36+
3237
### Deprecated
3338

3439
- The `preferred_ranges` option has been supported as a replacement for

control.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ func (c *Control) Start() {
6262
func (c *Control) Stop() {
6363
//TODO: stop tun and udp routines, the lock on hostMap effectively does that though
6464
c.CloseAllTunnels(false)
65+
if err := c.f.Close(); err != nil {
66+
c.l.WithError(err).Error("Close interface failed")
67+
}
6568
c.cancel()
6669
c.l.Info("Goodbye")
6770
}

dist/windows/wintun/LICENSE.txt

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
Prebuilt Binaries License
2+
-------------------------
3+
4+
1. DEFINITIONS. "Software" means the precise contents of the "wintun.dll"
5+
files that are included in the .zip file that contains this document as
6+
downloaded from wintun.net/builds.
7+
8+
2. LICENSE GRANT. WireGuard LLC grants to you a non-exclusive and
9+
non-transferable right to use Software for lawful purposes under certain
10+
obligations and limited rights as set forth in this agreement.
11+
12+
3. RESTRICTIONS. Software is owned and copyrighted by WireGuard LLC. It is
13+
licensed, not sold. Title to Software and all associated intellectual
14+
property rights are retained by WireGuard. You must not:
15+
a. reverse engineer, decompile, disassemble, extract from, or otherwise
16+
modify the Software;
17+
b. modify or create derivative work based upon Software in whole or in
18+
parts, except insofar as only the API interfaces of the "wintun.h" file
19+
distributed alongside the Software (the "Permitted API") are used;
20+
c. remove any proprietary notices, labels, or copyrights from the Software;
21+
d. resell, redistribute, lease, rent, transfer, sublicense, or otherwise
22+
transfer rights of the Software without the prior written consent of
23+
WireGuard LLC, except insofar as the Software is distributed alongside
24+
other software that uses the Software only via the Permitted API;
25+
e. use the name of WireGuard LLC, the WireGuard project, the Wintun
26+
project, or the names of its contributors to endorse or promote products
27+
derived from the Software without specific prior written consent.
28+
29+
4. LIMITED WARRANTY. THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF
30+
ANY KIND. WIREGUARD LLC HEREBY EXCLUDES AND DISCLAIMS ALL IMPLIED OR
31+
STATUTORY WARRANTIES, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS
32+
FOR A PARTICULAR PURPOSE, QUALITY, NON-INFRINGEMENT, TITLE, RESULTS,
33+
EFFORTS, OR QUIET ENJOYMENT. THERE IS NO WARRANTY THAT THE PRODUCT WILL BE
34+
ERROR-FREE OR WILL FUNCTION WITHOUT INTERRUPTION. YOU ASSUME THE ENTIRE
35+
RISK FOR THE RESULTS OBTAINED USING THE PRODUCT. TO THE EXTENT THAT
36+
WIREGUARD LLC MAY NOT DISCLAIM ANY WARRANTY AS A MATTER OF APPLICABLE LAW,
37+
THE SCOPE AND DURATION OF SUCH WARRANTY WILL BE THE MINIMUM PERMITTED UNDER
38+
SUCH LAW. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
39+
WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR
40+
A PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE
41+
EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
42+
43+
5. LIMITATION OF LIABILITY. To the extent not prohibited by law, in no event
44+
WireGuard LLC or any third-party-developer will be liable for any lost
45+
revenue, profit or data or for special, indirect, consequential, incidental
46+
or punitive damages, however caused regardless of the theory of liability,
47+
arising out of or related to the use of or inability to use Software, even
48+
if WireGuard LLC has been advised of the possibility of such damages.
49+
Solely you are responsible for determining the appropriateness of using
50+
Software and accept full responsibility for all risks associated with its
51+
exercise of rights under this agreement, including but not limited to the
52+
risks and costs of program errors, compliance with applicable laws, damage
53+
to or loss of data, programs or equipment, and unavailability or
54+
interruption of operations. The foregoing limitations will apply even if
55+
the above stated warranty fails of its essential purpose. You acknowledge,
56+
that it is in the nature of software that software is complex and not
57+
completely free of errors. In no event shall WireGuard LLC or any
58+
third-party-developer be liable to you under any theory for any damages
59+
suffered by you or any user of Software or for any special, incidental,
60+
indirect, consequential or similar damages (including without limitation
61+
damages for loss of business profits, business interruption, loss of
62+
business information or any other pecuniary loss) arising out of the use or
63+
inability to use Software, even if WireGuard LLC has been advised of the
64+
possibility of such damages and regardless of the legal or quitable theory
65+
(contract, tort, or otherwise) upon which the claim is based.
66+
67+
6. TERMINATION. This agreement is affected until terminated. You may
68+
terminate this agreement at any time. This agreement will terminate
69+
immediately without notice from WireGuard LLC if you fail to comply with
70+
the terms and conditions of this agreement. Upon termination, you must
71+
delete Software and all copies of Software and cease all forms of
72+
distribution of Software.
73+
74+
7. SEVERABILITY. If any provision of this agreement is held to be
75+
unenforceable, this agreement will remain in effect with the provision
76+
omitted, unless omission would frustrate the intent of the parties, in
77+
which case this agreement will immediately terminate.
78+
79+
8. RESERVATION OF RIGHTS. All rights not expressly granted in this agreement
80+
are reserved by WireGuard LLC. For example, WireGuard LLC reserves the
81+
right at any time to cease development of Software, to alter distribution
82+
details, features, specifications, capabilities, functions, licensing
83+
terms, release dates, APIs, ABIs, general availability, or other
84+
characteristics of the Software.

0 commit comments

Comments
 (0)