pieterlouw / caddy-net

Proxy server type for Caddy server (https://github.com/mholt/caddy)
Apache License 2.0
66 stars 11 forks source link

Caddy's move to Certmagic has broken this plugin #13

Closed dhannyz closed 5 years ago

dhannyz commented 5 years ago

TLS setup calls need to change to suit @mholt 's new certmagic api

mholt commented 5 years ago

What broke, exactly? The changes should have been internal...

dhannyz commented 5 years ago

This plugin calls methods that no longer seem to exist as they have been moved into certmagic.

# github.com/pieterlouw/caddy-net/caddynet/netserver
./tls.go:33:15: c.TLS.ObtainCert undefined (type *caddytls.Config has no field or method ObtainCert)
./tls.go:47:6: undefined: caddytls.HostQualifies
./tls.go:48:21: cfg.TLS.CacheManagedCertificate undefined (type *caddytls.Config has no field or method CacheManagedCertificate)
./tls.go:64:9: undefined: caddytls.RenewManagedCertificates
mholt commented 5 years ago

Should be easy fixes:

pieterlouw commented 5 years ago

Thanks for reporting @dhannyz and suggestions to fix it @mholt , will attend to it.

pieterlouw commented 5 years ago

Hi @mholt ,

I've made the changes according to suggestions above ( see here ). However when I deploy the new plugin I get the following build errors from the build server:

netserver/tls.go:34:15: c.TLS.Manager undefined (type *caddytls.Config has no field or method Manager)

netserver/tls.go:49:21: cfg.TLS.Manager undefined (type *caddytls.Config has no field or method Manager)

Against which version of Caddy is the build server building on? The reason I ask is because if I switch my local Caddy build to tag v0.11.1 I get the same errors on my development box.

Pieter

mholt commented 5 years ago

Yeah I think it hasn't been released yet on the build server, sorry. It'll go out with the next Caddy release, as soon as I find some time. It's crunch-time on my thesis.

joerocklin commented 5 years ago

I'm not entirely sure if it's related to this issue, if I select the net plugin on the Caddy download site right now, it fails to build.

mholt commented 5 years ago

So, Caddy 0.11.3 was released which should fix this, so you should be able to deploy the plugin.

A new, unrelated Caddy release is happening probably tomorrow, just FYI. I have a PR inbound in a few moments since there's one slight breaking change to the NewConfig function.

mholt commented 5 years ago

Okay, deploy away! :+1:

pieterlouw commented 5 years ago

Hi, Latest version (0.1.4) of the plugin has been deployed. Thanks again for reporting @dhannyz and for the assistance @mholt .

Pieter