5 Commits

Author SHA1 Message Date
Roman Zakharchuk e628cbd609 set update from amnezia.org (#108)
* set update from amnezia.org

* add update config to windows7 build

* set version to 2.0.2
2026-06-26 14:48:32 +08:00
Roman Zakharchuk c9740b17ad fix h values highlight 2026-06-25 14:41:49 +02:00
Roman Zakharchuk d4498cf46a win7 build scripts (#86) 2026-06-22 14:38:12 +07:00
vkamn 8e0e378414 chore: bump app version (#105) 2026-06-12 21:53:06 +07:00
Yaroslav Gurov d2567418e9 chore: update awg-go version 2026-06-12 16:30:36 +02:00
11 changed files with 370 additions and 35 deletions
+26
View File
@@ -0,0 +1,26 @@
name: build7
on:
workflow_dispatch:
jobs:
build7:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: run build
run: build7.bat
shell: cmd
- name: run installer build
run: installer/build7.bat
shell: cmd
- name: upload installer artifacts
uses: actions/upload-artifact@v4
with:
name: installer artifacts
path: installer/dist/**
retention-days: 7
+64
View File
@@ -0,0 +1,64 @@
name: release7
on:
workflow_dispatch:
jobs:
release7:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: prepare version
id: get_version
run: |
VERSION=$(grep 'Number = "' version/version.go | sed 's/.*Number = "\(.*\)"/\1/')
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: prepare sign
env:
SIGN_PFX_BASE64: ${{ secrets.SIGN_PFX_BASE64 }}
SIGN_BAT_BASE64: ${{ secrets.SIGN_BAT_BASE64 }}
run: |
echo $SIGN_PFX_BASE64 | base64 --decode > sign.pfx
echo $SIGN_BAT_BASE64 | base64 --decode > sign.bat
shell: bash
- name: prepare installer sign
env:
SIGN_PFX_BASE64: ${{ secrets.SIGN_PFX_BASE64 }}
SIGN_BAT_BASE64: ${{ secrets.SIGN_BAT_BASE64 }}
run: |
echo $SIGN_PFX_BASE64 | base64 --decode > installer/sign.pfx
echo $SIGN_BAT_BASE64 | base64 --decode > installer/sign.bat
shell: bash
- name: prepare signtool
run: |
$signtoolExe = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -Filter signtool.exe | Where-Object { $_.DirectoryName -match "\\x64$" } | Select-Object -First 1
$signtoolPath = $signtoolExe.DirectoryName
echo "Adding $signtoolPath to PATH"
echo "$signtoolPath" >> $env:GITHUB_PATH
shell: pwsh
- name: run build
run: build7.bat
shell: cmd
- name: run installer build
run: installer/build7.bat
shell: cmd
- name: prepare release
id: get_release_tag
uses: robinraju/release-downloader@v1
with:
latest: true
- name: update release
uses: softprops/action-gh-release@v2
with:
files: installer/dist/**
tag_name: ${{steps.get_release_tag.outputs.tag_name}}
+59
View File
@@ -0,0 +1,59 @@
name: sign-build7
on:
workflow_dispatch:
jobs:
sign-build7:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: prepare version
id: get_version
run: |
VERSION=$(grep 'Number = "' version/version.go | sed 's/.*Number = "\(.*\)"/\1/')
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: prepare sign
env:
SIGN_PFX_BASE64: ${{ secrets.SIGN_PFX_BASE64 }}
SIGN_BAT_BASE64: ${{ secrets.SIGN_BAT_BASE64 }}
run: |
echo $SIGN_PFX_BASE64 | base64 --decode > sign.pfx
echo $SIGN_BAT_BASE64 | base64 --decode > sign.bat
shell: bash
- name: prepare installer sign
env:
SIGN_PFX_BASE64: ${{ secrets.SIGN_PFX_BASE64 }}
SIGN_BAT_BASE64: ${{ secrets.SIGN_BAT_BASE64 }}
run: |
echo $SIGN_PFX_BASE64 | base64 --decode > installer/sign.pfx
echo $SIGN_BAT_BASE64 | base64 --decode > installer/sign.bat
shell: bash
- name: prepare signtool
run: |
$signtoolExe = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -Filter signtool.exe | Where-Object { $_.DirectoryName -match "\\x64$" } | Select-Object -First 1
$signtoolPath = $signtoolExe.DirectoryName
echo "Adding $signtoolPath to PATH"
echo "$signtoolPath" >> $env:GITHUB_PATH
shell: pwsh
- name: run build
run: build7.bat
shell: cmd
- name: run installer build
run: installer/build7.bat
shell: cmd
- name: upload installer artifacts
uses: actions/upload-artifact@v4
with:
name: installer artifacts
path: installer/dist/**
retention-days: 7
+91
View File
@@ -0,0 +1,91 @@
@echo off
rem SPDX-License-Identifier: MIT
rem Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved.
setlocal enabledelayedexpansion
set BUILDDIR=%~dp0
set PATH=%BUILDDIR%.deps\llvm-mingw-20231128-ucrt-x86_64\bin;%BUILDDIR%.deps\go-legacy-win7\bin;%BUILDDIR%.deps;%PATH%
set PATHEXT=.exe
cd /d %BUILDDIR% || exit /b 1
if exist .deps\prepared goto :render
:installdeps
rmdir /s /q .deps 2> NUL
mkdir .deps || goto :error
cd .deps || goto :error
call :download go-legacy-win7.zip https://github.com/thongtech/go-legacy-win7/releases/download/v1.24.4-1/go-legacy-win7-1.24.4-1.windows_amd64.zip 321a11edf2083434ba95562fb5592e3159907a25396478e5aef5b018d657ac24 || goto :error
call :download llvm-mingw-20231128-ucrt-x86_64.zip https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-x86_64.zip 7a344dafa6942de2c1f4643b3eb5c5ce5317fbab671a887e4d39f326b331798f || goto :error
rem Mirror of https://imagemagick.org/download/binaries/ImageMagick-7.0.8-42-portable-Q16-x64.zip
call :download imagemagick.zip https://download.wireguard.com/windows-toolchain/distfiles/ImageMagick-7.0.8-42-portable-Q16-x64.zip 584e069f56456ce7dde40220948ff9568ac810688c892c5dfb7f6db902aa05aa "convert.exe colors.xml delegates.xml" || goto :error
rem Mirror of https://sourceforge.net/projects/ezwinports/files/make-4.2.1-without-guile-w32-bin.zip
call :download make.zip https://download.wireguard.com/windows-toolchain/distfiles/make-4.2.1-without-guile-w32-bin.zip 30641be9602712be76212b99df7209f4f8f518ba764cf564262bc9d6e4047cc7 "--strip-components 1 bin" || goto :error
call :download amneziawg-tools.zip https://github.com/amnezia-vpn/amneziawg-tools/archive/v1.0.20250903.zip 086e0597906fd720ed83991716e77a8794ab750b9ccff8f153c7c05073d0b40c "--exclude wg-quick --strip-components 1" || goto :error
call :download wintun.zip https://www.wintun.net/builds/wintun-0.14.1.zip 07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51 || goto :error
copy /y NUL prepared > NUL || goto :error
cd .. || goto :error
:render
echo [+] Rendering icons
for %%a in ("ui\icon\*.svg") do convert -background none "%%~fa" -define icon:auto-resize="256,192,128,96,64,48,40,32,24,20,16" -compress zip "%%~dpna.ico" || goto :error
:build
git apply windows7-update.patch
for /f "tokens=3" %%a in ('findstr /r "Number.*=.*[0-9.]*" .\version\version.go') do set WIREGUARD_VERSION=%%a
set WIREGUARD_VERSION=%WIREGUARD_VERSION:"=%
for /f "tokens=1-4" %%a in ("%WIREGUARD_VERSION:.= % 0 0 0") do set WIREGUARD_VERSION_ARRAY=%%a,%%b,%%c,%%d
set GOOS=windows
set GOARM=7
set GOPATH=%BUILDDIR%.deps\gopath
set GOROOT=%BUILDDIR%.deps\go-legacy-win7
if "%GoGenerate%"=="yes" (
echo [+] Regenerating files
go generate ./... || exit /b 1
)
call :build_plat x86 i686 386 || goto :error
call :build_plat amd64 x86_64 amd64 || goto :error
call :build_plat arm64 aarch64 arm64 || goto :error
:sign
if exist .\sign.bat call .\sign.bat
if "%SigningProvider%"=="" goto :success
if "%TimestampServer%"=="" goto :success
echo [+] Signing
signtool sign %SigningProvider% /fd sha256 /tr "%TimestampServer%" /td sha256 /d WireGuard x86\amneziawg.exe x86\awg.exe amd64\amneziawg.exe amd64\awg.exe arm64\amneziawg.exe arm64\awg.exe || goto :error
:success
echo [+] Success. Launch amneziawg.exe.
exit /b 0
:download
echo [+] Downloading %1
curl -#fLo %1 %2 || exit /b 1
echo [+] Verifying %1
for /f %%a in ('CertUtil -hashfile %1 SHA256 ^| findstr /r "^[0-9a-f]*$"') do if not "%%a"=="%~3" exit /b 1
echo [+] Extracting %1
tar -xf %1 %~4 || exit /b 1
echo [+] Cleaning up %1
del %1 || exit /b 1
goto :eof
:build_plat
set GOARCH=%~3
mkdir %1 >NUL 2>&1
echo [+] Assembling resources %1
%~2-w64-mingw32-windres -DWIREGUARD_VERSION_ARRAY=%WIREGUARD_VERSION_ARRAY% -DWIREGUARD_VERSION_STR=%WIREGUARD_VERSION% -i resources.rc -o "resources_%~3.syso" -O coff -c 65001 || exit /b %errorlevel%
echo [+] Building program %1
go build -tags load_wgnt_from_rsrc -ldflags="-H windowsgui -s -w" -trimpath -buildvcs=false -v -o "%~1\amneziawg.exe" || exit /b 1
if not exist "%~1\awg.exe" (
echo [+] Building command line tools %1
del .deps\src\*.exe .deps\src\*.o .deps\src\wincompat\*.o .deps\src\wincompat\*.lib 2> NUL
set LDFLAGS=-s
make --no-print-directory -C .deps\src PLATFORM=windows CC=%~2-w64-mingw32-gcc WINDRES=%~2-w64-mingw32-windres V=1 RUNSTATEDIR= SYSTEMDUNITDIR= -j%NUMBER_OF_PROCESSORS% || exit /b 1
move /Y .deps\src\wg.exe "%~1\awg.exe" > NUL || exit /b 1
)
if not exist "%~1\wintun.dll" (
copy /Y ".deps\wintun\bin\%~1\wintun.dll" "%~1\wintun.dll" > NUL || exit /b 1
)
goto :eof
:error
echo [-] Failed with error #%errorlevel%.
cmd /c exit %errorlevel%
+9 -9
View File
@@ -3,21 +3,21 @@ module github.com/amnezia-vpn/amneziawg-windows-client
go 1.24.4
require (
github.com/amnezia-vpn/amneziawg-go v0.2.16
github.com/amnezia-vpn/amneziawg-windows v0.1.8
github.com/amnezia-vpn/amneziawg-go v0.2.18
github.com/amnezia-vpn/amneziawg-windows v0.1.9
github.com/lxn/walk v0.0.0-20210112085537-c389da54e794
github.com/lxn/win v0.0.0-20210218163916-a377121e959e
golang.org/x/crypto v0.39.0
golang.org/x/sys v0.33.0
golang.org/x/text v0.26.0
golang.org/x/crypto v0.42.0
golang.org/x/sys v0.36.0
golang.org/x/text v0.29.0
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2
)
require (
golang.org/x/mod v0.25.0 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/sync v0.15.0 // indirect
golang.org/x/tools v0.33.0 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.44.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/tools v0.37.0 // indirect
)
replace (
+18 -18
View File
@@ -1,30 +1,30 @@
github.com/amnezia-vpn/amneziawg-go v0.2.16 h1:XY6HOq/xtqH8ZXMncRWkjFs85EKdN10NLNnw23kTpE0=
github.com/amnezia-vpn/amneziawg-go v0.2.16/go.mod h1:nRkPpIzjCxMW8pZKXTRkpqAQVlmFJdVOGkeQSC7wbms=
github.com/amnezia-vpn/amneziawg-windows v0.1.8 h1:6WX4cL6H3gAdR9v9WEpsK3GKObXWLTiM3vUKZg1+K50=
github.com/amnezia-vpn/amneziawg-windows v0.1.8/go.mod h1:SVT5UeQz5bQLYqCfggffKZRoMCo0o1kQtoquzZLauJ8=
github.com/amnezia-vpn/amneziawg-go v0.2.18 h1:pUn7/P8qdGmHd6JmE3bCQXPblZs3vruWR98nLODQLJg=
github.com/amnezia-vpn/amneziawg-go v0.2.18/go.mod h1:aMgOk9MuX0xI7b5TKAYp8pLM54RlXcOPzDvYw3YEO5A=
github.com/amnezia-vpn/amneziawg-windows v0.1.9 h1:lz/aNZkkglUpBXub76TrTybnodrNxEoJwwJghFYcVhg=
github.com/amnezia-vpn/amneziawg-windows v0.1.9/go.mod h1:BdfpKW9+fZdnGpne7h8uidaheypncIQ5vG7oerRDnaw=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=
golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
golang.zx2c4.com/wireguard/windows v0.0.0-20210121140954-e7fc19d483bd h1:kAUzMAITME2MCtrXBaUa9P4tndiXGWO674k9gn6ZR28=
+76
View File
@@ -0,0 +1,76 @@
@echo off
rem SPDX-License-Identifier: MIT
rem Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved.
setlocal
set PATHEXT=.exe
set BUILDDIR=%~dp0
cd /d %BUILDDIR% || exit /b 1
for /f "tokens=3" %%a in ('findstr /r "Number.*=.*[0-9.]*" ..\version\version.go') do set WIREGUARD_VERSION=%%a
set WIREGUARD_VERSION=%WIREGUARD_VERSION:"=%
set WIX_CANDLE_FLAGS=-nologo -dWIREGUARD_VERSION="%WIREGUARD_VERSION%"
set WIX_LIGHT_FLAGS=-nologo -spdb
set WIX_LIGHT_FLAGS=%WIX_LIGHT_FLAGS% -sice:ICE39
set WIX_LIGHT_FLAGS=%WIX_LIGHT_FLAGS% -sice:ICE61
set WIX_LIGHT_FLAGS=%WIX_LIGHT_FLAGS% -sice:ICE03
if exist .deps\prepared goto :build
:installdeps
rmdir /s /q .deps 2> NUL
mkdir .deps || goto :error
cd .deps || goto :error
call :download wix-binaries.zip https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip 6ac824e1642d6f7277d0ed7ea09411a508f6116ba6fae0aa5f2c7daa2ff43d31 || goto :error
echo [+] Extracting wix-binaries.zip
mkdir wix\bin || goto :error
tar -xf wix-binaries.zip -C wix\bin || goto :error
echo [+] Cleaning up wix-binaries.zip
del wix-binaries.zip || goto :error
copy /y NUL prepared > NUL || goto :error
cd .. || goto :error
:build
if exist ..\sign.bat call ..\sign.bat
set PATH=%BUILDDIR%..\.deps\llvm-mingw-20231128-ucrt-x86_64\bin;%PATH%
set WIX=%BUILDDIR%.deps\wix\
set CFLAGS=-O3 -Wall -std=gnu11 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -municode -DUNICODE -D_UNICODE -DNDEBUG
set LDFLAGS=-shared -s -Wl,--kill-at -Wl,--major-os-version=6 -Wl,--minor-os-version=1 -Wl,--major-subsystem-version=6 -Wl,--minor-subsystem-version=1 -Wl,--tsaware -Wl,--dynamicbase -Wl,--nxcompat -Wl,--export-all-symbols
set LDLIBS=-lmsi -lole32 -lshlwapi -lshell32 -luuid -lntdll
call :msi x86 i686 x86 || goto :error
call :msi amd64 x86_64 x64 || goto :error
call :msi arm64 aarch64 arm64 || goto :error
if "%SigningProvider%"=="" goto :success
if "%TimestampServer%"=="" goto :success
echo [+] Signing
signtool sign %SigningProvider% /fd sha256 /tr "%TimestampServer%" /td sha256 /d "AmneziaWG Setup" "dist\amneziawg-*-windows7-%WIREGUARD_VERSION%.msi" || goto :error
:success
echo [+] Success.
exit /b 0
:download
echo [+] Downloading %1
curl -#fLo %1 %2 || exit /b 1
echo [+] Verifying %1
for /f %%a in ('CertUtil -hashfile %1 SHA256 ^| findstr /r "^[0-9a-f]*$"') do if not "%%a"=="%~3" exit /b 1
goto :eof
:msi
set CC=%~2-w64-mingw32-gcc
if not exist "%~1" mkdir "%~1"
echo [+] Compiling %1
%CC% %CFLAGS% %LDFLAGS% -o "%~1\customactions.dll" customactions.c %LDLIBS% || exit /b 1
if "%SigningProvider%"=="" goto :skipsign
if "%TimestampServer%"=="" goto :skipsign
echo [+] Signing %1
signtool sign %SigningProvider% /fd sha256 /tr "%TimestampServer%" /td sha256 /d "AmneziaWG Setup Custom Actions" "%~1\customactions.dll" || exit /b 1
:skipsign
"%WIX%bin\candle" %WIX_CANDLE_FLAGS% -dWIREGUARD_PLATFORM="%~1" -out "%~1\wireguard.wixobj" -arch %3 wireguard.wxs || exit /b %errorlevel%
echo [+] Linking %1
"%WIX%bin\light" %WIX_LIGHT_FLAGS% -out "dist\amneziawg-%~1-windows7-%WIREGUARD_VERSION%.msi" "%~1\wireguard.wixobj" || exit /b %errorlevel%
goto :eof
:error
echo [-] Failed with error #%errorlevel%.
cmd /c exit %errorlevel%
+6 -2
View File
@@ -271,6 +271,10 @@ func (s stringSpan) isValidUint(supportHex bool, min, max uint64) bool {
return val <= max && val >= min
}
func (s stringSpan) isValidUint32() bool {
return s.isValidUint(false, 0, 4_294_967_295)
}
func (s stringSpan) isValidPort() bool {
return s.isValidUint(false, 0, 65535)
}
@@ -383,13 +387,13 @@ func (s stringSpan) isValidHField() bool {
if *s.at(i) == '-' {
first := stringSpan{s.s, i}
second := stringSpan{s.at(i + 1), s.len - i - 1}
if first.isValidUint(false, 0, 2_147_483_647) && second.isValidUint(false, 0, 2_147_483_647) {
if first.isValidUint32() && second.isValidUint32() {
return true
}
return false
}
}
return s.isValidUint(false, 0, 2_147_483_647)
return s.isValidUint32()
}
func (s stringSpan) isValidIField() bool {
+5 -5
View File
@@ -6,12 +6,12 @@
package updater
const (
releasePublicKeyBase64 = "RWRNqGKtBXftKTKPpBPGDMe8jHLnFQ0EdRy8Wg0apV6vTDFLAODD83G4"
updateServerHost = "download.wireguard.com"
releasePublicKeyBase64 = "RWTIu7lL938k14FQAOYx3R4MaIKLv6CmaxBI3G8zV7tbjpmqFY38l2r3"
updateServerHost = "updates.amnezia.org"
updateServerPort = 443
updateServerUseHttps = true
latestVersionPath = "/windows-client/latest.sig"
msiPath = "/windows-client/%s"
msiArchPrefix = "wireguard-%s-"
latestVersionPath = "/amneziawg/windows-client/latest.sig"
msiPath = "/amneziawg/windows-client/%s"
msiArchPrefix = "amneziawg-%s-"
msiSuffix = ".msi"
)
+1 -1
View File
@@ -6,5 +6,5 @@
package version
const (
Number = "1.0.2"
Number = "2.0.2"
)
+15
View File
@@ -0,0 +1,15 @@
diff --git a/updater/constants.go b/updater/constants.go
index de2572e..6d9d2d8 100644
--- a/updater/constants.go
+++ b/updater/constants.go
@@ -10,8 +10,8 @@ const (
updateServerHost = "updates.amnezia.org"
updateServerPort = 443
updateServerUseHttps = true
- latestVersionPath = "/amneziawg/windows-client/latest.sig"
+ latestVersionPath = "/amneziawg/windows-client/latest-windows7.sig"
msiPath = "/amneziawg/windows-client/%s"
- msiArchPrefix = "amneziawg-%s-"
+ msiArchPrefix = "amneziawg-%s-windows7-"
msiSuffix = ".msi"
)