Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 23 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,29 @@ If a required command fails or emits a warning from project code, fix it in the

## Lessons

- Hiddify can rename Linux release assets and wrap its Windows portable files
in an outer directory. Verify the publisher's asset names and SHA-256 values,
assert the real ZIP layout in the installer fixture, and publish the complete
directory only after locating the executable. Stage explicit files after
frontend verification because TypeScript rewrites its tracked build cache.
Join filesystem path components separately in fixtures as well as native
installer code so the path source contract passes on every host.
- Keep Hiddify executable inspection in the environment apps collector. Inline
diagnostics for the misplaced ZIP push the shared environment collector over
Clippy's line limit. Bind the path from `TempDir::keep` when retaining a
failed rollback's backup.
- A spawned browser opener is not a successful handoff. Check the launcher exit
status and pass Windows URLs as data to the system association resolver.
Linux `xdg-open` can stay attached to the browser, so leave a still-running
process alive after the handoff wait (ADR 0075).

- Parallel PRs can reserve the same ADR number and version. Keep both ADRs,
renumber the incoming one, and sync the next version from the root
`version` file after retaining the current main lockfile.
- A pinned fallback does not pin an installer that tries `releases/latest`
first. Hiddify's automatic installer and manual fallback guide must use the
same tested release on Linux and Windows (ADR 0139).

- The advisory database can make an unchanged lockfile fail the gate. Update
vulnerable transitive crates through Cargo and replace unmaintained direct
dependencies. The `chrono` migration must preserve RFC 3339 strings in
Expand Down
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ members = [
]

[workspace.package]
version = "6.2.94"
version = "6.2.96"
edition = "2021"
license = "MIT OR Apache-2.0"
rust-version = "1.88"
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iran-split/desktop",
"version": "6.2.94",
"version": "6.2.96",
"private": true,
"type": "module",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/src/api/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,11 +563,11 @@ function guideFor(id: string): InstallGuide {
return {
id,
title: linux ? "Install Hiddify on Linux" : "Install Hiddify on Windows",
download_url: "https://github.com/hiddify/hiddify-app/releases/latest",
download_url: `https://github.com/hiddify/hiddify-app/releases/download/v5.9.15/${linux ? "Hiddify-Linux-x64.AppImage" : "Hiddify-Windows-Setup-x64.exe"}`,
steps: linux
? [
"Download Hiddify-Linux-x64-AppImage.AppImage from the official GitHub release.",
"chmod +x Hiddify-Linux-x64-AppImage.AppImage",
"Download Hiddify-Linux-x64.AppImage from the official GitHub release.",
"chmod +x Hiddify-Linux-x64.AppImage",
"Move it to ~/.local/share/biflow/apps/Hiddify.AppImage",
"Restart BiFlow and press Connect.",
]
Expand Down
46 changes: 27 additions & 19 deletions apps/desktop/src/components/ClientRegistry.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ describe("ClientRegistry profile picker", () => {
});

it("offers OpenVPN download on the Windscribe catalog and missing-binary banner", async () => {
useAppStore.setState({ boot: { platform: "linux" } as BootstrapResult });
vi.mocked(desktop.clientBinaryInstalled).mockResolvedValue(false);
render(<ClientRegistry />);

Expand All @@ -347,7 +348,7 @@ describe("ClientRegistry profile picker", () => {
within(row).getByRole("button", { name: "Download OpenVPN" }),
);
expect(desktop.openUrl).toHaveBeenCalledWith(
"https://openvpn.net/community-downloads/",
"https://openvpn.net/community-docs/installing-openvpn/",
);

const card = screen.getByTestId("client-card-windscribe");
Expand All @@ -362,29 +363,36 @@ describe("ClientRegistry profile picker", () => {
within(missingBanner).getByRole("button", { name: "Download OpenVPN" }),
);
expect(desktop.openUrl).toHaveBeenLastCalledWith(
"https://openvpn.net/community-downloads/",
"https://openvpn.net/community-docs/installing-openvpn/",
);
});

it("reports a failed macOS OpenVPN download page handoff", async () => {
useAppStore.setState({ boot: { platform: "macos" } as BootstrapResult });
vi.mocked(desktop.openUrl).mockRejectedValueOnce("browser handoff failed");
render(<ClientRegistry />);
it.each([
["macos", "https://formulae.brew.sh/formula/openvpn"],
["linux", "https://openvpn.net/community-docs/installing-openvpn/"],
["windows", "https://openvpn.net/community/"],
] as const)(
"reports a failed %s OpenVPN download page handoff",
async (platform, url) => {
useAppStore.setState({ boot: { platform } as BootstrapResult });
vi.mocked(desktop.openUrl).mockRejectedValueOnce(
"browser handoff failed",
);
render(<ClientRegistry />);

await userEvent.click(screen.getByRole("button", { name: "Add client" }));
const row = screen.getByTestId("client-catalog-openvpn");
await userEvent.click(
within(row).getByRole("button", { name: "Download OpenVPN" }),
);
await userEvent.click(screen.getByRole("button", { name: "Add client" }));
const row = screen.getByTestId("client-catalog-openvpn");
await userEvent.click(
within(row).getByRole("button", { name: "Download OpenVPN" }),
);

expect(desktop.openUrl).toHaveBeenCalledWith(
"https://formulae.brew.sh/formula/openvpn",
);
expect(useAppStore.getState().toast).toMatchObject({
text: "Could not open the download page.",
tone: "danger",
});
});
expect(desktop.openUrl).toHaveBeenCalledWith(url);
expect(useAppStore.getState().toast).toMatchObject({
text: "Could not open the download page.",
tone: "danger",
});
},
);

it("leaves the path unchanged when the picker is cancelled", async () => {
const updateClient = vi.fn();
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/lib/presets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("preset downloads", () => {
"downloadWindscribeConfig",
]);
expect(downloadUrlFor(links[0]!.spec, "linux")).toBe(
"https://openvpn.net/community-downloads/",
"https://openvpn.net/community-docs/installing-openvpn/",
);
expect(downloadUrlFor(links[1]!.spec, "linux")).toBe(
"https://windscribe.com/getconfig/openvpn",
Expand Down
10 changes: 6 additions & 4 deletions apps/desktop/src/lib/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export const PRESETS: PresetSpec[] = [
installHint:
"Install OpenVPN and choose a .ovpn profile. BiFlow never lets it take the default route.",
downloads: {
linux: "https://openvpn.net/community-downloads/",
windows: "https://openvpn.net/community-downloads/",
linux: "https://openvpn.net/community-docs/installing-openvpn/",
windows: "https://openvpn.net/community/",
macos: "https://formulae.brew.sh/formula/openvpn",
},
},
Expand All @@ -64,8 +64,10 @@ export const PRESETS: PresetSpec[] = [
installHint:
"Run Happ and expose a local SOCKS or mixed port (default 10808).",
downloads: {
linux: "https://www.happ.su/main/download",
windows: "https://www.happ.su/main/download",
linux:
"https://github.com/Happ-proxy/happ-desktop/releases/latest/download/Happ.linux.x64.deb",
windows:
"https://github.com/Happ-proxy/happ-desktop/releases/latest/download/setup-Happ.x64.exe",
macos:
"https://github.com/Happ-proxy/happ-desktop/releases/latest/download/Happ.macOS.universal.dmg",
},
Expand Down
8 changes: 4 additions & 4 deletions crates/iran-split-config/src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ const OPENVPN_SPEC: PresetSpec = PresetSpec {
install_hint:
"Install OpenVPN and choose a .ovpn profile. BiFlow never lets it take the default route.",
downloads: PresetDownloads {
linux: "https://openvpn.net/community-downloads/",
windows: "https://openvpn.net/community-downloads/",
linux: "https://openvpn.net/community-docs/installing-openvpn/",
windows: "https://openvpn.net/community/",
macos: "https://formulae.brew.sh/formula/openvpn",
},
};
Expand Down Expand Up @@ -246,8 +246,8 @@ const HAPP_SPEC: PresetSpec = PresetSpec {
macos_bypass: &["Happ", "*Happ*", "sing-box", "xray", "v2ray"],
install_hint: "Run Happ and expose a local SOCKS or mixed port (default 10808).",
downloads: PresetDownloads {
linux: "https://www.happ.su/main/download",
windows: "https://www.happ.su/main/download",
linux: "https://github.com/Happ-proxy/happ-desktop/releases/latest/download/Happ.linux.x64.deb",
windows: "https://github.com/Happ-proxy/happ-desktop/releases/latest/download/setup-Happ.x64.exe",
macos: "https://github.com/Happ-proxy/happ-desktop/releases/latest/download/Happ.macOS.universal.dmg",
},
};
Expand Down
4 changes: 4 additions & 0 deletions docs/adr/0074-happ-discovery-and-hidden-google.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

Accepted

The Clients catalog opens Happ's official x64 Debian package on Linux and
its x64 setup executable on Windows. The publisher's macOS DMG is the
corresponding macOS destination.

## Context

Connect logged `happ is not running and its executable was not found` even
Expand Down
12 changes: 7 additions & 5 deletions docs/adr/0075-windscribe-openvpn-download.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ already had a profile still had no in-app path to OpenVPN.
- Windscribe catalog and card download rows list **Download OpenVPN** first
(the same platform page as the OpenVPN preset), then **Get Windscribe
config**. On macOS that link opens the Homebrew formula for the standalone
`openvpn` executable. On Linux and Windows it opens OpenVPN Community.
`openvpn` executable. On Linux it opens OpenVPN's distribution package
instructions. On Windows it opens the official Community installer page.
- The amber "OpenVPN is not installed" banner always opens the OpenVPN
page, including on a Windscribe card.
- The URL allowlist stays derived from the preset table; Windscribe reuses
the OpenVPN row so it cannot drift.
- Use `/usr/bin/open` for macOS download links and check its exit status with
a bounded async wait. Client download buttons show a toast if the handoff
fails. Environment snapshots report whether the selected opener exists and
include `external_url_opener_missing` when it does not.
- Use `/usr/bin/open` on macOS, `xdg-open` on Linux, and the Windows shell
association via PowerShell. Pass the Windows URL as process environment data.
Check launcher status asynchronously and show a toast when the handoff
fails. On Linux, a launcher still running after the wait may own the browser
process, so leave it running. Environment snapshots report opener availability.

## Consequences

Expand Down
29 changes: 29 additions & 0 deletions docs/adr/0139-hiddify-5-5-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ADR 0139: Use Hiddify 5.5.5 for managed installation

## Status

Accepted

ADR 0140 updates the managed download to 5.9.15 and corrects Windows ZIP
installation.

## Context

The Windows installer still downloaded Hiddify 4.1.1. Linux tried the mutable
`releases/latest` AppImage before falling back to 4.1.1, so the platforms could
install different versions.

## Decision

- Pin managed Hiddify downloads and manual installation guides to the official
[5.5.5 release](https://github.com/hiddify/hiddify-app/releases/tag/v5.5.5).
- Linux downloads its versioned x64 AppImage directly. Windows retains the
versioned x64 portable ZIP followed by the setup executable fallback.
- Preserve discovery of existing installations and their settings. This change
selects the version for new managed installations; it does not replace an
existing external client automatically.

## Validation

A cross-platform unit test checks the exact Linux and Windows asset URLs and
that the manual guide uses the same download as automatic installation.
Loading
Loading