[bisq-network/bisq] Stream isolation for Tor (#2081)
Florian Reimair
notifications at github.com
Fri Dec 7 09:05:45 UTC 2018
freimair commented on this pull request.
> @@ -115,7 +117,17 @@ protected Socket createSocket(NodeAddress peerNodeAddress) throws IOException {
public Socks5Proxy getSocksProxy() {
try {
tor = Tor.getDefault();
- return tor != null ? tor.getProxy() : null;
+
+ String stream = "";
+ if (streamIsolation) {
+ // create a random string
+ byte[] bytes = new byte[512]; // note that getProxy does Sha256 that string anyways
+ new SecureRandom().nextBytes(bytes);
+ stream = new String(bytes);
Netlayer does a `stream.getBytes()` immediately, so there should be no issue. Anyhow, the `steam` now gets a Base64-encoded `bytes`.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2081#discussion_r239736180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20181207/11711be9/attachment.html>
More information about the bisq-github
mailing list