Skip to content

Commit fad1f90

Browse files
committed
Merge branch 'dev' into main for v3.2.0 release
2 parents d00ed03 + 38c950a commit fad1f90

111 files changed

Lines changed: 7406 additions & 814 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,18 @@ jobs:
2727

2828
- name: Install Linux build deps
2929
if: matrix.os == 'ubuntu-latest'
30+
env:
31+
DEBIAN_FRONTEND: noninteractive
3032
run: |
33+
set -eux
34+
sudo find /etc/apt \( -name '*.sources' -o -name '*.list' -o -name '*.sources.list' \) \
35+
-type f -exec sed -i 's/azure\.archive\.ubuntu\.com/archive.ubuntu.com/g' {} +
36+
sudo tee /etc/apt/apt.conf.d/99-ci-apt >/dev/null <<'EOF'
37+
Acquire::Retries "5";
38+
Acquire::http::Timeout "120";
39+
Acquire::https::Timeout "120";
40+
Dpkg::Use-Pty "0";
41+
EOF
3142
sudo apt-get update
3243
sudo apt-get install -y --no-install-recommends \
3344
build-essential pkg-config \

.github/workflows/release.yml

Lines changed: 133 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,45 @@ jobs:
6969
"NSISDIR=$nsisRoot" | Out-File -FilePath $env:GITHUB_ENV -Append
7070
& $makensis /VERSION
7171
72+
- name: Stage libcronet.dll (sing-box naive / Cronet)
73+
shell: pwsh
74+
run: ./scripts/ensure-libcronet-windows.ps1
75+
7276
- name: Build Windows app and installer
7377
shell: pwsh
7478
env:
7579
SUBSCRIPTION_ENCRYPT_KEY: ${{ secrets.SUBSCRIPTION_ENCRYPT_KEY }}
80+
# For pre-release tags (containing '-') point the updater at the dev branch
81+
# so test builds don't check the production manifest.
82+
MANIFEST_URL_OVERRIDE: ${{ contains(github.ref_name, '-') && 'https://raw.githubusercontent.com/AandStep/ResultV/dev/update.json' || '' }}
7683
run: |
7784
$key = $env:SUBSCRIPTION_ENCRYPT_KEY
85+
$ldflags = ""
7886
if ($key) {
79-
wails build -clean -nsis -platform windows/amd64 -ldflags "-X resultproxy-wails/internal/proxy.subscriptionEncryptKey=$key"
87+
$ldflags = "-X resultproxy-wails/internal/proxy.subscriptionEncryptKey=$key"
88+
}
89+
$manifestOverride = $env:MANIFEST_URL_OVERRIDE
90+
if ($manifestOverride) {
91+
$ldflags = "$ldflags -X resultproxy-wails/internal/updater.ManifestURLOverride=$manifestOverride".Trim()
92+
}
93+
if ($ldflags) {
94+
wails build -clean -nsis -platform windows/amd64 -ldflags $ldflags
8095
} else {
81-
Write-Warning "Secret SUBSCRIPTION_ENCRYPT_KEY not set — building without decryption key"
8296
wails build -clean -nsis -platform windows/amd64
8397
}
8498
99+
- name: Copy libcronet.dll next to portable exe
100+
shell: pwsh
101+
run: |
102+
$dll = Join-Path (Get-Location) "build/windows/libcronet.dll"
103+
if (-not (Test-Path $dll)) { throw "libcronet.dll missing — run scripts/ensure-libcronet-windows.ps1" }
104+
$portable = Get-ChildItem -Path "build/bin" -Filter "*.exe" -File |
105+
Where-Object { $_.Name -notlike "*-installer.exe" } |
106+
Select-Object -First 1
107+
if (-not $portable) { throw "Portable exe not found under build/bin" }
108+
Copy-Item -LiteralPath $dll -Destination $portable.DirectoryName -Force
109+
Write-Host "Copied libcronet.dll beside $($portable.Name)"
110+
85111
- name: Validate Windows artifacts
86112
shell: pwsh
87113
run: |
@@ -134,13 +160,19 @@ jobs:
134160
go install github.com/wailsapp/wails/v2/cmd/wails@latest
135161
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
136162
163+
- name: Stage libcronet.dylib (sing-box naive / Cronet)
164+
run: |
165+
chmod +x scripts/ensure-libcronet-macos.sh
166+
./scripts/ensure-libcronet-macos.sh
167+
137168
- name: Build macOS app and .dmg
138169
env:
139170
SUBSCRIPTION_ENCRYPT_KEY: ${{ secrets.SUBSCRIPTION_ENCRYPT_KEY }}
140171
APPLE_DEVELOPER_ID: ${{ secrets.APPLE_DEVELOPER_ID }}
141172
APPLE_NOTARY_APPLE_ID: ${{ secrets.APPLE_NOTARY_APPLE_ID }}
142173
APPLE_NOTARY_TEAM_ID: ${{ secrets.APPLE_NOTARY_TEAM_ID }}
143174
APPLE_NOTARY_PASSWORD: ${{ secrets.APPLE_NOTARY_PASSWORD }}
175+
MANIFEST_URL_OVERRIDE: ${{ contains(github.ref_name, '-') && 'https://raw.githubusercontent.com/AandStep/ResultV/dev/update.json' || '' }}
144176
run: |
145177
chmod +x build-macos.sh
146178
./build-macos.sh
@@ -154,6 +186,7 @@ jobs:
154186

155187
build-linux:
156188
runs-on: ubuntu-latest
189+
timeout-minutes: 45
157190
permissions:
158191
contents: read
159192
actions: write
@@ -173,7 +206,20 @@ jobs:
173206
node-version: 24
174207

175208
- name: Install Linux build dependencies
209+
env:
210+
DEBIAN_FRONTEND: noninteractive
176211
run: |
212+
set -eux
213+
# azure.archive.ubuntu.com on GitHub-hosted runners sometimes stalls for
214+
# many minutes; archive.ubuntu.com is a reliable fallback.
215+
sudo find /etc/apt \( -name '*.sources' -o -name '*.list' -o -name '*.sources.list' \) \
216+
-type f -exec sed -i 's/azure\.archive\.ubuntu\.com/archive.ubuntu.com/g' {} +
217+
sudo tee /etc/apt/apt.conf.d/99-ci-apt >/dev/null <<'EOF'
218+
Acquire::Retries "5";
219+
Acquire::http::Timeout "120";
220+
Acquire::https::Timeout "120";
221+
Dpkg::Use-Pty "0";
222+
EOF
177223
sudo apt-get update
178224
sudo apt-get install -y --no-install-recommends \
179225
build-essential pkg-config \
@@ -196,9 +242,15 @@ jobs:
196242
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
197243
chmod +x /usr/local/bin/linuxdeploy
198244
245+
- name: Stage libcronet.so (sing-box naive / Cronet)
246+
run: |
247+
chmod +x scripts/ensure-libcronet-linux.sh
248+
./scripts/ensure-libcronet-linux.sh
249+
199250
- name: Build Linux artifacts
200251
env:
201252
SUBSCRIPTION_ENCRYPT_KEY: ${{ secrets.SUBSCRIPTION_ENCRYPT_KEY }}
253+
MANIFEST_URL_OVERRIDE: ${{ contains(github.ref_name, '-') && 'https://raw.githubusercontent.com/AandStep/ResultV/dev/update.json' || '' }}
202254
run: |
203255
chmod +x build-linux.sh
204256
./build-linux.sh
@@ -285,6 +337,84 @@ jobs:
285337
body_path: RELEASE_BODY.txt
286338
files: release-assets/*
287339
draft: false
288-
prerelease: false
340+
# Tags with a hyphen (e.g. v3.2.0-dev.1) are pre-releases.
341+
# Pre-releases are visible on GitHub but not shown as "Latest release",
342+
# so production auto-update is unaffected.
343+
prerelease: ${{ contains(github.ref_name, '-') }}
344+
env:
345+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
346+
347+
- name: Compute sha256 and update update.json platforms
348+
run: |
349+
cat > update_manifest.cjs <<'NODE_EOF'
350+
const fs = require('fs');
351+
const path = require('path');
352+
const crypto = require('crypto');
353+
354+
const tag = process.env.GITHUB_REF_NAME; // e.g. "v3.2.0"
355+
const version = tag.replace(/^v/, '');
356+
const repo = process.env.GITHUB_REPOSITORY; // "AandStep/ResultV"
357+
const baseURL = `https://github.com/${repo}/releases/download/${tag}`;
358+
const dir = 'release-assets';
359+
360+
function sha256File(p) {
361+
return crypto.createHash('sha256').update(fs.readFileSync(p)).digest('hex');
362+
}
363+
364+
const files = fs.readdirSync(dir);
365+
366+
const portableFile = files.find(f => /^ResultV.*\.exe$/i.test(f) && !/installer/i.test(f) && !/setup/i.test(f));
367+
const installerFile = files.find(f => /installer.*\.exe$/i.test(f) || /setup.*\.exe$/i.test(f));
368+
const dmgFile = files.find(f => /\.dmg$/i.test(f));
369+
const appimageFile = files.find(f => /\.AppImage$/i.test(f));
370+
const debFile = files.find(f => /\.deb$/i.test(f));
371+
372+
const update = JSON.parse(fs.readFileSync('update.json', 'utf8'));
373+
update.version = version;
374+
update.platforms = {};
375+
376+
function addPlatform(key, filename) {
377+
if (!filename) return;
378+
const p = path.join(dir, filename);
379+
if (!fs.existsSync(p)) return;
380+
const stat = fs.statSync(p);
381+
update.platforms[key] = {
382+
url: `${baseURL}/${filename}`,
383+
sha256: sha256File(p),
384+
size: stat.size,
385+
};
386+
console.log(`[${key}] ${filename} sha256=${update.platforms[key].sha256} size=${stat.size}`);
387+
}
388+
389+
addPlatform('windows-amd64-portable', portableFile);
390+
addPlatform('windows-amd64-installer', installerFile);
391+
addPlatform('darwin-universal', dmgFile);
392+
addPlatform('linux-amd64-appimage', appimageFile);
393+
addPlatform('linux-amd64-deb', debFile);
394+
395+
fs.writeFileSync('update.json', JSON.stringify(update, null, 2) + '\n');
396+
console.log('update.json written with platforms:', Object.keys(update.platforms).join(', ') || '(none)');
397+
NODE_EOF
398+
node update_manifest.cjs
399+
400+
# For stable releases (no hyphen): commit update.json to main so all users
401+
# receive the update notification. For pre-releases (e.g. v3.2.0-dev.1):
402+
# commit to dev branch only — production users are unaffected.
403+
- name: Commit updated update.json
404+
run: |
405+
# Choose target branch based on whether this is a pre-release tag.
406+
if [[ "${{ github.ref_name }}" == *"-"* ]]; then
407+
TARGET_BRANCH="dev"
408+
else
409+
TARGET_BRANCH="main"
410+
fi
411+
git config user.name "github-actions[bot]"
412+
git config user.email "github-actions[bot]@users.noreply.github.com"
413+
git fetch origin "$TARGET_BRANCH"
414+
git checkout "$TARGET_BRANCH"
415+
git add update.json
416+
git diff --cached --quiet || \
417+
git commit -m "chore: update update.json platforms for ${{ github.ref_name }} [skip ci]"
418+
git push origin "$TARGET_BRANCH"
289419
env:
290420
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ build/bin/*.exe
3636
build/bin/cache.db
3737
/cache.db
3838
build/windows/installer/tmp/*
39+
# Fetched from Go modules via scripts/ensure-libcronet-*.{ps1,sh}
40+
build/windows/libcronet.dll
41+
build/darwin/libcronet.dylib
42+
build/linux/libcronet.so
3943
*.timestamp-*.mjs
4044
/tmp.exe
4145
*~
@@ -51,3 +55,6 @@ build/windows/installer/tmp/*
5155
tools/encrypt-sub/
5256
build-release.bat
5357
build-release.sh
58+
59+
# build
60+
build/bin/

README.en.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</p>
1111

1212
<p align="center">
13-
<img src="https://img.shields.io/badge/version-3.1.2-blue.svg" alt="Version">
13+
<img src="https://img.shields.io/badge/version-3.2.0-blue.svg" alt="Version">
1414
<img src="https://img.shields.io/badge/desktop-Wails-27272f.svg" alt="Wails">
1515
<img src="https://img.shields.io/badge/backend-Go-00ADD8.svg" alt="Go">
1616
<img src="https://img.shields.io/badge/frontend-React_18-61dafb.svg" alt="React">
@@ -33,7 +33,7 @@
3333

3434
## Overview
3535

36-
ResultV **3.1.2** is a native desktop application built with **[Wails v2](https://wails.io/)**. The UI is **React 18** with **Vite** and **Tailwind CSS**; traffic is handled by a **Go** backend and **[sing-box](https://github.com/SagerNet/sing-box)** (with project-specific build tags in `wails.json`). The interface is localized with **i18next** (English and Russian).
36+
ResultV **3.2.0** is a native desktop application built with **[Wails v2](https://wails.io/)**. The UI is **React 18** with **Vite** and **Tailwind CSS**; traffic is handled by a **Go** backend and **[sing-box](https://github.com/SagerNet/sing-box)** (with project-specific build tags in `wails.json`). The interface is localized with **i18next** (English and Russian).
3737

3838
**Prebuilt releases:** GitHub Actions publishes **Windows amd64** artifacts (portable `.exe` and NSIS installer), **macOS** (`.dmg`) and **Linux** (`.AppImage`, `.deb`, `.rpm`) when a `v*` tag is pushed.
3939

@@ -68,6 +68,8 @@ ResultV **3.1.2** is a native desktop application built with **[Wails v2](https:
6868
- Subscriptions in **JSON** (Xray format with `outbounds[]` and sing-box format with `type`) are parsed for all key protocols, including `wireguard`/`amneziawg` with an `amnezia` block.
6969
- **Tunnel** mode on Windows requires **running as Administrator**.
7070
- **Kill Switch** on Windows may require **administrator privileges** for firewall rules (`internal/system/killswitch_windows.go`).
71+
- If internet remains blocked after a crash or forced app termination, run in **PowerShell (Administrator)**:
72+
`Get-NetFirewallRule -DisplayName 'ResultV_KillSwitch*' -ErrorAction SilentlyContinue | Remove-NetFirewallRule`
7173
- Some subscription providers enforce **HWID device limits**; the app sends a stable `x-hwid` when fetching subscriptions and shows the reason if the provider returned an empty response due to the limit.
7274
- **In case of issues**, please contact TG @resultpoint_manager.
7375

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</p>
1111

1212
<p align="center">
13-
<img src="https://img.shields.io/badge/version-3.1.2-blue.svg" alt="Version">
13+
<img src="https://img.shields.io/badge/version-3.2.0-blue.svg" alt="Version">
1414
<img src="https://img.shields.io/badge/desktop-Wails-27272f.svg" alt="Wails">
1515
<img src="https://img.shields.io/badge/backend-Go-00ADD8.svg" alt="Go">
1616
<img src="https://img.shields.io/badge/frontend-React_18-61dafb.svg" alt="React">
@@ -33,7 +33,7 @@
3333

3434
## О проекте
3535

36-
ResultV **3.1.2** — нативное настольное приложение на **[Wails v2](https://wails.io/)**. Интерфейс: **React 18**, **Vite**, **Tailwind CSS**; трафик обрабатывает бэкенд на **Go** и движок **[sing-box](https://github.com/SagerNet/sing-box)** (теги сборки заданы в `wails.json`). Локализация через **i18next** (русский и английский).
36+
ResultV **3.2.0** — нативное настольное приложение на **[Wails v2](https://wails.io/)**. Интерфейс: **React 18**, **Vite**, **Tailwind CSS**; трафик обрабатывает бэкенд на **Go** и движок **[sing-box](https://github.com/SagerNet/sing-box)** (теги сборки заданы в `wails.json`). Локализация через **i18next** (русский и английский).
3737

3838
**Готовые сборки:** в GitHub Actions публикуются артефакты **Windows amd64** (portable `.exe` и установщик NSIS), **macOS** (`.dmg`) и **Linux** (`.AppImage`, `.deb`, `.rpm`) при push тега `v`*.
3939

@@ -70,6 +70,8 @@ ResultV **3.1.2** — нативное настольное приложение
7070
- Подписки в **JSON** (Xray-формат с `outbounds[]` и sing-box-формат с `type`) разбираются для всех ключевых протоколов, включая `wireguard`/`amneziawg` с блоком `amnezia`.
7171
- Режим **Tunnel** в Windows требует **запуска от имени администратора**.
7272
- **Kill Switch** в Windows может требовать **прав администратора** для правил брандмауэра (`internal/system/killswitch_windows.go`).
73+
- Если после сбоя/принудительного завершения приложения интернет остается заблокирован, выполните в **PowerShell (Администратор)**:
74+
`Get-NetFirewallRule -DisplayName 'ResultV_KillSwitch*' -ErrorAction SilentlyContinue | Remove-NetFirewallRule`
7375
- Некоторые провайдеры подписок используют **HWID-ограничение устройств**; приложение передает стабильный `x-hwid` при загрузке подписок и показывает причину, если провайдер вернул пустой ответ по лимиту.
7476
- **При сбоях** просьба писать в ТГ @resultpoint_manager.
7577

THIRD_PARTY_LICENSES.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Third-Party Licenses
2+
3+
ResultV includes the following third-party components. All other code is
4+
licensed under GPL-3.0 — see [LICENSE](LICENSE).
5+
6+
---
7+
8+
## getlantern/systray
9+
10+
- **Source**: https://github.com/getlantern/systray v1.2.2
11+
- **Location**: `internal/getlantern_systray/`
12+
- **License**: Apache-2.0 (see `internal/getlantern_systray/LICENSE`)
13+
14+
The vendored copy has been modified by ResultV. Original package comment:
15+
> Package systray is a cross-platform Go library to place an icon and menu
16+
> in the notification area.
17+
18+
---
19+
20+
## Go module dependencies
21+
22+
All other dependencies are consumed as normal Go modules and are not
23+
vendored into this repository. Their licenses are reproduced in the module
24+
cache (`go env GOMODCACHE`) and can be audited with:
25+
26+
```
27+
go-licenses report ./...
28+
```
29+
30+
Key dependency licenses:
31+
| Module | License |
32+
|--------|---------|
33+
| github.com/sagernet/sing-box | GPL-3.0 |
34+
| github.com/sagernet/sing | MIT |
35+
| github.com/sagernet/sing-tun | MIT |
36+
| github.com/sagernet/sing-quic | MIT |
37+
| github.com/sagernet/quic-go | MIT |
38+
| github.com/sagernet/gvisor | Apache-2.0 |
39+
| github.com/wailsapp/wails | MIT |
40+
| golang.org/x/sys | BSD-3-Clause |
41+
| github.com/getlantern/golog | Apache-2.0 |

0 commit comments

Comments
 (0)