feat(x): upgrade psiphon dependency#596
Conversation
|
@greptile review |
Greptile SummaryThis PR upgrades the Confidence Score: 5/5Safe 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
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]
Reviews (1): Last reviewed commit: "More tags" | Re-trigger Greptile |
| 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 |
There was a problem hiding this comment.
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.
|
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: 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 |
|
Found the issue and the potential fix: https://github.com/wlynxg/anet#how-to-build-with-go-1230-or-later |
|
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 |
No description provided.