Snowflake failed to connect on Android 11 and above
This issue causes Snowflake to be unable to establish a connection on Android 11 and above when the app's target SDK level is above 29.
It is related to the Go x/mobile issue https://github.com/golang/go/issues/40569
The problem is located in the Pion library https://github.com/pion/ice/blob/214c86c5cfbc40fa9adbbea59081bd64c8b65d7c/agent.go#L327 which calls https://pkg.go.dev/github.com/mingyech/transport/v2/stdnet#Net.UpdateInterfaces which is forbidden on Android 11.
Snowflake log:
2023/07/09 17:40:03 snowflake-client 2.5.1
2023/07/09 17:40:03 Started SOCKS listener at [scrubbed].
2023/07/09 17:40:17 SOCKS accepted: {[scrubbed] utls-imitate=hellorandomizedalpn map[utls-imitate:[hellorandomizedalpn]]}
2023/07/09 17:40:17
--- Starting Snowflake Client ---
2023/07/09 17:40:17 Using ICE servers:
2023/07/09 17:40:17 url: stun:stun.bluesip.net:3478
2023/07/09 17:40:17 url: stun:stun.epygi.com:3478
2023/07/09 17:40:17 url: stun:stun.stunprotocol.org:3478
2023/07/09 17:40:17 url: stun:stun.voys.nl:3478
2023/07/09 17:40:17 url: stun:stun.uls.co.za:3478
2023/07/09 17:40:17 url: stun:stun.sonetel.net:3478
2023/07/09 17:40:17 url: stun:stun.antisip.com:3478
2023/07/09 17:40:17 Rendezvous using Broker at: https://snowflake-broker.torproject.net.global.prod.fastly.net/
2023/07/09 17:40:17 Domain fronting using: cdn.sstatic.net
2023/07/09 17:40:17 ---- SnowflakeConn: begin collecting snowflakes ---
2023/07/09 17:40:17 ---- SnowflakeConn: starting a new session ---
2023/07/09 17:40:17 ---- SnowflakeConn: begin stream 3 ---
2023/07/09 17:40:17 redialing on same connection
2023/07/09 17:40:17 WebRTC: Collecting a new Snowflake. Currently at [0/1]
2023/07/09 17:40:17 snowflake-421fa3a84195d6e9 connecting...
2023/07/09 17:40:17 WebRTC: DataChannel created
2023/07/09 17:40:17 Failed to prepare offer failed to create network: route ip+net: netlinkrib: permission denied
2023/07/09 17:40:17 WebRTC: closing DataChannel
2023/07/09 17:40:17 WebRTC: closing PeerConnection
2023/07/09 17:40:17 WebRTC: Closing
2023/07/09 17:40:17 WebRTC: failed to create network: route ip+net: netlinkrib: permission denied Retrying...
2023/07/09 17:40:17 NAT Type: unrestricted