Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e12cf59
build and use xcframework binary target
mredig Jul 11, 2025
3c80774
(fix) workflow
mredig Jul 11, 2025
72170a6
Release 0.0.0
Jul 11, 2025
4922e1b
(fix) small build issues
mredig Jul 11, 2025
50aba8d
Release 0.0.1
Jul 11, 2025
641a46a
(fix) re-include stdlib patch
mredig Jul 15, 2025
bceff74
Release 0.0.2
Jul 15, 2025
e956de3
(refactor) update readme and license
mredig Jul 15, 2025
2fa2a37
Merge branch 'master' of github.com:ridgelineinternational/wireguard-…
mredig Jul 15, 2025
4cb1327
(feat) add wg dep update directions
mredig Jul 15, 2025
0344f71
(fix) link against older os versions
mredig Jul 21, 2025
a82c448
(bump) deps
mredig Jul 21, 2025
21f6454
Merge pull request #1 from ridgelineinternational/link-against-older-…
danderson-cont Jul 21, 2025
b3904af
Release 0.0.3
Jul 21, 2025
8eac68d
Add GOOS_iphonesimulator to Makefile to build a simulator compatible …
Danbana Jul 24, 2025
a35a1d8
Release 0.0.4-test
Jul 24, 2025
e4d9ec6
Release 0.0.4
Jul 24, 2025
adf8a96
(fix) allow the backendVersion to be accessed for logging
Danbana Sep 8, 2025
80d3b9f
Release 0.0.5
Sep 8, 2025
c4a6c32
(fix) rolling back unused change
Danbana Sep 8, 2025
3c04107
bump: update go deps
mredig Dec 11, 2025
8605ec1
refactor: project org
mredig Dec 11, 2025
49c9ab3
refactor: update readme
mredig Dec 11, 2025
87d47c0
refactor: remove recursive modulemap thing
mredig Dec 11, 2025
33c82e5
fix: typo
mredig Dec 11, 2025
d4d91fc
Merge pull request #2 from ridgelineinternational/mredig/resolve-umbr…
mredig Dec 12, 2025
5536750
Release 0.0.6
Dec 12, 2025
de85370
nit: update gitignore
mredig Dec 12, 2025
b22ba8c
refactor: move header files into a subdirectory
mredig Dec 12, 2025
9258957
Merge pull request #3 from ridgelineinternational/mredig/resolve-umbr…
mredig Dec 12, 2025
0e34569
Release 0.0.7
Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions .github/workflows/build-go-dependency-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Builds and publishes the wg-go binaries to this repo when run as a GitHub Workflow.
# The binaries in this repo are compiled without modification from upstream (official WireGuard) sources
# However, if you have security requirements beyond my assertion of "trust me bruh", the code/configs/scripts in this
# repo are 100% auditable and you are welcome to fork it and run it yourself to guarantee and grant yourself
# that wonderfully fluttery feeling of diy, security, and privacy. All the scripts should work automagically
# in their own github workflow context, or with a little effort, you can run it yourself offline.

name: Go Dependency Wrapper

on:
workflow_dispatch:
inputs:
update_go_deps:
description: 'Update go dependencies with `go get -u ./...'
required: false
type: boolean
default: false
go_update_patch_only:
description: '(only used if `update_go_deps` is `true`) When updating, only update the patch version.'
required: false
type: boolean
default: true
tag:
description: 'Releases can only be created from tags, so a unique tag is required. This will probably get updated to a versioning syntax in the future.'
required: true


jobs:
wg-build:
name: Wireguard Build and Release
runs-on: macos-15

concurrency:
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
group: wg-${{ github.head_ref }}
cancel-in-progress: true

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Determine Tag
id: tag
run: |
set -x

RAW_TAG="${{ github.event.inputs.tag }}"
TAG=$(echo "$RAW_TAG" | sed 's/[^a-zA-Z0-9._-]/-/g' | sed 's/[-]+/-/g' )

