Force Proxy to any Windows/MacOS/Linux Application TCP and UDP traffic
C ccybersecurityhttp3httpproxylinuxlinux-proxymacosmacos-appmacos-proxyproxifierproxifier-alternativeproxyclienttcpthick-clientudpwindivertwindows
ci: make release workflows manual, fix macOS pkg version (#231)
AnoF-Cyber93fa90b59565
diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.ymlindex 6500223..754a4a9 100644--- a/.github/workflows/build-mac.yml+++ b/.github/workflows/build-mac.yml@@ -163,7 +163,7 @@ jobs:chmod +x build.shbash build.sh- PKG_VERSION="3.2.0"+ PKG_VERSION=$(grep -m1 '^VERSION=' build.sh | cut -d'"' -f2)PKG_UNSIGNED="output/ProxyBridge-v${PKG_VERSION}-Universal-Installer.pkg"PKG_SIGNED="output/ProxyBridge-v${PKG_VERSION}-Universal-Installer-signed.pkg"diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release-linux.ymlindex 7552711..5c53757 100644--- a/.github/workflows/release-linux.yml+++ b/.github/workflows/release-linux.yml@@ -1,9 +1,14 @@name: Release ProxyBridge Linuxon:- release:- types: [published, created]+ # manual only, so creating a release no longer triggers every OS build. create+ # the release, then run just the workflow for the OS you want against its tag.workflow_dispatch:+ inputs:+ tag:+ description: 'Existing release tag to build and attach the installer to (e.g. v4.1.0)'+ required: true+ type: stringpermissions:contents: write@@ -15,11 +20,13 @@ jobs:permissions:contents: writeactions: read- if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.actor == github.repository_owner)+ if: github.actor == github.repository_ownersteps:- name: Checkout codeuses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4+ with:+ ref: ${{ inputs.tag }}- name: Install build dependenciesrun: |@@ -96,16 +103,14 @@ jobs:- name: Extract version from tagid: versionrun: |- if [ "${{ github.event_name }}" == "release" ]; then- VERSION="${{ github.event.release.tag_name }}"- else- VERSION="dev-$(date +%Y%m%d-%H%M%S)"- fi+ VERSION="$TAG"# Remove 'v' prefix if presentVERSION="${VERSION#v}"echo "version=$VERSION" >> $GITHUB_OUTPUTecho "Version: $VERSION"shell: bash+ env:+ TAG: ${{ inputs.tag }}- name: Create release archiverun: |@@ -138,12 +143,12 @@ jobs:shell: bash- name: Upload archive to release- if: github.event_name == 'release'run: |- gh release upload "${{ github.event.release.tag_name }}" ProxyBridge-Linux-v*.tar.gz --clobber+ gh release upload "$TAG" ProxyBridge-Linux-v*.tar.gz --clobbershell: bashenv:GH_TOKEN: ${{ github.token }}+ TAG: ${{ inputs.tag }}- name: Upload build artifactsuses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4diff --git a/.github/workflows/release-mac.yml b/.github/workflows/release-mac.ymlindex e7a1e5f..47b7ac7 100644--- a/.github/workflows/release-mac.yml+++ b/.github/workflows/release-mac.yml@@ -3,9 +3,14 @@ permissions:contents: writeon:- release:- types: [published, created]+ # manual only, so creating a release no longer triggers every OS build. create+ # the release, then run just the workflow for the OS you want against its tag.workflow_dispatch:+ inputs:+ tag:+ description: 'Existing release tag to build and attach the installer to (e.g. v4.1.0)'+ required: true+ type: stringjobs:build-and-release:@@ -13,11 +18,13 @@ jobs:permissions:contents: writeactions: read- if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.actor == github.repository_owner)+ if: github.actor == github.repository_ownersteps:- name: Checkout codeuses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4+ with:+ ref: ${{ inputs.tag }}- name: Set up Xcodeuses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1@@ -180,7 +187,7 @@ jobs:chmod +x build.shbash build.sh- PKG_VERSION="3.2.0"+ PKG_VERSION=$(grep -m1 '^VERSION=' build.sh | cut -d'"' -f2)PKG_UNSIGNED="output/ProxyBridge-v${PKG_VERSION}-Universal-Installer.pkg"PKG_SIGNED="output/ProxyBridge-v${PKG_VERSION}-Universal-Installer-signed.pkg"@@ -223,11 +230,11 @@ jobs:echo "PKG signed, notarized and stapled successfully"- name: Upload PKG to Release- if: github.event_name == 'release'run: |- gh release upload "${{ github.event.release.tag_name }}" MacOS/ProxyBridge/output/ProxyBridge-*.pkg --clobber+ gh release upload "$TAG" MacOS/ProxyBridge/output/ProxyBridge-*.pkg --clobberenv:GH_TOKEN: ${{ github.token }}+ TAG: ${{ inputs.tag }}- name: Upload PKG Artifactuses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.ymlindex 501e527..e04c1d2 100644--- a/.github/workflows/release-windows.yml+++ b/.github/workflows/release-windows.yml@@ -1,9 +1,14 @@name: Release ProxyBridge Windowson:- release:- types: [published, created]+ # manual only, so creating a release no longer triggers every OS build. create+ # the release, then run just the workflow for the OS you want against its tag.workflow_dispatch:+ inputs:+ tag:+ description: 'Existing release tag to build and attach the installer to (e.g. v4.1.0)'+ required: true+ type: stringpermissions:contents: write@@ -14,11 +19,13 @@ jobs:permissions:contents: writeactions: read- if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.actor == github.repository_owner)+ if: github.actor == github.repository_ownersteps:- name: Checkout codeuses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4+ with:+ ref: ${{ inputs.tag }}- name: Verify WinDivert installationrun: |@@ -45,16 +52,16 @@ jobs:shell: pwsh- name: Upload installer to release- if: github.event_name == 'release'run: |- gh release upload "${{ github.event.release.tag_name }}" (Get-ChildItem Windows/output/ProxyBridge-Setup-*.exe) --clobber+ gh release upload "$env:TAG" (Get-ChildItem Windows/output/ProxyBridge-Setup-*.exe) --clobbershell: pwshenv:GH_TOKEN: ${{ github.token }}+ TAG: ${{ inputs.tag }}- name: Upload build artifactsuses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4with:- name: ProxyBridge-Release-${{ github.event.release.tag_name }}+ name: ProxyBridge-Release-${{ inputs.tag }}path: Windows/output/retention-days: 90diff --git a/MacOS/ProxyBridge/build.sh b/MacOS/ProxyBridge/build.shindex 0fd1d42..ca6339f 100755--- a/MacOS/ProxyBridge/build.sh+++ b/MacOS/ProxyBridge/build.sh@@ -5,6 +5,14 @@ set -eSCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"VERSION="4.1.0"+# the pkg name/version here and the version shown in the app (About page, bundle)+# come from different places, make a mismatch fail the build instead of shipping it+PROJECT_VERSIONS=$(grep "MARKETING_VERSION" "$SCRIPT_DIR/ProxyBridge.xcodeproj/project.pbxproj" | sed -E 's/.*= *([^;]+);.*/\1/' | sort -u)+if [ "$PROJECT_VERSIONS" != "$VERSION" ]; then+ echo "Version mismatch: build.sh VERSION=$VERSION but MARKETING_VERSION in the Xcode project is: $(echo $PROJECT_VERSIONS)"+ exit 1+fi+if [ -f "$SCRIPT_DIR/.env" ]; thensource "$SCRIPT_DIR/.env"fi