From 26a022c90534323704ca456cf640eeec94aabf88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Tue, 9 Jun 2026 20:08:38 +0800 Subject: [PATCH] GitHub Action CI, README.md: Refinements and add compliance contents (#6283) And https://github.com/XTLS/Xray-core/pull/6283#issuecomment-4640162879 --- .github/build/windows/xray_no_window.cmd | 1 + .github/build/windows/xray_no_window.ps1 | 1 + .github/build/windows/xray_no_window.vbs | 1 + .github/workflows/release-win7.yml | 8 ++++--- .github/workflows/release.yml | 8 ++++--- .github/workflows/scheduled-assets-update.yml | 17 ++++++++++----- README.md | 21 +++++++++++++++++++ 7 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 .github/build/windows/xray_no_window.cmd create mode 100644 .github/build/windows/xray_no_window.ps1 create mode 100644 .github/build/windows/xray_no_window.vbs diff --git a/.github/build/windows/xray_no_window.cmd b/.github/build/windows/xray_no_window.cmd new file mode 100644 index 00000000..0fb15283 --- /dev/null +++ b/.github/build/windows/xray_no_window.cmd @@ -0,0 +1 @@ +powershell.exe -ExecutionPolicy Bypass -File ".\xray_no_window.ps1" diff --git a/.github/build/windows/xray_no_window.ps1 b/.github/build/windows/xray_no_window.ps1 new file mode 100644 index 00000000..6342a4ec --- /dev/null +++ b/.github/build/windows/xray_no_window.ps1 @@ -0,0 +1 @@ +Start-Process -FilePath ".\xray.exe" -ArgumentList "-config .\config.json" -WindowStyle Hidden diff --git a/.github/build/windows/xray_no_window.vbs b/.github/build/windows/xray_no_window.vbs new file mode 100644 index 00000000..8aa8ae40 --- /dev/null +++ b/.github/build/windows/xray_no_window.vbs @@ -0,0 +1 @@ +CreateObject("Wscript.Shell").Run "xray.exe -config config.json",0 diff --git a/.github/workflows/release-win7.yml b/.github/workflows/release-win7.yml index ac6b628f..d6bce607 100644 --- a/.github/workflows/release-win7.yml +++ b/.github/workflows/release-win7.yml @@ -134,15 +134,17 @@ jobs: run: | mv -f resources/geo* build_assets/ if [[ ${GOOS} == 'windows' ]]; then - echo 'CreateObject("Wscript.Shell").Run "xray.exe -config config.json",0' > build_assets/xray_no_window.vbs - echo 'Start-Process -FilePath ".\xray.exe" -ArgumentList "-config .\config.json" -WindowStyle Hidden' > build_assets/xray_no_window.ps1 + cp .github/build/windows/* build_assets/ + fi + if [[ ${GOOS} == 'windows' ]]; then + echo 'Adding Wintun into packages' if [[ ${GOARCH} == 'amd64' ]]; then mv resources/wintun/bin/amd64/wintun.dll build_assets/ fi if [[ ${GOARCH} == '386' ]]; then mv resources/wintun/bin/x86/wintun.dll build_assets/ fi - mv resources/wintun/LICENSE.txt build_assets/LICENSE-wintun.txt + mv resources/wintun/LICENSE.txt build_assets/LICENSE-Wintun fi - name: Copy README.md & LICENSE diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f25b782..6ff09d52 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -241,8 +241,10 @@ jobs: run: | mv -f resources/geo* build_assets/ if [[ ${GOOS} == 'windows' ]]; then - echo 'CreateObject("Wscript.Shell").Run "xray.exe -config config.json",0' > build_assets/xray_no_window.vbs - echo 'Start-Process -FilePath ".\xray.exe" -ArgumentList "-config .\config.json" -WindowStyle Hidden' > build_assets/xray_no_window.ps1 + cp .github/build/windows/* build_assets/ + fi + if [[ ${GOOS} == 'windows' ]]; then + echo 'Adding Wintun into packages' if [[ ${GOARCH} == 'amd64' ]]; then mv resources/wintun/bin/amd64/wintun.dll build_assets/ fi @@ -252,7 +254,7 @@ jobs: if [[ ${GOARCH} == 'arm64' ]]; then mv resources/wintun/bin/arm64/wintun.dll build_assets/ fi - mv resources/wintun/LICENSE.txt build_assets/LICENSE-wintun.txt + mv resources/wintun/LICENSE.txt build_assets/LICENSE-Wintun fi - name: Copy README.md & LICENSE diff --git a/.github/workflows/scheduled-assets-update.yml b/.github/workflows/scheduled-assets-update.yml index 44d4cb5b..3e20fc43 100644 --- a/.github/workflows/scheduled-assets-update.yml +++ b/.github/workflows/scheduled-assets-update.yml @@ -68,6 +68,9 @@ jobs: wintun: if: github.event.schedule == '30 22 * * *' || github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest + env: + ASSETVER: 0.14.1 + ASSETHASH: 07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51 steps: - name: Restore Wintun Cache uses: actions/cache/restore@v5 @@ -96,7 +99,6 @@ jobs: echo -e "Checking if wintun.dll for ${ARCHITECTURE} exists..." if [ -s "./resources/wintun/bin/${ARCHITECTURE}/wintun.dll" ]; then echo -e "wintun.dll for ${ARCHITECTURE} exists" - continue else echo -e "wintun.dll for ${ARCHITECTURE} is missing" missing=true @@ -113,12 +115,17 @@ jobs: fi if [[ "$missing" == true ]]; then FILENAME=wintun.zip - DOWNLOAD_FILE=wintun-0.14.1.zip + DOWNLOAD_FILE=wintun-${ASSETVER}.zip echo -e "Downloading https://www.wintun.net/builds/${DOWNLOAD_FILE}..." curl -L "https://www.wintun.net/builds/${DOWNLOAD_FILE}" -o "${FILENAME}" - echo -e "Unpacking wintun..." - unzip -u ${FILENAME} -d resources/ - echo "unhit=true" >> $GITHUB_OUTPUT + if [[ "$(sha256sum "./${FILENAME}" | awk -F ' ' '{print $1}')" == "${ASSETHASH}" ]]; then + echo -e "Unpacking wintun..." + unzip -u ${FILENAME} -d resources/ + echo "unhit=true" >> $GITHUB_OUTPUT + else + echo -e "Digest of ${FILENAME} mismatch." + exit 1 + fi fi - name: Save Wintun Cache diff --git a/README.md b/README.md index d04cd359..daf82368 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,27 @@ - [Xray-core v1.0.0](https://github.com/XTLS/Xray-core/releases/tag/v1.0.0) was forked from [v2fly-core 9a03cc5](https://github.com/v2fly/v2ray-core/commit/9a03cc5c98d04cc28320fcee26dbc236b3291256), and we have made & accumulated a huge number of enhancements over time, check [the release notes for each version](https://github.com/XTLS/Xray-core/releases). - For third-party projects used in [Xray-core](https://github.com/XTLS/Xray-core), check your local or [the latest go.mod](https://github.com/XTLS/Xray-core/blob/main/go.mod). +### Bundled Third-Party Components Redistribution + +**Certain optional features dynamically load third-party components. These optional components are separate works distributed under their own licenses, and are bundled into the ZIP package for ease of use. Users may replace these components under the licenses from these components.** + +These components include: + +#### Wintun + +This distribution contains unmodified official precompiled and pre-signed Wintun binaries. + +- Project: Wintun +- Copyright: Copyright (C) 2018-2021 WireGuard LLC. All Rights Reserved. +- Redistribution License: Prebuilt Binaries License (PBL) bundled with official precompiled and pre-signed binaries from wintun.net +- Component(s): wintun.dll +- Source: https://www.wintun.net/ +- Included in: + - Windows x86 (windows-32, win7-32) + - Windows x86-64 (windows-64, win7-64) + - Windows AArch64 (windows-arm64) +- Notes: Wintun is an optional runtime-loaded component only used for TUN inbound functionality on supported Windows platforms. + ## One-line Compilation ### Windows (PowerShell)