Skip to content

feat(x): upgrade psiphon dependency#596

Draft
fortuna wants to merge 4 commits into
mainfrom
fortuna/psiphon
Draft

feat(x): upgrade psiphon dependency#596
fortuna wants to merge 4 commits into
mainfrom
fortuna/psiphon

Conversation

@fortuna

@fortuna fortuna commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@fortuna

fortuna commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps

greptile-apps Bot commented Apr 27, 2026

Copy link
Copy Markdown

Greptile Summary

This PR upgrades the psiphon-tunnel-core dependency (and several of its transitive deps) and consistently adds the PSIPHON_DISABLE_INPROXY build tag across all CI build, test, and staticcheck steps to disable the in-proxy feature at compile time. The README is also updated to document the new tag requirement for Psiphon builds.

Confidence Score: 5/5

Safe to merge — changes are a routine dependency bump with consistent tag additions and no logic changes.

All changes are dependency version bumps and build-tag additions that are applied consistently across CI and documentation. The only finding is a minor P2 documentation discrepancy between the README's suggested GOTOOLCHAIN value and the toolchain directive in x/go.mod.

x/mobileproxy/README.md — minor Go toolchain version inconsistency worth aligning.

Important Files Changed

Filename Overview
.github/workflows/test.yml Consistently adds PSIPHON_DISABLE_INPROXY build tag to all psiphon-tagged build, test, and staticcheck steps across all platforms (Linux, macOS, Android).
x/go.mod Upgrades psiphon-tunnel-core and several transitive deps (utls, quic-go, circl, protobuf, etc.); adds new transitive deps (axiomhq/hyperloglog, kamstrup/intmap, dgryski/go-metro, Psiphon-Inc/uds-ipc, golang.org/x/tools/go/expect deprecated).
x/go.sum Checksum file updated to match new and removed dependency versions in go.mod; consistent with the module changes.
x/mobileproxy/README.md Documents updated Psiphon build instructions including new PSIPHON_DISABLE_INPROXY tag and a Go version constraint (GOTOOLCHAIN=go1.24.13) that is not reflected in x/go.mod's toolchain directive or the CI setup step.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Build / CI Trigger] --> B{Build Target}
    B -->|All platforms| C["go build -C x\n-tags psiphon,PSIPHON_DISABLE_INPROXY"]
    B -->|Ubuntu| D["gomobile bind\n-tags psiphon,PSIPHON_DISABLE_INPROXY\n→ mobileproxy.aar (Android)"]
    B -->|macOS| E["gomobile bind\n-tags psiphon,PSIPHON_DISABLE_INPROXY\n→ mobileproxy.xcframework (iOS)"]
    B -->|All platforms| F["go test\n-tags nettest,psiphon,PSIPHON_DISABLE_INPROXY"]
    C --> G[psiphon-tunnel-core\nv1.0.11-0.20260407161504]
    D --> G
    E --> G
    F --> G
    G --> H{PSIPHON_DISABLE_INPROXY?}
    H -->|true| I[In-proxy feature\ndisabled at compile time]
    H -->|false| J[Full Psiphon\nincluding in-proxy]
Loading

Reviews (1): Last reviewed commit: "More tags" | Re-trigger Greptile

Comment thread x/mobileproxy/README.md
Comment on lines +69 to +74
To add **Psiphon support**, include `golang.getoutline.org/sdk/x/mobileproxy/psiphon`. You will also need to add `-tags psiphon,PSIPHON_DISABLE_INPROXY` to the build flags, and downgrade Go to 1.24:

```bash
PATH="$(pwd)/out:$PATH" gomobile bind -ldflags='-s -w' -target=ios -iosversion=11.0 -tags=psiphon -o "$(pwd)/out/mobileproxy.xcframework" golang.getoutline.org/sdk/x/mobileproxy golang.getoutline.org/sdk/x/mobileproxy/psiphon
PATH="$(pwd)/out:$PATH" gomobile bind -ldflags='-s -w' -target=android -androidapi=21 -tags=psiphon -o "$(pwd)/out/mobileproxy.aar" golang.getoutline.org/sdk/x/mobileproxy golang.getoutline.org/sdk/x/mobileproxy/psiphon
export GOTOOLCHAIN=go1.24.13
PATH="$(pwd)/out:$PATH" gomobile bind -ldflags='-s -w' -target=ios -iosversion=11.0 -tags=psiphon,PSIPHON_DISABLE_INPROXY -o "$(pwd)/out/mobileproxy.xcframework" golang.getoutline.org/sdk/x/mobileproxy golang.getoutline.org/sdk/x/mobileproxy/psiphon
PATH="$(pwd)/out:$PATH" gomobile bind -ldflags='-s -w' -target=android -androidapi=21 -tags=psiphon,PSIPHON_DISABLE_INPROXY -o "$(pwd)/out/mobileproxy.aar" golang.getoutline.org/sdk/x/mobileproxy golang.getoutline.org/sdk/x/mobileproxy/psiphon

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Go toolchain version mismatch between README and x/go.mod

The README instructs users to pin GOTOOLCHAIN=go1.24.13, but x/go.mod declares toolchain go1.24.8. If the upgraded psiphon-tunnel-core genuinely requires Go 1.24.13 (rather than 1.24.8 being sufficient), the toolchain directive in x/go.mod should be bumped to match so that GOTOOLCHAIN=auto auto-selects the right version without manual intervention. If 1.24.13 is not actually required (i.e., 1.24.8 works fine), the README example should reflect the lower bound that x/go.mod already documents.

@fortuna

fortuna commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

Ugh, this is a major pain. The issues in the Psiphon code is forcing me to litter our code with extra tags, and the build is still failing on some dependency error:

link: [github.com/wlynxg/anet](https://github.com/wlynxg/anet): invalid reference to net.zoneCache

It seems they are trying to link against an unexported variable that changed across Go versions.

I'm inclined to give up fixing Psiphon until their code is fixed.

/cc @ohnorobo

@fortuna

fortuna commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

Found the issue and the potential fix: https://github.com/wlynxg/anet#how-to-build-with-go-1230-or-later

@fortuna

fortuna commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

Nevermind, the fix is bad. It requires digging into the standard library internals, which is not guaranteed to be stable: https://tip.golang.org/doc/go1.23#linker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant