tcp stream (und damit: tls passthrough) ist implementiert
This commit is contained in:
1 parent
6a5cb95f92
commit
fdcd06c93f
16 files changed
+1008
-75
No files matched your search
@@ -18,6 +18,7 @@ import (
|
||||
// Configuration ist die Wurzel der dynamischen Traefik-Konfiguration.
|
||||
type Configuration struct {
|
||||
HTTP *HTTPConfiguration `json:"http,omitempty" yaml:"http,omitempty"`
|
||||
TCP *TCPConfiguration `json:"tcp,omitempty" yaml:"tcp,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPConfiguration enthält Router, Services und Middlewares der HTTP-Ebene.
|
||||
@@ -60,6 +61,43 @@ type Server struct {
|
||||
URL string `json:"url" yaml:"url"`
|
||||
}
|
||||
|
||||
// TCPConfiguration enthält Router und Services der TCP-Ebene. Sultan nutzt
|
||||
// sie nur für TLS-Passthrough (Routing per SNI, TLS endet beim Backend).
|
||||
type TCPConfiguration struct {
|
||||
Routers map[string]*TCPRouter `json:"routers,omitempty" yaml:"routers,omitempty"`
|
||||
Services map[string]*TCPService `json:"services,omitempty" yaml:"services,omitempty"`
|
||||
}
|
||||
|
||||
// TCPRouter entspricht einem Traefik-TCP-Router.
|
||||
type TCPRouter struct {
|
||||
EntryPoints []string `json:"entryPoints,omitempty" yaml:"entryPoints,omitempty"`
|
||||
Service string `json:"service" yaml:"service"`
|
||||
Rule string `json:"rule" yaml:"rule"`
|
||||
Priority int `json:"priority,omitempty" yaml:"priority,omitempty"`
|
||||
TLS *TCPRouterTLS `json:"tls,omitempty" yaml:"tls,omitempty"`
|
||||
}
|
||||
|
||||
// TCPRouterTLS aktiviert TLS für einen TCP-Router; Passthrough reicht die
|
||||
// Verbindung unverändert an das Backend durch.
|
||||
type TCPRouterTLS struct {
|
||||
Passthrough bool `json:"passthrough,omitempty" yaml:"passthrough,omitempty"`
|
||||
}
|
||||
|
||||
// TCPService entspricht einem Traefik-TCP-Service.
|
||||
type TCPService struct {
|
||||
LoadBalancer *TCPServersLoadBalancer `json:"loadBalancer,omitempty" yaml:"loadBalancer,omitempty"`
|
||||
}
|
||||
|
||||
// TCPServersLoadBalancer verteilt Verbindungen auf die angegebenen Server.
|
||||
type TCPServersLoadBalancer struct {
|
||||
Servers []TCPServer `json:"servers" yaml:"servers"`
|
||||
}
|
||||
|
||||
// TCPServer ist ein einzelnes TCP-Backend (host:port).
|
||||
type TCPServer struct {
|
||||
Address string `json:"address" yaml:"address"`
|
||||
}
|
||||
|
||||
// Middleware ist eine Traefik-Middleware als verschachtelte Map, z. B.
|
||||
// {"redirectRegex": {"regex": "...", "permanent": "true"}}.
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user