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
I've been using and testing the build_with_stream method added in #1168, but as Target been used in both build_with_stream and try_connect it's resolving the sockaddrs when creating Target from the given Url, and leading to two problems:
it's possibly leaking data as it resolves through a standard connection and not through the preferred data stream passed as a parameter.
in connections, to .onion for example, it leads to an error because it tries to resolve it to sockaddrs which is expected to not be possible, and it's one of the reasons to use the specified data stream, in this case for example arti_client::DataStream.
I do see two possible fixes for the problem:
remove the sockaddrs resolution from the Target data structure, and do it only on try_connect_over_tcp, which is the only place it's being used.
receive the Target as a parameter, with the sockaddrs field being an Option<> leading to the user to possibly do the resolution when needed. It would also require upstreaming the parameter to ws-client methods as well.
The text was updated successfully, but these errors were encountered:
I've been using and testing the
build_with_stream
method added in #1168, but asTarget
been used in bothbuild_with_stream
andtry_connect
it's resolving the sockaddrs when creatingTarget
from the givenUrl
, and leading to two problems:.onion
for example, it leads to an error because it tries to resolve it to sockaddrs which is expected to not be possible, and it's one of the reasons to use the specified data stream, in this case for examplearti_client::DataStream
.I do see two possible fixes for the problem:
sockaddrs
resolution from theTarget
data structure, and do it only ontry_connect_over_tcp
, which is the only place it's being used.Target
as a parameter, with thesockaddrs
field being anOption<>
leading to the user to possibly do the resolution when needed. It would also require upstreaming the parameter to ws-client methods as well.The text was updated successfully, but these errors were encountered: