A URL shortener with various other utilities, backed by a custom lightweight framework.

Overview

da.gd

What is da.gd?

dagd-test

da.gd is both a URL shortener and a collection of quick-info tools written in PHP. It allows you to use curl (or any http client) to quickly retrieve various kinds of information such as your IP, useragent, whois for a given domain or IP, DNS lookups, etc., from an easy-to-remember url.

The goal of this project is to just make an easy to use, little-of-everything tool that works on any device or in any script in any situation. So far, some interesting ideas have been requested (and implemented). If you have an idea for a feature you would like to see, please either (order of preference):

  • Fork, Add feature, Send pull request for review/merge.
  • Ask relrod to implement it on irc (Libera) via PM.
  • File it in the issue tracker.

Because a goal of this project is to have it work for many purposes/situations, I encourage feedback, ideas, participation, and interaction with this project. Have some fun with it :)

What currently works?

curl da.gd/help will give you a list of what is currenly available on the live site.

Getting a dev environment up

da.gd is slightly annoying to set up, but there are now docker-compose files in place to make it easier. You can get a quick development environment set up by doing this:

  • Ensure you have a working docker-compose or podman-compose setup.
  • Clone the dagd repository
  • cd container
  • For docker-compose: docker-compose up
  • For podman-compose: podman-compose up
  • Go to http://localhost:8080/ in your regular browser.

Note that the development environment is entirely ephemeral. Anything stored in the database will be lost when you docker-compose down or podman-compose down. That is, the files in ./container/ are not meant for production use.

License

ASL 2.0. See LICENSE for more details.

