├── docker-compose.yaml ├── LICENSE ├── Dockerfile.debian ├── Dockerfile └── README.md /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | softether: 5 | image: toprock/softether 6 | cap_add: 7 | - NET_ADMIN 8 | restart: always 9 | ports: 10 | - 53:53 11 | - 444:443 12 | - 992:992 13 | - 1194:1194/udp 14 | - 5555:5555 15 | - 500:500/udp 16 | - 4500:4500/udp 17 | - 1701:1701/udp 18 | volumes: 19 | - "/etc/localtime:/etc/localtime:ro" 20 | - "/etc/timezone:/etc/timezone:ro" 21 | - "./softether_data:/mnt" 22 | - "./softether_log:/root/server_log" 23 | - "./softether_packetlog:/root/packet_log" 24 | - "./softether_securitylog:/root/security_log" 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Dockerfile.debian: -------------------------------------------------------------------------------- 1 | FROM debian:11-slim as builder 2 | #ARG GIT_TAG=5.01.9674 3 | RUN apt-get update && apt-get install -y \ 4 | git \ 5 | cmake \ 6 | gcc \ 7 | g++ \ 8 | make \ 9 | libncurses5-dev \ 10 | libssl-dev \ 11 | libsodium-dev \ 12 | libreadline-dev \ 13 | zlib1g-dev \ 14 | pkg-config 15 | WORKDIR /usr/local/src 16 | RUN git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git 17 | #RUN git clone -b ${GIT_TAG} https://github.com/SoftEtherVPN/SoftEtherVPN.git 18 | RUN cd SoftEtherVPN &&\ 19 | git submodule init &&\ 20 | git submodule update &&\ 21 | ./configure &&\ 22 | make -C build 23 | 24 | FROM debian:11-slim 25 | RUN apt-get update && apt-get install -y openssl \ 26 | libsodium23 \ 27 | libreadline8 28 | ENV PATH="/root:${PATH}" 29 | WORKDIR /root/ 30 | VOLUME /mnt 31 | RUN ln -s /mnt/vpn_server.config vpn_server.config && \ 32 | mkdir /mnt/backup.vpn_server.config &&\ 33 | ln -s /mnt/backup.vpn_server.config backup.vpn_server.config &&\ 34 | ln -s /mnt/lang.config lang.config 35 | COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpnserver /usr/local/src/SoftEtherVPN/build/vpncmd /usr/local/src/SoftEtherVPN/build/libcedar.so /usr/local/src/SoftEtherVPN/build/libmayaqua.so /usr/local/src/SoftEtherVPN/build/hamcore.se2 ./ 36 | 37 | EXPOSE 443/tcp 992/tcp 1194/tcp 1194/udp 5555/tcp 500/udp 4500/udp 38 | CMD ["/root/vpnserver", "execsvc"] 39 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine as builder 2 | #ARG GIT_TAG=5.02.5180 3 | RUN mkdir /usr/local/src && apk add binutils --no-cache\ 4 | build-base \ 5 | readline-dev \ 6 | openssl-dev \ 7 | ncurses-dev \ 8 | git \ 9 | cmake \ 10 | zlib-dev \ 11 | libsodium-dev \ 12 | gnu-libiconv 13 | 14 | ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so 15 | WORKDIR /usr/local/src 16 | RUN git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git 17 | #RUN git clone -b ${GIT_TAG} https://github.com/SoftEtherVPN/SoftEtherVPN.git 18 | ENV USE_MUSL=YES 19 | RUN cd SoftEtherVPN &&\ 20 | git submodule init &&\ 21 | git submodule update &&\ 22 | ./configure &&\ 23 | make -C build 24 | 25 | FROM alpine 26 | RUN apk add --no-cache readline \ 27 | openssl \ 28 | libsodium \ 29 | gnu-libiconv 30 | ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so 31 | ENV LD_LIBRARY_PATH /root 32 | ENV PATH="/root:${PATH}" 33 | WORKDIR /root/ 34 | VOLUME /mnt 35 | RUN ln -s /mnt/vpn_server.config vpn_server.config && \ 36 | mkdir /mnt/backup.vpn_server.config &&\ 37 | ln -s /mnt/backup.vpn_server.config backup.vpn_server.config &&\ 38 | ln -s /mnt/lang.config lang.config 39 | COPY --from=builder /usr/local/src/SoftEtherVPN/build/vpnserver /usr/local/src/SoftEtherVPN/build/vpncmd /usr/local/src/SoftEtherVPN/build/libcedar.so /usr/local/src/SoftEtherVPN/build/libmayaqua.so /usr/local/src/SoftEtherVPN/build/hamcore.se2 ./ 40 | 41 | EXPOSE 443/tcp 992/tcp 1194/tcp 1194/udp 5555/tcp 500/udp 4500/udp 42 | CMD ["/root/vpnserver", "execsvc"] 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This Project was moved to SoftetherVPN 2 | 3 | https://github.com/SoftEtherVPN/SoftetherVPN-docker 4 | 5 | Please change your images to https://hub.docker.com/repository/docker/softethervpn/vpnserver 6 | 7 | 8 | 9 | # softether-docker 10 | 11 | This container is designed to be as small as possible and host a SoftEther VPN Server 12 | It´s based on Alpine so result is around 10MB! 13 | It´s based on the great work of [SoftEherVPN](https://github.com/SoftEtherVPN/SoftEtherVPN/) 14 | 15 | You will be unable to bridge to a physical Ethernet adapter as there is no inside a Container but SecureNAT and other stuff that doesn´t need physical L2 will work. 16 | 17 | 18 | Available Tags 19 | --------- 20 | [![](https://images.microbadger.com/badges/version/toprock/softether.svg)](https://microbadger.com/images/toprock/softether "Get your own version badge on microbadger.com") up to date commits to the development repository 21 | 22 | 23 | [![](https://images.microbadger.com/badges/version/toprock/softether:stable.svg)](https://microbadger.com/images/toprock/softether:stable "Get your own version badge on microbadger.com") release from stable repository 24 | 25 | You can and should always specify your wanted version like `toprock/softether:5.01.9671` or `toprock/softether:4.32.9731` 26 | 27 | Usage docker run 28 | -------- 29 | 30 | This will keep your config and Logfiles in the docker volume `softetherdata` 31 | 32 | `docker run -d --rm --name softether-vpn-server -v softetherdata:/mnt -p 443:443/tcp -p 992:992/tcp -p 1194:1194/udp -p 5555:5555/tcp -p 500:500/udp -p 4500:4500/udp -p 1701:1701/udp --cap-add NET_ADMIN toprock/softether` 33 | 34 | ### Use vpncmd 35 | 36 | With newer releases I include vpncmd directly in the container so you can use it to configure the vpnserver. First start the vpnserver with the given command. Then you can run: 37 | 38 | `docker exec -it softether-vpn-server vpncmd` 39 | 40 | Usage docker-compose 41 | -------- 42 | The same command can be achieved by docker-compose, the docker compose file is in the repository 43 | ``` 44 | version: '3' 45 | 46 | services: 47 | softether: 48 | image: toprock/softether:5.01.9672 49 | cap_add: 50 | - NET_ADMIN 51 | restart: always 52 | ports: 53 | - 53:53 54 | - 444:443 55 | - 992:992 56 | - 1194:1194/udp 57 | - 5555:5555 58 | - 500:500/udp 59 | - 4500:4500/udp 60 | - 1701:1701/udp 61 | volumes: 62 | - "/etc/localtime:/etc/localtime:ro" 63 | - "/etc/timezone:/etc/timezone:ro" 64 | - "./softether_data:/mnt" 65 | - "./softether_log:/root/server_log" 66 | - "./softether_packetlog:/root/packet_log" 67 | - "./softether_securitylog:/root/security_log" 68 | ``` 69 | --------------------------------------------------------------------------------