Skip to content

Commit dbd69ff

Browse files
author
Steve Brown
committed
Update documentation
1 parent 1206e95 commit dbd69ff

File tree

2 files changed

+84
-1
lines changed

2 files changed

+84
-1
lines changed

REFERENCE.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
* `adguard::params`: Private class for managing some of the more complex default parameters
1616

17+
### Functions
18+
19+
* [`adguard::validate_tls_options`](#adguardvalidate_tls_options): This function ensures that the TLS config is valid before applying it.
20+
1721
### Data types
1822

1923
* [`Adguard::Blocked_service`](#adguardblocked_service): A list of services that AdGuard Home is able to block out of the box.
@@ -24,9 +28,11 @@
2428
* [`Adguard::Dhcp_v6_options`](#adguarddhcp_v6_options): A structured hash for sepcifying DHCP options for IPV6
2529
* [`Adguard::Dns_server`](#adguarddns_server): Valid DNS server types
2630
* [`Adguard::Filter`](#adguardfilter): Used to manage filters in Adguard
31+
* [`Adguard::Http_proxy`](#adguardhttp_proxy): Very basic validation to ensure the proxy type is sensible
2732
* [`Adguard::Ipv4_port`](#adguardipv4_port): Accepts an IPV4 address with a port (eg 192.168.1.1:8080)
2833
* [`Adguard::Log_file`](#adguardlog_file): Supported log file types
2934
* [`Adguard::Rewrite`](#adguardrewrite): Stuctured hash for managing rewrites
35+
* [`Adguard::Tls_options`](#adguardtls_options): Configures TLS options in AdGuard Home
3036
* [`Adguard::User`](#adguarduser): A structed hash for providing users for the adguard web UI.
3137

3238
## Classes
@@ -104,6 +110,8 @@ The following parameters are available in the `adguard` class:
104110
* [`cache_time`](#cache_time)
105111
* [`rewrites`](#rewrites)
106112
* [`blocked_services`](#blocked_services)
113+
* [`enable_tls`](#enable_tls)
114+
* [`tls_options`](#tls_options)
107115
* [`filters`](#filters)
108116
* [`whitelist_filters`](#whitelist_filters)
109117
* [`user_rules`](#user_rules)
@@ -150,7 +158,7 @@ Note: the password needs to be in BCrypt-encrypted format.
150158

151159
##### <a name="http_proxy"></a>`http_proxy`
152160

153-
Data type: `Optional[Stdlib::HTTPUrl]`
161+
Data type: `Optional[Adguard::Http_proxy]`
154162

155163
Define an optional http_proxy.
156164
While adguard supports SOCKS5 alongside HTTP/S, this is **not** supported in the Puppet module at this time.
@@ -566,6 +574,22 @@ An array of any services you wish to block.
566574

567575
Default value: ``undef``
568576

577+
##### <a name="enable_tls"></a>`enable_tls`
578+
579+
Data type: `Boolean`
580+
581+
EXPERIMENTAL: enable TLS. This workflow is largely untested, use with caution.
582+
583+
Default value: ``false``
584+
585+
##### <a name="tls_options"></a>`tls_options`
586+
587+
Data type: `Optional[Adguard::Tls_options]`
588+
589+
The TLS configuration options.
590+
591+
Default value: ``undef``
592+
569593
##### <a name="filters"></a>`filters`
570594

571595
Data type: `Array[Adguard::Filter]`
@@ -740,6 +764,26 @@ The version to install from the GitHub release
740764

741765
Default value: `'latest'`
742766

767+
## Functions
768+
769+
### <a name="adguardvalidate_tls_options"></a>`adguard::validate_tls_options`
770+
771+
Type: Puppet Language
772+
773+
This function ensures that the TLS config is valid before applying it.
774+
775+
#### `adguard::validate_tls_options(Adguard::Tls_options $tls_options)`
776+
777+
The adguard::validate_tls_options function.
778+
779+
Returns: `Boolean` Returns true if the configuration is valid
780+
781+
##### `tls_options`
782+
783+
Data type: `Adguard::Tls_options`
784+
785+
Accepts a hash of tls_options
786+
743787
## Data types
744788

745789
### <a name="adguardblocked_service"></a>`Adguard::Blocked_service`
@@ -858,6 +902,16 @@ Struct[{
858902
}]
859903
```
860904

905+
### <a name="adguardhttp_proxy"></a>`Adguard::Http_proxy`
906+
907+
Very basic validation to ensure the proxy type is sensible
908+
909+
Alias of
910+
911+
```puppet
912+
Pattern[/^(http|https|socks5)\:\/\//]
913+
```
914+
861915
### <a name="adguardipv4_port"></a>`Adguard::Ipv4_port`
862916

863917
Accepts an IPV4 address with a port (eg 192.168.1.1:8080)
@@ -891,6 +945,33 @@ Struct[{
891945
}]
892946
```
893947

948+
### <a name="adguardtls_options"></a>`Adguard::Tls_options`
949+
950+
Configures TLS options in AdGuard Home
951+
952+
* **See also**
953+
* https://github.com/AdguardTeam/AdGuardHome/wiki/Encryption
954+
955+
Alias of
956+
957+
```puppet
958+
Struct[{
959+
server_name => Stdlib::Host,
960+
force_https => Boolean,
961+
port_https => Stdlib::Port,
962+
port_dns_over_tls => Stdlib::Port,
963+
port_dns_over_quic => Stdlib::Port,
964+
port_dnscrypt => Stdlib::Port,
965+
dnscrypt_config_file => Optional[Stdlib::Unixpath],
966+
allow_unencrypted_doh => Boolean,
967+
strict_sni_check => Boolean,
968+
certificate_chain => Optional[String],
969+
private_key => Optional[String],
970+
certificate_path => Optional[Stdlib::Unixpath],
971+
private_key_path => Optional[Stdlib::Unixpath]
972+
}]
973+
```
974+
894975
### <a name="adguarduser"></a>`Adguard::User`
895976

896977
A structed hash for providing users for the adguard web UI.

types/tls_options.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @summary
22
# Configures TLS options in AdGuard Home
3+
#
4+
# @see https://github.com/AdguardTeam/AdGuardHome/wiki/Encryption
35
type Adguard::Tls_options = Struct[{
46
server_name => Stdlib::Host,
57
force_https => Boolean,

0 commit comments

Comments
 (0)