Comments
  • Blacklisted long URL (crypto-news-flash.com)

    Blacklisted long URL (crypto-news-flash.com)

    • [x] https://www.investing.com/news/stock-market-news/banco-bpm-repaid-125-billion-euros-of-ecb-loans--source-2961384
    • [x] https://www.fxempire.com/news/article/banco-bpm-repaid-12-5-billion-euros-of-ecb-loans-source-1226282
    • [x] https://www.crypto-news-flash.com/crypto-lender-blockfi-files-for-bankruptcy-and-sues-sbf-for-575m-robinhood-shares-will-bitcoin-drop/
    • [x] https://www.crypto-news-flash.com/will-the-biggest-bitcoin-trust-with-635000-btc-fall-investors-face-trust-issues/?utm_source=rss&utm_medium=rss&utm_campaign=will-the-biggest-bitcoin-trust-with-635000-btc-fall-investors-face-trust-issues
    opened by impredicative 10
  • Blacklisted long URL (paypal)

    Blacklisted long URL (paypal)

    • [ ] https://finance.yahoo.com/news/metamask-partners-paypal-ethereum-purchases-031959133.html?.tsrc=rss
    • [ ] https://cryptonews.com/news/crypto-adoption-metamask-wallet-teams-up-with-paypal-to-enable-customers-to-buy-eth-directly.htm
    opened by impredicative 6
  • Morning downtime

    Morning downtime

    I have noticed a brief downtime in the mornings for a couple of minutes in a day. I have seen this on multiple days. Is there a process that runs that causes this downtime?

    opened by impredicative 5
  • Blacklisted long URL (economictimes.indiatimes.com)

    Blacklisted long URL (economictimes.indiatimes.com)

    https://economictimes.indiatimes.com/industry/renewables/indias-power-giant-ntpc-will-turn-to-nuclear-fleet-in-climate-goal-chase/articleshow/96074775.cms

    opened by impredicative 5
  • Long URL is not a valid URL

    Long URL is not a valid URL

    I am receiving the error "Long URL is not a valid URL" for the following long URL:

    https://www.investing.com/central-banks/european-central-bank/speeches/european-banking-supervision-–-business-model-analysis-200142286

    Note that the quoted version of the same long URL below encounters no such error:

    https://www.investing.com/central-banks/european-central-bank/speeches/european-banking-supervision-%E2%80%93-business-model-analysis-200142286

    The character in question is EN DASH, but other non-ASCII characters can similarly come up in other examples.

    Can dagd just work with the given unicode URL without me having to quote it? Is dagd too strict in checking URL validity?

    opened by impredicative 5
  • Short url suffix expansion in long url

    Short url suffix expansion in long url

    @programble had an idea on irc today of basically this:

    Given a short url, da.gd/foo, which expands to long url example.com/bar, going to da.gd/foo/quux would take you to example.com/bar/quux.

    This feels a little confusing to me, but I don't have much of a case against it. This ticket serves as a call for comments. :)

    Note that we can sort-of emulate this feature with the Commander da.gd app, but the url would be longer da.gd/c/<something>/<shorturl>/<suffix>.

    So from some people who use da.gd - thoughts on this? Should it just include everything past the shorturl? Should we include the querystring too?

    /cc @duckinator @Ttech @Raynes

    opened by relrod 5
  • Read timeouts

    Read timeouts

    I am seeing multiple read timeout errors this morning. Times are Eastern.

    8:31:02 AM Failed to receive a response for long URL https://www.marketwatch.com/story/cleveland-cliffs-shares-rise-on-higher-annual-fixed-prices-for-steel-01671713469?siteid=yhoof2&yptr=yahoo  in attempt 3 of 3. The exception is: ConnectTimeout: HTTPSConnectionPool(host='da.gd', port=443): Max retries exceeded with url: /s (Caused by ConnectTimeoutError(<urllib3.connection.HTTPS

    8:33:38 AM Failed to receive a response for long URL https://barrons.com/articles/self-driving-startup-tusimple-cut-staff-restructuring-51671715893?mod=RTA  in attempt 3 of 3. The exception is: ConnectTimeout: HTTPSConnectionPool(host='da.gd', port=443): Max retries exceeded with url: /s (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fca146a

    8:42:52 AM Failed to receive a response for long URL https://dailycoin.com/former-ftx-alameda-research-executives-cooperating-with-the-authorities/  in attempt 3 of 3. The exception is: ReadTimeout: HTTPSConnectionPool(host='da.gd', port=443): Read timed out. (read timeout=3)

    No further errors were observed later.

    opened by impredicative 4
  • Blacklisted long URL (finance.yahoo.com)

    Blacklisted long URL (finance.yahoo.com)

    Hi. I am sometimes getting a "Blacklisted long URL" 400 error for some legitimate news sites. For example:

    • https://finance.yahoo.com/m/a8255075-9607-30b7-a123-7ec4368f11ad/apple-iphone-estimates-keep.html?.tsrc=rss
    • https://finance.yahoo.com/news/apple-is-making-your-i-phone-more-secure-to-fight-off-nation-state-hackers-180008035.html?.tsrc=rss

    Can this site (and any other news sites) be removed from the blacklist?

    opened by impredicative 4
  • Accept bitcoin donations

    Accept bitcoin donations

    It shouldn't hurt to accept donations via a crypto such as bitcoin. This allows people to donate more anonymously.

    It is easy to setup a cold wallet using a dedicated laptop booting it with Tails OS liveUSB as it has Electrum over Tor. Its documentation covers it reasonably. Other people use a hardware wallet. If you switch to accepting it, please ensure that at least one other person you trust can fully access it.

    There is no rush. I have nothing in mind for a few months w.r.t. this issue.

    opened by impredicative 4
  • Reference Python code for shortening a long URL

    Reference Python code for shortening a long URL

    I am documenting here the most basic Python reference code for shortening a long URL as per the API:

    > import requests
    > response = requests.post('https://da.gd/s/', data={'url': 'https://realpython.com/python-requests/'}, timeout=3)
    > response.raise_for_status()
    > response.status_code
    200
    > response.text
    'https://da.gd/KFUPh\n'
    > response.text.rstrip()
    'https://da.gd/KFUPh'
    
    opened by impredicative 3
  • Template for non-text browsers

    Template for non-text browsers

    Is this something we want to pursue (a simple html template for non-text, real browsers)?

    If it is, it should handle all cases, including those with verbose output like /headers and /w/.

    Ideas welcome.

    opened by relrod 3
  • Remove remaining `DaGdBaseApp` usages

    Remove remaining `DaGdBaseApp` usages

    • [x] DaGdBreakController - fixed by #39
    • [x] DaGdDNSController - fixed by #39
    • [x] DaGdLeftPadController - fixed by #39
    • [x] DaGdMetricsController - fixed by #38
    • [ ] DaGdHelpController - will be replaced by newhelp
    • [ ] DaGdImageController - it does some graphic stuff, possibly a more complex DaGdController port
    • [x] DaGdCommanderController - maybe we'll delete this?
    Cleanup 
    opened by danopia 0
  • QR code generation

    QR code generation

    I've wanted to add a qr application to dagd for quite some time. Most of the QR code generation libraries in existence, with bindings for PHP, are either:

    • LGPL licensed -- which we cannot include.
    • 1k lines of code -- which, given that dagd is currently PHP, is really scary to depend on.

    In addition to the above, we have in general been following Not-Invented-Here and implementing everything ourselves anyway (e.g. see the whois app where we implement our own whois client).

    So I suspect this comes down to me reading about how QR codes are generated, and writing the simplest possible implementation of a generation library. I will probably prototype it out in Haskell (which works since dagd is moving to Haskell at some point anyway), and then backport it to PHP.

    This would be a separate application but we could also have it optionally show QR codes when a shorturl is requested, by e.g. passing: ?qr=1 (and having a checkbox on the html form set that).

    New feature 
    opened by relrod 0
Owner
da.gd
The da.gd URL Shortener & Toolset
da.gd
URL shortener web application based on the Laravel PHP Framework.

UrlHub Warning: UrlHub is still in development, constantly being optimized and isn't still stable enough to be used in production environments. Whatev

Kei 349 Jan 4, 2023
URL shortener web application based on the Laravel PHP Framework.

UrlHub Warning: UrlHub is still in development, constantly being optimized and isn't still stable enough to be used in production environments. Whatev

Kei 348 Dec 23, 2022
:aerial_tramway: A modern, powerful, and robust URL shortener

?? A modern, minimalist, and lightweight URL shortener. Polr is an intrepid, self-hostable open-source link shortening web application with a robust A

Chaoyi Zha 4.6k Jan 1, 2023
A simple URL shortener for PHP

Shorty Shorty is a simple URL shortener for PHP. Installation 1. Download and extract the files to your web directory. 2. Use the included database.sq

Mike Cao 210 Dec 19, 2022
A fast and powerful URL Shortener built with Laravel, VueJS, and Tailwind CSS.

A fast and powerful URL Shortener built with Laravel, VueJS, and Tailwind CSS.

Devpri 53 Dec 25, 2022
Simpler Url Shortener for Laravel

Laravel Url Shortener Install composer require magarrent/laravel-url-shortener Run migrations: php artisan migrate Configuration If you want to config

Marc Garcia Torrent 51 Dec 17, 2022
🔗 Your Own URL Shortener

Your Own URL Shortener YOURLS is a set of PHP scripts that will allow you to run Your Own URL Shortener, on your server. You'll have full control over

YOURLS 8.8k Jan 3, 2023
A simple but powerful URL shortener

UrlShorter 这是一个足够简洁的Url短网址生成器 This is a simple Url shorter. 兼容性 在PHP7.X 与 PHP 8.0 下测试通过 安装 step 1: git clone [email protected]:soxft/UrlShorter.git step

xcsoft 74 Dec 21, 2022
URL - link shortener based on sqlite

link-url-shortener url - link shortener based on sqlite.

Okin On 1 Nov 12, 2021
The modern, privacy-aware URL Shortener built in PHP.

About UrlHum UrlHum is a modern, privacy-aware and fast URL Shortener built with PHP and the Laravel Framework. At the moment UrlHum is heavily under

UrlHum 622 Jan 7, 2023
A modern, powerful, and robust URL shortener

?? A modern, minimalist, and lightweight URL shortener. Polr is an intrepid, self-hostable open-source link shortening web application with a robust A

Chaoyi Zha 4.6k Dec 30, 2022
Um encurtador de URL's gratuito e Open source. Torne suas URL's um tanto pequenas forma rápida e gratuita

Slim Framework 4 Skeleton Application Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This app

Kilderson Sena 30 Jun 30, 2022
Laravel based API to shorten URLs and share them easily. Redirects to the real URL by entering a short URL generated by the API

URL Shortener Requirements: PHP 7.4 or above composer node / npm Installation clone the project from the Github repository, enter the project folder,

Julio Vergara 5 Nov 20, 2021
Checking an arbitrary URL for Micro-Framework HLEB

Checking an arbitrary URL for Micro-Framework HLEB The class RouteFinder is not included in the original configuration of the framework HLEB, so it mu

Foma Tuturov 1 Nov 4, 2021
Purl is a simple Object Oriented URL manipulation library for PHP 7.2+

Purl Purl is a simple Object Oriented URL manipulation library for PHP 7.2+ Installation The suggested installation method is via composer: composer r

Jonathan H. Wage 908 Dec 21, 2022
Laravel URL Localization Manager - [ccTLD, sub-domain, sub-directory].

Laravel URL Localization - (ccTLD, sub-domain, sub-directory). with Simple & Easy Helpers. Afrikaans Akan shqip አማርኛ العربية հայերեն অসমীয়া azərbayca

Pharaonic 2 Aug 7, 2022
Enables the possibility generating sanitized URL parts from persisted patterns.

#Persisted sanitized pattern mapping What does it do? Enables the possibility generating sanitized URL parts from persisted patterns. How does it work

Markus Hofmann 1 Apr 7, 2022
A Laravel URL Shortener package that provides URL redirects with optionally protected URL password, URL expiration, open limits before expiration

A Laravel URL Shortener package that provides URL redirects with optionally protected URL password, URL expiration, open limits before expiration, ability to set feature activation dates, and click tracking out of the box for your Laravel applications.

YorCreative 53 Jan 4, 2023
Shortener URL is simple web application to short your URL

Shortener URL is simple web application to short your URL. It will generate unique key, with the unique key it will redirect to the original URL.

Abid Ra 1 Jan 22, 2022
A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own custom domain.

A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own custom domain. Table of Contents Full documentation Dock

null 1.7k Dec 29, 2022