• u/lukmly013 💾 (lemmy.sdf.org)@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      5
      ·
      4 days ago

      NGINX autoindex + Wget + SSH fuckery (a.k.a.: “Lazy turd solution”)

      Idea:
      You can put files into selected directory for filesharing which will be used as root directory for NGINX. When you enable autoindex you’ll get the classic directory listing you see on places like Linux ISO mirrors.
      That will be the file source.
      To download, you’ll simply download from that autoindex page.
      Uploading is, uuuhh, creative.
      You have to also run NGINX server the same way on the upload side, either have them on same network or use reverse SSH forwarding, and then SSH into the machine you wish to upload to and download the files into it with Wget (or at least I use Wget) from the locally running server.

      Example config I last used on my phone as the upload side:

      daemon off;
      events {}
      http {
      server {
              listen 192.168.34.217:8080;
              root /storage/emulated/0/LibreTorrent/;
              location / {
                      autoindex on;
              }
      }
      }
      

      Yes, the indentation, I know.