Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
f19a3b24
Commit
f19a3b24
authored
Mar 30, 2018
by
Ruslan Drozhdzh
Committed by
Miek Gieben
Mar 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin/forward: improve tls configuration (#1643)
parent
0e0a641f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
plugin/forward/README.md
plugin/forward/README.md
+8
-2
plugin/forward/setup.go
plugin/forward/setup.go
+2
-2
No files found.
plugin/forward/README.md
View file @
f19a3b24
...
...
@@ -60,8 +60,14 @@ forward FROM TO... {
an upstream to be down. If 0, the upstream will never be marked as down (nor health checked).
Default is 2.
*
`expire`
**DURATION**
, expire (cached) connections after this time, the default is 10s.
*
`tls`
**CERT**
**KEY**
**CA**
define the TLS properties for TLS; if you leave this out the
system's configuration will be used.
*
`tls`
**CERT**
**KEY**
**CA**
define the TLS properties for TLS connection. From 0 to 3 arguments can be
provided with the meaning as described below
*
`tls`
- no client authentication is used, and the system CAs are used to verify the server certificate
*
`tls`
**CA**
- no client authentication is used, and the file CA is used to verify the server certificate
*
`tls`
**CERT**
**KEY**
- client authentication is used with the specified cert/key pair.
The server certificate is verified with the system CAs
*
`tls`
**CERT**
**KEY**
**CA**
- client authentication is used with the specified cert/key pair.
The server certificate is verified using the specified CA file
*
`tls_servername`
**NAME**
allows you to set a server name in the TLS configuration; for instance 9.9.9.9
needs this to be set to
`dns.quad9.net`
.
*
`policy`
specifies the policy to use for selecting upstream servers. The default is
`random`
.
...
...
plugin/forward/setup.go
View file @
f19a3b24
...
...
@@ -200,11 +200,11 @@ func parseBlock(c *caddy.Controller, f *Forward) error {
f
.
forceTCP
=
true
case
"tls"
:
args
:=
c
.
RemainingArgs
()
if
len
(
args
)
!=
3
{
if
len
(
args
)
>
3
{
return
c
.
ArgErr
()
}
tlsConfig
,
err
:=
pkgtls
.
NewTLSConfig
(
args
[
0
],
args
[
1
],
args
[
2
]
)
tlsConfig
,
err
:=
pkgtls
.
NewTLSConfig
FromArgs
(
args
...
)
if
err
!=
nil
{
return
err
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment