this post was submitted on 01 Sep 2024
239 points (97.6% liked)

Asklemmy

43947 readers
877 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS
 

FOSS or otherwise

you are viewing a single comment's thread
view the rest of the comments
[โ€“] user224@lemmy.sdf.org 15 points 2 months ago (5 children)

Termux on Android.

I've got some videos on my phone I might want to watch on random computers, so I serve them up with NGINX. I've got wget-created mirrors of some old websites on my phone, so I serve them up with NGINX. Other files I may want to move out from my phone to untrusted computers on the network can too be served up simply by NGINX.
I've got the full Wikipedia zim file from Kiwix on my Micro SD card, so I run kiwix-serve (behind NGINX).
I've got all the music on my phone, naturally the phone is then running my Navidrome server (behind NGINX).
Of course, I may want to manage this from a computer, so it's running SSH server.
My phone is always connected to VPN and uses NextDNS, naturally I may want to use this with other computers, but I can't install software to computers I don't own (I mean, I can, but ... it would be disliked), naturally it is then running Tiniproxy HTTP proxy server.
Some desktop GUI apps can be useful on a phone too. noaa-apt, Kid3, Audacity, desktop Firefox, Handbrake because I am too dumb for ffmpeg, so I run XFCE DE on it. Naturally, I can access it from a computer (I know) too, after all it's accessed via a VNC server.
Am I stupid enough to expose something using HTTP protocol running on my phone to the internet? Of course I am! I can use cloudflared.
Do I want to encrypt a file? I can use GPG.
Do I want to create a compressed archive? I've got TAr and GZip.
Do I want to browse Gopher? I've got Lynx.
SSH or telnet somewhere? The clients are there.

[โ€“] Mr_Blott 16 points 2 months ago (1 children)

Christ on a bike, this comment reads like I'm having a stroke

[โ€“] The_Che_Banana@beehaw.org 2 points 2 months ago

Do I want to download a car? I have PoterZebie on LilypaD for 3gb and a portable SD kaZoo

[โ€“] gears@sh.itjust.works 8 points 2 months ago (1 children)

Why on earth do you run this all on your phone as opposed to on a home server?

[โ€“] user224@lemmy.sdf.org 9 points 2 months ago

Because... I can.

And it's portable.

[โ€“] dutchkimble@lemy.lol 3 points 2 months ago* (last edited 2 months ago)

Thanks for giving me many hours of something to do

[โ€“] dessalines@lemmy.ml 3 points 2 months ago (1 children)

I code nearly exclusively over termux+ssh.

[โ€“] Noxious@fedia.io 2 points 2 months ago (1 children)

You ssh into your phone? Or you use Termux on your phone to ssh into another machine?

[โ€“] dessalines@lemmy.ml 2 points 2 months ago (1 children)

I code from an android tablet, by ssh'ing into a linux server running arch linux for development. I used vim+plugins for years, but now helix as it supports rust and typescript well.

[โ€“] Noxious@fedia.io 1 points 2 months ago (1 children)

May I ask which tablet you use and why? Do you use an external keyboard? I find your setup really interesting, and would love to know the reasons behind it

[โ€“] dessalines@lemmy.ml 1 points 2 months ago

A xiaomi pad 5 pro, with an external keyboard. I switched to coding remotely a few years ago, so its nice to have a portable device with like 12 hours of battery life.

[โ€“] tetris11@lemmy.ml 1 points 2 months ago (1 children)

nginx

why not just python -m http.server 1234 ?

[โ€“] user224@lemmy.sdf.org 1 points 2 months ago (1 children)

I feel like NGINX is simplest to configure. And it's in the repos already, so I don't see the advantage here.

Easy to do redirects, directory listings, serving a static website, setting mime types of specific files, basic user authentication, using HTTPS, using it as reverse proxy, limiting request types, limiting bandwidth, and making the directory listings far nicer with fancyindex module. That's all I need and it's pretty simple to do with NGINX. I don't know what the Python HTTP server does, nor how to use.

[โ€“] tetris11@lemmy.ml 1 points 2 months ago* (last edited 2 months ago)

if you said Caddy, I'd believe you more -- but nginx requires a lot of configuration.

python http server simply does a directory listing in the folder it is invoked in, and if there is an index.html file present it will serve it by default. Easy for hosting files/images from your phone