This release brings three main changes.

  1. The ability to filter links.
  2. Support for an optional notes field.
  3. Ability to edit expiry time and notes.

I try not to too many new features to avoid bloat, but it seemed like these were pretty useful for a link shortener, especially when managing thousands of short links. (To my surprise, some people even use it to manage millions of links.)

Please take a look at the release notes for a complete list of changes.

P.S. The next thing I'll be focusing on is improving throughput under sustained load. If anyone has experience with SQLite, feel free to drop any tips. All the db related code is here. I'm mostly interested in improving insert speeds when 1000s of inserts are done per second.

Edit: There's a Codeberg mirror as well.

all 18 comments

sorted by: hot top controversial new old
[–] 5 points 5 months ago (1 child)

This looks pretty interesting. I have been passively looking for such a service. I will give this a whirl and try it out.

  • source
  • hideshow 1 child comment
  • [–] 4 points 5 months ago (1 child)
  • [–] 2 points 5 months ago (1 child)

    This is very cool. I like your github write up a lot. Hosted.

  • source
  • hideshow 1 child comment
  • [+] 2 points 2 months ago (1 child)
  • [–] [S] 1 point 2 months ago*

    Thanks. Filtering does not cover expiry, but it does cover shortlinks, longlinks, and notes. Making expiry work will make the filtering inefficient for little benefit, since the expiry times are stored as UNIX timestamps in the database.

  • source
  • parent
  • [–] 2 points 5 months ago (8 children)

    Opening the shortened URL in your browser will instantly redirect you to the correct long URL. (So no stupid redirection pages.)

    an interstitial or redirect page would be a security feature, especially for a shortener open to the public.

  • source
  • hideshow 8 child comments
  • [–] 2 points 5 months ago (7 children)

    Can you elaborate? Seems interesting.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 1 point 5 months ago (6 children)

    bad actors use shorteners to mask the actual url of their pages so their potential victims don't know where they're going until it is, perhaps, 'too late'

  • source
  • parent
  • hideshow 6 child comments
  • [–] [S] 4 points 5 months ago* (last edited 5 months ago)

    That could be, but I don't think that it should be relied upon. The shortener itself can execute malicious code, so that kind of security is, in my opinion, essentially theatre. I'd just say that don't click on links that you don't trust.

    This project is for own use/use with friends/family/internally in an org etc., where trust isn't an issue. Of course, I cannot stop anyone from using it in any other way that they see fit. It can help shorten annoying long links for ease of sharing, but that's it.

  • source
  • parent
  • [–] 1 point 5 months ago (4 children)

    Didn't down vote you, but if someone clicks a link without, at the very least, mousing over it to view the url, then you get what you get. One of the most effective anti-virus programs you can ever deploy on any system is your own prudence and discretion. It's not the fault of the url shortner, it's the moron clicking indiscriminately.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 3 points 5 months ago (1 child)

    those "morons" represent the vast majority of internet users.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 5 months ago

    Dude...one of the most cornball things I've ever heard in my life but has some truth to it is 'You can't fix stupid.' It's 2026! Spool up. I would guess that the biggest portion of those morons are boomers, yet still, it's 2026. I'm sorry to sound so harsh but I really tire of the older set especially, but pretty much anyone in a technologically developed country claiming not to be technologically inclined. They had no flipping problem learning FaceBook. 'How to Use A Computer Tutorial' search turns up thousands of tutorials on that very topic. Unless you live in a remote area or a technologically underdeveloped country where technology is not readily accessible to the common man, then yeah. I'm a septuagenarian and I learned. I have no certs, or diplomas, or any thing, which should be obvious, but I get by pretty decent I'd say. It's pretty much attainable by the vast majority of people if they'd only put a little effort into it.

    /rant

  • source
  • parent
  • [–] -2 points 5 months ago

    Optimizing a dead internet engine

  • source
  • 37 comments in c/selfhosted@lemmy.world view that post
    [+] 16 points 1 year ago (1 child)
  • [–] [S] 10 points 1 year ago* (last edited 1 year ago)

    Thank you for the kind words.

    Won't lie, the main reason that I stuck to a vanilla frontend approach is because I didn't know what else to do. I've never been a frontend dev, and never wish to be one. So I looked at an older project, and started by trying to replicate it. In hindsight, it was probably a good decision. The backend is more intentional though, and I do try to keep things simple and clean.

  • source
  • parent
  • [–] [S] 9 points 1 year ago*

    I'm already aware of a few small UI oddities. There were quite a few changes in the frontend, so I kind of expect these. Please let me know if you see anything weird. You can comment here, or open a bug report. I expect to do a patch release by tomorrow.

  • source
  • [–] 17 points 1 year ago* (15 children)

    Looks like a good project, but I genuinely don't quite get why Rust projects feel the need to advertise "written in Rust" as a feature. Do you find that a lot of users care which programming language your app is written in? Does it help with finding contributors?

    I don't know which programming language most of my self-hosted apps use, and I don't mind since they all work well and do their job.

  • source
  • hideshow 15 child comments
  • [–] 14 points 1 year ago (3 children)

    I mean, for myself personally if it were written in NodeJS or Python or something I'd be less interested.

    And I don't even care about Rust. It's just that everything and their sister is written in NodeJS and Python. I say this as someone who founded a company that uses Python.

    Also the more I hear about actual Rust adoption the more willing I am to consider it for the next big thing.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 0 points 1 year ago (2 children)

    if it were written in NodeJS or Python or something I'd be less interested.

    Does it matter if it's running in Docker and the container is lightweight (say less than 50MB), though? I like apps being written in a language I know well so I can contribute if needed, but other than that, I mostly treat a Docker image as a black box.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 7 points 1 year ago* (1 child)

    That'd be awesome. Unfortunately most of my experience (and I realize that is my experience) has so many packages dependencies that 50MB is impossible.

    Don't get me wrong, I am proficient in JS/TS so being able to work handily in NodeJS is great, less context switching, but I feel like so many companies I contract for just jam a square peg into a round hole because - and it just makes things painful.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago*

    Yeah it's definitely not possible to reach 50MB with a Node.js Docker image, but <150MB should be doable with a distroless base image + compiling the app into one JS file (for example, using Parcel or esbuild).

    It's possible to reach ~50-60MB Docker image with a C# app. Rust and Go definitely produce more compact binaries though.

  • source
  • parent
  • [–] 28 points 1 year ago (5 children)

    Imo, it's nice to see tools written in a memory safe systems language

    Especially if you use a lot of them. More utility, less attack surface

  • source
  • parent
  • hideshow 5 child comments
  • [–] 5 points 1 year ago (4 children)

    This makes sense! You get the same advantage if the app uses Go or C# though, and both of those can compile to a single statically-linked executable too.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 0 points 1 year ago (3 children)

    If it's written in C# that's a huge turn-off though because that means it's likely to only run on Windows.

    I mean, in theory, it could run on Linux but that's a very rare situation. Almost everything ever written in C# uses Windows-specific APIs and basically no one installs the C# runtime on Linux anymore. It's both enormous and a pain in the ass to get working properly for any given C# project.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 1 year ago* (last edited 1 year ago) (2 children)

    That's a very old way of thinking of things. C# has been cross platform for a long time.

    Almost everything ever written in C# uses Windows-specific APIs

    Not really. Most C# apps use .NET (since the framework and standard library is quite feature-rich) rather than direct Win32 calls, and .NET is cross-platform. A lot of web services are written in C# and deployed to Linux servers.

    basically no one installs the C# runtime on Linux anymore

    You can compile a C# app to a single executable that doesn't require the framework to be installed.

    Are you running Jellyfin, the *arr suite, slskd, or Technitium DNS? They're all written in C#.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 year ago (1 child)

    You've obviously never tried to get any given .NET project working in Linux. There's .NET and then there's .NET Core which is a mere subset of .NET.

    Only .NET Core runs on Linux and nobody uses it. The list of .NET stuff that will actually run on .NET Core (alone) is a barren wasteland.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 1 year ago* (last edited 1 year ago)

    I'm a C# developer and run .NET apps on Linux all the time. I usually work on CLI and server apps, but recently released my first Linux desktop app written in C#: https://flathub.org/apps/com.daniel15.wcc

    Even before .NET Core, I was using Mono to run C# apps on Linux. There used to be quite a few GNOME apps written in C#.

    There’s .NET and then there’s .NET Core which is a mere subset of .NET.

    Nope. The old .NET Framework has been deprecated for a long time. The latest version, 4.8.1, is not very different to 4.6 which was released 10 years ago.

    The modern versions are just called .NET, which is what .NET Core used to be, but with much more of the framework implemented in a cross-platform way. Something like 95% of the Windows-only .NET Framework has been reimplemented in a cross-platform way.

    The list of .NET stuff that will actually run on .NET Core (alone) is a barren wasteland.

    All modern .NET code is built on the cross-platform framework. Only legacy apps used the old Windows-only .NET Framework.

    If you get the free community version of Visual Studio and create a new C# project, it'll be using the latest cross-platform framework. You can even cross-compile for Linux on a Windows system.

  • source
  • parent
  • [–] 4 points 1 year ago (1 child)

    As an information security professional and someone who works on tiny, embedded systems, knowing that a project is written in Rust is a huge enticement. I wish more projects written in Rust advertised this fact!

    Benefits of Rust projects—from my perspective:

    • Don't have to worry about the biggest, most common security flaws. Rust projects can still have security flaws (anything can) but it's much less likely for certain categories of flaws.
    • Super easy to build stuff from scratch. Rust's crates ecosystem is fantastic! Especially in the world of embedded where it's a godsend compared to dealing with C/C++ libraries.
    • It's probably super low overhead and really fast (because Rust stuff just tends to be like that due to the nature of the language and that special way the borrow checker bitches at you when you make poor programming choices haha).
    • It's probably cross-platform or trivially made cross-platform.
  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 1 year ago

    People who are into systems languages would care and for newer languages the more people advertise their usage the more mainstream it becomes and then bigger more traditional companies would consider using it and that would help increase the size of that languages ecosystem and community so I'm okay with people adding written in Rust to their project descriptions

  • source
  • parent
  • [–] 5 points 1 year ago (5 children)

    The name is a dead ringer for a Bengali coder 🤝

  • source
  • hideshow 5 child comments
  • [–] [S] 4 points 1 year ago* (last edited 1 year ago) (1 child)

    শুনে ভালো লাগলো যে এটা কারো চোখে পড়েছে। নয়তো সবাইকে বোঝাতে হয় কি নাম, কেন নাম। আসলে বাঙালী প্রোগ্রামার খুব বেশি চিনি না।

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 1 year ago*

    Amar toh ekbaare chokhe poreche 😁

    Bangali "hobby" programmer khub kom i ache. Beshir bhag IT company te ache, aar shudhu kaaj er jonnoi joto ta programming dorkar pore, kore.

    Fediverse e arek bangali dekhe khub i bhalo laagche 🤝🤝

  • source
  • parent
  • [–] 5 points 1 year ago (5 children)

    I am digging this, thanks for keeping it updated and improving it!

    I see that you say it's feature complete / no user stuff; but it'd really mesh well if it took OIDC authentication. Don't need it to make users or anything, just instead of the password popup the OIDC provider is asked for confirmation that whatever user registered with the OIDC is logged in. That'd let me leverage extra 2FA protection from the OIDC provider and juice on that one-login life.

    Now I have no experience making OIDC crap work nor how it even works behind the scenes, so I can't help :( sorry; just wishful thinking.

    Also saw on your github - hope our newly shit-out gestapo don't bother you!

  • source
  • hideshow 5 child comments
  • [–] 3 points 1 year ago (3 children)

    This would require configuration with a whitelist of which OIDC IdPs to trust. Otherwise anybody could self-authorise a OIDC token (using their own IdP) and use that to log in.

  • source
  • parent
  • hideshow 3 child comments
  • [–] [S] 4 points 1 year ago* (1 child)

    Hmm, so that might be out of scope here. But I can try to do some kind of 2FA, shouldn't be much of an issue, really. It's just that I never thought a link shortener needed 2FA protection since the links will be publicly shared anyway.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago

    Looks nice, thank you :]

  • source
  • [–] 1 point 1 year ago (1 child)

    I've been using your application for my services for almost a month now, though I just have one redirect link at the moment. I just forgot about it after the setup, although you could consider it to be a sign of a good product?

    I wish if there could be additional analytics or logs for the links like a timeline, unique + existing visitors etc, however I completely understand if they cannot be implemented for the sake of keeping the app simple. Thanks for your service regardless!

  • source
  • hideshow 1 child comment
  • [–] [S] 4 points 1 year ago

    I'm happy that you like it. Any kind of analytics or logging is decidedly against my stated policy for this project, so I won't be adding it. But I understand that some might need it, and in that case, one should look at more comprehensive solutions like YOURLS.

  • source
  • parent
  • [+] 1 point 1 year ago (1 child)
  • [–] 0 points 1 year ago

    I am lazy and just use .htaccess

  • source