News for hackers. Stuff that matters.
Re:Ask HN: Is there any software you only made for your own ... by BoppreH on Friday July 05, 2024 @11:49AM (#40883769)
I have a 3-letter domain that I use as my personal playground (think "xyz.com"). It features:

- One-click upload of text, clipboard, and files. So from any computer, I can visit xyz.com + ctrl+v to upload the clipboard, or drag and drop a file, etc. It's the only feature available to unauthenticated sessions, but I'm not too worried because you don't get a URL back.

- A list of uploaded files, with buttons to copy link, download, delete, or generate QR code.

- Notifications (for authenticated sessions) when an upload is made.

- Simplified RSS feed reader (also custom[1]). It scans my feeds every 10 minutes, and displays the URLs of new items, along with a button to open all in new tabs and mark them as read.

- A Server-sent-events channel[2], and a UI that displays visitors in real time. The channel allows me to send redirects/file downloads to any visitor, so I'm constantly asking people to visit xyz.com when I need to hand them something digitally. Visitors are color coded with randomized backgrounds for identification.

- Youtube video downloader (powered by yt-dlp), along with audio extractor and pitch+speed correction for songs.

- Authentication is by approval from an already authenticated session (usually my phone). In the worst case I can edit the text file via SSH.

I add or remove widgets according to my needs. At one point I had chat integration with Facebook+WhatsApp+Telegram (got me banned from WhatsApp), radio player (replaced with Spotify), and even balances from my bank accounts, credit card, and Steam (removed after a bank found out and I got scared).

The whole thing runs in custom pair of Go and Python servers, developed slowly over the last ten years, and I use it multiple times a day. Feels like a digital tree house, messy but fun and useful.

[1]: https://github.com/boppreh/feeder

[2]: https://github.com/boppreh/server-sent-events

Edit: people have found it (not exactly hidden) and started spamming uploads of "HELLO FROM HN". From Sweden, I think. Well, Hi! But I'm taking it down for a few days to avoid tempting more people.

Re:Ask HN: Is there any software you only made for your own ... by Manozco on Friday July 05, 2024 @11:58AM (#40883849)
This is like 90% of what I need to setup on a server for my personal usage. Issue is I don't do front dev at all so I never really start working on it. Any chance you've open sourced it ? (Or if not opensourced but you're willing to privately share the code, you can reach me at hn [at] manoz [dot] co)
Re:Ask HN: Is there any software you only made for your own ... by BoppreH on Friday July 05, 2024 @12:20PM (#40884007)
I sent you an email with the code and instructions. I won't share it openly because I don't want to tempt people into finding security flaws for fun.

It's definitely not code that I'm proud of, but it's been serving me well for many years, and might help you get started.

Re:Ask HN: Is there any software you only made for your own ... by ycuser2 on Friday July 05, 2024 @01:04PM (#40884355)
> ..., along with audio extractor and pitch+speed correction for songs

What do you mean with pitch+speed correction? Have songs on youtube false pitch or speed?

Re:Ask HN: Is there any software you only made for your own ... by BoppreH on Friday July 05, 2024 @01:07PM (#40884375)
I often have to download songs for children to sing, but they have trouble with fast or low-pitched songs. It destroys the audio quality, but they don't seem to mind.
Re:Ask HN: Is there any software you only made for your own ... by liamYC on Friday July 05, 2024 @01:14PM (#40884426)
Cool projects, I’d definitely like my server to be able to do all these things. What have you used to deploy it?
Re:Ask HN: Is there any software you only made for your own ... by BoppreH on Friday July 05, 2024 @01:38PM (#40884576)
- Oracle Cloud Free Tier[1] for a Ubuntu VPS (4 ARM cores, 24 GB RAM). Surprisingly pleasant and reliable, given who's offering and for how much ($0). It used to be on DigitalOcean, until they kept screwing up their FreeBSD support and bricked my machine twice.

- Caddy[2] web server with Let's Encrypt certificates, working as reverse proxy.

The rest is a very lazy 2010's solution:

- A Go server for HTTP (static files, uploads, maintaining server-sent-event channels). It also reads and writes events in a custom format to a local socket, for the interactive parts.

- A Python server for the widgets, communicating with the Go server.

- Source code edited manually in-place (SSH or SSHFS[3], with Git) and restarted as needed. I know, I know, awful practice. But as I'm the only user, uptime during development is not a concern.

- Startup is handled by a @reboot cronjob and a bash one liner.

- Text files for "structured storage" (RSS feed items, authenticated sessions, mapping of uploaded file names).

As horrible as it might all sound, it has survived ten years and two cloud vendors. Nowadays I might containerize it, or rewrite as one Rust server, but I think I made the right choices at the time.

8/10 given the unusual requirements.

[1] https://www.oracle.com/cloud/free/

[2] https://caddyserver.com/

[3] https://github.com/winfsp/sshfs-win

Re:Ask HN: Is there any software you only made for your own ... by liamYC on Saturday July 13, 2024 @12:57AM (#40951871)
Thanks a lot for this, I’ll check it out
Re:Ask HN: Is there any software you only made for your own ... by duckmysick on Saturday July 06, 2024 @06:53PM (#40893959)
> removed after a bank started asking questions

What? That seems crazy. A bank was giving you an earful for accessing your own balance?

Re:Ask HN: Is there any software you only made for your own ... by BoppreH on Sunday July 07, 2024 @04:09AM (#40895992)
I was scraping their website every few minutes, from a cloud provider, using a cookie I created by logging in manually while VPN'ing through the cloud (so the IP looked the same).

Eventually the cookie started "expiring" quicker and quicker, and they eventually thought I was being hacked. I knew how sketchy the whole thing was, so I didn't want to admit that I was doing the "hacking" myself.

It was probably against the terms of service, triggering alarms on their side, and risking being classified as actual hacking. Not worth it.

Eventually I got a bank account and app with instant transaction notifications, so now there's no point in scraping anymore.