1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-09-20 10:19:20 +03:00

25 Commits

Author SHA1 Message Date
f197edbc38 Merge d6d0f2dadd into f525b4d660 2025-02-12 23:49:09 +00:00
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
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
2628ac1884 Merge pull request #2091 from siddharth-narayan/oqs-submodule-update
Update liboqs and oqs-provider submodules - Add X25519MLKEM768 NIST f…
2025-01-15 07:22:50 +01:00
972256c578 Update liboqs and oqs-provider submodules - Add X25519MLKEM768 NIST finalized PQ Key exchange 2025-01-14 17:37:55 -06:00
8be6d756b8 Merge pull request #2089 from metalefty/drop_exec
Drop unnecessary exec permission
2025-01-14 07:36:11 +01:00
a6c5f0d135 Drop unnecessary exec permission 2025-01-14 14:35:34 +09:00
c2487c6b2e Merge pull request #2086 from Mastemmah/ArtifactsPublising
Adding artifact publishing for Linux
2025-01-07 11:26:05 +01:00
817214da1f Adding artifact publishing for Linux
Simple Workflow change to download deb packages created within the Linux workflow
2025-01-07 00:13:06 +01:00
015f93f7b7 Merge pull request #2082 from chipitsine/master
stbchecker: modernize .net version
2024-12-15 01:18:01 +01:00
cdd3bddcc6 stbchecker: modernize .net version 2024-12-15 00:55:46 +01:00
0a1f0913d9 Merge pull request #2081 from chipitsine/master
CI: modernize macos versions
2024-12-15 00:49:45 +01:00
18cbd4627a CI: modernize macos versions 2024-12-15 00:25:35 +01:00
e475d70c0b Merge pull request #2056 from nynauy/nynauy-systemd-patch
Correct and simplify systemd service files
2024-09-24 16:47:23 +02:00
e94240d9a0 Merge pull request #2033 from siddharth-narayan/nt-fix
Fix "Not on NT" error message and add uihelp to vpncmd
2024-09-21 21:59:10 +02:00
023eb3465d Correct and simplify systemd service files
Remove unnecessary wrappers and change to start services directly. Also remove misused "EnvironmentFile" and unrecommended "KillMode=process".
2024-09-17 07:03:19 +08:00
5d1ce1a2cd Merge pull request #2051 from chipitsine/master
bump version for upcoming 5187 release
2024-09-09 21:57:51 +02:00
d8569ad31a bump version for upcoming 5187 release 2024-09-09 21:12:38 +02:00
e3e0c33e3b Merge pull request #2044 from Evengard/fix2043
Incorrect variable used while iterating through sessions which makes the loop stuck
2024-09-09 21:06:40 +02:00
8f0deb576c Incorrect variable used while iterating through sessions which makes the loop stuck 2024-08-25 15:36:50 +03:00
27d233a522 Merge branch 'SoftEtherVPN:master' into nt-fix 2024-08-15 04:28:13 -04:00
128fefc63e Add UI helper to vpncmd on Windows 2024-08-15 04:26:15 -04:00
3a25c6bf73 Fix incorrect "Not on NT" error messages 2024-07-17 15:16:11 -07:00
d6d0f2dadd Update BUILD_UNIX.md 2021-06-17 16:00:27 +01:00
68b72d8867 Centos8 requires EPEL repo for libsodium 2021-06-17 15:57:54 +01:00
23 changed files with 298 additions and 27 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 }}

View File

@ -26,6 +26,13 @@ jobs:
cd build
cpack -C Release -G DEB
- name: Upload DEB packages as artifacts
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: deb-packages
path: build/*.deb
- name: Test
run: |
.ci/appveyor-deb-install-test.sh

View File

@ -7,7 +7,7 @@ jobs:
build_and_test:
strategy:
matrix:
os: [macos-14, macos-13, macos-12]
os: [macos-15, macos-14, macos-13]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:

View File

@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.15)
set(BUILD_NUMBER CACHE STRING "The number of the current build.")
if ("${BUILD_NUMBER}" STREQUAL "")
set(BUILD_NUMBER "5186")
set(BUILD_NUMBER "5187")
endif()
if (BUILD_NUMBER LESS 5180)

View File

@ -1,5 +1,5 @@
{
"environments": [ { "BuildNumber": "5186" } ],
"environments": [ { "BuildNumber": "5187" } ],
"configurations": [
{
"name": "x64-native",

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,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

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"

View File

@ -33,6 +33,7 @@ You need to install the following software to build SoftEther VPN for UNIX.
```bash
sudo yum -y groupinstall "Development Tools"
sudo yum -y install epel-release
sudo yum -y install cmake ncurses-devel openssl-devel libsodium-devel readline-devel zlib-devel
```

View File

@ -2138,9 +2138,9 @@ void L2TPProcessInterrupts(L2TP_SERVER *l2tp)
UINT64 l2tpTimeout = L2TP_TUNNEL_TIMEOUT;
// If we got on ANY session a higher timeout than the default L2TP tunnel timeout, increase it
for (i = 0; i < LIST_NUM(t->SessionList); i++)
for (j = 0; j < LIST_NUM(t->SessionList); j++)
{
L2TP_SESSION* s = LIST_DATA(t->SessionList, i);
L2TP_SESSION* s = LIST_DATA(t->SessionList, j);
if (s->TubeRecv != NULL && s->TubeRecv->DataTimeout > l2tpTimeout)
{

View File

@ -4259,7 +4259,7 @@ UINT MsService(char *name, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop, UINT
if ((mode == SVC_MODE_INSTALL || mode == SVC_MODE_UNINSTALL || mode == SVC_MODE_START ||
mode == SVC_MODE_STOP || mode == SVC_MODE_SERVICE) &&
(ms->IsNt == false))
(IsNt() == false))
{
// Tried to use the command for the NT in non-WindowsNT system
MsgBox(NULL, MB_ICONSTOP, _UU("SVC_NT_ONLY"));

View File

@ -170,7 +170,6 @@ typedef struct MS
{
HINSTANCE hInst;
HINSTANCE hKernel32;
bool IsNt;
bool IsAdmin;
HANDLE hCurrentProcess;
UINT CurrentProcessId;

View File

@ -60,7 +60,7 @@ struct DYN_VALUE
#define DEFAULT_CIPHER_LIST "ECDHE+AESGCM:ECDHE+CHACHA20:DHE+AESGCM:DHE+CHACHA20:ECDHE+AES256:DHE+AES256:RSA+AES"
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#define PQ_GROUP_LIST "p521_kyber1024:x25519_kyber768:P-521:X25519:P-256"
#define PQ_GROUP_LIST "X25519MLKEM768:p521_kyber1024:x25519_kyber768:P-521:X25519:P-256"
#endif
// SSL logging function

0
src/Mayaqua/Unix.c Executable file → Normal file
View File

View File

@ -6,7 +6,9 @@
// VPN Command Line Management Utility
#include "Cedar/Cedar.h"
#ifdef OS_WIN32
#include "Cedar/CMInner.h"
#endif
#include "Cedar/Command.h"
#include "Mayaqua/Internat.h"
@ -39,6 +41,10 @@ int main(int argc, char *argv[])
#endif
InitCedar();
#ifdef OS_WIN32
CmExecUiHelperMain();
#endif
s = GetCommandLineUniStr();
if (s == NULL)

View File

@ -4,11 +4,8 @@ After=network.target auditd.service
ConditionPathExists=!@DIR@/softether/vpnbridge/do_not_run
[Service]
Type=forking
EnvironmentFile=-@DIR@/softether/vpnbridge
ExecStart=@DIR@/softether/vpnbridge/vpnbridge start
ExecStop=@DIR@/softether/vpnbridge/vpnbridge stop
KillMode=process
Type=exec
ExecStart=@DIR@/softether/vpnbridge/vpnbridge execsvc
Restart=on-failure
# Hardening

View File

@ -4,11 +4,8 @@ After=network.target auditd.service
ConditionPathExists=!@DIR@/softether/vpnclient/do_not_run
[Service]
Type=forking
EnvironmentFile=-@DIR@/softether/vpnclient
ExecStart=@DIR@/softether/vpnclient/vpnclient start
ExecStop=@DIR@/softether/vpnclient/vpnclient stop
KillMode=process
Type=exec
ExecStart=@DIR@/softether/vpnclient/vpnclient execsvc
Restart=on-failure
# Hardening

View File

@ -4,12 +4,9 @@ After=network.target auditd.service
ConditionPathExists=!@DIR@/softether/vpnserver/do_not_run
[Service]
Type=forking
Type=exec
TasksMax=infinity
EnvironmentFile=-@DIR@/softether/vpnserver
ExecStart=@DIR@/softether/vpnserver/vpnserver start
ExecStop=@DIR@/softether/vpnserver/vpnserver stop
KillMode=process
ExecStart=@DIR@/softether/vpnserver/vpnserver execsvc
Restart=on-failure
# Hardening