Re:Termux: terminal emulator and Debian-style userland as an...
by pryelluw on Sunday October 22, 2017 @09:38PM
(#15530077)
I installed this months ago and cant figure out how to access localhost through my browser. I wrote a sample flask app and ran it but cant access it outside of termux. Is there a way to do so?
[ Parent
| on HN ]
Re:Termux: terminal emulator and Debian-style userland as an...
by hyperpallium on Monday October 23, 2017 @12:35AM
(#15530753)
python3 -m http.server
http://localhost:8000/ # on phone
However, I haven't been able to access a server running on termux on my phone from anywhere else. I suspect servers are blocked by my mobile ISP (makes sense!), but I never got to the bottom of it.Should work over wifi though.
Re:Termux: terminal emulator and Debian-style userland as an...
by icebraining on Monday October 23, 2017 @04:36AM
(#15531653)
I suspect servers are blocked by my mobile ISP (makes sense!), but I never got to the bottom of it.
Many mobile ISPs run NAT, you don't even get a public IP of your own during the session, just an internal one.
Re:Termux: terminal emulator and Debian-style userland as an...
by hyperpallium on Monday October 23, 2017 @05:09AM
(#15531782)
Thanks! Is there a way to do it? It must support bi-dir streams, they just need to be initiated from the phone.
Re:Termux: terminal emulator and Debian-style userland as an...
by icebraining on Monday October 23, 2017 @05:39AM
(#15531898)
You can use a tunnel like https://pagekite.net/ it seems they support Android.
Alternatively, you can DIY by connecting to some other machine using SSH and establishing a reverse tunnel.
Re:Termux: terminal emulator and Debian-style userland as an...
by npolet on Monday October 23, 2017 @01:40AM
(#15530960)
I tend to run:
python -m http.server 0.0.0.0:8000
That should allow you to access it externally.
Re:Termux: terminal emulator and Debian-style userland as an...
by pryelluw on Monday October 23, 2017 @07:21AM
(#15532298)
Just tested it and wont work.
Edit:
Works if you just run:
python3 -m http.server
Thanks for the helpEdit[1]:
Works great with python's built in web server but wont work with flask's built in development web server.