Update golang crypto library
run go get -u golang.org/x/crypto in sdk and in /x
This is to fix the error
E panic: tls: ConnectionState is not equal to tls.ConnectionState: struct field count mismatch: 17 vs 16
Someone was seeing this while trying to use mobileproxy in an android app. Due to a new field being added in crypto/tls Conn.ConnectionState
Yeah, I'm not yet convinced this fixes the issue (it's still in draft) and I'm suspicious of how dramatic the changes it makes are. We would want to test something like this very carefully.
The user found that compiling with go 1.24.6 fixed their issue, so it's definitely some kind of library version mismatch, presumably of x/crypto. Where the seam is exactly (psiphon and mobileproxy? the mobileproxy aar and the user's app?) I'm not sure.
By the error message, this unsafe reflection code in psiphon is also involved.
It seems like they are hacking the TLS library. Perhaps we need to update the psiphon dependencies instead.
The reflection is concerning. I hope they are not doing any function calls with reflection (field lookup is ok), because that would disable dead code removal and bloat any code we build.