1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-04-03 18:00:08 +03:00

Compare commits

...

4 Commits

Author SHA1 Message Date
korokke2
008fae65c1
Merge a8bc827706 into f525b4d660 2025-02-10 20:27:45 +01:00
Ilya Shipitsin
f525b4d660
Merge pull request #2101 from chipitsine/master
CI: move docker build machinery to the main repo
2025-02-10 19:59:22 +01:00
Ilia Shipitsin
a081fdd5c8 CI: move docker build machinery to the main repo
more details: https://github.com/SoftEtherVPN/SoftetherVPN-docker/issues/4
2025-02-09 23:32:26 +01:00
korokke2
a8bc827706
Update description
Updated with the most recent and appropriate description.
2024-11-12 12:06:06 +09:00
7 changed files with 268 additions and 1 deletions

59
.github/workflows/docker-vpnbridge.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: docker-vpnbridge
on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
docker-vpnbridge:
strategy:
matrix:
variant: [
{ name: amd64, platform: "linux/amd64", repo: "softethervpn/vpnbridge" },
{ name: arm64, platform: "linux/arm64", repo: "softethervpn/vpnbridge-arm64" }
]
name: vpnbridge/${{ matrix.variant.name }}
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'SoftEtherVPN' }}
steps:
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.variant.repo }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v9.2.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
target: vpnbridge
platforms: ${{ matrix.variant.platform }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

59
.github/workflows/docker-vpnclient.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: docker-vpnclient
on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
docker-vpnclient:
strategy:
matrix:
variant: [
{ name: amd64, platform: "linux/amd64", repo: "softethervpn/vpnclient" },
{ name: arm64, platform: "linux/arm64", repo: "softethervpn/vpnclient-arm64" }
]
name: vpnclient/${{ matrix.variant.name }}
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'SoftEtherVPN' }}
steps:
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.variant.repo }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v9.2.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
target: vpnclient
platforms: ${{ matrix.variant.platform }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

59
.github/workflows/docker-vpnserver.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: docker-vpnserver
on:
push:
branches:
- 'master'
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
docker:
strategy:
matrix:
variant: [
{ name: amd64, platform: "linux/amd64", repo: "softethervpn/vpnserver" },
{ name: arm64, platform: "linux/arm64", repo: "softethervpn/vpnserver-arm64" }
]
name: vpnserver/${{ matrix.variant.name }}
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'SoftEtherVPN' }}
steps:
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.variant.repo }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v9.2.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
target: vpnserver
push: ${{ github.event_name != 'pull_request' }}
platforms: ${{ matrix.variant.platform }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

51
Dockerfile Normal file
View File

@ -0,0 +1,51 @@
FROM alpine AS builder
RUN mkdir /usr/local/src && apk add binutils --no-cache\
linux-headers \
build-base \
readline-dev \
openssl-dev \
ncurses-dev \
git \
cmake \
zlib-dev \
libsodium-dev \
gnu-libiconv
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so
ADD ./ /usr/local/src/SoftEtherVPN/
WORKDIR /usr/local/src
ENV USE_MUSL=YES
ENV CMAKE_FLAGS="-DSE_PIDDIR=/run/softether -DSE_LOGDIR=/var/log/softether -DSE_DBDIR=/var/lib/softether"
RUN cd SoftEtherVPN &&\
./configure &&\
make -j $(getconf _NPROCESSORS_ONLN) -C build
FROM alpine AS base
RUN apk add --no-cache readline \
openssl \
libsodium \
gnu-libiconv \
iptables
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so
WORKDIR /usr/local/bin
VOLUME /var/log/softether
VOLUME /var/lib/softether
VOLUME /run/softether
COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpncmd /usr/local/src/SoftEtherVPN/build/hamcore.se2 ./
COPY --from=builder /usr/local/src/SoftEtherVPN/build/libcedar.so /usr/local/src/SoftEtherVPN/build/libmayaqua.so /usr/local/lib/
FROM base AS vpnserver
COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpnserver ./
EXPOSE 443/tcp 992/tcp 1194/tcp 1194/udp 5555/tcp 500/udp 4500/udp
CMD ["/usr/local/bin/vpnserver", "execsvc"]
FROM base AS vpnclient
COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpnclient ./
CMD ["/usr/local/bin/vpnclient", "execsvc"]
FROM base AS vpnbridge
COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpnbridge ./
CMD ["/usr/local/bin/vpnbridge", "execsvc"]

View File

@ -2,4 +2,4 @@ SoftEther VPN ("SoftEther" means "Software Ethernet") is an open-source cross-pl
Its protocol is very fast and it can be used in very restricted environments, as it's able to transfer packets over DNS and ICMP. Its protocol is very fast and it can be used in very restricted environments, as it's able to transfer packets over DNS and ICMP.
The server includes a free Dynamic DNS service, which can be used to access the server even if the public IP address changes. The server includes a free Dynamic DNS service, which can be used to access the server even if the public IP address changes.
A NAT-Traversal function is also available, very useful in case the required ports cannot be opened on the firewall. A NAT-Traversal function is also available, very useful in case the required ports cannot be opened on the firewall.
The supported third party protocols are OpenVPN, L2TP/IPSec and SSTP. The supported third party protocols are OpenVPN, L2TP/IPSec, SSTP and WireGuard.

View File

@ -0,0 +1,16 @@
version: '3'
services:
softether:
image: softethervpn/vpnclient:latest
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- NET_ADMIN
restart: always
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
- "./softether_data:/var/lib/softether"
- "./softether_log:/var/log/softether"
# - "./adminip.txt:/var/lib/softether/adminip.txt:ro"

23
docker-compose.yaml Normal file
View File

@ -0,0 +1,23 @@
version: '3'
services:
softether:
image: softethervpn/vpnserver:latest
cap_add:
- NET_ADMIN
restart: always
ports:
#- 53:53 #DNS tunneling
- 443:443 #Management and HTTPS tunneling
- 992:992 #HTTPS tunneling
#- 1194:1194/udp #OpenVPN
#- 5555:5555 #HTTPS tunneling
#- 500:500/udp #IPsec/L2TP
#- 4500:4500/udp #IPsec/L2TP
#- 1701:1701/udp #IPsec/L2TP
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
- "./softether_data:/var/lib/softether"
- "./softether_log:/var/log/softether"
# - "./adminip.txt:/var/lib/softether/adminip.txt:ro"