vnxme
d7872c3bfa
caddytls: Refactor sni matcher ( #6812 )
Tests / test (./cmd/caddy/caddy, ~1.22.3, ubuntu-latest, 0, 1.22, linux) (push) Failing after 1m24s
Tests / test (./cmd/caddy/caddy, ~1.23.0, ubuntu-latest, 0, 1.23, linux) (push) Failing after 1m24s
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Has been skipped
Cross-Build / build (~1.22.3, 1.22, aix) (push) Successful in 1m34s
Cross-Build / build (~1.22.3, 1.22, darwin) (push) Successful in 1m22s
Cross-Build / build (~1.22.3, 1.22, dragonfly) (push) Successful in 1m25s
Cross-Build / build (~1.22.3, 1.22, freebsd) (push) Successful in 1m26s
Cross-Build / build (~1.22.3, 1.22, illumos) (push) Successful in 1m22s
Cross-Build / build (~1.22.3, 1.22, linux) (push) Successful in 1m39s
Cross-Build / build (~1.22.3, 1.22, netbsd) (push) Successful in 1m27s
Cross-Build / build (~1.22.3, 1.22, openbsd) (push) Successful in 1m22s
Cross-Build / build (~1.22.3, 1.22, solaris) (push) Successful in 1m21s
Cross-Build / build (~1.22.3, 1.22, windows) (push) Successful in 1m37s
Cross-Build / build (~1.23.0, 1.23, aix) (push) Successful in 1m13s
Cross-Build / build (~1.23.0, 1.23, darwin) (push) Successful in 1m26s
Cross-Build / build (~1.23.0, 1.23, dragonfly) (push) Successful in 1m15s
Cross-Build / build (~1.23.0, 1.23, freebsd) (push) Successful in 1m24s
Cross-Build / build (~1.23.0, 1.23, illumos) (push) Successful in 1m16s
Cross-Build / build (~1.23.0, 1.23, linux) (push) Successful in 1m17s
Cross-Build / build (~1.23.0, 1.23, netbsd) (push) Successful in 1m14s
Cross-Build / build (~1.23.0, 1.23, openbsd) (push) Successful in 1m26s
Cross-Build / build (~1.23.0, 1.23, solaris) (push) Successful in 1m18s
Cross-Build / build (~1.23.0, 1.23, windows) (push) Successful in 1m38s
Lint / lint (ubuntu-latest, linux) (push) Successful in 1m57s
Lint / govulncheck (push) Successful in 1m28s
Tests / test (./cmd/caddy/caddy, ~1.22.3, macos-14, 0, 1.22, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy, ~1.23.0, macos-14, 0, 1.23, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.22.3, windows-latest, True, 1.22, windows) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.23.0, windows-latest, True, 1.23, windows) (push) Has been cancelled
2025-01-27 11:42:09 -07:00
vnxme
7b8f3505e3
caddytls: Fix sni_regexp matcher to obtain layer4 contexts ( #6804 )
...
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Has been skipped
Cross-Build / build (~1.22.3, 1.22, aix) (push) Successful in 1m36s
Cross-Build / build (~1.22.3, 1.22, darwin) (push) Successful in 1m31s
Cross-Build / build (~1.22.3, 1.22, dragonfly) (push) Successful in 1m24s
Cross-Build / build (~1.22.3, 1.22, freebsd) (push) Successful in 1m22s
Cross-Build / build (~1.22.3, 1.22, illumos) (push) Successful in 1m30s
Cross-Build / build (~1.22.3, 1.22, linux) (push) Successful in 1m33s
Cross-Build / build (~1.22.3, 1.22, netbsd) (push) Successful in 1m30s
Cross-Build / build (~1.22.3, 1.22, openbsd) (push) Successful in 1m34s
Cross-Build / build (~1.22.3, 1.22, solaris) (push) Successful in 1m38s
Cross-Build / build (~1.22.3, 1.22, windows) (push) Successful in 1m37s
Cross-Build / build (~1.23.0, 1.23, aix) (push) Successful in 1m13s
Cross-Build / build (~1.23.0, 1.23, darwin) (push) Successful in 1m15s
Cross-Build / build (~1.23.0, 1.23, dragonfly) (push) Successful in 1m35s
Cross-Build / build (~1.23.0, 1.23, freebsd) (push) Successful in 1m14s
Cross-Build / build (~1.23.0, 1.23, illumos) (push) Successful in 1m22s
Cross-Build / build (~1.23.0, 1.23, linux) (push) Successful in 1m15s
Cross-Build / build (~1.23.0, 1.23, netbsd) (push) Successful in 1m31s
Cross-Build / build (~1.23.0, 1.23, openbsd) (push) Successful in 1m29s
Cross-Build / build (~1.23.0, 1.23, solaris) (push) Successful in 1m19s
Cross-Build / build (~1.23.0, 1.23, windows) (push) Successful in 1m35s
Lint / lint (ubuntu-latest, linux) (push) Successful in 1m59s
Lint / govulncheck (push) Successful in 1m51s
Tests / test (./cmd/caddy/caddy, ~1.22.3, macos-14, 0, 1.22, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy, ~1.23.0, macos-14, 0, 1.23, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.22.3, windows-latest, True, 1.22, windows) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.23.0, windows-latest, True, 1.23, windows) (push) Has been cancelled
Lint / lint (macos-14, mac) (push) Has been cancelled
Lint / lint (windows-latest, windows) (push) Has been cancelled
* caddytls: Fix sni_regexp matcher
* caddytls: Refactor sni_regexp matcher
2025-01-25 07:45:41 -07:00
Francis Lavoie
2faeac0a10
chore: Use slices package where possible ( #6585 )
...
Tests / test (./cmd/caddy/caddy.exe, ~1.22.3, windows-latest, True, 1.22, windows) (push) Waiting to run
Tests / test (./cmd/caddy/caddy.exe, ~1.23.0, windows-latest, True, 1.23, windows) (push) Waiting to run
Lint / lint (macos-14, mac) (push) Waiting to run
Lint / lint (windows-latest, windows) (push) Waiting to run
Tests / test (./cmd/caddy/caddy, ~1.22.3, ubuntu-latest, 0, 1.22, linux) (push) Failing after 1m34s
Tests / test (./cmd/caddy/caddy, ~1.23.0, ubuntu-latest, 0, 1.23, linux) (push) Failing after 1m25s
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Successful in 24s
Cross-Build / build (~1.22.3, 1.22, aix) (push) Successful in 1m31s
Cross-Build / build (~1.22.3, 1.22, darwin) (push) Successful in 1m32s
Cross-Build / build (~1.22.3, 1.22, dragonfly) (push) Successful in 1m41s
Cross-Build / build (~1.22.3, 1.22, freebsd) (push) Successful in 1m34s
Cross-Build / build (~1.22.3, 1.22, illumos) (push) Successful in 1m31s
Cross-Build / build (~1.22.3, 1.22, linux) (push) Successful in 1m31s
Cross-Build / build (~1.22.3, 1.22, netbsd) (push) Successful in 1m30s
Cross-Build / build (~1.22.3, 1.22, openbsd) (push) Successful in 1m31s
Cross-Build / build (~1.22.3, 1.22, solaris) (push) Successful in 1m32s
Cross-Build / build (~1.22.3, 1.22, windows) (push) Successful in 1m31s
Cross-Build / build (~1.23.0, 1.23, aix) (push) Successful in 1m24s
Cross-Build / build (~1.23.0, 1.23, darwin) (push) Successful in 1m22s
Cross-Build / build (~1.23.0, 1.23, dragonfly) (push) Successful in 1m20s
Cross-Build / build (~1.23.0, 1.23, freebsd) (push) Successful in 1m21s
Cross-Build / build (~1.23.0, 1.23, illumos) (push) Successful in 1m22s
Cross-Build / build (~1.23.0, 1.23, linux) (push) Successful in 1m23s
Cross-Build / build (~1.23.0, 1.23, netbsd) (push) Successful in 1m20s
Cross-Build / build (~1.23.0, 1.23, openbsd) (push) Successful in 1m22s
Cross-Build / build (~1.23.0, 1.23, solaris) (push) Successful in 1m24s
Cross-Build / build (~1.23.0, 1.23, windows) (push) Successful in 1m21s
Lint / lint (ubuntu-latest, linux) (push) Successful in 2m12s
Lint / govulncheck (push) Successful in 1m20s
* chore: Use slices package where possible
* More, mostly using ContainsFunc
* Even more slice operations
2024-09-25 14:30:56 -06:00
Kévin Dunglas
f4bf4e0097
perf: use zap's Check() to prevent useless allocs ( #6560 )
...
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Successful in 40s
Cross-Build / build (~1.22.3, 1.22, aix) (push) Successful in 2m55s
Cross-Build / build (~1.22.3, 1.22, dragonfly) (push) Successful in 3m1s
Cross-Build / build (~1.22.3, 1.22, freebsd) (push) Successful in 3m1s
Cross-Build / build (~1.22.3, 1.22, netbsd) (push) Successful in 3m1s
Cross-Build / build (~1.22.3, 1.22, windows) (push) Successful in 3m1s
Cross-Build / build (~1.22.3, 1.22, darwin) (push) Failing after 13m23s
Cross-Build / build (~1.23.0, 1.23, aix) (push) Successful in 2m40s
Cross-Build / build (~1.22.3, 1.22, illumos) (push) Failing after 11m51s
Cross-Build / build (~1.22.3, 1.22, linux) (push) Failing after 11m47s
Cross-Build / build (~1.23.0, 1.23, darwin) (push) Successful in 2m29s
Cross-Build / build (~1.23.0, 1.23, linux) (push) Successful in 2m39s
Cross-Build / build (~1.22.3, 1.22, openbsd) (push) Failing after 13m27s
Cross-Build / build (~1.22.3, 1.22, solaris) (push) Failing after 13m27s
Cross-Build / build (~1.23.0, 1.23, netbsd) (push) Successful in 2m41s
Cross-Build / build (~1.23.0, 1.23, openbsd) (push) Successful in 2m54s
Cross-Build / build (~1.23.0, 1.23, solaris) (push) Successful in 2m40s
Cross-Build / build (~1.23.0, 1.23, dragonfly) (push) Failing after 14m19s
Cross-Build / build (~1.23.0, 1.23, freebsd) (push) Failing after 14m10s
Cross-Build / build (~1.23.0, 1.23, illumos) (push) Failing after 14m2s
Cross-Build / build (~1.23.0, 1.23, windows) (push) Failing after 11m58s
Lint / lint (ubuntu-latest, linux) (push) Failing after 3m44s
Lint / govulncheck (push) Successful in 2m18s
Tests / test (./cmd/caddy/caddy, ~1.22.3, macos-14, 0, 1.22, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy, ~1.23.0, macos-14, 0, 1.23, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.22.3, windows-latest, True, 1.22, windows) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.23.0, windows-latest, True, 1.23, windows) (push) Has been cancelled
Lint / lint (macos-14, mac) (push) Has been cancelled
Lint / lint (windows-latest, windows) (push) Has been cancelled
* perf: use zap's Check() to prevent useless allocs
* fix
* fix
* fix
* fix
* restore previous replacer behavior
* fix linter
2024-09-13 11:16:37 -06:00
vnxme
2d12fb7ac6
caddytls: Add sni_regexp matcher ( #6569 )
Tests / test (./cmd/caddy/caddy, ~1.23.0, ubuntu-latest, 0, 1.23, linux) (push) Failing after 2m28s
Tests / test (s390x on IBM Z) (push) Has been skipped
Tests / goreleaser-check (push) Successful in 28s
Cross-Build / build (~1.22.3, 1.22, aix) (push) Successful in 2m59s
Tests / test (./cmd/caddy/caddy, ~1.22.3, ubuntu-latest, 0, 1.22, linux) (push) Failing after 12m25s
Cross-Build / build (~1.22.3, 1.22, darwin) (push) Successful in 3m25s
Cross-Build / build (~1.22.3, 1.22, dragonfly) (push) Failing after 14m5s
Cross-Build / build (~1.22.3, 1.22, freebsd) (push) Failing after 14m0s
Cross-Build / build (~1.22.3, 1.22, illumos) (push) Failing after 13m57s
Cross-Build / build (~1.22.3, 1.22, linux) (push) Failing after 13m52s
Cross-Build / build (~1.22.3, 1.22, netbsd) (push) Failing after 13m48s
Cross-Build / build (~1.22.3, 1.22, openbsd) (push) Successful in 3m4s
Cross-Build / build (~1.22.3, 1.22, solaris) (push) Successful in 2m53s
Cross-Build / build (~1.22.3, 1.22, windows) (push) Successful in 3m9s
Cross-Build / build (~1.23.0, 1.23, aix) (push) Successful in 2m42s
Cross-Build / build (~1.23.0, 1.23, darwin) (push) Successful in 2m52s
Cross-Build / build (~1.23.0, 1.23, dragonfly) (push) Successful in 2m36s
Cross-Build / build (~1.23.0, 1.23, freebsd) (push) Successful in 2m49s
Cross-Build / build (~1.23.0, 1.23, illumos) (push) Successful in 2m53s
Cross-Build / build (~1.23.0, 1.23, linux) (push) Successful in 2m42s
Cross-Build / build (~1.23.0, 1.23, netbsd) (push) Successful in 2m49s
Cross-Build / build (~1.23.0, 1.23, openbsd) (push) Successful in 2m39s
Cross-Build / build (~1.23.0, 1.23, solaris) (push) Successful in 2m40s
Cross-Build / build (~1.23.0, 1.23, windows) (push) Successful in 2m40s
Tests / test (./cmd/caddy/caddy, ~1.22.3, macos-14, 0, 1.22, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy, ~1.23.0, macos-14, 0, 1.23, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.22.3, windows-latest, True, 1.22, windows) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.23.0, windows-latest, True, 1.23, windows) (push) Has been cancelled
2024-09-11 20:51:59 -06:00
vnxme
7cf8376e63
matchers: fix a regression in #6480 ( #6510 )
...
The context may have no replacer
2024-08-12 10:01:09 +03:00
vnxme
59cbb2c83a
caddytls,caddyhttp: Placeholders for some TLS and HTTP matchers ( #6480 )
...
Tests / test (./cmd/caddy/caddy, ~1.21.0, macos-14, 0, 1.21, mac) (push) Waiting to run
Tests / test (./cmd/caddy/caddy, ~1.21.0, ubuntu-latest, 0, 1.21, linux) (push) Waiting to run
Tests / test (./cmd/caddy/caddy, ~1.22.3, macos-14, 0, 1.22, mac) (push) Waiting to run
Tests / test (./cmd/caddy/caddy, ~1.22.3, ubuntu-latest, 0, 1.22, linux) (push) Waiting to run
Tests / test (./cmd/caddy/caddy.exe, ~1.21.0, windows-latest, True, 1.21, windows) (push) Waiting to run
Tests / test (./cmd/caddy/caddy.exe, ~1.22.3, windows-latest, True, 1.22, windows) (push) Waiting to run
Tests / test (s390x on IBM Z) (push) Waiting to run
Tests / goreleaser-check (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, aix) (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, darwin) (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, dragonfly) (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, freebsd) (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, illumos) (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, linux) (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, netbsd) (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, openbsd) (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, solaris) (push) Waiting to run
Cross-Build / build (~1.22.3, 1.22, windows) (push) Waiting to run
Lint / lint (macos-14, mac) (push) Waiting to run
Lint / lint (ubuntu-latest, linux) (push) Waiting to run
Lint / lint (windows-latest, windows) (push) Waiting to run
Lint / govulncheck (push) Waiting to run
* Runtime placeholders for caddytls matchers (1/3):
- remove IPs validation in UnmarshalCaddyfile
* Runtime placeholders for caddytls matchers (2/3):
- add placeholder replacement for IPs in Provision
* Runtime placeholders for caddytls matchers (3/3):
- add placeholder replacement for other strings
* Runtime placeholders for caddyhttp matchers (1/1):
- add placeholder replacement for IPs in Provision
* Runtime placeholders for caddyhttp/caddytls matchers:
- move PrivateRandesCIDR under internal
2024-08-07 11:02:23 -06:00
vnxme
61fe152c60
caddytls: Caddyfile support for TLS handshake matchers ( #6461 )
...
* Caddyfile support for TLS handshake matchers:
- caddytls.MatchLocalIP
- caddytls.MatchRemoteIP
- caddytls.MatchServerName
* Caddyfile support for TLS handshake matchers:
- fix imports order
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
---------
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2024-07-24 09:26:09 -06:00
Viktor Szépe
d7e3a1974b
Fix typos ( #6311 )
...
* Fix typos
* Revert
* Revert to "htlm"
* fix indentations
2024-05-10 08:08:54 -06:00
Mohammed Al Sahaf
26748d06b4
connection policy: add local_ip
matcher ( #6074 )
...
* connection policy: add `local_ip`
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
---------
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2024-04-15 21:13:24 +03:00
Jacob Gadikian
d6f86cccf5
ci: use gci linter ( #5708 )
...
* use gofmput to format code
* use gci to format imports
* reconfigure gci
* linter autofixes
* rearrange imports a little
* export GOOS=windows golangci-lint run ./... --fix
2023-08-14 09:41:15 -06:00
Matthew Holt
e43b6d8178
core: Variadic Context.Logger(); soft deprecation
...
Ideally I'd just remove the parameter to caddy.Context.Logger(), but
this would break most Caddy plugins.
Instead, I'm making it variadic and marking it as partially deprecated.
In the future, I might completely remove the parameter once most
plugins have updated.
2022-09-16 16:55:36 -06:00
WilczyńskiT
c7772588bd
core: Change net.IP to netip.Addr; use netip.Prefix ( #4966 )
...
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2022-08-17 16:10:57 -06:00
GallopingKylin
66de438a98
caddytls: Fix MatchRemoteIP
provisoning with multiple CIDR ranges ( #4522 )
2022-01-13 11:56:18 -05:00
Matt Holt
956f01163d
caddytls: Implement remote IP connection matcher ( #4123 )
...
* caddytls: Implement remote IP connection matcher
* Implement IP range negation
If both Ranges and NotRanges are specified, both must match.
2021-04-30 10:14:52 -06:00
Matthew Holt
c87f82f0ce
caddytls: Match automation policies by wildcard subjects too
...
https://caddy.community/t/wildcard-snis-not-being-matched/7271/24?u=matt
Also use new CertMagic function for matching wildcard names
2020-03-26 14:01:38 -06:00
Matthew Holt
3c1def2430
caddytls: Support wildcard matching in ServerName conn policy matcher
2020-03-20 15:51:37 -06:00
Matt Holt
3c90e370a4
v2: Module documentation; refactor LoadModule(); new caddy struct tags ( #2924 )
...
This commit goes a long way toward making automated documentation of
Caddy config and Caddy modules possible. It's a broad, sweeping change,
but mostly internal. It allows us to automatically generate docs for all
Caddy modules (including future third-party ones) and make them viewable
on a web page; it also doubles as godoc comments.
As such, this commit makes significant progress in migrating the docs
from our temporary wiki page toward our new website which is still under
construction.
With this change, all host modules will use ctx.LoadModule() and pass in
both the struct pointer and the field name as a string. This allows the
reflect package to read the struct tag from that field so that it can
get the necessary information like the module namespace and the inline
key.
This has the nice side-effect of unifying the code and documentation. It
also simplifies module loading, and handles several variations on field
types for raw module fields (i.e. variations on json.RawMessage, such as
arrays and maps).
I also renamed ModuleInfo.Name -> ModuleInfo.ID, to make it clear that
the ID is the "full name" which includes both the module namespace and
the name. This clarity is helpful when describing module hierarchy.
As of this change, Caddy modules are no longer an experimental design.
I think the architecture is good enough to go forward.
2019-12-10 13:36:46 -07:00
Matthew Holt
c9980fd367
Refactor Caddyfile adapter and module registration
...
Use piles from which to draw config values.
Module values can return their name, so now we can do two-way mapping
from value to name and name to value; whereas before we could only map
name to value. This was problematic with the Caddyfile adapter since
it receives values and needs to know the name to put in the config.
2019-08-21 10:46:35 -06:00
Matthew Holt
fdd871e177
go.mod: Append /v2 to module name; update all import paths
...
See https://github.com/golang/go/wiki/Modules#semantic-import-versioning
2019-07-02 12:37:06 -06:00
Matthew Holt
3177ee8010
Add license
2019-06-30 16:07:58 -06:00
Matthew Holt
6706c9225a
Implement templates handler; various minor cleanups and bug fixes
2019-06-18 11:13:12 -06:00
Matthew Holt
5137859e47
Rename caddy2 -> caddy
...
Removes the version from the package name
2019-06-14 11:58:28 -06:00
Matthew Holt
613aecb898
Change import paths to GitHub package names
2019-06-04 13:52:37 -06:00
Matthew Holt
210d0cf7f1
Implement custom cert selection policies; optimize matching for SNI
2019-05-24 13:18:45 -06:00
Matthew Holt
2fd98cb040
Module.New() does not need to return an error
2019-05-21 14:22:21 -06:00
Matthew Holt
48b5a80320
Remove (unimplemented) enterprise TLS matchers
2019-05-07 11:58:58 -06:00
Matthew Holt
43961b542b
General cleanup and more godocs
2019-04-26 12:35:39 -06:00
Matthew Holt
2d056fbe66
Initial commit of Storage, TLS, and automatic HTTPS implementations
2019-04-25 13:54:48 -06:00