echo "RAW_TAG=${RAW_TAG}" >> "$GITHUB_OUTPUT"
echo "TAG=${TAG}" >> "$GITHUB_OUTPUT"
env:
RAW_TAG: ${{ github.event.inputs.tag }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_BASE_BRANCH: ${{ github.base_ref }}
GITHUB_REF: ${{ github.ref }}

- name: Select Xcode
run: |
sudo xcode-select -s /Applications/Xcode_16.4.app

- name: Install Dependencies
run: |
brew install go

- name: Handle Inputs
run: |
set -xoe

pushd WireGuardGoFoundationSource

if [[ "$RUN_UPDATES" == "true" ]]; then
UPDATE_COMMAND=("go")
UPDATE_COMMAND+=("get")

if [[ "$PATCH_ONLY_UPDATES" == "true" ]]; then
UPDATE_COMMAND+=("-u=patch")
else
UPDATE_COMMAND+=("-u")
fi

UPDATE_COMMAND+=("./...")
fi

"${UPDATE_COMMAND[@]}"

popd

git add WireGuardGoFoundationSource/.
env:
RUN_UPDATES: ${{ github.event.inputs.update_go_deps }}
PATCH_ONLY_UPDATES: ${{ github.event.inputs.go_update_patch_only }}

- name: Build XCFramework
run: |
set -xoe

pushd WireGuardGoFoundationSource
make build-xcframework

zip -ry WireGuardGoFoundation.xcframework.zip WireGuardGoFoundation.xcframework
popd
mv WireGuardGoFoundationSource/WireGuardGoFoundation.xcframework.zip .

- name: Update Package
run: |
set -xoe

CHECKSUM=$(swift package compute-checksum WireGuardGoFoundation.xcframework.zip)
NEW_URL="https://github.com/${{ github.repository }}/releases/download/${TAG}/WireGuardGoFoundation.xcframework.zip"

sed -i "" "s|let url = \".*\"|let url = \"$NEW_URL\"|" Package.swift
sed -i "" "s|let checksum = \".*\"|let checksum = \"$CHECKSUM\"|" Package.swift

git add Package.swift
git commit -m "Release ${TAG}"
git push origin HEAD:master
git tag ${TAG}
git push origin ${TAG}
env:
TAG: ${{ steps.tag.outputs.TAG }}

- name: Release
uses: softprops/action-gh-release@v2
with:
files: WireGuardGoFoundation.xcframework.zip
make_latest: true
tag_name: ${{ steps.tag.outputs.TAG }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ Sources/WireGuardApp/Config/Developer.xcconfig

# Vim
.*.sw*
*.profraw
19 changes: 19 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
File renamed without changes.
File renamed without changes.
25 changes: 8 additions & 17 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// swift-tools-version:5.3
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let url = "https://github.com/ridgelineinternational/wireguard-apple-xcframework/releases/download/0.0.7/WireGuardGoFoundation.xcframework.zip"
let checksum = "9cf2b8e63e92bcb21ff0c453c10afa1977992f1aea38e28b9bf5be5804beab0e"

let package = Package(
name: "WireGuardKit",
platforms: [
.macOS(.v12),
.iOS(.v15)
.macOS(.v13),
.iOS(.v16)
],
products: [
.library(name: "WireGuardKit", targets: ["WireGuardKit"])
Expand All @@ -16,25 +19,13 @@ let package = Package(
targets: [
.target(
name: "WireGuardKit",
dependencies: ["WireGuardKitGo", "WireGuardKitC"]
dependencies: ["WireGuardGoFoundation", "WireGuardKitC"]
),
.target(
name: "WireGuardKitC",
dependencies: [],
publicHeadersPath: "."
),
.target(
name: "WireGuardKitGo",
dependencies: [],
exclude: [
"goruntime-boottime-over-monotonic.diff",
"go.mod",
"go.sum",
"api-apple.go",
"Makefile"
],
publicHeadersPath: ".",
linkerSettings: [.linkedLibrary("wg-go")]
)
.binaryTarget(name: "WireGuardGoFoundation", url: url, checksum: checksum)
]
)
Loading