|
1 | 1 | # [WireGuard](https://www.wireguard.com/) for Windows |
2 | 2 |
|
3 | | -***If you've come here looking to simply run WireGuard for Windows, [you may download it here](https://www.wireguard.com/install/).*** |
| 3 | +This is a fully-featured WireGuard client for Windows that uses [Wintun](https://www.wintun.net/). It is the only official and recommended way of using WireGuard on Windows. |
4 | 4 |
|
5 | | -This is a fully-featured WireGuard client for Windows that uses [Wintun](https://www.wintun.net/). |
| 5 | +## Download & Install |
6 | 6 |
|
7 | | -### Documentation |
| 7 | +If you've come here looking to simply run WireGuard for Windows, [the main download page has links](https://www.wireguard.com/install/). There you will find two things: |
8 | 8 |
|
9 | | -In addition to this [`README.md`](README.md), which contains information about building and developing WireGuard for Windows, the following documents are also available: |
| 9 | +- [The WireGuard Installer](https://download.wireguard.com/windows-client/wireguard-installer.exe) – This selects the most recent version for your architecture, downloads it, checks signatures and hashes, and installs it. |
| 10 | +- [Standalone MSIs](https://download.wireguard.com/windows-client/) – These are for system admins who want to deploy the MSIs directly. For most end users, the ordinary installer takes care of downloading these automatically. |
10 | 11 |
|
11 | | -- [`adminregistry.md`](adminregistry.md) – A list of registry keys settable by the system administrator for changing the behavior of the application. |
12 | | -- [`attacksurface.md`](attacksurface.md) – A discussion of the various components from a security perspective, so that future auditors of this code have a head start in assessing its security design. |
13 | | -- [`enterprise.md`](enterprise.md) – A summary of various features and tips for making the application usable in enterprise settings. |
14 | | -- [`netquirk.md`](netquirk.md) – A description of various networking quirks and "kill-switch" semantics. |
| 12 | +## Documentation |
15 | 13 |
|
16 | | -### Building |
| 14 | +In addition to this [`README.md`](README.md), the following documents are also available: |
17 | 15 |
|
18 | | -Windows 10 64-bit or Windows Server 2019, and Git for Windows is required. The build script will take care of downloading, verifying, and extracting the right versions of the various dependencies: |
| 16 | +- [`adminregistry.md`](docs/adminregistry.md) – A list of registry keys settable by the system administrator for changing the behavior of the application. |
| 17 | +- [`attacksurface.md`](docs/attacksurface.md) – A discussion of the various components from a security perspective, so that future auditors of this code have a head start in assessing its security design. |
| 18 | +- [`buildrun.md`](docs/buildrun.md) – Instructions on building, localizing, running, and developing for this repository. |
| 19 | +- [`enterprise.md`](docs/enterprise.md) – A summary of various features and tips for making the application usable in enterprise settings. |
| 20 | +- [`netquirk.md`](docs/netquirk.md) – A description of various networking quirks and "kill-switch" semantics. |
19 | 21 |
|
20 | | -```text |
21 | | -C:\Projects> git clone https://git.zx2c4.com/wireguard-windows |
22 | | -C:\Projects> cd wireguard-windows |
23 | | -C:\Projects\wireguard-windows> build |
24 | | -``` |
25 | | - |
26 | | -### Running |
| 22 | +## License |
27 | 23 |
|
28 | | -After you've built the application, run `amd64\wireguard.exe` or `x86\wireguard.exe` to install the manager service and show the UI. |
| 24 | +This repository is MIT-licensed. |
29 | 25 |
|
30 | 26 | ```text |
31 | | -C:\Projects\wireguard-windows> amd64\wireguard.exe |
| 27 | +Copyright (C) 2018-2020 WireGuard LLC. All Rights Reserved. |
| 28 | +
|
| 29 | +Permission is hereby granted, free of charge, to any person obtaining a |
| 30 | +copy of this software and associated documentation files (the "Software"), |
| 31 | +to deal in the Software without restriction, including without limitation |
| 32 | +the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 33 | +and/or sell copies of the Software, and to permit persons to whom the |
| 34 | +Software is furnished to do so, subject to the following conditions: |
| 35 | +
|
| 36 | +The above copyright notice and this permission notice shall be included in |
| 37 | +all copies or substantial portions of the Software. |
| 38 | +
|
| 39 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 40 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 41 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 42 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 43 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 44 | +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 45 | +DEALINGS IN THE SOFTWARE. |
32 | 46 | ``` |
33 | | - |
34 | | -Since WireGuard requires the Wintun driver to be installed, and this generally requires a valid Microsoft signature, you may benefit from first installing a release of WireGuard for Windows from the official [wireguard.com](https://www.wireguard.com/install/) builds, which bundles a Microsoft-signed Wintun, and then subsequently run your own wireguard.exe. Alternatively, you can craft your own installer using the `quickinstall.bat` script. |
35 | | - |
36 | | -### Optional: Localizing |
37 | | - |
38 | | -To translate WireGuard UI to your language: |
39 | | - |
40 | | -1. Upgrade `resources.rc` accordingly. Follow the pattern. |
41 | | - |
42 | | -2. Make a new directory in `locales\` containing the language ID: |
43 | | - |
44 | | - ```text |
45 | | - C:\Projects\wireguard-windows> mkdir locales\<langID> |
46 | | - ``` |
47 | | - |
48 | | -3. Configure and run `build` to prepare initial `locales\<langID>\messages.gotext.json` file: |
49 | | - |
50 | | - ```text |
51 | | - C:\Projects\wireguard-windows> set GoGenerate=yes |
52 | | - C:\Projects\wireguard-windows> build |
53 | | - C:\Projects\wireguard-windows> copy locales\<langID>\out.gotext.json locales\<langID>\messages.gotext.json |
54 | | - ``` |
55 | | - |
56 | | -4. Translate `locales\<langID>\messages.gotext.json`. See other language message files how to translate messages and how to tackle plural. For this step, the project is currently using [CrowdIn](https://crowdin.com/translate/WireGuard); please make sure your translations make it there in order to be added here. |
57 | | - |
58 | | -5. Run `build` from the step 3 again, and test. |
59 | | - |
60 | | -6. Repeat from step 4. |
61 | | - |
62 | | -### Optional: Creating the Installer |
63 | | - |
64 | | -The installer build script will take care of downloading, verifying, and extracting the right versions of the various dependencies: |
65 | | - |
66 | | -```text |
67 | | -C:\Projects\wireguard-windows> cd installer |
68 | | -C:\Projects\wireguard-windows\installer> build |
69 | | -``` |
70 | | - |
71 | | -### Optional: Signing Binaries |
72 | | - |
73 | | -Add a file called `sign.bat` in the root of this repository with these contents, or similar: |
74 | | - |
75 | | -```text |
76 | | -set SigningCertificate=DF98E075A012ED8C86FBCF14854B8F9555CB3D45 |
77 | | -set TimestampServer=http://timestamp.digicert.com |
78 | | -``` |
79 | | - |
80 | | -After, run the above `build` commands as usual, from a shell that has [`signtool.exe`](https://docs.microsoft.com/en-us/windows/desktop/SecCrypto/signtool) in its `PATH`, such as the Visual Studio 2017 command prompt. |
81 | | - |
82 | | -### Alternative: Building from Linux |
83 | | - |
84 | | -You must first have Mingw and ImageMagick installed. |
85 | | - |
86 | | -```text |
87 | | -$ sudo apt install mingw-w64 imagemagick |
88 | | -$ git clone https://git.zx2c4.com/wireguard-windows |
89 | | -$ cd wireguard-windows |
90 | | -$ make |
91 | | -``` |
92 | | - |
93 | | -You can deploy the 64-bit build to an SSH host specified by the `DEPLOYMENT_HOST` environment variable (default "winvm") to the remote directory specified by the `DEPLOYMENT_PATH` environment variable (default "Desktop") by using the `deploy` target: |
94 | | - |
95 | | -```text |
96 | | -$ make deploy |
97 | | -``` |
98 | | - |
99 | | -### [`wg(8)`](https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8) Support for Windows |
100 | | - |
101 | | -The command line utility [`wg(8)`](https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8) works well on Windows. Being a Unix-centric project, it compiles with a Makefile and MingW: |
102 | | - |
103 | | -```text |
104 | | -$ git clone https://git.zx2c4.com/wireguard-tools |
105 | | -$ PLATFORM=windows make -C wireguard-tools/src |
106 | | -$ stat wireguard-tools/src/wg.exe |
107 | | -``` |
108 | | - |
109 | | -It interacts with WireGuard instances run by the main WireGuard for Windows program. |
110 | | - |
111 | | -When building on Windows, the aforementioned `build.bat` script takes care of building this. |
0 commit comments