-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An equivalent to the other/fun/bootstrap_node_info.py
script for TCP
#2331
Comments
A special case 78 bytes starting with magic bytes is fine as a convention and easy to use the existing A TCP packet to be forwarded is really complicated to construct. I am looking for something braindead easy I can contruct in Python to get an intelligent response, and nothing more, to test that I got a Tox TCP tcp_port/BSd through a proxy/router/smoke signal/telepathy... |
The main test case is can I test a BSd running on an OnionV3 Torred port that can be accessed through Tor. But there might other similar cases. Does toxic's --tcp_port allow you to use Tor to turn it into an OnionV3 relay? If so we might be able encourage each toxic user to be an OnionV3 provider, which would really help our resilliancy. If we can make it easy for clients to be tcp_servers the numbers change radically. Anyone that is running a client like toxic over Tor already has a Tor server running, and could, with a 3 line change to torrc, help the network by running an OnionV3 Tox TCP server. Then we could figure out a way of integrating the propagation of the information about the onion addresses. |
https://github.com/Tox/toxstatus can do that, it can be used as a command line tool. |
Thanks for toxstatus - I missed that - but no, it does not solve the issue here. It doesn't work AFAIK behind SOCKS - I can't even build it behind SOCKS -:) The issue here is testing a BS node whilst behind a SOCKS proxy. I can reach a TCP port on a BS node over SOCKS but I don't have a simple way of getting a meaningful reply out of a simple utility written easily in any language - Python in this example. UDP you can send a packet of len 78 with the magic first bytes and get a version and MOTD reply. What little I understood, the TCP handshake is much more complex, too complex for my usecase. I asked @Green-Sky to add it as from looking at the UDP reply code it can't be "much" work. It's important as this is a complete blocker for me to testing a simple way of providing BS nodes over OnionV3 which will help our resiliency. It's pretty easy to block our small number or nodes, and it's very easy for poisoned guard or exit nodes to try to block Tox over Tor. What I'm trying to explore is Tox in Tor, which should be more tamper resistant. PS: nice to see a command-line tool for Tox; I just added a Python console to toxygen so it's a command-line CLI for anything wrapped into tox_wrapper. |
Is there a mailinglist of IRC chat or NGC for node operators to ask them to run an Onion service with their nodes? If so, could it be referred to on tox.chat, and a page on it written up in the wiki? |
It would be really nice to have some/any simple solution fix to the TCP_server code to at least look for a special packet ping packet and be nice and send a simple nice reply like the UDP case. We need this to make the tcp server testable/usable with Tor, and we need Tor to be resilient against network blocks or snooping. There are people using Tox for serious reasons, and right now it's trivial to observe or block with the small number of boot nodes. |
I see this now. Yes that sounds like a thing we can do. Would you like to join our NGC dev channel to discuss more? I'm interested in making tox in tor (e.g. hidden node) work. |
See also #2332 I'm in your Dev channel as of today - let me know in there when you are online. |
If you're interested in making tox in tor (e.g. hidden node) work, a pre-requisite is to get all of the big nodes to run a TCP port hooked up to a hidden service, and then report the corresponding onion address in the motd field of their node desctiption, (Unless you can get the node description to have an onions field which is a list of onion_address:tcp_port.) This can be done right now if you want to get a testbed in place to test against. Configure your boostrap server with an extra tcp_port that is not listed publically in the nodes.json file. We will use 33446 as an example. In your /etc/tor/torrc or equivalent, you need to add 2 sections. The first is:
The second is:
Replace 33446 with your real port number. The next time tor starts up, a new directory will be created in /var/lib/tor/tox-hsv3/ and it will have a file called hostname. Look in the file for the onion address to your site. Now add the onion address followed by a colon and the port to the motd field of the advertised nodes.json entry for your server |
I'm interested in making tox in tor (e.g. hidden node) work: if onion addresses from the big nodes start showing up in the nodes.json, and the blockers to testing get dealt with #2584 (comment) , I'll try testing it, |
We need a an equivalent to the
other/fun/bootstrap_node_info.py
script for TCP to test TCP connections.For UDP you can send a packet of len 78 with the magic first bytes and get a version and MOTD reply. Not so for TCP ( in fact if you do send such a packet to the TCP it send the BS node into an infinite loop for which it never recovers). So we need a simple fix to the TCP_server code to at least look for a special packet like this and be nice and send a simple nice reply like the UDP case.
The text was updated successfully, but these errors were encountered: