-
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.
Merge pull request #3 from sdslabs/wireguard
Add Wireguard
- Loading branch information
Showing
37 changed files
with
1,398 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.git | ||
.gitignore | ||
.github | ||
.gitattributes | ||
READMETEMPLATE.md | ||
README.md |
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 @@ | ||
# This file is globally distributed to all container image projects from | ||
# https://github.com/linuxserver/docker-jenkins-builder/blob/master/.editorconfig | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
# trim_trailing_whitespace may cause unintended issues and should not be globally set true | ||
trim_trailing_whitespace = false | ||
|
||
[{Dockerfile*,**.yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}] | ||
indent_style = space | ||
indent_size = 4 |
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,17 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
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,44 @@ | ||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# ========================= | ||
# Operating System Files | ||
# ========================= | ||
|
||
# OSX | ||
# ========================= | ||
|
||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear on external disk | ||
.Spotlight-V100 | ||
.Trashes | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
.jenkins-external |
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,56 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM ghcr.io/linuxserver/baseimage-alpine:3.18 | ||
|
||
# set version label | ||
ARG BUILD_DATE | ||
ARG VERSION | ||
ARG WIREGUARD_RELEASE | ||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" | ||
LABEL maintainer="thespad" | ||
|
||
RUN \ | ||
echo "**** install dependencies ****" && \ | ||
apk add --no-cache --virtual=build-dependencies \ | ||
build-base \ | ||
elfutils-dev \ | ||
gcc \ | ||
git \ | ||
linux-headers && \ | ||
apk add --no-cache \ | ||
bc \ | ||
coredns \ | ||
gnupg \ | ||
grep \ | ||
iproute2 \ | ||
iptables \ | ||
ip6tables \ | ||
iputils \ | ||
libcap-utils \ | ||
libqrencode \ | ||
net-tools \ | ||
openresolv \ | ||
perl && \ | ||
echo "wireguard" >> /etc/modules && \ | ||
echo "**** install wireguard-tools ****" && \ | ||
if [ -z ${WIREGUARD_RELEASE+x} ]; then \ | ||
WIREGUARD_RELEASE=$(curl -sX GET "https://api.github.com/repos/WireGuard/wireguard-tools/tags" \ | ||
| jq -r .[0].name); \ | ||
fi && \ | ||
cd /app && \ | ||
git clone https://git.zx2c4.com/wireguard-tools && \ | ||
cd wireguard-tools && \ | ||
git checkout "${WIREGUARD_RELEASE}" && \ | ||
sed -i 's|\[\[ $proto == -4 \]\] && cmd sysctl -q net\.ipv4\.conf\.all\.src_valid_mark=1|[[ $proto == -4 ]] \&\& [[ $(sysctl -n net.ipv4.conf.all.src_valid_mark) != 1 ]] \&\& cmd sysctl -q net.ipv4.conf.all.src_valid_mark=1|' src/wg-quick/linux.bash && \ | ||
make -C src -j$(nproc) && \ | ||
make -C src install && \ | ||
echo "**** clean up ****" && \ | ||
apk del --no-network build-dependencies && \ | ||
rm -rf \ | ||
/tmp/* | ||
|
||
# add local files | ||
COPY /root / | ||
|
||
# ports and volumes | ||
EXPOSE 51820/udp |
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,56 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.18 | ||
|
||
# set version label | ||
ARG BUILD_DATE | ||
ARG VERSION | ||
ARG WIREGUARD_RELEASE | ||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" | ||
LABEL maintainer="thespad" | ||
|
||
RUN \ | ||
echo "**** install dependencies ****" && \ | ||
apk add --no-cache --virtual=build-dependencies \ | ||
build-base \ | ||
elfutils-dev \ | ||
gcc \ | ||
git \ | ||
linux-headers && \ | ||
apk add --no-cache \ | ||
bc \ | ||
coredns \ | ||
gnupg \ | ||
grep \ | ||
iproute2 \ | ||
iptables \ | ||
ip6tables \ | ||
iputils \ | ||
libcap-utils \ | ||
libqrencode \ | ||
net-tools \ | ||
openresolv \ | ||
perl && \ | ||
echo "wireguard" >> /etc/modules && \ | ||
echo "**** install wireguard-tools ****" && \ | ||
if [ -z ${WIREGUARD_RELEASE+x} ]; then \ | ||
WIREGUARD_RELEASE=$(curl -sX GET "https://api.github.com/repos/WireGuard/wireguard-tools/tags" \ | ||
| jq -r .[0].name); \ | ||
fi && \ | ||
cd /app && \ | ||
git clone https://git.zx2c4.com/wireguard-tools && \ | ||
cd wireguard-tools && \ | ||
git checkout "${WIREGUARD_RELEASE}" && \ | ||
sed -i 's|\[\[ $proto == -4 \]\] && cmd sysctl -q net\.ipv4\.conf\.all\.src_valid_mark=1|[[ $proto == -4 ]] \&\& [[ $(sysctl -n net.ipv4.conf.all.src_valid_mark) != 1 ]] \&\& cmd sysctl -q net.ipv4.conf.all.src_valid_mark=1|' src/wg-quick/linux.bash && \ | ||
make -C src -j$(nproc) && \ | ||
make -C src install && \ | ||
echo "**** clean up ****" && \ | ||
apk del --no-network build-dependencies && \ | ||
rm -rf \ | ||
/tmp/* | ||
|
||
# add local files | ||
COPY /root / | ||
|
||
# ports and volumes | ||
EXPOSE 51820/udp |
Oops, something went wrong.