Server types other than HTTP

Awesome!! Congrats Miek! You’re not alone in thinking about versioning and such… the whole build server that actually powers the download page with those plugins needs an overhaul. We’ll be working on it. :wink:

1 Like

Thanks Matt.

One question related to versioning. I’m now calling caddymain.Run() to run CoreDNS but this function sets the AppVersion and AppName to Caddy. Is there is way to override this?

Haha, well, maybe it’s time to have “the talk” about what Caddy really is. :smile: Now that Caddy is pieced together with a lot of different parts, is Caddy the core that all the plugins plug into, or is it the server type? If multiple server types, which one? It is kind of cyborg now.

I have a pretty clear picture of what Caddy core is, and I think it seems right to keep the application called Caddy. However, when you distribute your own binaries with just the DNS server type, I can understand why that is not desirable.

Caddy uses those two values, for example, when it requests TLS certificates from a CA server by setting the User-Agent. This is definitely Caddy doing that work, and I’m not sure where else those values are accessed within core or the TLS plugin, so customizing it may not be necessary…

Ack.

Yes, some more guidelines on what is Caddy and what can be used by server plugin(s) would be nice.

In this particular case (i.e. setting these specific values) moving them to a init function would solve this.

1 Like

Making build.bash a go program makes also sense.

FYI: I forgot to remove an entire directory and on this PR that ‘lines-deleted’ number went up to 8200. The dir that I removed contained another 1000 lines. So in all, we’ve almost deleted 10,000 lines of code :slight_smile:
cloc tells me CoreDNS is now 12,000 lines (mosty middleware 11,0000). So a) we’ve halved the code base b) it takes only a few lines of code to become a server plugin

2 Likes

I agree. Part of the lack of documentation is mostly because I haven’t decided yet. Experience will tell! So we’re both still figuring out these details. :wink:

FTP server type to run a FTP-Server / Reverse Proxy with caddy work be awesome :slight_smile:

@pwFoo, Are you thinking anonymous FTP or a full fledged authenticated FTP implementation? In the latter case I’m curious what authenticated FTP has to offer that can’t be done better using ssh/scp. FTP as a protocol has a long history of not only a pain (e.g. NAT traversal) but also suffers from more than its fair share of protocol based security flaws.

I think reverse proxy ssh / scp wouldn’t be possible / easy… So I’m searching or rev proxy file transfer solution for my docker environment.

Protocol wise FTP is a mess. But FTP servers historically have offered easier / more flexible user / account management.

I am still looking for an ssh/scp server that lets me auth against ldap, and give access to arbitrary paths to users.

I guess the main problem with that is that an ssh server needs either access to, or implement itself some sort of shell. not always what you want.

Maybe Caddy can facilitate something like a hybrid.

1 Like

Hi,

I would like to have a go at adding TCP as a server type but I’m just wondering what would the need/use case for extra server types be?

Pieter

What do you mean? People have asked for Caddy as a TLS proxy, for instance. The HTTP server type only does HTTP proxying.

1 Like

Use cases for other server types could be

web proxy
ftp proxy
ftp rev proxy (would be great)

1 Like

Hi @matt,
I meant using TCP itself as a server type and what the use of it would be in the Caddy ecosystem, but TLS proxy is a nice example.

Hi @matt,

I think I need to rephrase my question. What I meant was what would be the advantage of writing a TCP server type (i.e tls proxy) as part of the Caddy ecosystem instead of a standalone app?

Reasons I can think of would be:

  1. to have it all in one binary (with existing http and dns)
  2. leverage the simplicity of the Caddyfile configuration
  3. Caddy’s TLS features

Am I on the right track here?

1 Like

Yes; and see my original post at the topic start for more advantages. :wink:

Edit: I’ve moved the discussion about the new TCP/UDP server type to a new topic: Writing a TCP/UDP server type for Caddy

1 Like

17 posts were split to a new topic: Writing a TCP/UDP server type for Caddy

well since you ask, I’d want to see all server types which LYNX textmode browser supports, which are quite numerous and include

ftp gopher mailto nntp news file wais

and some more. would be helpful for server managers who have no GUI.