reticulum-meshchat icon indicating copy to clipboard operation
reticulum-meshchat copied to clipboard

Android 14 access localhost:8000

Open cyclingtogether opened this issue 1 year ago β€’ 2 comments

Successfully built in android/termux.

Startet meshchat without errors but not able to access localhost:8000 from any webbrowser. Probably a security feature in android 14?

How would you access it, any hints?

note: (installing and starting firefox out of termux is missing an x environment, so this does not work)

cyclingtogether avatar Sep 18 '24 12:09 cyclingtogether

Hey! Unsure on this one sorry. I'm also on Android 14, but I was able to build and run on Termux without any issues. I could access with https://locahost:8000 via Google Chrome and also an installed PWA.

No errors in the console in termux?

liamcottle avatar Sep 24 '24 05:09 liamcottle

no compile errors. i have a highly debloated phone, maybe its missing some invasive google thingie.. will tell when figured out or someone points me to the missing piece

cyclingtogether avatar Sep 26 '24 14:09 cyclingtogether

maybe this works only on a rooted device?

having a samsung with oneui, there seems to be a hidden firewall. would nice to know of anyone else can access localhost from any browser.

magdesign avatar Oct 26 '24 02:10 magdesign

I'm going to close this out as I haven't seen any follow ups, and it's working on my Samsung S24 with Android 14, but if this is still an issue, try the following:

python3 meshchat.py --headless --host 0.0.0.0

liamcottle avatar Dec 29 '24 05:12 liamcottle

For now i run it on my linuxmobile phone since it is still not possible to view localhost on a samsung device... Hopefully we will have more people wanting to use this on a proprietary Android device... to find a solution.

thank you for making mashchat!

magdesign avatar Dec 29 '24 13:12 magdesign

user l78193 on matrix asked what errors i get when running:

nc -lv 5555

in termux and then opening a browser 127.0.0.1:5555

in termux i get:

Listening on 0.0.0.0 5555
Connection received on localhost 55762
GET / HTTP/1.1
Host: 127.0.0.1:5555
Connection: keep-alive
sec-ch-ua: "Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"
sec-ch-ua-mobile: ?1
sec-ch-ua-platform: "Android"
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Mobile Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-IE,en;q=0.9,de-CH;q=0.8,de;q=0.7,en-GB;q=0.6,en-US;q=0.5

also made a simple test withβ€Œ installing npm install -g http-server creating a test website and starting: http-server

then i can easy access the website from any browser in android.

magdesign avatar Feb 27 '25 15:02 magdesign

πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚

finnaly solved this with:

npm run build-frontend

maybe spitting a warning in the terminal would be nice when frontend was not build

magdesign avatar Feb 27 '25 16:02 magdesign

I too cannot connect to :8000 via Chrome/Firefox on Sony Xperia running Android 15 .... a real shame indeed. The same :8000 works fine on a computer (firefox on Ubuntu 22) and on Apple ipad using firefox.

adingbatponder avatar Feb 28 '25 11:02 adingbatponder