Requested plugins (ideas for developers!)

Over the last year, a bunch of feature requests have cropped up in GitHub issues. But some features don’t belong in Caddy core, so we made Caddy extensible with plugins. I’ve closed those issues but am linking to them here so they are not lost.

If you’re a Go developer that would like to extend Caddy’s functionality, please feel free to build these plugins and share them with the world! :earth_americas: :earth_africa:

We can use this thread as a collection point for plugin requests, but if you are actively developing a Caddy plugin and would like to track its progress and talk code, please open an issue on GitHub! Thanks—we want to keep all specific dev-related discussion on GitHub.

Adding a new plugin idea

  • Make sure it has not already been proposed
  • Include specific, concrete details with enough information so that someone who is interested in building it can act on your idea.

Discussing a specific idea

If you want to further discuss a plugin idea or reply to one, click “Reply as linked topic” to start a new thread. Let’s keep this thread on-topic.

These are ordered roughly oldest to newest (descending).

The List

  1. GRPC gateway/proxy
  2. Generating podcast feeds
  3. OAuth login middleware
  4. Run as Windows service
  5. General security middleware
  6. Live reload on save/modify
  7. File manager
  8. go get vanity URL support
  9. Kubernetes Ingress controller
  10. S3-specific proxy (or expand the existing proxy directive)
  11. Statistics/metrics and/or monitoring service integration
  12. Minify/pre-process
  13. Modify response bodies on-the-fly
  14. Integrated site search
  15. AsciiDoc parser
  16. Geolocation
  17. DNS over HTTPS
1 Like

Caching plugin

Caches a path for X amount of time based on settings.

cache /assets {
    ttl 86400
    cache_path assets
}

Description
ttl - How long to cache for
cache_path - Where to store cache.
Default storage location would be in the .caddy/cache/ folder if relative path is used.
So in the example above assets would be cached in .caddy/cache/assets

This would work really well when proxying storage services like B2/GCS/S3 due to the cost of egress for those services.

1 Like

Request Inspector

Would be awesome to see a rolling log of the last N requests to a server:

inpect /inspect {
   requests 100
}

Could store relevant data and render a view a la request bin : http://requestbin.agaveapi.co/tzcl6wtz?inspect

2 Likes

Permalinks plugin, to 301 new URL schemes. Related this post

permalinks {
    path /path/to/map/file
}

And in the file you would have

example.com/old/style/links,example.com/new-style-links
example.com/some/other/link,example.com/some-other-link

Caddy would 301 everything in the map.

1 Like

Hey!

Do any one knows if there is someone doing the 12 (Minify)? I would like to do that! :smiley: It would be a nice and useful.

Edit: I didn’t find it so I started one: GitHub - hacdias/caddy-v1-minify: Caddy plugin that provides file minification .

5 Likes

Surprise: https://github.com/hacdias/caddy-filemanager . I’ll start it today probably :wink:

3 Likes

That’s awesome! I look forward to trying it out. :slight_smile:

1 Like



This are just three preview images of the current interface of File Manager. I hope you like it! :wink:

4 Likes

I love the material design!

1 Like

If caching plugin is used with caddy as reverse proxy the cache folder should include the domain / vhost.

An url based admin api (like done with varnish) would be nice to

  1. manual create / update cache
  2. delete cached page
  3. delete all cached pages belong to the domain / vhost

There are 2 ideas floating around and I had no time yet to get to them. Perhaps someone else is faster:

  1. Redirect plugin using DNS TXT records:
    TXT records such as: “302;https://example.com
    Or: “302;https://example.com/{uri}
    On an incoming request the plugin would request the _redirect.$host TXT record and redirect the request accordingly. This has rudimentary caching due to how DNS works.

  2. Rewrite plugin:
    Ability to rewrite strings within the response body. example.comcdn.example.com and maybe even more via an additional regexp option.

Just a minimal idea dump.

3 Likes

WebDAV plugin

Per-directory configuration overrides (similar to .htaccess as in Apache world).

This is similar to other requested feature of per-domain configuration files.

To allow end-users some degree of customization without letting them edit main Caddy config file.

The redirect idea is close to me, because I run a DNS-redirect service (serves HTTPS over caddy, maintains configuration in a yml file) called lightsaber.

However, I really like the idea of setting up the config itself in a TXT record (instead of a public yml file). I’m going to work on integrating that into lightsaber first.

Awesome to hear, that it’s not just me that thinks having the redirect config collocated with the actual DNS records might be great. I’ll try to get my preliminary thoughts on the TXT formate to you as an issue in lightsaber for now and even so I might not have time yet to help with the implementation I would love to contribute my thoughts and a second set of eyes, where possible.

Possible to ever have caddy do tcp proxy? It’s so easy to do web proxy already; I’m spoiled and would love an easy tcp proxy!

1 Like

@doughnet There’s a net server type that can proxy tcp+udp now! https://caddyserver.com/docs/net

1 Like

A post was split to a new topic: Request for v2 plugins