elisescu / tty-share

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

How to use it in the LAN? #6

Closed gyl30 closed 5 years ago

gyl30 commented 5 years ago

Make runs can run normally.However, I want to use it in the LAN. I tried the following command, but none of them succeeded. server(192.168.1.70):

  1. ./out/tty-server --url http://192.168.1.70:8090 --web_address 192.168.1.70:8090 --sender_address :7654 -frontend_path ./frontend/public
  2. sudo ./out/tty-server --url http://192.168.1.70 --sender_address :7654 -frontend_path ./frontend/public

As you can see, I tried it twice on the server.

client(192.168.1.70):

  1. ./out/tty-share --useTLS=false --server localhost:7654

web(192.168.3.44) http://192.168.1.70:8090/s/qjeU3w5wrfckB-4yNQLsn6GbgpU_5fT8XQ0azTTpD1Y=

I received lERR_ADDRESS_UNREACHABLE

How can I work?

elisescu commented 5 years ago

Hey @ggyyll . The way you tried it, looks good at first sight. But the ADDRESS_UNREACHABLE error you get sounds more like a network problem - your "web" 192.168.3.44 machine cannot reach the other machine 192.168.1.70, where you run the server. Did you check to see if the two hosts can talk to each other?

wtxpwh commented 5 years ago

./out/tty-server --url http://192.168.1.70:8090 --web_address 192.168.1.70:8090 --sender_address :7654

elisescu commented 5 years ago

./out/tty-server --url http://192.168.1.70:8090 --web_address 192.168.1.70:8090 --sender_address :7654

I assume that the setup is the same as in your first comment, where you run the server and tty-share on the host 192.168.1.70, and then the browser on 192.168.3.44 host. In that case, can you try again with --web_address 0.0.0.0:8090 or just --web_address :8090 instead of --web_address 192.168.1.70:8090? Then in your browser try to open http://192.168.1.70:8090/s/somerandomtexdthere . If you still get ADDRESS_UNREACHABLE then the two hosts/IPs can't talk with each other. Can you ping 192.168.1.70 from 192.168.3.44?

gyl30 commented 5 years ago

thank you very much, my iptables is a little problem.Now can work