Code Monkey home page Code Monkey logo

Comments (21)

mholt avatar mholt commented on July 23, 2024 4

We have implemented this in Caddy 2.

from caddy.

sinni800 avatar sinni800 commented on July 23, 2024 3

Good to know, thanks :) Caddy is getting better and better. I threw Nginx out completely for my purposes

from caddy.

francislavoie avatar francislavoie commented on July 23, 2024 3

Quick update to this issue - there's now srv:// support for service discovery for both fastcgi and proxy (e.g. via Consul). In addition, there's a docker plugin that can be used as well.

from caddy.

francislavoie avatar francislavoie commented on July 23, 2024 1

@pcj until this is available in Caddy, check out https://traefik.io/ which does service discovery

from caddy.

mholt avatar mholt commented on July 23, 2024

It's not possible today, but in the future, definitely yes. Caddy's middleware handlers are designed to be hot-swappable without having to restart the process. A remote management API is one of the primary goals, as well as a nice web UI.

I need to do some refactoring but those are the next major features I hope.

from caddy.

mholt avatar mholt commented on July 23, 2024

@kelseyhightower Okay, I'm starting on this. When you say "add and remove backends" are you referring to the proxy directive? What's on your API dream list?

from caddy.

alixaxel avatar alixaxel commented on July 23, 2024

@alfonsodev Just because I know you'd 👍 this.

from caddy.

amerine avatar amerine commented on July 23, 2024

@mholt I can't speak for @kelseyhightower but personally the top priority for me would be to remotely manage proxy, tls and websocket

from caddy.

mholt avatar mholt commented on July 23, 2024

Cool, I'll try to do those first. I'm cooking up some other neat things too that I'll be excited for you to try.

from caddy.

nodesocket avatar nodesocket commented on July 23, 2024

👍 on a web-ui to configure and change common directives.

from caddy.

mholt avatar mholt commented on July 23, 2024

I have refactored a good portion of the server code to allow another package (the API) to change it. So far, new servers can be started and I have a few endpoints wired up that both get and post middleware configuration.

There is still lots to do, but I hope we'll have something to show within a few weeks.

from caddy.

j-mcnally avatar j-mcnally commented on July 23, 2024

Can the api support client TLS auth? I started using this pretty heavy with apis "docker/etcd" and it would be nice to standardize this as an auth option for the caddy api as well. I think you posted some material related to this recently on twitter.

from caddy.

mholt avatar mholt commented on July 23, 2024

At this point, I don't see why not. (As of the latest version, 0.7.1, Caddy supports TLS client auth.) I haven't decided on API authentication, but TLS client auth would not be the only way to authenticate.

An API service will not be allowed without TLS (unless it's only accessible to localhost).

from caddy.

mholt avatar mholt commented on July 23, 2024

Anyone interested in this may now try out an early prototype of the API - the details are in issue #111. It doesn't do much yet, but next on the list are endpoints for TLS and proxy configuration. Feel free to check it out and comment in that issue.

from caddy.

amerine avatar amerine commented on July 23, 2024

@mholt Awesome stuff so far.

from caddy.

sinni800 avatar sinni800 commented on July 23, 2024

I tried to find code on this feature but the api branch is gone (it was described why, I can see that) and there are no more hints on this.

Is there any progress on this?

Personally, I think a tiny web interface that only gives you the config file as a plain text to edit would be a pretty good start. The config file is so easy to read and manipulate anyway. Make that a directive and you can use any authentication directive anyway.

from caddy.

mholt avatar mholt commented on July 23, 2024

@sinni800 Yeah, we've been working on the front-end UI, and I actually have a file stashed locally here that implements a sort of API, for experimenting. But right now most of the effort has been going into the new site and build system... trust me, it's all worth the wait. :) Yes, the API will start simple. We'll build out from there.

from caddy.

kmanley avatar kmanley commented on July 23, 2024

Any news on this? I am looking to dynamically add/remove backends to caddy reverse proxy via api

from caddy.

yroc92 avatar yroc92 commented on July 23, 2024

@kmanley I've been working with @mholt on this, though admittedly it took a back seat this summer because of my graduation and wedding 😅. We're back on it now though! Again, it'll be simple endpoints to start out, as we want to get the general structure out to the public ASAP. Out of curiosity, what's your use case? Is this a personal project or for a business, etc?

from caddy.

emctoo avatar emctoo commented on July 23, 2024

maybe we could setup some plans or todos or disscussion, people could join in @yroc92

from caddy.

pcj avatar pcj commented on July 23, 2024

I'd like to be able to dynamically add proxy entries to new docker containers that come up and down in a build pipeline app, simple as adding stanza such as:

pr-101.example.com {
    proxy / localhost:8101 {
        transparent
    }
}

Having a web ui is not a priority for me.

from caddy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.