Comments (21)
We have implemented this in Caddy 2.
from caddy.
Good to know, thanks :) Caddy is getting better and better. I threw Nginx out completely for my purposes
from caddy.
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.
@pcj until this is available in Caddy, check out https://traefik.io/ which does service discovery
from caddy.
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.
@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.
@alfonsodev Just because I know you'd 👍 this.
from caddy.
@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.
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.
👍 on a web-ui to configure and change common directives.
from caddy.
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.
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.
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.
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.
@mholt Awesome stuff so far.
from caddy.
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.
@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.
Any news on this? I am looking to dynamically add/remove backends to caddy reverse proxy via api
from caddy.
@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.
maybe we could setup some plans or todos or disscussion, people could join in @yroc92
from caddy.
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)
- Permission denied when first run after fresh installation. HOT 11
- ZeroSSL Issuer can't use dns_challenge_override_domain HOT 4
- Client_ip not merged as remote_ip used to in "not" expression HOT 3
- v2.8 is a major breaking change: update to CertMagic breaks LegoDeprecated HOT 1
- the change to SanitizedPathJoin in v2.8.x can cause routing to break in certain configurations HOT 5
- X-Accel-Redirect style of header matching is broken in handle_response
- using the file ext caddyfile for a config file does not work HOT 1
- Weighted Round-Robin strategy doesn't support zero values HOT 2
- regression in 2.8 file_server serving root index file HOT 3
- Any possibility/Hope for GUI like Nginx proxy manager ? HOT 2
- `Error: ambiguous config file format; please specify adapter (use --adapter)` since 2.8.2 HOT 10
- TLSv1.3 (IN), TLS alert, internal error (592) - When use TLS for IP address with Caddy HOT 6
- How to run 'crontab' ? HOT 6
- Error: ambiguous config file format, config inside hidden folder HOT 3
- Where do you perform time-taking one-time setups HOT 3
- `caddyevents.CaddyEvent` does not provide accessors to event metadata HOT 2
- After renaming basicauth to basic_auth directive Caddyfile fails to load if custom salt argument was used HOT 16
- Caddy does not save configs automatically HOT 6
- [file_server browse] Layout setting is not saved HOT 12
- vars not expanded in path directives HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy.