You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ProxyServer contains three hash maps keyed by StreamKey that contain information about persistent routes through the MASQ network: virtual connections between the browser and a server. When either the browser or the server shuts down the TCP connection it has with its Node, the corresponding StreamKey becomes worthless and is removed from all three of these hash maps.
When a Node receives Gossip showing that a neighborship in the network has disappeared, it's possible that some of the persistent routes held by the ProxyServer are invalidated. However, there is no mechanism for informing the ProxyServer of destroyed neighborships, so the ProxyServer keeps those (now inoperative) persistent routes in its hash maps, and user traffic over them will suddenly start timing out (after two minutes, for most browsers).
Modify the code so that:
When an existing neighborship disappears from the NeighborhoodDatabase, a message about that fact is sent to the ProxyServer.
The ProxyServer will look through its stream_key_routes hash map for routes (use the ExpectedServices) that involve that neighborship. Any routes that are identified should be removed from stream_key_routes and keys_and_addrs.
For each route removed, a new route to the same exit Node is demanded from the Neighborhood.
If the Neighborhood can make such a route, it is entered in stream_key_routes and keys_and_addrs under the same StreamKey as before, so that future traffic will follow the new route without interruption.
If the Neighorhood cannot make such a route, the StreamKey should be retired from the tunneled_hosts hash map as well, and the TCP stream to the browser explicitly closed.
Of course, if the Node that disappeared or went routes_data = false is an exit Node in any of the ProxyServer's stored routes, those routes are worthless and should be discarded and their connections closed, so that the browser can revive them and start new TLS sessions.
Note: Be sure to find all the ways a neighborship can disappear. Gossip is a very common way (don't forget that Nodes can not only completely drop neighborships, but they can also set their routes_data flag to false, whereupon their neighborships become just as useless for routing or exiting as if they had been completely dropped), but there's also the RemoveNeighborMessage. There may be other ways as well.
The text was updated successfully, but these errors were encountered:
The
ProxyServer
contains three hash maps keyed byStreamKey
that contain information about persistent routes through the MASQ network: virtual connections between the browser and a server. When either the browser or the server shuts down the TCP connection it has with its Node, the correspondingStreamKey
becomes worthless and is removed from all three of these hash maps.When a Node receives Gossip showing that a neighborship in the network has disappeared, it's possible that some of the persistent routes held by the
ProxyServer
are invalidated. However, there is no mechanism for informing theProxyServer
of destroyed neighborships, so theProxyServer
keeps those (now inoperative) persistent routes in its hash maps, and user traffic over them will suddenly start timing out (after two minutes, for most browsers).Modify the code so that:
NeighborhoodDatabase
, a message about that fact is sent to theProxyServer
.ProxyServer
will look through itsstream_key_routes
hash map for routes (use theExpectedServices
) that involve that neighborship. Any routes that are identified should be removed fromstream_key_routes
andkeys_and_addrs
.Neighborhood
.Neighborhood
can make such a route, it is entered instream_key_routes
andkeys_and_addrs
under the sameStreamKey
as before, so that future traffic will follow the new route without interruption.Neighorhood
cannot make such a route, theStreamKey
should be retired from thetunneled_hosts
hash map as well, and the TCP stream to the browser explicitly closed.routes_data = false
is an exit Node in any of the ProxyServer's stored routes, those routes are worthless and should be discarded and their connections closed, so that the browser can revive them and start new TLS sessions.Note: Be sure to find all the ways a neighborship can disappear. Gossip is a very common way (don't forget that Nodes can not only completely drop neighborships, but they can also set their
routes_data
flag tofalse
, whereupon their neighborships become just as useless for routing or exiting as if they had been completely dropped), but there's also theRemoveNeighborMessage
. There may be other ways as well.The text was updated successfully, but these errors were encountered: