elisescu / tty-share

Share your linux or osx terminal over the Internet.
https://tty-share.com/
MIT License
806 stars 87 forks source link

Connection refused to localhost on any port. #54

Closed YellowOnion closed 1 year ago

YellowOnion commented 2 years ago
> tty-share  --readonly --command tmux --args "attach -t default --ignore-size" --public
public session: https://on.tty-share.com/s/<snip />/
local session: http://localhost:8000/s/local/
Press Enter to continue!
ERRO[0005] Cannot proxy the connection to the target HTTP server: dial tcp [::1]:8000: connect: connection refused

I've tried multiple ports...do I need to run tty-server manually? Both local and remote don't work.

I'm confused what I'm supposed to do.

elisescu commented 2 years ago

@YellowOnion , this is pretty strange. The only think I can come up with, is to check whether you have any firewall that won't allow local connections - although that would be super strange. Can you try the same thing (i.e.: to listen to localhost:8000 on one end, and then check if you can connect from another end) with netcat? Something like nc -vlk 8000 and nc -v localhost 8000? Also maybe try using the local ipv4 directly, like: tty-share -listen "127.0.0.1:8123" ... and see if that would work instead? (I'm saying this being a bit suspicios on the [::1]:8000 part of your log line - although not very confident in this assumption).

YellowOnion commented 2 years ago

Okay I seemed to get it working, pressing enter actually drops me in to a bash shell and I thought it quit the app, I could then join the session, I still get the error even on ipv4 and a different port, but I just don't understand what it means, since it seems to be working both publically and locally, when I actually hit enter.

elisescu commented 2 years ago

@YellowOnion that's pretty weird, and I have no idea why you get that message, and even more so why it works given the message. According to the message, it should not work - as it can't connect to the "server" (local) that runs the actual session (and serves the frontend + websockets). Sorry but I have no clue what's going on there

elisescu commented 1 year ago

@YellowOnion I am closing this issue. Feel free to re-open it if you have more questions