Discussion:
[tor-dev] (no subject)
sarpedon montecarlo
2018-10-26 13:12:16 UTC
Permalink
Hi!
I am supposed to implement, a python application that runs tor in
background.
The running tor is under direct control of the python app via control port.
This running tor, is the proxy for the Tor Browser; By this I mean, when
the Tor Browser starts, it will connect to this process, instead of the
bundled tor provided by itself.
The controlling features I am into, are as below:
A) I want to attach streams coming from each tabs of the Tor Browser,
attached to a separate circuit; By this I mean each tab of the browser, use
a separate circuit, and do not share circuits with each other.(just like
the way ordinary TBB does that)
for this I am aware that Tor Button plugin does something with the streams
to separate streams of a specific tab from other streams.
Then by using IsolateSocksStream option on the tor side, tor will
successfully isolate each tabs streams.
My problem here, is that I am handling the routing and stream attaching all
by myself and I can not use the provided IsolateSocksStream option because
I am handling the circuit generation by myself because of the specific
policies I am using for generating circuits, and their related paths.
So if I am facing a bunch of streams, and I have a bunch of circuits
myself, How am I going to detect that Stream A is from tab A of TBB and
Stream B is from tab B of TBB, so I attach stream A to circuit A, and
attach stream B to circuit B.
Thanks in advance.
Traumschule
2018-10-26 23:09:07 UTC
Permalink
Hi,

without checking the list archive,

On Fri, 26 Oct 2018 16:42:16 +0330
Post by sarpedon montecarlo
My problem here, is that I am handling the routing and stream
attaching all by myself and I can not use the provided
IsolateSocksStream option because I am handling the circuit
generation by myself because of the specific policies I am using for
generating circuits, and their related paths. So if I am facing a
bunch of streams, and I have a bunch of circuits myself, How am I
going to detect that Stream A is from tab A of TBB and Stream B is
from tab B of TBB, so I attach stream A to circuit A, and attach
stream B to circuit B. Thanks in advance.
It sounds like you looked at the code already, so excuse me if this
doesn't help too much. You could use authentication like here:
http://jqs44zhtxl2uo6gk.onion/torbutton.git/tree/src/components/domain-isolator.js#n128
https://gitweb.torproject.org/torbutton.git/tree/src/components/domain-isolator.js#n128

Stem is another option to control circuits using circuit IDs:
http://vt5hknv6sblkgf22.onion/api/control.html#stem.control.Controller.new_circuit
https://stem.torproject.org/api/control.html#stem.control.Controller.new_circuit

Tails implements stream isolation by using a different SocksPort per
application (the document is slightly outdated, #3455 is fixed already):
https://tails.boum.org/contribute/design/stream_isolation/

More developer info can be found here:
https://kkkkkkkkkk63ava6.onion.si/wiki/Stream_Isolation#Information
https://tor.stackexchange.com/questions/10559/whats-the-best-way-to-isolate-applications-as-they-enter-the-tor-network

Hope that helps!
--
traumschule.org

gpg fingerprint:
9356 4DED 8546 8D9A C290 3605 12EE 7D70 7111 2056

/otr info
OTR: ***@irc.indymedia.org fingerprint:
OTR: 35AACA83 4564616C B6EBEC66 56B6B2FC C8D572F1
OTR: ***@irc.oftc.net fingerprint:
OTR: D1CCD207 B60C1866 56A975AE ACE090E9 45E90846
OTR: ***@chat.freenode.net fingerprint:
OTR: 51BF8BB9 434840CC 24F264BC 76450C27 A6AADB12
Continue reading on narkive:
Loading...