Documentation
¶
Index ¶
- Constants
- type Cache
- func (Cache) CaddyModule() caddy.ModuleInfo
- func (c *Cache) ClearClientHello(addr string)
- func (c *Cache) GetClientHello(addr string) *string
- func (c *Cache) Provision(ctx caddy.Context) error
- func (c *Cache) SetClientHello(addr string, encoded string)
- func (c *Cache) Start() error
- func (c *Cache) Stop() error
- type CacheEntry
- type ClientHelloConnWrapper
- type ClientHelloHandler
- func (ClientHelloHandler) CaddyModule() caddy.ModuleInfo
- func (h *ClientHelloHandler) Provision(ctx caddy.Context) error
- func (h *ClientHelloHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request, next caddyhttp.Handler) error
- func (h *ClientHelloHandler) UnmarshalCaddyfile(_ *caddyfile.Dispenser) error
- type ClientHelloListenerWrapper
- func (ClientHelloListenerWrapper) CaddyModule() caddy.ModuleInfo
- func (l *ClientHelloListenerWrapper) Provision(ctx caddy.Context) error
- func (l *ClientHelloListenerWrapper) UnmarshalCaddyfile(_ *caddyfile.Dispenser) error
- func (l *ClientHelloListenerWrapper) WrapListener(ln net.Listener) net.Listener
- type Config
Constants ¶
View Source
const (
CacheAppId = "client_hello.cache"
)
View Source
const (
ConfigAppId = "client_hello.config"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (Cache) CaddyModule ¶
func (Cache) CaddyModule() caddy.ModuleInfo
CaddyModule implements caddy.Module
func (*Cache) ClearClientHello ¶
func (*Cache) GetClientHello ¶
func (*Cache) SetClientHello ¶
type CacheEntry ¶
type CacheEntry struct {
Value string
}
type ClientHelloConnWrapper ¶
type ClientHelloConnWrapper struct {
net.Conn // embed the net.Conn interface (crucial for setReadTimeout to be applied by caddy to avoid blocking reads!)
// contains filtered or unexported fields
}
ClientHelloConnWrapper is a custom wrapper for net.Conn that intercepts the Read operation and allows us to collect the client hello bytes
func NewClientHelloConnWrapper ¶
func NewClientHelloConnWrapper(conn net.Conn, cache *Cache, log *zap.Logger) *ClientHelloConnWrapper
NewClientHelloConnWrapper creates a new wrapper
func (*ClientHelloConnWrapper) Close ¶
func (r *ClientHelloConnWrapper) Close() error
Close closes the connection
type ClientHelloHandler ¶
type ClientHelloHandler struct {
// contains filtered or unexported fields
}
func (ClientHelloHandler) CaddyModule ¶
func (ClientHelloHandler) CaddyModule() caddy.ModuleInfo
CaddyModule implements caddy.Module
func (*ClientHelloHandler) Provision ¶
func (h *ClientHelloHandler) Provision(ctx caddy.Context) error
Provision implements caddy.Provisioner
func (*ClientHelloHandler) ServeHTTP ¶
func (h *ClientHelloHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request, next caddyhttp.Handler) error
ServeHTTP implements caddyhttp.MiddlewareHandler
func (*ClientHelloHandler) UnmarshalCaddyfile ¶
func (h *ClientHelloHandler) UnmarshalCaddyfile(_ *caddyfile.Dispenser) error
UnmarshalCaddyfile implements caddyfile.Unmarshaler
type ClientHelloListenerWrapper ¶
type ClientHelloListenerWrapper struct {
// contains filtered or unexported fields
}
func (ClientHelloListenerWrapper) CaddyModule ¶
func (ClientHelloListenerWrapper) CaddyModule() caddy.ModuleInfo
CaddyModule implements caddy.Module
func (*ClientHelloListenerWrapper) Provision ¶
func (l *ClientHelloListenerWrapper) Provision(ctx caddy.Context) error
func (*ClientHelloListenerWrapper) UnmarshalCaddyfile ¶
func (l *ClientHelloListenerWrapper) UnmarshalCaddyfile(_ *caddyfile.Dispenser) error
UnmarshalCaddyfile implements caddyfile.Unmarshaler
func (*ClientHelloListenerWrapper) WrapListener ¶
func (l *ClientHelloListenerWrapper) WrapListener(ln net.Listener) net.Listener
WrapListener implements caddy.ListenerWrapper
type Config ¶
type Config struct {
MaxClientHelloSize uint16 `json:"max_client_hello_size"`
}
func (Config) CaddyModule ¶
func (Config) CaddyModule() caddy.ModuleInfo
CaddyModule implements caddy.Module
Click to show internal directories.
Click to hide internal directories.