1. 23 Sep, 2017 1 commit
  2. 24 Jun, 2017 1 commit
  3. 27 May, 2017 1 commit
    • Matthew Holt's avatar
      Vendor all dependencies (Warning: Huge changeset.) · 6fde3632
      Matthew Holt authored
      The vendor/ folder was created with the help of @FiloSottile's gvt and
      vendorcheck.
      
      Any dependencies of Caddy plugins outside this repo are not vendored.
      
      We do not remove any unused, vendored packages because vendorcheck -u
      only checks using the current build configuration; i.e. packages that
      may be imported by files toggled by build tags of other systems.
      
      CI tests have been updated to ignore the vendor/ folder. When Go 1.9 is
      released, a few of the go commands should be revised to again use ./...
      as it will ignore the vendor folder by default.
      6fde3632
  4. 17 May, 2017 1 commit
  5. 21 Feb, 2017 1 commit
  6. 18 Feb, 2017 1 commit
  7. 17 Feb, 2017 2 commits
  8. 29 Oct, 2016 1 commit
  9. 03 Oct, 2016 2 commits
  10. 06 Aug, 2016 1 commit
  11. 20 Jun, 2016 2 commits
    • Matthew Holt's avatar
      Fix tests after controller refactor · 1fdc46e5
      Matthew Holt authored
      The search-and-replace was a little too aggressive and I accidentally
      ran tests recursively in a subdirectory instead of repo's top folder.
      1fdc46e5
    • Matthew Holt's avatar
      Refactor how caddy.Context is stored and used · a798e0c9
      Matthew Holt authored
      - Server types no longer need to store their own contexts; they are
        stored on the caddy.Instance, which means each context will be
        properly GC'ed when the instance is stopped. Server types should use
        type assertions to convert from caddy.Context to their concrete
        context type when they need to use it.
      - Pass the entire context into httpserver.GetConfig instead of only the
        Key field.
      - caddy.NewTestController now requires a server type string so it can
        create a controller with the proper concrete context associated with
        that server type.
      
      Tests still need more attention so that we can test the proper creation
      of startup functions, etc.
      a798e0c9
  12. 04 Jun, 2016 1 commit
    • Matthew Holt's avatar
      Rewrote Caddy from the ground up; initial commit of 0.9 branch · ac4fa2c3
      Matthew Holt authored
      These changes span work from the last ~4 months in an effort to make
      Caddy more extensible, reduce the coupling between its components, and
      lay a more robust foundation of code going forward into 1.0. A bunch of
      new features have been added, too, with even higher future potential.
      
      The most significant design change is an overall inversion of
      dependencies. Instead of the caddy package knowing about the server
      and the notion of middleware and config, the caddy package exposes an
      interface that other components plug into. This does introduce more
      indirection when reading the code, but every piece is very modular and
      pluggable. Even the HTTP server is pluggable.
      
      The caddy package has been moved to the top level, and main has been
      pushed into a subfolder called caddy. The actual logic of the main
      file has been pushed even further into caddy/caddymain/run.go so that
      custom builds of Caddy can be 'go get'able.
      
      The HTTPS logic was surgically separated into two parts to divide the
      TLS-specific code and the HTTPS-specific code. The caddytls package can
      now be used by any type of server that needs TLS, not just HTTP. I also
      added the ability to customize nearly every aspect of TLS at the site
      level rather than all sites sharing the same TLS configuration. Not all
      of this flexibility is exposed in the Caddyfile yet, but it may be in
      the future. Caddy can also generate self-signed certificates in memory
      for the convenience of a developer working on localhost who wants HTTPS.
      And Caddy now supports the DNS challenge, assuming at least one DNS
      provider is plugged in.
      
      Dozens, if not hundreds, of other minor changes swept through the code
      base as I literally started from an empty main function, copying over
      functions or files as needed, then adjusting them to fit in the new
      design. Most tests have been restored and adapted to the new API,
      but more work is needed there.
      
      A lot of what was "impossible" before is now possible, or can be made
      possible with minimal disruption of the code. For example, it's fairly
      easy to make plugins hook into another part of the code via callbacks.
      Plugins can do more than just be directives; we now have plugins that
      customize how the Caddyfile is loaded (useful when you need to get your
      configuration from a remote store).
      
      Site addresses no longer need be just a host and port. They can have a
      path, allowing you to scope a configuration to a specific path. There is
      no inheretance, however; each site configuration is distinct.
      
      Thanks to amazing work by Lucas Clemente, this commit adds experimental
      QUIC support. Turn it on using the -quic flag; your browser may have
      to be configured to enable it.
      
      Almost everything is here, but you will notice that most of the middle-
      ware are missing. After those are transferred over, we'll be ready for
      beta tests.
      
      I'm very excited to get this out. Thanks for everyone's help and
      patience these last few months. I hope you like it!!
      ac4fa2c3
  13. 15 Apr, 2016 1 commit
    • W-Mark Kubacki's avatar
      Support configuring less restrictive TLS client auth requirements · 69c2d78f
      W-Mark Kubacki authored
      Caddyfile parameter "clients" of "tls" henceforth accepts a special
      first modifier. It is one of, and effects:
      
       * request         = tls.RequestClientCert
       * require         = tls.RequireAnyClientCert
       * verify_if_given = tls.VerifyClientCertIfGiven
       * (none)          = tls.RequireAndVerifyClientCert
      
      The use-case for this is as follows: A middleware would serve items to the
      public, but if a certificate were given the middleware would permit file
      manipulation.
      
      And, in a different plugin such as a forum or blog, not verifying a client
      cert would be nice for registration: said blog would subsequently only
      compare the SPKI of a client certificate.
      69c2d78f
  14. 05 Apr, 2016 1 commit
  15. 04 Apr, 2016 1 commit
  16. 02 Apr, 2016 1 commit
  17. 23 Feb, 2016 1 commit
  18. 11 Feb, 2016 1 commit
    • Matthew Holt's avatar
      Major refactor of all HTTPS/TLS/ACME code · 11103bd8
      Matthew Holt authored
      Biggest change is no longer using standard library's tls.Config.getCertificate function to get a certificate during TLS handshake. Implemented our own cache which can be changed dynamically at runtime, even during TLS handshakes. As such, restarts are no longer required after certificate renewals or OCSP updates.
      
      We also allow loading multiple certificates and keys per host, even by specifying a directory (tls got a new 'load' command for that).
      
      Renamed the letsencrypt package to https in a gradual effort to become more generic; and https is more fitting for what the package does now.
      
      There are still some known bugs, e.g. reloading where a new certificate is required but port 80 isn't currently listening, will cause the challenge to fail. There's still plenty of cleanup to do and tests to write. It is especially confusing right now how we enable "on-demand" TLS during setup and keep track of that. But this change should basically work so far.
      11103bd8
  19. 13 Jan, 2016 1 commit
  20. 12 Jan, 2016 1 commit
  21. 03 Jan, 2016 1 commit
  22. 19 Dec, 2015 2 commits
  23. 09 Dec, 2015 1 commit
  24. 26 Oct, 2015 1 commit
    • Matthew Holt's avatar
      core: Major refactor for graceful restarts; numerous fixes · 4ebff9a1
      Matthew Holt authored
      Merged config and app packages into one called caddy. Abstracted away caddy startup functionality making it easier to embed Caddy in any Go application and use it as a library. Graceful restart (should) now ensure child starts properly. Now piping a gob bundle to child process so that the child can match up inherited listeners to server address. Much cleanup still to do.
      4ebff9a1
  25. 17 Oct, 2015 1 commit
  26. 20 Jun, 2015 1 commit
  27. 02 Jun, 2015 1 commit
  28. 25 May, 2015 1 commit
  29. 21 May, 2015 2 commits
  30. 19 May, 2015 1 commit
  31. 18 May, 2015 2 commits