Closed pitsi closed 1 year ago
I might be experiencing the same issue
ERRO[0052] Cannot proxy the connection to the target HTTP server: dial tcp [::1]:8000: connect: connection refused
Trying it on a single machine. Linux.
Hey!
@pitsi , you are running it correctly, but without being explicit on what address to listen on that machine, it defaults to localhost, hence it will listen only for local connections. You can use the --listen
flag to tell it to accept connections on any interface, e.g.: tty-share --listen 0.0.0.0:8000
and then from your other machines you can use the links you were already trying to use: http://192.168.1.130:8000/s/local/
. I realize this is not obvious, so maybe I could listen to 0.0.0.0 by default... I'll think about it.
Also, did you check the tty-proxy
- you can host that one yourself, and you would not need any settings on your router. I imagine you want access to your rpi from outside local network, and not use my tty-share.com
- you can definitely do that if you host the proxy somewhere publicly accessible, and then pass to the tty-share
command the address where the proxy is with the --tty-proxy
flag. Unrelated, but perhaps you want to update to the latest version too - it now supports port forwarding, if you need that.
@andys8 , are you sure you're not using the--public
flag? That log line you mention above makes me think that you are using a public session. Although, eve if you have that flag, it's still concerning that you get the error. Has it ever worked for you? Can you try with a different port to listen on, by using --listen :8001
for example, and see if you get the same error? Do you have a firewall that would prevent it (can you try with netcat and see if you can listen&connect to TCP sockets locally without issues)?
You are probably right about the first part. I will test it later and report back. Tbh, from all the available parameters, I only used --public
and --readonly
(for obvious reasons).
As for tty-proxy and the rest, I have no problem using your domain, but some people complained about lag. I was showcasing something in python, which was inside a 80*24 terminal and had no animations (e.g. cmatrix or tty-clock have animations in them). Last but not least, I rely on what the debian repo can offer, because I do not know how to package stuff and I have no idea about docker etc, so all I can use is tty-share.
---edit It worked! I can finally see my rpi from the browser! You can close the issue if the other user's questions are covered.
And happy 2023 to everyone!
I discovered tty-share a couple of weeks ago and I have used its
--public
parameter to share it over the internet to a couple of friends so as to show them some python stuff.However, I can not find a way to make it work over my local network. For instance, I run it on my rpi3b+ (debian 11 aarch64, tty-share 2.2.0, 192.168.1.130 local ip) and I get this output. Please notice that there is no extra output despite the
--verbose
parameterThen I go to my desktop, open a browser, visit
http://192.168.1.130:8000/s/local/
and I get a connection refused error! It even fails when I try connecting to it via the tty-share itself, as seen in the last gif of the readme!The same thing applies if I run it on the desktop (debian unstable x64, tty-share 2.3.0). I run tty-share but I can not connect to it through the browser with
http://192.168.1.2:8000/s/local/
but only withhttp://localhost:8000/s/local/
, which is practically useless. Is there something I am doing wrong? There is no such thing as a firewall anywhere.Moreover, I would like to share my terminal without the need of tty-share.com. I have my own domain name, I have forwarded the port on my router properly, but a connection to
http://mydomain.com:8000/s/local/
does not seem to work. Testing another app on the same port shows that the port is open and the app is visible on the internet as it should.