Add a new protocol
Co-authored-by: Gérald Croës <gerald@containo.us>
This commit is contained in:
parent
0ca2149408
commit
4a68d29ce2
231 changed files with 6895 additions and 4395 deletions
|
@ -121,11 +121,12 @@ func (s *AcmeSuite) TearDownSuite(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *AcmeSuite) TestHTTP01DomainsAtStart(c *check.C) {
|
||||
c.Skip("We need to fix DefaultCertificate at start")
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "web"},
|
||||
Domains: types.Domains{types.Domain{
|
||||
Main: "traefik.acme.wtf",
|
||||
}},
|
||||
|
@ -139,11 +140,12 @@ func (s *AcmeSuite) TestHTTP01DomainsAtStart(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *AcmeSuite) TestHTTP01DomainsInSANAtStart(c *check.C) {
|
||||
c.Skip("We need to fix DefaultCertificate at start")
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "web"},
|
||||
Domains: types.Domains{types.Domain{
|
||||
Main: "acme.wtf",
|
||||
SANs: []string{"traefik.acme.wtf"},
|
||||
|
@ -162,7 +164,7 @@ func (s *AcmeSuite) TestHTTP01OnHostRule(c *check.C) {
|
|||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "web"},
|
||||
OnHostRule: true,
|
||||
},
|
||||
},
|
||||
|
@ -178,7 +180,7 @@ func (s *AcmeSuite) TestHTTP01OnHostRuleECDSA(c *check.C) {
|
|||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "web"},
|
||||
OnHostRule: true,
|
||||
KeyType: "EC384",
|
||||
},
|
||||
|
@ -195,7 +197,7 @@ func (s *AcmeSuite) TestHTTP01OnHostRuleInvalidAlgo(c *check.C) {
|
|||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "web"},
|
||||
OnHostRule: true,
|
||||
KeyType: "INVALID",
|
||||
},
|
||||
|
@ -207,28 +209,12 @@ func (s *AcmeSuite) TestHTTP01OnHostRuleInvalidAlgo(c *check.C) {
|
|||
s.retrieveAcmeCertificate(c, testCase)
|
||||
}
|
||||
|
||||
func (s *AcmeSuite) TestHTTP01OnHostRuleWithPath(c *check.C) {
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_http01_web_path.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
OnHostRule: true,
|
||||
},
|
||||
},
|
||||
expectedCommonName: acmeDomain,
|
||||
expectedAlgorithm: x509.RSA,
|
||||
}
|
||||
|
||||
s.retrieveAcmeCertificate(c, testCase)
|
||||
}
|
||||
|
||||
func (s *AcmeSuite) TestHTTP01OnHostRuleStaticCertificatesWithWildcard(c *check.C) {
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_tls.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "web"},
|
||||
OnHostRule: true,
|
||||
},
|
||||
},
|
||||
|
@ -244,7 +230,7 @@ func (s *AcmeSuite) TestHTTP01OnHostRuleDynamicCertificatesWithWildcard(c *check
|
|||
traefikConfFilePath: "fixtures/acme/acme_tls_dynamic.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "web"},
|
||||
OnHostRule: true,
|
||||
},
|
||||
},
|
||||
|
@ -255,78 +241,6 @@ func (s *AcmeSuite) TestHTTP01OnHostRuleDynamicCertificatesWithWildcard(c *check
|
|||
s.retrieveAcmeCertificate(c, testCase)
|
||||
}
|
||||
|
||||
func (s *AcmeSuite) TestHTTP01OnDemand(c *check.C) {
|
||||
c.Skip("on demand")
|
||||
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
OnDemand: true,
|
||||
},
|
||||
},
|
||||
expectedCommonName: acmeDomain,
|
||||
expectedAlgorithm: x509.RSA,
|
||||
}
|
||||
|
||||
s.retrieveAcmeCertificate(c, testCase)
|
||||
}
|
||||
|
||||
func (s *AcmeSuite) TestHTTP01OnDemandStaticCertificatesWithWildcard(c *check.C) {
|
||||
c.Skip("on demand")
|
||||
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_tls.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
OnDemand: true,
|
||||
},
|
||||
},
|
||||
expectedCommonName: wildcardDomain,
|
||||
expectedAlgorithm: x509.RSA,
|
||||
}
|
||||
|
||||
s.retrieveAcmeCertificate(c, testCase)
|
||||
}
|
||||
|
||||
func (s *AcmeSuite) TestHTTP01OnDemandStaticCertificatesWithWildcardMultipleEntrypoints(c *check.C) {
|
||||
c.Skip("on demand")
|
||||
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_tls_multiple_entrypoints.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
OnDemand: true,
|
||||
},
|
||||
},
|
||||
expectedCommonName: acmeDomain,
|
||||
expectedAlgorithm: x509.RSA,
|
||||
}
|
||||
|
||||
s.retrieveAcmeCertificate(c, testCase)
|
||||
}
|
||||
|
||||
func (s *AcmeSuite) TestHTTP01OnDemandDynamicCertificatesWithWildcard(c *check.C) {
|
||||
c.Skip("on demand")
|
||||
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_tls_dynamic.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
OnDemand: true,
|
||||
},
|
||||
},
|
||||
expectedCommonName: wildcardDomain,
|
||||
expectedAlgorithm: x509.RSA,
|
||||
}
|
||||
|
||||
s.retrieveAcmeCertificate(c, testCase)
|
||||
}
|
||||
|
||||
func (s *AcmeSuite) TestTLSALPN01OnHostRule(c *check.C) {
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
|
@ -343,23 +257,8 @@ func (s *AcmeSuite) TestTLSALPN01OnHostRule(c *check.C) {
|
|||
s.retrieveAcmeCertificate(c, testCase)
|
||||
}
|
||||
|
||||
func (s *AcmeSuite) TestTLSALPN01OnDemand(c *check.C) {
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
template: templateModel{
|
||||
Acme: acme.Configuration{
|
||||
TLSChallenge: &acme.TLSChallenge{},
|
||||
OnDemand: true,
|
||||
},
|
||||
},
|
||||
expectedCommonName: acmeDomain,
|
||||
expectedAlgorithm: x509.RSA,
|
||||
}
|
||||
|
||||
s.retrieveAcmeCertificate(c, testCase)
|
||||
}
|
||||
|
||||
func (s *AcmeSuite) TestTLSALPN01DomainsAtStart(c *check.C) {
|
||||
c.Skip("We need to fix DefaultCertificate at start")
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
template: templateModel{
|
||||
|
@ -378,6 +277,7 @@ func (s *AcmeSuite) TestTLSALPN01DomainsAtStart(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *AcmeSuite) TestTLSALPN01DomainsInSANAtStart(c *check.C) {
|
||||
c.Skip("We need to fix DefaultCertificate at start")
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_base.toml",
|
||||
template: templateModel{
|
||||
|
@ -397,6 +297,7 @@ func (s *AcmeSuite) TestTLSALPN01DomainsInSANAtStart(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *AcmeSuite) TestTLSALPN01DomainsWithProvidedWildcardDomainAtStart(c *check.C) {
|
||||
c.Skip("We need to fix DefaultCertificate at start")
|
||||
testCase := acmeTestCase{
|
||||
traefikConfFilePath: "fixtures/acme/acme_tls.toml",
|
||||
template: templateModel{
|
||||
|
@ -419,7 +320,7 @@ func (s *AcmeSuite) TestNoValidLetsEncryptServer(c *check.C) {
|
|||
file := s.adaptFile(c, "fixtures/acme/acme_base.toml", templateModel{
|
||||
Acme: acme.Configuration{
|
||||
CAServer: "http://wrongurl:4001/directory",
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "http"},
|
||||
HTTPChallenge: &acme.HTTPChallenge{EntryPoint: "web"},
|
||||
OnHostRule: true,
|
||||
},
|
||||
})
|
||||
|
|
|
@ -14,8 +14,8 @@ import (
|
|||
"github.com/abronan/valkeyrie/store"
|
||||
"github.com/abronan/valkeyrie/store/consul"
|
||||
"github.com/containous/staert"
|
||||
"github.com/containous/traefik/cluster"
|
||||
"github.com/containous/traefik/integration/try"
|
||||
"github.com/containous/traefik/old/cluster"
|
||||
"github.com/go-check/check"
|
||||
checker "github.com/vdemeester/shakers"
|
||||
)
|
||||
|
|
|
@ -158,13 +158,13 @@ func (s *DockerSuite) TestDockerContainersWithLabels(c *check.C) {
|
|||
|
||||
// Start a container with some labels
|
||||
labels := map[string]string{
|
||||
"traefik.Routers.Super.Rule": "Host(`my.super.host`)",
|
||||
"traefik.http.Routers.Super.Rule": "Host(`my.super.host`)",
|
||||
}
|
||||
s.startContainerWithLabels(c, "swarm:1.0.0", labels, "manage", "token://blabla")
|
||||
|
||||
// Start another container by replacing a '.' by a '-'
|
||||
labels = map[string]string{
|
||||
"traefik.Routers.SuperHost.Rule": "Host(`my-super.host`)",
|
||||
"traefik.http.Routers.SuperHost.Rule": "Host(`my-super.host`)",
|
||||
}
|
||||
s.startContainerWithLabels(c, "swarm:1.0.0", labels, "manage", "token://blablabla")
|
||||
|
||||
|
@ -250,8 +250,8 @@ func (s *DockerSuite) TestRestartDockerContainers(c *check.C) {
|
|||
|
||||
// Start a container with some labels
|
||||
labels := map[string]string{
|
||||
"traefik.Routers.Super.Rule": "Host(`my.super.host`)",
|
||||
"traefik.Services.powpow.LoadBalancer.server.Port": "2375",
|
||||
"traefik.http.Routers.Super.Rule": "Host(`my.super.host`)",
|
||||
"traefik.http.Services.powpow.LoadBalancer.server.Port": "2375",
|
||||
}
|
||||
s.startContainerWithNameAndLabels(c, "powpow", "swarm:1.0.0", labels, "manage", "token://blabla")
|
||||
|
||||
|
|
|
@ -8,16 +8,16 @@ checkNewVersion = false
|
|||
[accessLog]
|
||||
filePath = "access.log"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.frontendRedirect]
|
||||
[entrypoints.frontendRedirect]
|
||||
address = ":8005"
|
||||
[entryPoints.httpFrontendAuth]
|
||||
[entrypoints.httpFrontendAuth]
|
||||
address = ":8006"
|
||||
[entryPoints.httpRateLimit]
|
||||
[entrypoints.httpRateLimit]
|
||||
address = ":8007"
|
||||
[entryPoints.digestAuth]
|
||||
[entrypoints.digestAuth]
|
||||
address = ":8008"
|
||||
|
||||
[api]
|
||||
|
|
|
@ -1,21 +1,17 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
logLevel = "DEBUG"
|
||||
|
||||
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
address = "{{ .PortHTTP }}"
|
||||
[entryPoints.https]
|
||||
address = "{{ .PortHTTPS }}"
|
||||
[entryPoints.https.tls]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = "{{ .PortHTTP }}"
|
||||
[entrypoints.web-secure]
|
||||
address = "{{ .PortHTTPS }}"
|
||||
|
||||
[acme]
|
||||
email = "test@traefik.io"
|
||||
storage = "/tmp/acme.json"
|
||||
entryPoint = "https"
|
||||
# entryPoint = "https"
|
||||
acmeLogging = true
|
||||
onDemand = {{ .Acme.OnDemand }}
|
||||
onHostRule = {{ .Acme.OnHostRule }}
|
||||
keyType = "{{ .Acme.KeyType }}"
|
||||
caServer = "{{ .Acme.CAServer }}"
|
||||
|
@ -42,14 +38,15 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[services]
|
||||
[services.test.loadbalancer]
|
||||
[[services.test.loadbalancer.servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
[http.services]
|
||||
[http.services.test.loadbalancer]
|
||||
[[http.services.test.loadbalancer.servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[routers]
|
||||
[routers.test]
|
||||
service = "test"
|
||||
rule = "Host(`traefik.acme.wtf`)"
|
||||
entryPoints = ["https"]
|
||||
[http.routers]
|
||||
[http.routers.test]
|
||||
entryPoints = ["web-secure"]
|
||||
rule = "Host(`traefik.acme.wtf`)"
|
||||
service = "test"
|
||||
[http.routers.test.tls]
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
address = "{{ .PortHTTP }}"
|
||||
[entryPoints.https]
|
||||
address = "{{ .PortHTTPS }}"
|
||||
[entryPoints.https.tls]
|
||||
|
||||
[acme]
|
||||
email = "test@traefik.io"
|
||||
storage = "/tmp/acme.json"
|
||||
entryPoint = "https"
|
||||
acmeLogging = true
|
||||
onDemand = {{ .Acme.OnDemand }}
|
||||
onHostRule = {{ .Acme.OnHostRule }}
|
||||
keyType = "{{ .Acme.KeyType }}"
|
||||
caServer = "{{ .Acme.CAServer }}"
|
||||
|
||||
{{if .Acme.HTTPChallenge }}
|
||||
[acme.httpChallenge]
|
||||
entryPoint = "{{ .Acme.HTTPChallenge.EntryPoint }}"
|
||||
{{end}}
|
||||
|
||||
{{range .Acme.Domains}}
|
||||
[[acme.domains]]
|
||||
main = "{{ .Main }}"
|
||||
sans = [{{range .SANs }}
|
||||
"{{.}}",
|
||||
{{end}}]
|
||||
{{end}}
|
||||
|
||||
[web]
|
||||
path="/traefik"
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[services]
|
||||
[services.test.loadbalancer]
|
||||
[[services.test.loadbalancer.servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[routers]
|
||||
[routers.test]
|
||||
service = "test"
|
||||
rule = "Host(`traefik.acme.wtf`)"
|
||||
entryPoints = ["https"]
|
|
@ -1,22 +1,17 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
address = "{{ .PortHTTP }}"
|
||||
[entryPoints.https]
|
||||
address = "{{ .PortHTTPS }}"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.DefaultCertificate]
|
||||
certFile = "fixtures/acme/ssl/wildcard.crt"
|
||||
keyFile = "fixtures/acme/ssl/wildcard.key"
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = "{{ .PortHTTP }}"
|
||||
[entrypoints.web-secure]
|
||||
address = "{{ .PortHTTPS }}"
|
||||
|
||||
[acme]
|
||||
email = "test@traefik.io"
|
||||
storage = "/tmp/acme.json"
|
||||
entryPoint = "https"
|
||||
# entryPoint = "https"
|
||||
acmeLogging = true
|
||||
onDemand = {{ .Acme.OnDemand }}
|
||||
onHostRule = {{ .Acme.OnHostRule }}
|
||||
keyType = "{{ .Acme.KeyType }}"
|
||||
caServer = "{{ .Acme.CAServer }}"
|
||||
|
@ -43,14 +38,19 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[services]
|
||||
[services.test.loadbalancer]
|
||||
[[services.test.loadbalancer.servers]]
|
||||
[http.services]
|
||||
[http.services.test.loadbalancer]
|
||||
[[http.services.test.loadbalancer.servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[routers]
|
||||
[routers.test]
|
||||
service = "test"
|
||||
[http.routers]
|
||||
[http.routers.test]
|
||||
entryPoints = ["web-secure"]
|
||||
rule = "Host(`traefik.acme.wtf`)"
|
||||
entryPoints = ["https"]
|
||||
service = "test"
|
||||
[http.routers.test.tls]
|
||||
|
||||
[tlsStores.default.defaultCertificate]
|
||||
certFile = "fixtures/acme/ssl/wildcard.crt"
|
||||
keyFile = "fixtures/acme/ssl/wildcard.key"
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = "{{ .PortHTTP }}"
|
||||
[entryPoints.https]
|
||||
[entrypoints.web-secure]
|
||||
address = "{{ .PortHTTPS }}"
|
||||
[entryPoints.https.tls]
|
||||
|
||||
[acme]
|
||||
email = "test@traefik.io"
|
||||
storage = "/tmp/acme.json"
|
||||
entryPoint = "https"
|
||||
# entryPoint = "https"
|
||||
acmeLogging = true
|
||||
onDemand = {{ .Acme.OnDemand }}
|
||||
onHostRule = {{ .Acme.OnHostRule }}
|
||||
keyType = "{{ .Acme.KeyType }}"
|
||||
caServer = "{{ .Acme.CAServer }}"
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = "{{ .PortHTTP }}"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
address = "{{ .PortHTTP }}"
|
||||
[entryPoints.https]
|
||||
address = "{{ .PortHTTPS }}"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.traefik]
|
||||
address = ":9000"
|
||||
[entryPoints.traefik.tls]
|
||||
[entryPoints.traefik.tls.DefaultCertificate]
|
||||
certFile = "fixtures/acme/ssl/wildcard.crt"
|
||||
keyFile = "fixtures/acme/ssl/wildcard.key"
|
||||
[entrypoints.web-secure]
|
||||
address = "{{ .PortHTTPS }}"
|
||||
|
||||
[entrypoints.traefik]
|
||||
address = ":9000"
|
||||
# FIXME
|
||||
# [entrypoints.traefik.tls]
|
||||
# [entrypoints.traefik.tls.DefaultCertificate]
|
||||
# certFile = "fixtures/acme/ssl/wildcard.crt"
|
||||
# keyFile = "fixtures/acme/ssl/wildcard.key"
|
||||
|
||||
[acme]
|
||||
email = "test@traefik.io"
|
||||
storage = "/tmp/acme.json"
|
||||
entryPoint = "https"
|
||||
# entryPoint = "https"
|
||||
acmeLogging = true
|
||||
onDemand = {{ .Acme.OnDemand }}
|
||||
onHostRule = {{ .Acme.OnHostRule }}
|
||||
keyType = "{{ .Acme.KeyType }}"
|
||||
caServer = "{{ .Acme.CAServer }}"
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
[services]
|
||||
[services.test.loadbalancer]
|
||||
[[services.test.loadbalancer.servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[routers]
|
||||
[routers.test]
|
||||
service = "test"
|
||||
rule = "Host(`traefik.acme.wtf`)"
|
||||
entryPoints = ["https"]
|
||||
[http.services]
|
||||
[http.services.test.loadbalancer]
|
||||
[[http.services.test.loadbalancer.servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[http.routers]
|
||||
[http.routers.test]
|
||||
entryPoints = ["web-secure"]
|
||||
rule = "Host(`traefik.acme.wtf`)"
|
||||
service = "test"
|
||||
[http.routers.test.tls]
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
store = ["default"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/acme/ssl/wildcard.crt"
|
||||
keyFile = "fixtures/acme/ssl/wildcard.key"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.api]
|
||||
[entrypoints.api]
|
||||
address = ":8081"
|
||||
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.api]
|
||||
[entrypoints]
|
||||
[entrypoints.api]
|
||||
address = ":8081"
|
||||
[entryPoints.http]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.https]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entrypoints.web-secure.tls]
|
||||
|
||||
[providers]
|
||||
[providers.consul]
|
||||
|
|
|
@ -3,8 +3,8 @@ logLevel = "DEBUG"
|
|||
|
||||
[api]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[providers]
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8080"
|
||||
[entryPoints.api]
|
||||
[entrypoints.api]
|
||||
address = ":8081"
|
||||
|
||||
[providers]
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8080"
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Rule = "Host(`test.local`)"
|
||||
service = "service1"
|
||||
middlewares = ["error"]
|
||||
|
||||
[middlewares]
|
||||
[middlewares.error.errors]
|
||||
[http.middlewares]
|
||||
[http.middlewares.error.errors]
|
||||
status = ["500-502", "503-599"]
|
||||
service = "error"
|
||||
query = "/50x.html"
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
passHostHeader = true
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://{{.Server1}}:8989474"
|
||||
weight = 1
|
||||
|
||||
[services.error.loadbalancer]
|
||||
[[services.error.loadbalancer.servers]]
|
||||
[http.services.error.loadbalancer]
|
||||
[[http.services.error.loadbalancer.servers]]
|
||||
url = "http://{{.Server2}}:80"
|
||||
weight = 1
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8080"
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Rule = "Host(`test.local`)"
|
||||
service = "service1"
|
||||
middlewares = ["error"]
|
||||
|
||||
[middlewares]
|
||||
[middlewares.error.errors]
|
||||
[http.middlewares]
|
||||
[http.middlewares.error.errors]
|
||||
status = ["500-502", "503-599"]
|
||||
service = "error"
|
||||
query = "/50x.html"
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
passHostHeader = true
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://{{.Server1}}:80"
|
||||
weight = 1
|
||||
|
||||
[services.error.loadbalancer]
|
||||
[[services.error.loadbalancer.servers]]
|
||||
[http.services.error.loadbalancer]
|
||||
[[http.services.error.loadbalancer.servers]]
|
||||
url = "http://{{.Server2}}:80"
|
||||
weight = 1
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.api]
|
||||
[entrypoints.api]
|
||||
address = ":8081"
|
||||
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.api]
|
||||
[entrypoints]
|
||||
[entrypoints.api]
|
||||
address = ":8081"
|
||||
[entryPoints.http]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.https]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entrypoints.web-secure.tls]
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[providers]
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Path(`/test1`)"
|
||||
service = "service1"
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
weight = 1
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[routers]
|
||||
[routers.router2]
|
||||
[http.routers]
|
||||
[http.routers.router2]
|
||||
rule = "Path(`/test2`)"
|
||||
service = "service2"
|
||||
|
||||
[services]
|
||||
[services.service2.loadbalancer]
|
||||
[[services.service2.loadbalancer.servers]]
|
||||
[http.services]
|
||||
[http.services.service2.loadbalancer]
|
||||
[[http.services.service2.loadbalancer.servers]]
|
||||
url = "http://172.17.0.123:80"
|
||||
weight = 1
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[providers]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[log]
|
||||
|
@ -9,35 +9,35 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Host(`test.localhost`)"
|
||||
service = "service2"
|
||||
|
||||
[routers.router2]
|
||||
[http.routers.router2]
|
||||
rule = "Path(`/test`)"
|
||||
middlewares = ["circuitbreaker"]
|
||||
service = "service1"
|
||||
|
||||
[middlewares]
|
||||
[middlewares.circuitbreaker.circuitbreaker]
|
||||
[http.middlewares]
|
||||
[http.middlewares.circuitbreaker.circuitbreaker]
|
||||
expression = "NetworkErrorRatio() > 0.5"
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.2:80"
|
||||
weight = 10
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://172.17.0.3:80"
|
||||
weight = 1
|
||||
|
||||
[services.service2]
|
||||
[services.service2.loadbalancer]
|
||||
[http.services.service2]
|
||||
[http.services.service2.loadbalancer]
|
||||
method = "drr"
|
||||
[[services.service2.loadbalancer.servers]]
|
||||
[[http.services.service2.loadbalancer.servers]]
|
||||
url = "http://172.17.0.4:80"
|
||||
weight = 1
|
||||
[[services.service2.loadbalancer.servers]]
|
||||
[[http.services.service2.loadbalancer.servers]]
|
||||
url = "http://172.17.0.5:80"
|
||||
weight = 2
|
||||
|
|
|
@ -4,26 +4,27 @@ rootCAs = [ """{{ .CertContent }}""" ]
|
|||
[global]
|
||||
debug = true
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Host(`127.0.0.1`)"
|
||||
service = "service1"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "https://127.0.0.1:{{ .GRPCServerPort }}"
|
||||
weight = 1
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
[global]
|
||||
debug = true
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8081"
|
||||
|
||||
[api]
|
||||
|
@ -11,13 +10,13 @@ debug = true
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Host(`127.0.0.1`)"
|
||||
service = "service1"
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "h2c://127.0.0.1:{{ .GRPCServerPort }}"
|
||||
weight = 1
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
|
||||
[global]
|
||||
debug = true
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Host(`127.0.0.1`)"
|
||||
service = "service1"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "h2c://127.0.0.1:{{ .GRPCServerPort }}"
|
||||
weight = 1
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
|
|
@ -5,28 +5,27 @@ insecureSkipVerify = true
|
|||
[global]
|
||||
debug = true
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Host(`127.0.0.1`)"
|
||||
service = "service1"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "https://127.0.0.1:{{ .GRPCServerPort }}"
|
||||
weight = 1
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
[serversTransport]
|
||||
rootCAs = [ """{{ .CertContent }}""" ]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Host(`127.0.0.1`)"
|
||||
service = "service1"
|
||||
middlewares = ["retryer"]
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[middlewares]
|
||||
[middlewares.retryer.retry]
|
||||
[http.middlewares]
|
||||
[http.middlewares.retryer.retry]
|
||||
Attempts = 2
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[services.service1.loadbalancer.responseForwarding]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[http.services.service1.loadbalancer.responseForwarding]
|
||||
flushInterval="1ms"
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "https://127.0.0.1:{{ .GRPCServerPort }}"
|
||||
weight = 1
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
|
|
@ -2,29 +2,27 @@
|
|||
[serversTransport]
|
||||
rootCAs = [ """{{ .CertContent }}""" ]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "Host(`127.0.0.1`)"
|
||||
service = "service1"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[services.service1.loadbalancer.responseForwarding]
|
||||
flushInterval="1ms"
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "https://127.0.0.1:{{ .GRPCServerPort }}"
|
||||
weight = 1
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = """{{ .CertContent }}"""
|
||||
keyFile = """{{ .KeyContent }}"""
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http1]
|
||||
[entrypoints]
|
||||
[entrypoints.http1]
|
||||
address = ":8000"
|
||||
[entryPoints.http2]
|
||||
[entrypoints.http2]
|
||||
address = ":9000"
|
||||
|
||||
[api]
|
||||
|
@ -12,21 +12,21 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
service = "service1"
|
||||
Rule = "Host(`test.localhost`)"
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
method = "drr"
|
||||
[services.service1.loadbalancer.healthcheck]
|
||||
[http.services.service1.loadbalancer.healthcheck]
|
||||
path = "/health"
|
||||
interval = "1s"
|
||||
timeout = "0.9s"
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://{{.Server1}}:80"
|
||||
weight = 1
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://{{.Server2}}:80"
|
||||
weight = 1
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http1]
|
||||
[entrypoints]
|
||||
[entrypoints.http1]
|
||||
address = ":8000"
|
||||
[entryPoints.http2]
|
||||
[entrypoints.http2]
|
||||
address = ":9000"
|
||||
|
||||
[api]
|
||||
|
@ -12,21 +12,21 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
service = "service1"
|
||||
Rule = "Host(`test.localhost`)"
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
method = "wrr"
|
||||
[services.service1.loadbalancer.healthcheck]
|
||||
[http.services.service1.loadbalancer.healthcheck]
|
||||
path = "/health"
|
||||
interval = "1s"
|
||||
timeout = "0.9s"
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://{{.Server1}}:80"
|
||||
weight = 1
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://{{.Server2}}:80"
|
||||
weight = 1
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
@ -10,19 +10,19 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
service = "service1"
|
||||
Rule = "Host(`test.localhost`)"
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
method = "drr"
|
||||
[services.service1.loadbalancer.healthcheck]
|
||||
[http.services.service1.loadbalancer.healthcheck]
|
||||
path = "/health"
|
||||
port = 80
|
||||
interval = "1s"
|
||||
timeout = "0.9s"
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://{{.Server1}}:81"
|
||||
weight = 1
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
@ -10,20 +10,20 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[routers]
|
||||
[routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
service = "service1"
|
||||
Rule = "Host(`test.localhost`)"
|
||||
|
||||
[services]
|
||||
[services.service1.loadbalancer]
|
||||
[services.service1.loadbalancer.healthcheck]
|
||||
[http.services]
|
||||
[http.services.service1.loadbalancer]
|
||||
[http.services.service1.loadbalancer.healthcheck]
|
||||
path = "/health"
|
||||
interval = "1s"
|
||||
timeout = "0.9s"
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://{{.Server1}}:80"
|
||||
weight = 1
|
||||
[[services.service1.loadbalancer.servers]]
|
||||
[[http.services.service1.loadbalancer.servers]]
|
||||
url = "http://{{.Server2}}:80"
|
||||
weight = 1
|
||||
|
|
|
@ -1,50 +1,49 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.ClientCA]
|
||||
files = ["fixtures/https/clientca/ca1.crt"]
|
||||
optional = true
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[http.routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
[http.routers.router2.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9010"
|
||||
Weight = 1
|
||||
[Services.service2]
|
||||
[Services.service2.LoadBalancer]
|
||||
|
||||
[[Services.service2.LoadBalancer.Servers]]
|
||||
[http.services.service2]
|
||||
[http.services.service2.LoadBalancer]
|
||||
[[http.services.service2.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9020"
|
||||
Weight = 1
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/snitest.org.cert"
|
||||
keyFile = "fixtures/https/snitest.org.key"
|
||||
|
||||
[tlsOptions.default.ClientCA]
|
||||
files = ["fixtures/https/clientca/ca1.crt"]
|
||||
optional = true
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.ClientCA]
|
||||
files = ["fixtures/https/clientca/ca1and2.crt"]
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[http.routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
[http.routers.router2.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9010"
|
||||
Weight = 1
|
||||
[Services.service2]
|
||||
[Services.service2.LoadBalancer]
|
||||
|
||||
[[Services.service2.LoadBalancer.Servers]]
|
||||
[http.services.service2]
|
||||
[http.services.service2.LoadBalancer]
|
||||
[[http.services.service2.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9020"
|
||||
Weight = 1
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/snitest.org.cert"
|
||||
keyFile = "fixtures/https/snitest.org.key"
|
||||
|
||||
[tlsOptions.default.ClientCA]
|
||||
files = ["fixtures/https/clientca/ca1and2.crt"]
|
|
@ -2,49 +2,48 @@
|
|||
logLevel = "DEBUG"
|
||||
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.ClientCA]
|
||||
files = ["fixtures/https/clientca/ca1.crt", "fixtures/https/clientca/ca2.crt"]
|
||||
optional = false
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
[http.routers.router1.tls]
|
||||
[http.routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
[http.routers.router2.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9010"
|
||||
Weight = 1
|
||||
[Services.service2]
|
||||
[Services.service2.LoadBalancer]
|
||||
|
||||
[[Services.service2.LoadBalancer.Servers]]
|
||||
[http.services.service2]
|
||||
[http.services.service2.LoadBalancer]
|
||||
[[http.services.service2.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9020"
|
||||
Weight = 1
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/snitest.org.cert"
|
||||
keyFile = "fixtures/https/snitest.org.key"
|
||||
|
||||
[tlsOptions.default.ClientCA]
|
||||
files = ["fixtures/https/clientca/ca1.crt", "fixtures/https/clientca/ca2.crt"]
|
||||
optional = false
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
service = "service1"
|
||||
rule = "Host(`snitest.com`)"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.routers.router2]
|
||||
service = "service2"
|
||||
rule = "Host(`snitest.org`)"
|
||||
[http.routers.router2.tls]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9010"
|
||||
Weight = 1
|
||||
[Services.service2]
|
||||
[Services.service2.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[[Services.service2.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9020"
|
||||
Weight = 1
|
||||
[http.services.service2]
|
||||
[http.services.service2.LoadBalancer]
|
||||
[[http.services.service2.LoadBalancer.Servers]]
|
||||
url = "http://127.0.0.1:9020"
|
||||
weight = 1
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
# bad certificates to validate the loop on the certificate appending
|
||||
[tls.certificate]
|
||||
# bad content
|
||||
|
@ -36,7 +37,6 @@ w/X5M802XqzLjeec5zHoZDfknnAkgR9MsxZYmZPFaDyL6GOKUB8=
|
|||
-----END RSA PRIVATE KEY-----"""
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = """-----BEGIN CERTIFICATE-----
|
||||
MIIC/zCCAeegAwIBAgIJALAYHG/vGqWEMA0GCSqGSIb3DQEBBQUAMBYxFDASBgNV
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
|
||||
[entryPoints.https02]
|
||||
address = ":8443"
|
||||
[entryPoints.https02.tls]
|
||||
[entrypoints.https02]
|
||||
address = ":8443"
|
||||
|
||||
[api]
|
||||
|
||||
|
|
|
@ -1,43 +1,43 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.defaultCertificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service1"
|
||||
Rule = "Host(`www.snitest.com`)"
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
service = "service1"
|
||||
rule = "Host(`snitest.com`)"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.routers.router2]
|
||||
service = "service1"
|
||||
rule = "Host(`www.snitest.com`)"
|
||||
[http.routers.router2.tls]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9010"
|
||||
Weight = 1
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/wildcard.snitest.com.cert"
|
||||
keyFile = "fixtures/https/wildcard.snitest.com.key"
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/www.snitest.com.cert"
|
||||
keyFile = "fixtures/https/www.snitest.com.key"
|
||||
certFile = "fixtures/https/www.snitest.com.cert"
|
||||
keyFile = "fixtures/https/www.snitest.com.key"
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
|
|
|
@ -1,102 +1,169 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8888"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
address = ":8888"
|
||||
|
||||
[entryPoints.https]
|
||||
address = ":8443"
|
||||
[entryPoints.https.tls]
|
||||
[entrypoints.web-secure]
|
||||
address = ":8443"
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https"]
|
||||
Rule = "Host(`example.com`)"
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`example.com`)"
|
||||
middlewares = ["redirect-https"]
|
||||
service = "service1"
|
||||
|
||||
[Routers.router2]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-slash-strip"]
|
||||
Rule = "Host(`example2.com`)"
|
||||
[http.routers.router1TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`example.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router1TLS.tls]
|
||||
|
||||
[Routers.router3]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "foo-add-prefix"]
|
||||
Rule = "Host(`test.com`)"
|
||||
[http.routers.router2]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`example2.com`)"
|
||||
middlewares = ["redirect-https", "api-slash-strip"]
|
||||
service = "service1"
|
||||
|
||||
[Routers.router4]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "foo-slash-add-prefix"]
|
||||
Rule = "Host(`test2.com`)"
|
||||
[http.routers.router2TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`example2.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router2TLS.tls]
|
||||
|
||||
[Routers.router5]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "id-strip-regex-prefix"]
|
||||
Rule = "Host(`foo.com`)"
|
||||
[http.routers.router3]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`test.com`)"
|
||||
middlewares = ["redirect-https", "foo-add-prefix"]
|
||||
service = "service1"
|
||||
|
||||
[Routers.router6]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "id-slash-strip-regex-prefix"]
|
||||
Rule = "Host(`foo2.com`)"
|
||||
[http.routers.router3TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`test.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router3TLS.tls]
|
||||
|
||||
[Routers.router7]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-regex-replace"]
|
||||
Rule = "Host(`bar.com`)"
|
||||
[http.routers.router4]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`test2.com`)"
|
||||
middlewares = ["redirect-https", "foo-slash-add-prefix"]
|
||||
service = "service1"
|
||||
|
||||
[Routers.router8]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-slash-regex-replace"]
|
||||
Rule = "Host(`bar2.com`)"
|
||||
[http.routers.router4TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`test2.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router4TLS.tls]
|
||||
|
||||
[Routers.router9]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-replace-path"]
|
||||
Rule = "Host(`pow.com`)"
|
||||
[http.routers.router5]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`foo.com`)"
|
||||
middlewares = ["redirect-https", "id-strip-regex-prefix"]
|
||||
service = "service1"
|
||||
|
||||
[Routers.router10]
|
||||
Service = "service1"
|
||||
Middlewares = ["redirect-https", "api-slash-replace-path"]
|
||||
Rule = "Host(`pow2.com`)"
|
||||
[http.routers.router5TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`foo.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router5TLS.tls]
|
||||
|
||||
[Middlewares]
|
||||
[Middlewares.api-strip.StripPrefix]
|
||||
[http.routers.router6]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`foo2.com`)"
|
||||
middlewares = ["redirect-https", "id-slash-strip-regex-prefix"]
|
||||
service = "service1"
|
||||
|
||||
[http.routers.router6TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`foo2.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router6TLS.tls]
|
||||
|
||||
[http.routers.router7]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`bar.com`)"
|
||||
middlewares = ["redirect-https", "api-regex-replace"]
|
||||
service = "service1"
|
||||
|
||||
[http.routers.router7TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`bar.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router7TLS.tls]
|
||||
|
||||
[http.routers.router8]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`bar2.com`)"
|
||||
middlewares = ["redirect-https", "api-slash-regex-replace"]
|
||||
service = "service1"
|
||||
|
||||
[http.routers.router8TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`bar2.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router8TLS.tls]
|
||||
|
||||
[http.routers.router9]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`pow.com`)"
|
||||
middlewares = ["redirect-https", "api-replace-path"]
|
||||
service = "service1"
|
||||
|
||||
[http.routers.router9TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`pow.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router9TLS.tls]
|
||||
|
||||
[http.routers.router10]
|
||||
entrypoints = [ "web" ]
|
||||
rule = "Host(`pow2.com`)"
|
||||
middlewares = ["redirect-https", "api-slash-replace-path"]
|
||||
service = "service1"
|
||||
|
||||
[http.routers.router10TLS]
|
||||
entrypoints = [ "web-secure" ]
|
||||
rule = "Host(`pow2.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router10TLS.tls]
|
||||
|
||||
[http.middlewares]
|
||||
[http.middlewares.api-strip.StripPrefix]
|
||||
prefixes = ["/api"]
|
||||
[Middlewares.api-slash-strip.StripPrefix]
|
||||
[http.middlewares.api-slash-strip.StripPrefix]
|
||||
prefixes = ["/api/"]
|
||||
[Middlewares.foo-add-prefix.AddPrefix]
|
||||
[http.middlewares.foo-add-prefix.AddPrefix]
|
||||
prefix = "/foo"
|
||||
[Middlewares.foo-slash-add-prefix.AddPrefix]
|
||||
[http.middlewares.foo-slash-add-prefix.AddPrefix]
|
||||
prefix = "/foo/"
|
||||
[Middlewares.id-strip-regex-prefix.StripPrefixRegex]
|
||||
[http.middlewares.id-strip-regex-prefix.StripPrefixRegex]
|
||||
regex = ["/{id:[a-z]+}"]
|
||||
[Middlewares.id-slash-strip-regex-prefix.StripPrefixRegex]
|
||||
[http.middlewares.id-slash-strip-regex-prefix.StripPrefixRegex]
|
||||
regex = ["/{id:[a-z]+}/"]
|
||||
[Middlewares.api-regex-replace.ReplacePathRegex]
|
||||
[http.middlewares.api-regex-replace.ReplacePathRegex]
|
||||
regex = "/api"
|
||||
replacement = "/"
|
||||
[Middlewares.api-slash-regex-replace.ReplacePathRegex]
|
||||
[http.middlewares.api-slash-regex-replace.ReplacePathRegex]
|
||||
regex = "/api/"
|
||||
replacement = "/"
|
||||
[Middlewares.api-replace-path.ReplacePath]
|
||||
[http.middlewares.api-replace-path.ReplacePath]
|
||||
path = "/api"
|
||||
[Middlewares.api-slash-replace-path.ReplacePath]
|
||||
[http.middlewares.api-slash-replace-path.ReplacePath]
|
||||
path = "/api/"
|
||||
[Middlewares.redirect-https.redirectScheme]
|
||||
[http.middlewares.redirect-https.redirectScheme]
|
||||
scheme = "https"
|
||||
port = "8443"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:80"
|
||||
Weight = 1
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
url = "http://127.0.0.1:80"
|
||||
weight = 1
|
||||
|
|
|
@ -1,46 +1,45 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
logLevel = "DEBUG"
|
||||
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[http.routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Host(`snitest.org`)"
|
||||
[http.routers.router2.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9010"
|
||||
Weight = 1
|
||||
[Services.service2]
|
||||
[Services.service2.LoadBalancer]
|
||||
|
||||
[[Services.service2.LoadBalancer.Servers]]
|
||||
[http.services.service2]
|
||||
[http.services.service2.LoadBalancer]
|
||||
[[http.services.service2.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9020"
|
||||
Weight = 1
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/snitest.org.cert"
|
||||
keyFile = "fixtures/https/snitest.org.key"
|
||||
|
|
|
@ -1,36 +1,37 @@
|
|||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.defaultCertificate]
|
||||
certFile = "fixtures/https/wildcard.snitest.com.cert"
|
||||
keyFile = "fixtures/https/wildcard.snitest.com.key"
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
rule = "HostRegexp(`{subdomain:[a-z1-9-]+}.snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service1"
|
||||
service = "service1"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[http.routers.router2]
|
||||
rule = "HostRegexp(`{subdomain:[a-z1-9-]+}.www.snitest.com`)"
|
||||
service = "service1"
|
||||
[http.routers.router2.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9010"
|
||||
Weight = 1
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/uppercase_wildcard.www.snitest.com.cert"
|
||||
keyFile = "fixtures/https/uppercase_wildcard.www.snitest.com.key"
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = "fixtures/https/wildcard.snitest.com.cert"
|
||||
keyFile = "fixtures/https/wildcard.snitest.com.key"
|
||||
|
|
|
@ -1,44 +1,43 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
logLevel = "DEBUG"
|
||||
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
[entryPoints.https.tls.DefaultCertificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[Routers.router2]
|
||||
Service = "service1"
|
||||
Rule = "Host(`www.snitest.com`)"
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
service = "service1"
|
||||
rule = "Host(`snitest.com`)"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.routers.router2]
|
||||
service = "service1"
|
||||
rule = "Host(`www.snitest.com`)"
|
||||
[http.routers.router2.tls]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9010"
|
||||
Weight = 1
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/wildcard.snitest.com.cert"
|
||||
keyFile = "fixtures/https/wildcard.snitest.com.key"
|
||||
|
||||
[[tls]]
|
||||
entryPoints = ["https"]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/https/www.snitest.com.cert"
|
||||
keyFile = "fixtures/https/www.snitest.com.key"
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
|
|
|
@ -1,30 +1,33 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
logLevel = "DEBUG"
|
||||
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
address = ":4443"
|
||||
[entryPoints.https.tls]
|
||||
sniStrict = true
|
||||
[entryPoints.https.tls.defaultCertificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":4443"
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Host(`snitest.com`)"
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
service = "service1"
|
||||
rule = "Host(`snitest.com`)"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
url = "http://127.0.0.1:9010"
|
||||
weight = 1
|
||||
|
||||
[tlsOptions.default]
|
||||
sniStrict = true
|
||||
|
||||
[tlsStores.default]
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = "fixtures/https/snitest.com.cert"
|
||||
keyFile = "fixtures/https/snitest.com.key"
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:9010"
|
||||
Weight = 1
|
||||
|
|
|
@ -21,8 +21,8 @@ fblo6RBxUQ==
|
|||
-----END CERTIFICATE-----
|
||||
"""]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8081"
|
||||
|
||||
[api]
|
||||
|
@ -30,15 +30,15 @@ fblo6RBxUQ==
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Path(`/ping`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "{{ .BackendHost }}"
|
||||
Weight = 1
|
||||
|
|
|
@ -5,8 +5,8 @@ logLevel = "DEBUG"
|
|||
# Use certificate in net/internal/testcert.go
|
||||
rootCAs = [ "fixtures/https/rootcas/local.crt"]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8081"
|
||||
|
||||
[api]
|
||||
|
@ -14,15 +14,15 @@ rootCAs = [ "fixtures/https/rootcas/local.crt"]
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Path(`/ping`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "{{ .BackendHost }}"
|
||||
Weight = 1
|
||||
|
|
|
@ -4,8 +4,8 @@ keepTrailingSlash = {{ .KeepTrailingSlash }}
|
|||
logLevel = "DEBUG"
|
||||
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[providers]
|
||||
|
|
|
@ -8,10 +8,10 @@ filePath = "access.log"
|
|||
filePath = "traefik.log"
|
||||
logLevel = "ERROR"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.api]
|
||||
[entrypoints.api]
|
||||
address = ":7888"
|
||||
|
||||
checkNewVersion = false
|
||||
|
@ -31,15 +31,15 @@ entryPoint = "api"
|
|||
################################################################
|
||||
# rules
|
||||
################################################################
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Path(`/test1`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://127.0.0.1:8081"
|
||||
Weight = 1
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.api]
|
||||
[entrypoints.api]
|
||||
address = ":9090"
|
||||
|
||||
[api]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[providers]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[global]
|
||||
debug=true
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
@ -15,15 +15,15 @@ debug=true
|
|||
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router-1]
|
||||
[http.routers]
|
||||
[http.routers.router-1]
|
||||
Service = "service-test"
|
||||
Rule = "PathPrefix(`/file`)"
|
||||
|
||||
[Services]
|
||||
[Services.service-test]
|
||||
[Services.service-test.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service-test]
|
||||
[http.services.service-test.LoadBalancer]
|
||||
|
||||
[[Services.service-test.LoadBalancer.Servers]]
|
||||
[[http.services.service-test.LoadBalancer.Servers]]
|
||||
URL = "http://{{ .IP }}"
|
||||
Weight = 1
|
||||
|
|
|
@ -3,8 +3,8 @@ logLevel = "DEBUG"
|
|||
|
||||
[api]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[Providers]
|
||||
|
@ -12,13 +12,13 @@ logLevel = "DEBUG"
|
|||
|
||||
[Providers.File]
|
||||
|
||||
[Services]
|
||||
[Services.service]
|
||||
[Services.service.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service]
|
||||
[http.services.service.LoadBalancer]
|
||||
|
||||
[[Services.service.LoadBalancer.Servers]]
|
||||
[[http.services.service.LoadBalancer.Servers]]
|
||||
URL = "{{.Server}}"
|
||||
Weight = 1
|
||||
[Middlewares]
|
||||
[Middlewares.customheader.Headers.CustomRequestHeaders]
|
||||
[http.middlewares]
|
||||
[http.middlewares.customheader.Headers.CustomRequestHeaders]
|
||||
X-Custom="CustomValue"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.http.proxyProtocol]
|
||||
[entrypoints.web.proxyProtocol]
|
||||
trustedIPs = ["{{.HaproxyIP}}"]
|
||||
|
||||
[api]
|
||||
|
@ -12,15 +12,15 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Path(`/whoami`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://{{.WhoamiIP}}"
|
||||
Weight = 1
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.http.proxyProtocol]
|
||||
[entrypoints.web.proxyProtocol]
|
||||
trustedIPs = ["1.2.3.4"]
|
||||
|
||||
[api]
|
||||
|
@ -12,15 +12,15 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Path(`/whoami`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://{{.WhoamiIP}}"
|
||||
Weight = 1
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":80"
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Middlewares = [ "ratelimit" ]
|
||||
Rule = "Path(`/`)"
|
||||
|
||||
[Middlewares]
|
||||
[Middlewares.ratelimit.RateLimit]
|
||||
[http.middlewares]
|
||||
[http.middlewares.ratelimit.RateLimit]
|
||||
extractorfunc = "client.ip"
|
||||
[Middlewares.ratelimit.RateLimit.rateset.rateset1]
|
||||
[http.middlewares.ratelimit.RateLimit.rateset.rateset1]
|
||||
period = "60s"
|
||||
average = 4
|
||||
burst = 5
|
||||
[Middlewares.ratelimit.RateLimit.rateset.rateset2]
|
||||
[http.middlewares.ratelimit.RateLimit.rateset.rateset2]
|
||||
period = "3s"
|
||||
average = 1
|
||||
burst = 2
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
passHostHeader = true
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://{{.Server1}}:80"
|
||||
Weight = 1
|
||||
|
|
|
@ -1,32 +1,30 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.http.transport.lifeCycle]
|
||||
[entrypoints.web.transport.lifeCycle]
|
||||
RequestAcceptGraceTimeout = "10s"
|
||||
|
||||
|
||||
[entryPoints.traefik]
|
||||
[entrypoints.traefik]
|
||||
address = ":8001"
|
||||
[entryPoints.traefik.transport.lifeCycle]
|
||||
[entrypoints.traefik.transport.lifeCycle]
|
||||
RequestAcceptGraceTimeout = "10s"
|
||||
|
||||
|
||||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router]
|
||||
[http.routers]
|
||||
[http.routers.router]
|
||||
Service = "service"
|
||||
Rule = "Path(`/service`)"
|
||||
|
||||
[Services]
|
||||
[Services.service]
|
||||
[Services.service.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service]
|
||||
[http.services.service.LoadBalancer]
|
||||
|
||||
[[Services.service.LoadBalancer.Servers]]
|
||||
[[http.services.service.LoadBalancer.Servers]]
|
||||
URL = "{{.Server}}"
|
||||
Weight = 1
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
@ -10,23 +10,23 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Middlewares = [ "retry" ]
|
||||
Rule = "PathPrefix(`/`)"
|
||||
|
||||
[Middlewares.retry.Retry]
|
||||
[http.middlewares.retry.Retry]
|
||||
Attempts = 3
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://{{.WhoamiEndpoint}}:8080"
|
||||
Weight = 1
|
||||
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://{{.WhoamiEndpoint}}:80"
|
||||
Weight = 1
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[entryPoints.traefik]
|
||||
[entrypoints.traefik]
|
||||
address = ":8001"
|
||||
|
||||
|
||||
[api]
|
||||
middlewares = ["file.authentication"]
|
||||
|
||||
|
@ -16,6 +15,6 @@ logLevel = "DEBUG"
|
|||
|
||||
[providers.file]
|
||||
|
||||
[middlewares]
|
||||
[middlewares.authentication.basicauth]
|
||||
[http.middlewares]
|
||||
[http.middlewares.authentication.basicauth]
|
||||
users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[global]
|
||||
debug=true
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
@ -10,26 +10,26 @@ debug=true
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
EntryPoints = ["http"]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
EntryPoints = ["web"]
|
||||
Service = "service1"
|
||||
Rule = "PathPrefix(`/whoami`)"
|
||||
|
||||
[Routers.router2]
|
||||
[http.routers.router2]
|
||||
EntryPoints = ["traefik"]
|
||||
Service = "service2"
|
||||
Rule = "PathPrefix(`/whoami`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "{{ .Server1 }}"
|
||||
Weight = 1
|
||||
|
||||
[Services.service2]
|
||||
[Services.service2.LoadBalancer]
|
||||
[[Services.service2.LoadBalancer.Servers]]
|
||||
[http.services.service2]
|
||||
[http.services.service2.LoadBalancer]
|
||||
[[http.services.service2.LoadBalancer.Servers]]
|
||||
URL = "{{ .Server2 }}"
|
||||
Weight = 1
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
[entryPoints.http.ForwardedHeaders]
|
||||
[entrypoints.web.ForwardedHeaders]
|
||||
insecure=true
|
||||
[entryPoints.http.ClientIPStrategy]
|
||||
[entrypoints.web.ClientIPStrategy]
|
||||
depth=2
|
||||
|
||||
[api]
|
||||
|
|
73
integration/fixtures/tcp/mixed.toml
Normal file
73
integration/fixtures/tcp/mixed.toml
Normal file
|
@ -0,0 +1,73 @@
|
|||
[entrypoints]
|
||||
[entrypoints.tcp]
|
||||
address = ":8093"
|
||||
|
||||
[api]
|
||||
|
||||
[providers.file]
|
||||
|
||||
[http]
|
||||
[http.routers]
|
||||
[http.routers.my-router]
|
||||
rule = "Path(`/test`)"
|
||||
service = "whoami"
|
||||
entrypoint=["tcp"]
|
||||
|
||||
[http.routers.my-https-router]
|
||||
entrypoints=["tcp"]
|
||||
rule = "Path(`/whoami/`)"
|
||||
service = "whoami"
|
||||
[http.routers.my-https-router.tls]
|
||||
|
||||
[http.services]
|
||||
[http.services.whoami.loadbalancer]
|
||||
[[http.services.whoami.loadbalancer.servers]]
|
||||
url = "http://localhost:8085"
|
||||
weight=1
|
||||
[tcp]
|
||||
[tcp.routers]
|
||||
[tcp.routers.to-whoami-a]
|
||||
rule = "HostSNI(`whoami-a.test`)"
|
||||
service = "whoami-a"
|
||||
entrypoints = [ "tcp" ]
|
||||
[tcp.routers.to-whoami-a.tls]
|
||||
passthrough=true
|
||||
|
||||
[tcp.routers.to-whoami-b]
|
||||
rule = "HostSNI(`whoami-b.test`)"
|
||||
service = "whoami-b"
|
||||
entrypoints = [ "tcp" ]
|
||||
[tcp.routers.to-whoami-b.tls]
|
||||
passthrough=true
|
||||
|
||||
[tcp.routers.to-whoami-no-cert]
|
||||
rule = "HostSNI(`whoami-c.test`)"
|
||||
service = "whoami-no-cert"
|
||||
entrypoints = [ "tcp" ]
|
||||
[tcp.routers.to-whoami-no-cert.tls]
|
||||
|
||||
[tcp.services.whoami-a]
|
||||
[tcp.services.whoami-a.loadbalancer]
|
||||
method = "wrr"
|
||||
[[tcp.services.whoami-a.loadbalancer.servers]]
|
||||
address = "localhost:8081"
|
||||
weight = 1
|
||||
|
||||
[tcp.services.whoami-b]
|
||||
[tcp.services.whoami-b.loadbalancer]
|
||||
method = "wrr"
|
||||
[[tcp.services.whoami-b.loadbalancer.servers]]
|
||||
address = "localhost:8082"
|
||||
weight = 1
|
||||
|
||||
[tcp.services.whoami-no-cert]
|
||||
[tcp.services.whoami-no-cert.loadbalancer]
|
||||
method = "wrr"
|
||||
[[tcp.services.whoami-no-cert.loadbalancer.servers]]
|
||||
address = "localhost:8083"
|
||||
weight = 1
|
||||
|
||||
[[tls]]
|
||||
[tls.certificate]
|
||||
certFile = "fixtures/tcp/whoami-c.crt"
|
||||
keyFile = "fixtures/tcp/whoami-c.key"
|
63
integration/fixtures/tcp/non-tls-fallback.toml
Normal file
63
integration/fixtures/tcp/non-tls-fallback.toml
Normal file
|
@ -0,0 +1,63 @@
|
|||
[entrypoints]
|
||||
[entrypoints.tcp]
|
||||
address = ":8093"
|
||||
|
||||
[api]
|
||||
|
||||
[global]
|
||||
debug = true
|
||||
|
||||
[providers.file]
|
||||
|
||||
[tcp]
|
||||
[tcp.routers]
|
||||
[tcp.routers.to-whoami-a]
|
||||
rule = "HostSNI(`whoami-a.test`)"
|
||||
service = "whoami-a"
|
||||
entrypoints = [ "tcp" ]
|
||||
[tcp.routers.to-whoami-a.tls]
|
||||
passthrough=true
|
||||
|
||||
[tcp.routers.to-whoami-b]
|
||||
rule = "HostSNI(`whoami-b.test`)"
|
||||
service = "whoami-b"
|
||||
entrypoints = [ "tcp" ]
|
||||
[tcp.routers.to-whoami-b.tls]
|
||||
passthrough=true
|
||||
|
||||
[tcp.routers.to-whoami-no-cert]
|
||||
rule = "HostSNI(`whoami-c.test`)"
|
||||
service = "whoami-no-cert"
|
||||
entrypoints = [ "tcp" ]
|
||||
[tcp.routers.to-whoami-no-cert.tls]
|
||||
|
||||
[tcp.routers.to-whoami-no-tls]
|
||||
entrypoints = ["tcp"]
|
||||
rule="HostSNI(`*`)"
|
||||
service = "whoami-no-tls"
|
||||
|
||||
[tcp.services]
|
||||
[tcp.services.whoami-no-tls.loadbalancer]
|
||||
[[tcp.services.whoami-no-tls.loadbalancer.servers]]
|
||||
address = "localhost:8084"
|
||||
|
||||
[tcp.services.whoami-a]
|
||||
[tcp.services.whoami-a.loadbalancer]
|
||||
method = "wrr"
|
||||
[[tcp.services.whoami-a.loadbalancer.servers]]
|
||||
address = "localhost:8081"
|
||||
weight = 1
|
||||
|
||||
[tcp.services.whoami-b]
|
||||
[tcp.services.whoami-b.loadbalancer]
|
||||
method = "wrr"
|
||||
[[tcp.services.whoami-b.loadbalancer.servers]]
|
||||
address = "localhost:8082"
|
||||
weight = 1
|
||||
|
||||
[tcp.services.whoami-no-cert]
|
||||
[tcp.services.whoami-no-cert.loadbalancer]
|
||||
method = "wrr"
|
||||
[[tcp.services.whoami-no-cert.loadbalancer.servers]]
|
||||
address = "localhost:8083"
|
||||
weight = 1
|
22
integration/fixtures/tcp/non-tls.toml
Normal file
22
integration/fixtures/tcp/non-tls.toml
Normal file
|
@ -0,0 +1,22 @@
|
|||
[entrypoints]
|
||||
[entrypoints.tcp]
|
||||
address = ":8093"
|
||||
|
||||
[api]
|
||||
|
||||
[global]
|
||||
debug = true
|
||||
|
||||
[providers.file]
|
||||
|
||||
[tcp]
|
||||
[tcp.routers]
|
||||
[tcp.routers.to-whoami-no-tls]
|
||||
entrypoints = ["tcp"]
|
||||
rule="HostSNI(`*`)"
|
||||
service = "whoami-no-tls"
|
||||
|
||||
[tcp.services]
|
||||
[tcp.services.whoami-no-tls.loadbalancer]
|
||||
[[tcp.services.whoami-no-tls.loadbalancer.servers]]
|
||||
address = "localhost:8084"
|
17
integration/fixtures/tcp/whoami-a.crt
Normal file
17
integration/fixtures/tcp/whoami-a.crt
Normal file
|
@ -0,0 +1,17 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICrDCCAZQCCQDlk0DXaomRQjANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA13
|
||||
aG9hbWktYS50ZXN0MB4XDTE5MDIyNTE1NTMyN1oXDTIwMDIyNTE1NTMyN1owGDEW
|
||||
MBQGA1UEAwwNd2hvYW1pLWEudGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
|
||||
AQoCggEBAJvexSEnLjqdkRCUlkfkpNTiSLlVaJFpGuThcETtommAlM2oE9pbXnVX
|
||||
PYyT/HRrd/ecI5EtU4P7Mh1iGxopjPuHWSyMxlhFJb9yziDaoizLtFQoHCUM7wd6
|
||||
hGFu7/zscQ6VBKRzP1A/iUdn6xIKwl5ggbqKHd1+5KOf0hpFSITKOdfWQtBAje/L
|
||||
SY8SEn/3lcfGcLq57JxSW7TslW140Yd8MJfAU+P7DfEO8MQesl+b8CV/QjshQn+d
|
||||
5j5LBvWHQby8IZGfigAsAM6NNZEnm77mbr87mBP4sk8ayjzGdkTiIyY3u4/OR34A
|
||||
Ybx+EBK37weMxoLALEtCWO8+RKcfvX0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEA
|
||||
P8GTdBRlGmIk//R1CQtsaF2+xkFJ40TfGd6P/I3jHZPLcxEIiqdKCa9Bkfn2VMEB
|
||||
dEruIgOvuSs8IjfkahtErKZaDgGt1gnwutUhi8N2Kw/EM/tG2w/a5A2K4XlVC/Rq
|
||||
W/dQqDAlD2H/VtA15Ov3VctaxP6ouGyoz3w2ycKFqbAwz4POuF6gzgOSKs5saMvP
|
||||
D4lNn2a4zFfiaRh9GsdinvYx4MP2ploPhScp2GHWve9EZVPs2rpza7jHdws18Hgs
|
||||
w9wRY2iASYNu+3yZvCKbBA6BaCektyifspyoDd1xxUhnqIjZCKyvZZZxtjbBObt+
|
||||
LyvN9Z22WHCewBB5cycqJg==
|
||||
-----END CERTIFICATE-----
|
28
integration/fixtures/tcp/whoami-a.key
Normal file
28
integration/fixtures/tcp/whoami-a.key
Normal file
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCb3sUhJy46nZEQ
|
||||
lJZH5KTU4ki5VWiRaRrk4XBE7aJpgJTNqBPaW151Vz2Mk/x0a3f3nCORLVOD+zId
|
||||
YhsaKYz7h1ksjMZYRSW/cs4g2qIsy7RUKBwlDO8HeoRhbu/87HEOlQSkcz9QP4lH
|
||||
Z+sSCsJeYIG6ih3dfuSjn9IaRUiEyjnX1kLQQI3vy0mPEhJ/95XHxnC6ueycUlu0
|
||||
7JVteNGHfDCXwFPj+w3xDvDEHrJfm/Alf0I7IUJ/neY+Swb1h0G8vCGRn4oALADO
|
||||
jTWRJ5u+5m6/O5gT+LJPGso8xnZE4iMmN7uPzkd+AGG8fhASt+8HjMaCwCxLQljv
|
||||
PkSnH719AgMBAAECggEAeMyKTGpYGpdZANeXLHqYAGCq6e+2TdN+Q1owL0tX7pn3
|
||||
OPeFA1qCd0A4dEWQhw1u+Vhp/C57pjK8oScSSBFhsOIxiyRC59AXNCuecrnerAbn
|
||||
Z716KoC+kzYxeG2I0qTP7fQxl921eNT06IEyHlZ2UrxKbi5yfOHGAsVvCGsfi8EU
|
||||
qYl+tJjAi2mEzDv7BB5SgnP933L5Z4HX2PtSod3S2gQOV3/fPf9MKuOakKU+ryor
|
||||
6zkqlk3zM9O8fZBMakOEw8BqeYUiy7WdlL571g9DUFk8j82CICyP1UXu91c1X4Qw
|
||||
J7fqM/Sj8zz5AITvUbMBin1QjN/FrWehG54RL44oJQKBgQDLs+oYPrZoNgEVu2x3
|
||||
FnLJWX1HBH4jXaqiQWNZbuxiiHjs5CXWMzCatUEthS59EFjKTcnTfw/KKrxMpQWB
|
||||
ccbUFdLLD2R6SZYo1BYvso9pIdhwr8EN68/46QGzdUWEyrr4qpVPKFbZNx2XS6UU
|
||||
o1qoX73qpnt2ApGvg7uEpPDHUwKBgQDD4x/Ftl8feuMVzZrQioVLXGKigSugtWHi
|
||||
frwT0o4K98fK52GK118OcUmCSSK+y7zDj38W4rGxQeZhsMuofcJWpE9ObKkMZHjq
|
||||
h59JYtm7/3aIcNDdV80cw24C29r6m0EuLtc15PW0d9zOiTuSDhc3EtQkDRjLH+Hw
|
||||
F+G+r1Hd7wKBgBc/2aAayEbsowMP+Tk+XquMgzfv01XGAwux2t0CRAia+vJOt+LS
|
||||
xOFjfqTrZnrvurKcXkS9Y9f3OLamvxIfIkpik0SJ5TXv4CuYyU94WdXt/v4dkTM9
|
||||
juch8QfCgsS9PsnS7meyevcfy0jRYW4Rlu9QviRiDAVUFbyqlGR3TuPxAoGBAI8L
|
||||
or4MqXYhlQbs9+rl3OTleBnXXfajvfFaPxnynkugGcQwJ2juUboIPHfp1Hej7Bqb
|
||||
BWG+9afNyeD47CAEhhAjOM66RtCH5kzN8SH0D7Bbo0GLsNqSLXSdug5YYpazHWwO
|
||||
RJZUtqCtDw+740aLB6TuGQCil8Jta96acf1/pbb9AoGAHgsLGROMhPGkhtsKopbZ
|
||||
DBk3MMQzQpGW4VNrsdB/IngfACWFuyUsbq2wz34hzqZhscPxUlWTvGYFncsmhXQK
|
||||
DzzUSurhAx1p4EuTvOwR9/+Ix6bZjXJRJ97PLWukoyKu0kHeinz1KHNHPqACWhrn
|
||||
TxAR+4Nxzl9BGraAYSDFzCw=
|
||||
-----END PRIVATE KEY-----
|
17
integration/fixtures/tcp/whoami-b.crt
Normal file
17
integration/fixtures/tcp/whoami-b.crt
Normal file
|
@ -0,0 +1,17 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICrDCCAZQCCQDcDAGQQnwhwTANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA13
|
||||
aG9hbWktYi50ZXN0MB4XDTE5MDIyNTE1NTM1NFoXDTIwMDIyNTE1NTM1NFowGDEW
|
||||
MBQGA1UEAwwNd2hvYW1pLWIudGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
|
||||
AQoCggEBANb0fChkS4+iY9fQ5REqZ05U7RZg/l+CBYkLmT2PxLaQrX7VmEWW0r4+
|
||||
APQXyx0oMow1wNIaPaaP825t+aH/EoKL5BKs0bGZl6Y6qhYnDxxlqZQEkFHbAU4J
|
||||
ueyyBl4bKyG1z3ESiNtnTps0YLQNuryeeOzfrIvhlasy7qp/p0kQEp7L8Jnc2/u1
|
||||
ZTxU2G8uwcGHZWzf013BU7ekfwEJFc6jEbJvDwYBfPmZzzNmd5l+GLng6D+t+dzc
|
||||
bRvDTNyTpc9DQKRbiGiGmZRB2QOfGMOkGlMSxpyksyW+0QTt6qpIbe2mJZEobxaL
|
||||
itDRKWy78ZtesVXAykTWyN0KOqpveY8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEA
|
||||
DklJ5gqIluh0M+5voOqx2qbFG1Eov3+5CbMTM3cw+6EijSks6bCMCHh8gyjvRjDA
|
||||
NGhrPT2d07c346lDJgrwUBDVHck8fj0ClsPe1KK8FTCbarhMUeUePn2IImGPBYcq
|
||||
U3Revb8IbAdh39OwsR7Mp8DK1jtfI6K5ORJHPEeeEJmzN5QntrH5+2tTUJo8T8I4
|
||||
jrywDkxtuvtFwQPwTRZABvmsnFF1xk152b1HApOK20R6eAH9M/o1ld3C1+ZPtIRU
|
||||
xklTPfLkQr2HJKzTqVyAKsdt/XQdAKO7jLWujc54qTBBFLbZdLsBivobkCipK/b5
|
||||
8krDBZkjG6RhpChzoIAeaA==
|
||||
-----END CERTIFICATE-----
|
28
integration/fixtures/tcp/whoami-b.key
Normal file
28
integration/fixtures/tcp/whoami-b.key
Normal file
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDW9HwoZEuPomPX
|
||||
0OURKmdOVO0WYP5fggWJC5k9j8S2kK1+1ZhFltK+PgD0F8sdKDKMNcDSGj2mj/Nu
|
||||
bfmh/xKCi+QSrNGxmZemOqoWJw8cZamUBJBR2wFOCbnssgZeGyshtc9xEojbZ06b
|
||||
NGC0Dbq8nnjs36yL4ZWrMu6qf6dJEBKey/CZ3Nv7tWU8VNhvLsHBh2Vs39NdwVO3
|
||||
pH8BCRXOoxGybw8GAXz5mc8zZneZfhi54Og/rfnc3G0bw0zck6XPQ0CkW4hohpmU
|
||||
QdkDnxjDpBpTEsacpLMlvtEE7eqqSG3tpiWRKG8Wi4rQ0Slsu/GbXrFVwMpE1sjd
|
||||
Cjqqb3mPAgMBAAECggEACqZcTGgDsl8aUUQBRWNzcNcWVAiEMdkwSwTvF7S6y0zJ
|
||||
u8H7ZF8/m7tYsr9HCe/G6Vl0bzRrn4f8SJlcR+FqWltx9lbnoMP6VnsLmENhJUgI
|
||||
KdQ8DkIqg2JJ+ucrF5iC/42RdIm1jCFHLLtgmyse+F9loF7InrmTf8LrPjlK4Xy6
|
||||
Edj8mM/DEyH1BrakoBm9RjAJi/+UtUNXtCYPA/uF4Efbc3rP9uk4ejzsIceaJ3TV
|
||||
lcL17JsZQ0Z2Cd2audtJW8TlTvMk9p8i4ekXNFCeUnHH4lXM8co6rhHrD+Mt5cVR
|
||||
2RROO8KxgRdOLHvkSMayQeMlSWX6tOedLtuYNqaxiQKBgQD7y2Db4KGy7JahlDkE
|
||||
4esk87uwur2hvHBIJNHtC7s0F/EN9ckPyekLB6Npv2YglQ7gv24G3jydZPzMSejf
|
||||
qRddUjuAU2o6nrKAQXDRJB/j1dugeYEWKc4C3Lrss/gGVCs+TqFHJCkuaHft0GKj
|
||||
ppunIaQ8ZeOAv7YmzHovw8/BywKBgQDai5a5cL86zovKTi0Q6T51T07/q/lMSoHu
|
||||
DEIKMGStnVRK55i3bnX/+3iJCMwSqByCmD9XrYYHNeeRBow/W4lGbyJQm/bokt4m
|
||||
pOSnQnUkwuKL+XI1kPFM14OvMSsMZF4GMplh7dSoN2808mSHI/Mcn03gq82CsItM
|
||||
pEBT46KezQKBgGfA9UeFN3wf6y3ngttVMGzIljWLrWpA2M+RhIM2C0y69NR4zAHa
|
||||
hFHMMvT3LmEMqtXHa9Ier0F4BIc1iWToKz2EDgqh1KsVC5632IIFbbKXQ+nLR3rX
|
||||
fRFG3St+ORx6gFsrUV+cMe/ykkCHVq3ykD79KMzOe0FpPeic51hZSnmjAoGBAJDo
|
||||
o708DCBzGe+/nFQtRBPGzYvrvPagJLzx9cwJwIf53Q15uSJPpQBh/s9mPOJWA+l4
|
||||
B/AcB9W6IVxhKhdMm55PTEKE19foolKfXVmmUERa0JqdgOQRwl4APLmqcW/bERks
|
||||
7dUoPKx5bUx/OLb+2FFvM9U4NaFlbEgaVOkK9CY1AoGBAPZcYhzBKsB39f8pKSR/
|
||||
wDLKTXdrh+c6JNDl5ZBvUI7PJ9yUhr2I+AMuqhppVdk5uPAHRwZJvjbX4t/Uyzdc
|
||||
LJ7o87ujJDq1CElcX04tZ3Q+YTEqgRuYoP4QAllBjbb3iBnSNOfkbbijaGPY7XB6
|
||||
ugI1J6omjblZScJZIRhikHpN
|
||||
-----END PRIVATE KEY-----
|
21
integration/fixtures/tcp/whoami-c.crt
Normal file
21
integration/fixtures/tcp/whoami-c.crt
Normal file
|
@ -0,0 +1,21 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDYDCCAkgCCQDtnVpsbiGA2DANBgkqhkiG9w0BAQsFADByMQswCQYDVQQGEwJm
|
||||
cjEQMA4GA1UECAwHdHJhZWZpazEPMA0GA1UEBwwGY2hlZXNlMRMwEQYDVQQKDApj
|
||||
b250YWlub3VzMRMwEQYDVQQLDApjb250YWlub3VzMRYwFAYDVQQDDA13aG9hbWkt
|
||||
Yy50ZXN0MB4XDTE5MDIyNTE1NTMwMloXDTIwMDIyNTE1NTMwMlowcjELMAkGA1UE
|
||||
BhMCZnIxEDAOBgNVBAgMB3RyYWVmaWsxDzANBgNVBAcMBmNoZWVzZTETMBEGA1UE
|
||||
CgwKY29udGFpbm91czETMBEGA1UECwwKY29udGFpbm91czEWMBQGA1UEAwwNd2hv
|
||||
YW1pLWMudGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALABMros
|
||||
UVUpKhUClQjw0wsr6nibhAzaI/NZCzfFyX3pjid+WH68thjuiRaEkihXVgeh14ss
|
||||
qbzvZZ41UYnF2ARKbLFNOOGUUWKYPReA14ik5B9x1Cd7bPCk8cxkwBEiya31JpTE
|
||||
p/F5+h+/f9vHDZV+DXZS4XfMAnpQ7Dsgf6qAtWs8o3jvIGv1KyWs7/3uAbKpW7e8
|
||||
cSfDYqjWuZgBkkOvHGfQHgHHEnPzEmnrWHDKas9A4LJckTQwcAYuXpVlqrupx8dK
|
||||
IwFkM8wrkBa1alZHQ1qKiG7BLF2TAscFbYr3/ZissQ+C2OgMpgg6mhoET4PThcHn
|
||||
zyrwk6CnvOZO7jcCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEACpLnRKsRIzpjXhS5
|
||||
bfmcQgwIwwAtJU4ZxrDg/Fj9dZ7fTApiDNkGh8EjvOIIjGVWivWPuvXGLXK/RK4H
|
||||
jj4CkdjzCRfLT+Cf20u0ScP4htx7n9Piufluo1AFEn5ZiAWWvFcbTLrROUQ0G10U
|
||||
dXXJdDIWjayI7Lbt8YN1B2RkTjoKLCNHWGDDaiqZFoX9uqN0KuglFvc01aBUXtiA
|
||||
Q3UJckIqaN225WRPFq/TMKdoZBlX4sGyTYGcxpDdyOrQ+w8pwocmW2G/pQE39wRn
|
||||
1H+AyavuFXfdTZpshy4KZuWb6MA3WLzoIgL0111VxhGUFNA0z169vMgd0AmMpLGo
|
||||
8qIPSA==
|
||||
-----END CERTIFICATE-----
|
28
integration/fixtures/tcp/whoami-c.key
Normal file
28
integration/fixtures/tcp/whoami-c.key
Normal file
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCwATK6LFFVKSoV
|
||||
ApUI8NMLK+p4m4QM2iPzWQs3xcl96Y4nflh+vLYY7okWhJIoV1YHodeLLKm872We
|
||||
NVGJxdgESmyxTTjhlFFimD0XgNeIpOQfcdQne2zwpPHMZMARIsmt9SaUxKfxefof
|
||||
v3/bxw2Vfg12UuF3zAJ6UOw7IH+qgLVrPKN47yBr9SslrO/97gGyqVu3vHEnw2Ko
|
||||
1rmYAZJDrxxn0B4BxxJz8xJp61hwymrPQOCyXJE0MHAGLl6VZaq7qcfHSiMBZDPM
|
||||
K5AWtWpWR0NaiohuwSxdkwLHBW2K9/2YrLEPgtjoDKYIOpoaBE+D04XB588q8JOg
|
||||
p7zmTu43AgMBAAECggEAGoEDr49u7AEX6jQKV19UmJETbPgWSY0r7sBQ9SQetIxQ
|
||||
MNhQ4Tzvuw9oq3BpRhPoy5tuhvHB2ca/KbTjw3h8kCDY/1Yeo7GfE9bTFE/9pQEX
|
||||
rTiJ9ywZ+p8MHnhph+sSLdUF60817yIsLU28Jk9yVzm1M0VF2LFrChpXiIvbTcR1
|
||||
+dIbK5cWJnmlbL+dqPK8aujJcVUN25qowPvs/1uyr6pWlByNNo79e0UF0TAr/i0y
|
||||
YP13R5amTfkh+1ISleMTSNFhCTv+4fso95GKSp1Q2Ogg8raa5F1C4UZNS82haQBG
|
||||
8njseclsZaYI5hJH9kxPR1ml06ANqtqsMtirK0yGYQKBgQDjHy978fJ3aaI4XPCp
|
||||
zi63QCCiR2E7y0pZoNwOQtzK5h399QzWMj10Iv+dX9GVfpo1dHlJGrbOTu+sb4pH
|
||||
Ns/JEa3hazOymnloh3GDhGjiah3ygYUBuK1uQph5dyh2M5M6IxQYXp17un/e7gFU
|
||||
f4/ip7UMNued9PR8SEJ6IU4FBwKBgQDGYiZk4gDKlikIQIZBwxnc9vOWVtg1HFYP
|
||||
IuMXKDKnyY29jSqJ2cCpYsIx+sU+siNT7svW27CAz4evRAwWIBrywtfSRDI+VrrH
|
||||
4JyjEfwhqXiDicl8XK8+1K1THvfwI8Fr/y8nB768HaM6OHcB/Tn+arzvvl1cRfsU
|
||||
AvQIe88xUQKBgFtq8wb1pP3Ro/0B09DVb9JM2pXXG1khA4U+DTUkTpDQvSO6Xfdd
|
||||
c4TqjW6/4bFFqzZ28latjQVPmoMSxlrRwiMRnaaNKtrp+JJNajBgvILd6b3xyiKe
|
||||
PhiSb6L8hmnFaq5M7kq80rC5qbyGmjxzt+uoS2RmOSZIMZxQzYkxHKFDAoGAZ7i/
|
||||
bDWBxmn2MBtUVqPELPRs7SigyDv1ftp1sxDQU0udMQLSv9o60hURhYIgiKQotmR+
|
||||
7OpWATMANRG15AeLL2vR3VzMjC1aYNC99MCde5gYq2VqE/x9n7Mgn/nsFgELywRT
|
||||
yetRvRcd1X3aMw8LuEpkWFDGjU0FdjQJFTpuXNECgYEAwIKGhL+xJCgbIlwv49CW
|
||||
DXvc4H6ISYA2aRGhx8wpuiXLNtXexgW8e6kuL8jjaKkQblxgcPEQYJzGCwaJqVZj
|
||||
h8IL+p+OGR65XLNwE2zMyGGFNdgxrl12O6A6c9ax1hXbeRjl6WYI9w7mFiQYFdla
|
||||
Zycs5m7Ie5HwaLXWWM1Zw/0=
|
||||
-----END PRIVATE KEY-----
|
|
@ -7,8 +7,8 @@ logLevel = "DEBUG"
|
|||
responseHeaderTimeout = "300ms"
|
||||
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[accessLog]
|
||||
|
@ -20,24 +20,24 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Path(`/dialTimeout`)"
|
||||
|
||||
[Routers.router2]
|
||||
[http.routers.router2]
|
||||
Service = "service2"
|
||||
Rule = "Path(`/responseHeaderTimeout`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://50.255.255.1"
|
||||
Weight = 1
|
||||
|
||||
[Services.service2]
|
||||
[Services.service2.LoadBalancer]
|
||||
[[Services.service2.LoadBalancer.Servers]]
|
||||
[http.services.service2]
|
||||
[http.services.service2.LoadBalancer]
|
||||
[[http.services.service2.LoadBalancer.Servers]]
|
||||
URL = "http://{{.TimeoutEndpoint}}:9000"
|
||||
Weight = 1
|
||||
|
|
|
@ -7,23 +7,23 @@ debug = true
|
|||
[serversTransport]
|
||||
rootCAs = [ """{{ .RootCertContent }}""" ]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.https]
|
||||
[entrypoints]
|
||||
[entrypoints.web-secure]
|
||||
address = ":8443"
|
||||
|
||||
[entryPoints.https.tls]
|
||||
|
||||
[entryPoints.https.tls.ClientCA]
|
||||
files = [ """{{ .RootCertContent }}""" ]
|
||||
optional = false
|
||||
|
||||
[entryPoints.https.tls.DefaultCertificate]
|
||||
certFile = """{{ .ServerCertContent }}"""
|
||||
keyFile = """{{ .ServerKeyContent }}"""
|
||||
|
||||
[api]
|
||||
|
||||
[providers]
|
||||
[providers.docker]
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
watch = true
|
||||
|
||||
[providers.file]
|
||||
|
||||
[tlsOptions.default.ClientCA]
|
||||
files = [ """{{ .RootCertContent }}""" ]
|
||||
optional = false
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = """{{ .ServerCertContent }}"""
|
||||
keyFile = """{{ .ServerKeyContent }}"""
|
||||
|
|
|
@ -6,8 +6,8 @@ debug = true
|
|||
|
||||
[api]
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[tracing]
|
||||
|
@ -23,55 +23,55 @@ debug = true
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Middlewares = ["retry", "ratelimit"]
|
||||
Rule = "Path(`/ratelimit`)"
|
||||
[Routers.router2]
|
||||
[http.routers.router2]
|
||||
Service = "service2"
|
||||
Middlewares = ["retry"]
|
||||
Rule = "Path(`/retry`)"
|
||||
[Routers.router3]
|
||||
[http.routers.router3]
|
||||
Service = "service3"
|
||||
Middlewares = ["retry", "basic-auth"]
|
||||
Rule = "Path(`/auth`)"
|
||||
|
||||
[Middlewares]
|
||||
[Middlewares.retry.retry]
|
||||
[http.middlewares]
|
||||
[http.middlewares.retry.retry]
|
||||
attempts = 3
|
||||
[Middlewares.basic-auth.BasicAuth]
|
||||
[http.middlewares.basic-auth.BasicAuth]
|
||||
users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
|
||||
[Middlewares.ratelimit.RateLimit]
|
||||
[http.middlewares.ratelimit.RateLimit]
|
||||
extractorfunc = "client.ip"
|
||||
[Middlewares.ratelimit.RateLimit.rateset.rateset1]
|
||||
[http.middlewares.ratelimit.RateLimit.rateset.rateset1]
|
||||
period = "60s"
|
||||
average = 4
|
||||
burst = 5
|
||||
[Middlewares.ratelimit.RateLimit.rateset.rateset2]
|
||||
[http.middlewares.ratelimit.RateLimit.rateset.rateset2]
|
||||
period = "3s"
|
||||
average = 1
|
||||
burst = 2
|
||||
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
passHostHeader = true
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
||||
Weight = 1
|
||||
|
||||
[Services.service2]
|
||||
[http.services.service2]
|
||||
passHostHeader = true
|
||||
[Services.service2.LoadBalancer]
|
||||
[[Services.service2.LoadBalancer.Servers]]
|
||||
[http.services.service2.LoadBalancer]
|
||||
[[http.services.service2.LoadBalancer.Servers]]
|
||||
URL = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
||||
Weight = 1
|
||||
|
||||
[Services.service3]
|
||||
[http.services.service3]
|
||||
passHostHeader = true
|
||||
[Services.service3.LoadBalancer]
|
||||
[[Services.service3.LoadBalancer.Servers]]
|
||||
[http.services.service3.LoadBalancer]
|
||||
[[http.services.service3.LoadBalancer.Servers]]
|
||||
URL = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
||||
Weight = 1
|
||||
|
|
|
@ -11,8 +11,8 @@ checkNewVersion = false
|
|||
[accessLog]
|
||||
filePath = "access.log"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[log]
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
[entrypoints]
|
||||
[entrypoints.web]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
@ -10,15 +10,15 @@ logLevel = "DEBUG"
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "PathPrefix(`/ws`)"
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
passHostHeader = true
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "{{ .WebsocketServer }}"
|
||||
Weight = 1
|
||||
|
|
|
@ -4,13 +4,9 @@ logLevel = "DEBUG"
|
|||
[serversTransport]
|
||||
insecureSkipVerify=true
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.wss]
|
||||
[entrypoints]
|
||||
[entrypoints.wss]
|
||||
address = ":8000"
|
||||
[entryPoints.wss.tls]
|
||||
[entryPoints.wss.tls.DefaultCertificate]
|
||||
certFile = "resources/tls/local.cert"
|
||||
keyFile = "resources/tls/local.key"
|
||||
|
||||
[api]
|
||||
|
||||
|
@ -18,15 +14,20 @@ insecureSkipVerify=true
|
|||
[providers]
|
||||
[providers.file]
|
||||
|
||||
[Routers]
|
||||
[Routers.router1]
|
||||
[http.routers]
|
||||
[http.routers.router1]
|
||||
Service = "service1"
|
||||
Rule = "Path(`/echo`,`/ws`)"
|
||||
[http.routers.router1.tls]
|
||||
|
||||
[Services]
|
||||
[Services.service1]
|
||||
[Services.service1.LoadBalancer]
|
||||
[http.services]
|
||||
[http.services.service1]
|
||||
[http.services.service1.LoadBalancer]
|
||||
PassHostHeader = true
|
||||
[[Services.service1.LoadBalancer.Servers]]
|
||||
[[http.services.service1.LoadBalancer.Servers]]
|
||||
URL = "{{ .WebsocketServer }}"
|
||||
Weight = 1
|
||||
|
||||
[tlsStores.default.DefaultCertificate]
|
||||
certFile = "resources/tls/local.cert"
|
||||
keyFile = "resources/tls/local.key"
|
||||
|
|
|
@ -720,7 +720,6 @@ func modifyCertificateConfFileContent(c *check.C, certFileName, confFileName, en
|
|||
CertFile: traefiktls.FileOrContent("fixtures/https/" + certFileName + ".cert"),
|
||||
KeyFile: traefiktls.FileOrContent("fixtures/https/" + certFileName + ".key"),
|
||||
},
|
||||
EntryPoints: []string{entryPoint},
|
||||
}},
|
||||
}
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ func init() {
|
|||
check.Suite(&HostResolverSuite{})
|
||||
check.Suite(&HTTPSSuite{})
|
||||
check.Suite(&LogRotationSuite{})
|
||||
check.Suite(&MarathonSuite{})
|
||||
check.Suite(&MarathonSuite15{})
|
||||
// check.Suite(&MarathonSuite{})
|
||||
// check.Suite(&MarathonSuite15{})
|
||||
check.Suite(&RateLimitSuite{})
|
||||
check.Suite(&RestSuite{})
|
||||
check.Suite(&RetrySuite{})
|
||||
|
@ -73,8 +73,9 @@ func init() {
|
|||
}
|
||||
if *host {
|
||||
// tests launched from the host
|
||||
check.Suite(&K8sSuite{})
|
||||
// check.Suite(&K8sSuite{})
|
||||
check.Suite(&ProxyProtocolSuite{})
|
||||
check.Suite(&TCPSuite{})
|
||||
// FIXME Provider tests
|
||||
// check.Suite(&Etcd3Suite{})
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ func (s *MarathonSuite15) TestConfigurationUpdate(c *check.C) {
|
|||
CPU(0.1).
|
||||
Memory(32).
|
||||
EmptyNetworks().
|
||||
AddLabel("traefik.Routers.rt.Rule", "PathPrefix(`/service`)")
|
||||
AddLabel("traefik.http.Routers.rt.Rule", "PathPrefix(`/service`)")
|
||||
app.Container.
|
||||
Expose(80).
|
||||
Docker.
|
||||
|
@ -117,7 +117,7 @@ func (s *MarathonSuite15) TestConfigurationUpdate(c *check.C) {
|
|||
CPU(0.1).
|
||||
Memory(32).
|
||||
EmptyNetworks().
|
||||
AddLabel("traefik.Routers.app.Rule", "PathPrefix(`/app`)")
|
||||
AddLabel("traefik.http.Routers.app.Rule", "PathPrefix(`/app`)")
|
||||
app.Container.
|
||||
Expose(80).
|
||||
Docker.
|
||||
|
|
|
@ -108,7 +108,7 @@ func (s *MarathonSuite) TestConfigurationUpdate(c *check.C) {
|
|||
Name("/whoami").
|
||||
CPU(0.1).
|
||||
Memory(32).
|
||||
AddLabel("traefik.Routers.rt.Rule", "PathPrefix(`/service`)")
|
||||
AddLabel("traefik.http.Routers.rt.Rule", "PathPrefix(`/service`)")
|
||||
app.Container.Docker.Bridged().
|
||||
Expose(80).
|
||||
Container("containous/whoami")
|
||||
|
@ -125,7 +125,7 @@ func (s *MarathonSuite) TestConfigurationUpdate(c *check.C) {
|
|||
Name("/whoami").
|
||||
CPU(0.1).
|
||||
Memory(32).
|
||||
AddLabel("traefik.Routers.app.Rule", "PathPrefix(`/app`)")
|
||||
AddLabel("traefik.http.Routers.app.Rule", "PathPrefix(`/app`)")
|
||||
app.Container.Docker.Bridged().
|
||||
Expose(80).
|
||||
Container("containous/whoami")
|
||||
|
|
|
@ -2,78 +2,78 @@ server0:
|
|||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt-server0.entryPoints=http
|
||||
- traefik.routers.rt-server0.rule=Path("/test")
|
||||
- traefik.services.service1.loadbalancer.server.port=80
|
||||
- traefik.http.routers.rt-server0.entryPoints=web
|
||||
- traefik.http.routers.rt-server0.rule=Path("/test")
|
||||
- traefik.http.services.service1.loadbalancer.server.port=80
|
||||
server1:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt-server1.entryPoints=http
|
||||
- traefik.routers.rt-server1.rule=Host("frontend1.docker.local")
|
||||
- traefik.services.service1.loadbalancer.server.port=80
|
||||
- traefik.http.routers.rt-server1.entryPoints=web
|
||||
- traefik.http.routers.rt-server1.rule=Host("frontend1.docker.local")
|
||||
- traefik.http.services.service1.loadbalancer.server.port=80
|
||||
server2:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt-server2.entryPoints=http
|
||||
- traefik.routers.rt-server2.rule=Host("frontend2.docker.local")
|
||||
- traefik.services.service2.loadbalancer.server.port=80
|
||||
- traefik.services.service2.loadbalancer.method=drr
|
||||
- traefik.http.routers.rt-server2.entryPoints=web
|
||||
- traefik.http.routers.rt-server2.rule=Host("frontend2.docker.local")
|
||||
- traefik.http.services.service2.loadbalancer.server.port=80
|
||||
- traefik.http.services.service2.loadbalancer.method=drr
|
||||
server3:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt-server3.entryPoints=http
|
||||
- traefik.routers.rt-server3.rule=Host("frontend2.docker.local")
|
||||
- traefik.services.service2.loadbalancer.server.port=80
|
||||
- traefik.services.service2.loadbalancer.method=drr
|
||||
- traefik.http.routers.rt-server3.entryPoints=web
|
||||
- traefik.http.routers.rt-server3.rule=Host("frontend2.docker.local")
|
||||
- traefik.http.services.service2.loadbalancer.server.port=80
|
||||
- traefik.http.services.service2.loadbalancer.method=drr
|
||||
authFrontend:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt-authFrontend.entryPoints=httpFrontendAuth
|
||||
- traefik.routers.rt-authFrontend.rule=Host("frontend.auth.docker.local")
|
||||
- traefik.routers.rt-authFrontend.middlewares=basicauth
|
||||
- traefik.middlewares.basicauth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/
|
||||
- traefik.services.service3.loadbalancer.server.port=80
|
||||
- traefik.http.routers.rt-authFrontend.entryPoints=httpFrontendAuth
|
||||
- traefik.http.routers.rt-authFrontend.rule=Host("frontend.auth.docker.local")
|
||||
- traefik.http.routers.rt-authFrontend.middlewares=basicauth
|
||||
- traefik.http.middlewares.basicauth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/
|
||||
- traefik.http.services.service3.loadbalancer.server.port=80
|
||||
digestAuthMiddleware:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt-digestAuthMiddleware.entryPoints=digestAuth
|
||||
- traefik.routers.rt-digestAuthMiddleware.rule=Host("entrypoint.digest.auth.docker.local")
|
||||
- traefik.routers.rt-digestAuthMiddleware.middlewares=digestauth
|
||||
- traefik.middlewares.digestauth.digestauth.users=test:traefik:a2688e031edb4be6a3797f3882655c05, test2:traefik:518845800f9e2bfb1f1f740ec24f074e
|
||||
- traefik.services.service3.loadbalancer.server.port=80
|
||||
- traefik.http.routers.rt-digestAuthMiddleware.entryPoints=digestAuth
|
||||
- traefik.http.routers.rt-digestAuthMiddleware.rule=Host("entrypoint.digest.auth.docker.local")
|
||||
- traefik.http.routers.rt-digestAuthMiddleware.middlewares=digestauth
|
||||
- traefik.http.middlewares.digestauth.digestauth.users=test:traefik:a2688e031edb4be6a3797f3882655c05, test2:traefik:518845800f9e2bfb1f1f740ec24f074e
|
||||
- traefik.http.services.service3.loadbalancer.server.port=80
|
||||
frontendRedirect:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt-frontendRedirect.entryPoints=frontendRedirect
|
||||
- traefik.routers.rt-frontendRedirect.rule=Path("/test")
|
||||
- traefik.routers.rt-frontendRedirect.middlewares=redirecthttp
|
||||
- traefik.middlewares.redirecthttp.redirectScheme.scheme=http
|
||||
- traefik.middlewares.redirecthttp.redirectScheme.port=8000
|
||||
- traefik.services.service3.loadbalancer.server.port=80
|
||||
- traefik.http.routers.rt-frontendRedirect.entryPoints=frontendRedirect
|
||||
- traefik.http.routers.rt-frontendRedirect.rule=Path("/test")
|
||||
- traefik.http.routers.rt-frontendRedirect.middlewares=redirecthttp
|
||||
- traefik.http.middlewares.redirecthttp.redirectScheme.scheme=http
|
||||
- traefik.http.middlewares.redirecthttp.redirectScheme.port=8000
|
||||
- traefik.http.services.service3.loadbalancer.server.port=80
|
||||
rateLimit:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt-rateLimit.entryPoints=httpRateLimit
|
||||
- traefik.routers.rt-rateLimit.rule=Host("ratelimit.docker.local")
|
||||
- traefik.routers.rt-rateLimit.middlewares=rate
|
||||
- traefik.middlewares.rate.ratelimit.extractorfunc=client.ip
|
||||
- traefik.middlewares.rate.ratelimit.rateset.Rate0.average=1
|
||||
- traefik.middlewares.rate.ratelimit.rateset.Rate0.burst=2
|
||||
- traefik.middlewares.rate.ratelimit.rateset.Rate0.period=10s
|
||||
- traefik.services.service3.loadbalancer.server.port=80
|
||||
- traefik.http.routers.rt-rateLimit.entryPoints=httpRateLimit
|
||||
- traefik.http.routers.rt-rateLimit.rule=Host("ratelimit.docker.local")
|
||||
- traefik.http.routers.rt-rateLimit.middlewares=rate
|
||||
- traefik.http.middlewares.rate.ratelimit.extractorfunc=client.ip
|
||||
- traefik.http.middlewares.rate.ratelimit.rateset.Rate0.average=1
|
||||
- traefik.http.middlewares.rate.ratelimit.rateset.Rate0.burst=2
|
||||
- traefik.http.middlewares.rate.ratelimit.rateset.Rate0.period=10s
|
||||
- traefik.http.services.service3.loadbalancer.server.port=80
|
||||
frontendWhitelist:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt-frontendWhitelist.entryPoints=http
|
||||
- traefik.routers.rt-frontendWhitelist.rule=Host("frontend.whitelist.docker.local")
|
||||
- traefik.routers.rt-frontendWhitelist.middlewares=wl
|
||||
- traefik.middlewares.wl.ipwhitelist.sourcerange=8.8.8.8/32
|
||||
- traefik.services.service3.loadbalancer.server.port=80
|
||||
- traefik.http.routers.rt-frontendWhitelist.entryPoints=web
|
||||
- traefik.http.routers.rt-frontendWhitelist.rule=Host("frontend.whitelist.docker.local")
|
||||
- traefik.http.routers.rt-frontendWhitelist.middlewares=wl
|
||||
- traefik.http.middlewares.wl.ipwhitelist.sourcerange=8.8.8.8/32
|
||||
- traefik.http.services.service3.loadbalancer.server.port=80
|
||||
|
|
|
@ -2,7 +2,7 @@ whoami1:
|
|||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.router1.rule=PathPrefix("/whoami")
|
||||
- traefik.http.routers.router1.rule=PathPrefix("/whoami")
|
||||
|
||||
whoami2:
|
||||
image: containous/whoami
|
||||
|
|
|
@ -2,5 +2,5 @@ server1:
|
|||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.services.service1.loadbalancer.server.port=80
|
||||
- traefik.routers.router1.rule=Host("github.com")
|
||||
- traefik.http.services.service1.loadbalancer.server.port=80
|
||||
- traefik.http.routers.router1.rule=Host("github.com")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
whoami1:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.Routers.RouterMini.Rule=PathPrefix("/whoami")
|
||||
- traefik.http.Routers.RouterMini.Rule=PathPrefix("/whoami")
|
||||
- traefik.enable=true
|
||||
|
||||
|
|
32
integration/resources/compose/tcp.yml
Normal file
32
integration/resources/compose/tcp.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
whoami-a:
|
||||
image: containous/whoamitcp
|
||||
command: -name whoami-a -certFile /certs/whoami-a.crt -keyFile /certs/whoami-a.key
|
||||
volumes:
|
||||
- ../../fixtures/tcp:/certs
|
||||
ports:
|
||||
- "8081:8080"
|
||||
|
||||
whoami-b:
|
||||
image: containous/whoamitcp
|
||||
command: -name whoami-b -certFile /certs/whoami-b.crt -keyFile /certs/whoami-b.key
|
||||
volumes:
|
||||
- ../../fixtures/tcp:/certs
|
||||
ports:
|
||||
- "8082:8080"
|
||||
|
||||
whoami-no-cert:
|
||||
image: containous/whoamitcp
|
||||
command: -name whoami-no-cert
|
||||
ports:
|
||||
- "8083:8080"
|
||||
|
||||
whoami-no-tls:
|
||||
image: containous/whoamitcp
|
||||
command: -name whoami-no-tls
|
||||
ports:
|
||||
- "8084:8080"
|
||||
|
||||
whoami:
|
||||
image: containous/whoami
|
||||
ports:
|
||||
- "8085:80"
|
|
@ -1,7 +1,7 @@
|
|||
whoami:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.frontend.passTLSClientCert.pem=true
|
||||
- traefik.routers.route1.rule=PathPrefix(`/`)
|
||||
- traefik.routers.route1.middlewares=passtls
|
||||
- traefik.middlewares.passtls.passtlsclientcert.pem=true
|
||||
- traefik.http.routers.route1.rule=PathPrefix(`/`)
|
||||
- traefik.http.routers.route1.middlewares=passtls
|
||||
- traefik.http.routers.route1.tls=true
|
||||
- traefik.http.middlewares.passtls.passtlsclientcert.pem=true
|
||||
|
|
|
@ -2,33 +2,33 @@ noOverrideWhitelist:
|
|||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt1.rule=Host("no.override.whitelist.docker.local")
|
||||
- traefik.routers.rt1.middlewares=wl1
|
||||
- traefik.middlewares.wl1.ipwhiteList.sourceRange=8.8.8.8
|
||||
- traefik.http.routers.rt1.rule=Host("no.override.whitelist.docker.local")
|
||||
- traefik.http.routers.rt1.middlewares=wl1
|
||||
- traefik.http.middlewares.wl1.ipwhiteList.sourceRange=8.8.8.8
|
||||
|
||||
overrideIPStrategyRemoteAddrWhitelist:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt2.rule=Host("override.remoteaddr.whitelist.docker.local")
|
||||
- traefik.routers.rt2.middlewares=wl2
|
||||
- traefik.middlewares.wl2.ipwhitelist.sourceRange=8.8.8.8
|
||||
- traefik.middlewares.wl2.ipwhitelist.ipStrategy=true
|
||||
- traefik.http.routers.rt2.rule=Host("override.remoteaddr.whitelist.docker.local")
|
||||
- traefik.http.routers.rt2.middlewares=wl2
|
||||
- traefik.http.middlewares.wl2.ipwhitelist.sourceRange=8.8.8.8
|
||||
- traefik.http.middlewares.wl2.ipwhitelist.ipStrategy=true
|
||||
|
||||
overrideIPStrategyDepthWhitelist:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt3.rule=Host("override.depth.whitelist.docker.local")
|
||||
- traefik.routers.rt3.middlewares=wl3
|
||||
- traefik.middlewares.wl3.ipwhitelist.sourceRange=8.8.8.8
|
||||
- traefik.middlewares.wl3.ipwhitelist.ipStrategy.depth=3
|
||||
- traefik.http.routers.rt3.rule=Host("override.depth.whitelist.docker.local")
|
||||
- traefik.http.routers.rt3.middlewares=wl3
|
||||
- traefik.http.middlewares.wl3.ipwhitelist.sourceRange=8.8.8.8
|
||||
- traefik.http.middlewares.wl3.ipwhitelist.ipStrategy.depth=3
|
||||
|
||||
overrideIPStrategyExcludedIPsWhitelist:
|
||||
image: containous/whoami
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.routers.rt4.rule=Host("override.excludedips.whitelist.docker.local")
|
||||
- traefik.routers.rt4.middlewares=wl4
|
||||
- traefik.middlewares.wl4.ipwhitelist.sourceRange=8.8.8.8
|
||||
- traefik.middlewares.wl4.ipwhitelist.ipStrategy.excludedIPs=10.0.0.1,10.0.0.2
|
||||
- traefik.http.routers.rt4.rule=Host("override.excludedips.whitelist.docker.local")
|
||||
- traefik.http.routers.rt4.middlewares=wl4
|
||||
- traefik.http.middlewares.wl4.ipwhitelist.sourceRange=8.8.8.8
|
||||
- traefik.http.middlewares.wl4.ipwhitelist.ipStrategy.excludedIPs=10.0.0.1,10.0.0.2
|
||||
|
|
|
@ -32,10 +32,10 @@ func (s *RestSuite) TestSimpleConfiguration(c *check.C) {
|
|||
err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
config := config.Configuration{
|
||||
config := config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"router1": {
|
||||
EntryPoints: []string{"http"},
|
||||
EntryPoints: []string{"web"},
|
||||
Middlewares: []string{},
|
||||
Service: "service1",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
|
|
|
@ -449,10 +449,10 @@ func (s *SimpleSuite) TestMultiprovider(c *check.C) {
|
|||
err = try.GetRequest("http://127.0.0.1:8080/api/providers/file/services", 1000*time.Millisecond, try.BodyContains("service"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
config := config.Configuration{
|
||||
config := config.HTTPConfiguration{
|
||||
Routers: map[string]*config.Router{
|
||||
"router1": {
|
||||
EntryPoints: []string{"http"},
|
||||
EntryPoints: []string{"web"},
|
||||
Middlewares: []string{"file.customheader"},
|
||||
Service: "file.service",
|
||||
Rule: "PathPrefix(`/`)",
|
||||
|
|
165
integration/tcp_test.go
Normal file
165
integration/tcp_test.go
Normal file
|
@ -0,0 +1,165 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/containous/traefik/integration/try"
|
||||
"github.com/go-check/check"
|
||||
checker "github.com/vdemeester/shakers"
|
||||
)
|
||||
|
||||
type TCPSuite struct{ BaseSuite }
|
||||
|
||||
func (s *TCPSuite) SetUpSuite(c *check.C) {
|
||||
s.createComposeProject(c, "tcp")
|
||||
s.composeProject.Start(c)
|
||||
}
|
||||
|
||||
func (s *TCPSuite) TestMixed(c *check.C) {
|
||||
file := s.adaptFile(c, "fixtures/tcp/mixed.toml", struct {
|
||||
}{})
|
||||
defer os.Remove(file)
|
||||
|
||||
cmd, display := s.traefikCmd(withConfigFile(file))
|
||||
defer display(c)
|
||||
|
||||
err := cmd.Start()
|
||||
c.Assert(err, checker.IsNil)
|
||||
defer cmd.Process.Kill()
|
||||
|
||||
err = try.GetRequest("http://127.0.0.1:8080/api/providers/file/routers", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.BodyContains("Path(`/test`)"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
//Traefik passes through, termination handled by whoami-a
|
||||
out, err := guessWho("127.0.0.1:8093", "whoami-a.test", true)
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(out, checker.Contains, "whoami-a")
|
||||
|
||||
//Traefik passes through, termination handled by whoami-b
|
||||
out, err = guessWho("127.0.0.1:8093", "whoami-b.test", true)
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(out, checker.Contains, "whoami-b")
|
||||
|
||||
//Termination handled by traefik
|
||||
out, err = guessWho("127.0.0.1:8093", "whoami-c.test", true)
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(out, checker.Contains, "whoami-no-cert")
|
||||
|
||||
tr1 := &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
},
|
||||
}
|
||||
req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:8093/whoami/", nil)
|
||||
c.Assert(err, checker.IsNil)
|
||||
err = try.RequestWithTransport(req, 10*time.Second, tr1, try.StatusCodeIs(http.StatusOK))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
req, err = http.NewRequest(http.MethodGet, "https://127.0.0.1:8093/not-found/", nil)
|
||||
c.Assert(err, checker.IsNil)
|
||||
err = try.RequestWithTransport(req, 10*time.Second, tr1, try.StatusCodeIs(http.StatusNotFound))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
err = try.GetRequest("http://127.0.0.1:8093/test", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK))
|
||||
c.Assert(err, checker.IsNil)
|
||||
err = try.GetRequest("http://127.0.0.1:8093/not-found", 500*time.Millisecond, try.StatusCodeIs(http.StatusNotFound))
|
||||
c.Assert(err, checker.IsNil)
|
||||
}
|
||||
|
||||
func (s *TCPSuite) TestNonTLSFallback(c *check.C) {
|
||||
file := s.adaptFile(c, "fixtures/tcp/non-tls-fallback.toml", struct {
|
||||
}{})
|
||||
defer os.Remove(file)
|
||||
|
||||
cmd, display := s.traefikCmd(withConfigFile(file))
|
||||
defer display(c)
|
||||
|
||||
err := cmd.Start()
|
||||
c.Assert(err, checker.IsNil)
|
||||
defer cmd.Process.Kill()
|
||||
|
||||
err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
//Traefik passes through, termination handled by whoami-a
|
||||
out, err := guessWho("127.0.0.1:8093", "whoami-a.test", true)
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(out, checker.Contains, "whoami-a")
|
||||
|
||||
//Traefik passes through, termination handled by whoami-b
|
||||
out, err = guessWho("127.0.0.1:8093", "whoami-b.test", true)
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(out, checker.Contains, "whoami-b")
|
||||
|
||||
//Termination handled by traefik
|
||||
out, err = guessWho("127.0.0.1:8093", "whoami-c.test", true)
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(out, checker.Contains, "whoami-no-cert")
|
||||
|
||||
out, err = guessWho("127.0.0.1:8093", "", false)
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(out, checker.Contains, "whoami-no-tls")
|
||||
}
|
||||
|
||||
func (s *TCPSuite) TestNonTlsTcp(c *check.C) {
|
||||
|
||||
file := s.adaptFile(c, "fixtures/tcp/non-tls.toml", struct {
|
||||
}{})
|
||||
defer os.Remove(file)
|
||||
|
||||
cmd, display := s.traefikCmd(withConfigFile(file))
|
||||
defer display(c)
|
||||
|
||||
err := cmd.Start()
|
||||
c.Assert(err, checker.IsNil)
|
||||
defer cmd.Process.Kill()
|
||||
|
||||
err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
//Traefik will forward every requests on the given port to whoami-no-tls
|
||||
out, err := guessWho("127.0.0.1:8093", "", false)
|
||||
c.Assert(err, checker.IsNil)
|
||||
c.Assert(out, checker.Contains, "whoami-no-tls")
|
||||
}
|
||||
|
||||
func guessWho(addr, serverName string, tlsCall bool) (string, error) {
|
||||
var conn net.Conn
|
||||
var err error
|
||||
|
||||
if tlsCall {
|
||||
conn, err = tls.Dial("tcp", addr, &tls.Config{ServerName: serverName, InsecureSkipVerify: true})
|
||||
} else {
|
||||
tcpAddr, err2 := net.ResolveTCPAddr("tcp", addr)
|
||||
if err2 != nil {
|
||||
return "", err2
|
||||
}
|
||||
|
||||
conn, err = net.DialTCP("tcp", nil, tcpAddr)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
_, err = conn.Write([]byte("WHO"))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
out := make([]byte, 2048)
|
||||
n, err := conn.Read(out)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return string(out[:n]), nil
|
||||
}
|
|
@ -132,6 +132,6 @@ func (s *TracingSuite) TestZipkinAuth(c *check.C) {
|
|||
err = try.GetRequest("http://127.0.0.1:8000/auth", 500*time.Millisecond, try.StatusCodeIs(http.StatusUnauthorized))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
err = try.GetRequest("http://"+s.ZipkinIP+":9411/api/v2/spans?serviceName=tracing", 20*time.Second, try.BodyContains("entrypoint http", "file.basic-auth"))
|
||||
err = try.GetRequest("http://"+s.ZipkinIP+":9411/api/v2/spans?serviceName=tracing", 20*time.Second, try.BodyContains("entrypoint web", "file.basic-auth"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue