mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-24 11:58:38 -05:00
[PR #3076] [CLOSED] Fix V1 target fallback for non-semver Newt versions #20441
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/3076
Author: @rinseaid
Created: 5/14/2026
Status: ❌ Closed
Base:
dev← Head:fix/v1-target-fallback-http-mode📝 Commits (1)
4270519Fix V1 target fallback for non-semver Newt versions📊 Changes
1 file changed (+27 additions, -25 deletions)
View changed files
📝
server/routers/client/targets.ts(+27 -25)📄 Description
Summary
convertTargetsIfNessicary()falls back to V1 targets whensemver.satisfies()returns false for the Newt's reported versionsemver.satisfies()returns false for any non-semver string (e.g., custom build tags like"dev","patched","nightly")convertSubnetProxyTargetsV2ToV1()stripshttpTargetsand only preservesrewriteTo, which is empty/undefined for HTTP-mode resourcesThe fix adds a
semver.valid()guard so the V1 fallback only triggers for versions that are valid semver AND below1.10.3. Non-semver version strings are treated as V2-capable, since genuinely old Newt versions always reported real semver versions.Both call sites in
convertTargetsIfNessicary()andupdateTargets()are updated.Test plan
"dev") and verify HTTP-mode resources are reachable1.10.2still receives V1 targets (backwards compat preserved)1.10.3+ receives V2 targets (existing behavior unchanged)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.