forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WireGuard support for tunnel traffic encryption
This PR implements antrea-io#2243. Change tunnel traffic encryption option to enum type. The options contains none (default), ipsec and wireguard. Signed-off-by: Xu Liu <[email protected]>
- Loading branch information
Showing
53 changed files
with
1,805 additions
and
360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ARG GO_VERSION | ||
ARG WIREGUARD_GO_VERSION | ||
|
||
FROM golang:${GO_VERSION} as builder | ||
|
||
RUN git clone https://git.zx2c4.com/wireguard-go && \ | ||
cd wireguard-go && \ | ||
git checkout ${WIREGUARD_GO_VERSION} && \ | ||
make && \ | ||
make install | ||
|
||
RUN git clone https://git.zx2c4.com/wireguard-tools && \ | ||
cd wireguard-tools && \ | ||
cd src && \ | ||
make && \ | ||
make install | ||
|
||
FROM ubuntu:20.04 | ||
COPY --from=builder /usr/bin/wireguard-go /usr/bin/wg /usr/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# images/wireguard-go | ||
|
||
This Docker image is a very lightweight image based on Ubuntu 20.04 which | ||
includes WireGuard golang implementation and wireguard-tools. It can be used | ||
for Kind clusters for tests when injected as a sidecar to antrea-agent. | ||
The version is available at <https://github.com/WireGuard/wireguard-go/releases>. | ||
|
||
If you need to build a new version of the image and push it to Dockerhub, you | ||
can run the following: | ||
|
||
```bash | ||
cd build/images/wireguard-go | ||
GO_VERSION=$(head -n 1 ../deps/go-version) | ||
WIREGUARD_GO_VERSION=0.0.20210424 | ||
docker build -t antrea/wireguard-go:$WIREGUARD_GO_VERSION --build-arg GO_VERSION=$GO_VERSION --build-arg WIREGUARD_GO_VERSION=$WIREGUARD_GO_VERSION . | ||
docker push antrea/wireguard-go:$WIREGUARD_GO_VERSION | ||
``` | ||
|
||
The `docker push` command will fail if you do not have permission to push to the | ||
`antrea` Dockerhub repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.