Briar crashes when TorPlugin tries to create a connection
java.lang.NullPointerException: Attempt to write to field 'java.io.OutputStream net.sourceforge.jsocks.Proxy.out' on a null object reference
at net.sourceforge.jsocks.SocksSocket.doDirect(SocksSocket.java:279)
at net.sourceforge.jsocks.SocksSocket.<init>(SocksSocket.java:100)
at org.briarproject.plugins.tor.TorPlugin.createConnection(TorPlugin.java:536)
at org.briarproject.plugins.tor.TorPlugin$2.run(TorPlugin.java:515)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
In the library sources that Gradle downloaded for me, it looks like the proxy field of the jsocks SocksSocket
constructor is ignored completely, but the doDirect()
internal function called by that constructor uses the unset proxy
variable. This looks like an upstream bug. I don't know how this is working for anyone else, given that the jsocks library is verified by Gradle Witness.