Skip to content

Commit

Permalink
chore(docs): add direct links to configuration field references
Browse files Browse the repository at this point in the history
And auto-update those links to match the current version.
  • Loading branch information
pitkley committed May 29, 2022
1 parent 58f1c79 commit cc3897a
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 3 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,35 +121,51 @@ The general configuration happens across six categories:

This category defines global, default values to be used by DFW and the other categories.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.GlobalDefaults.html)

* `backend_defaults`

This category defines configuration values that are specific to the firewall-backend used.

[Field reference for `nftables`.](https://dfw.rs/1.2.1/dfw/nftables/types/struct.Defaults.html)

[Field reference for `iptables`.](https://dfw.rs/1.2.1/dfw/iptables/types/struct.Defaults.html)

* `container_to_container`

This controls the communication between containers and across [Docker networks][docker-networks].

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToContainer.html)

* `container_to_wider_world`

This controls if and how containers may access the wider world, i.e. what they can communicate across the `OUTPUT` chain on the host.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToWiderWorld.html)

* `container_to_host`

To restrict or allow access to the host, this section is used.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToHost.html)

* `wider_world_to_container`

This controls how the wider world, i.e. whatever comes in through the `INPUT` chain on the host, can communicate with a container or a Docker network.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.WiderWorldToContainer.html)

* `container_dnat`

This category allows you to define specific rules for destination network address translation, even or especially across Docker networks.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerDNAT.html)

**See the [examples][examples] and [configuration types][types.rs] for detailed descriptions and examples of every configuration section.**

[docker-networks]: https://docs.docker.com/engine/userguide/networking/
[examples]: https://github.com/pitkley/dfw/tree/main/examples
[types.rs]: https://dfw.rs/latest/dfw/types/index.html
[types.rs]: https://dfw.rs/1.2.1/dfw/types/index.html

## <a name="ipv6support"></a> IPv6 support

Expand Down
16 changes: 15 additions & 1 deletion docs/GETTING-STARTED-iptables.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,49 @@ The general configuration happens across six categories:

This category defines global, default values to be used by DFW and the other categories.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.GlobalDefaults.html)

* `backend_defaults`

This category defines configuration values that are specific to the firewall-backend used.

[Field reference for `iptables`.](https://dfw.rs/1.2.1/dfw/iptables/types/struct.Defaults.html)

* `container_to_container`

This controls the communication between containers and across [Docker networks][docker-networks].

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToContainer.html)

* `container_to_wider_world`

This controls if and how containers may access the wider world, i.e. what they can communicate across the `OUTPUT` chain on the host.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToWiderWorld.html)

* `container_to_host`

To restrict or allow access to the host, this section is used.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToHost.html)

* `wider_world_to_container`

This controls how the wider world, i.e. whatever comes in through the `INPUT` chain on the host, can communicate with a container or a Docker network.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.WiderWorldToContainer.html)

* `container_dnat`

This category allows you to define specific rules for destination network address translation, even or especially across Docker networks.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerDNAT.html)

**See the [examples][examples] and [configuration types][types.rs] for detailed descriptions and examples of every configuration section.**

[docker-networks]: https://docs.docker.com/engine/userguide/networking/
[examples]: https://github.com/pitkley/dfw/tree/main/examples
[types.rs]: https://dfw.rs/latest/dfw/types/index.html
[types.rs]: https://dfw.rs/1.2.1/dfw/types/index.html

## <a name="runningdfw"></a> Running DFW

Expand Down
16 changes: 15 additions & 1 deletion docs/GETTING-STARTED-nftables.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,35 +103,49 @@ The general configuration happens across six categories:

This category defines global, default values to be used by DFW and the other categories.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.GlobalDefaults.html)

* `backend_defaults`

This category defines configuration values that are specific to the firewall-backend used.

[Field reference for `nftables`.](https://dfw.rs/1.2.1/dfw/nftables/types/struct.Defaults.html)

* `container_to_container`

This controls the communication between containers and across [Docker networks][docker-networks].

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToContainer.html)

* `container_to_wider_world`

This controls if and how containers may access the wider world, i.e. what they can communicate across the `OUTPUT` chain on the host.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToWiderWorld.html)

* `container_to_host`

To restrict or allow access to the host, this section is used.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToHost.html)

* `wider_world_to_container`

This controls how the wider world, i.e. whatever comes in through the `INPUT` chain on the host, can communicate with a container or a Docker network.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.WiderWorldToContainer.html)

* `container_dnat`

This category allows you to define specific rules for destination network address translation, even or especially across Docker networks.

[Field reference.](https://dfw.rs/1.2.1/dfw/types/struct.ContainerDNAT.html)

**See the [examples][examples] and [configuration types][types.rs] for detailed descriptions and examples of every configuration section.**

[docker-networks]: https://docs.docker.com/engine/userguide/networking/
[examples]: https://github.com/pitkley/dfw/tree/main/examples
[types.rs]: https://dfw.rs/latest/dfw/types/index.html
[types.rs]: https://dfw.rs/1.2.1/dfw/types/index.html

## <a name="runningdfw"></a> Running DFW

Expand Down
17 changes: 17 additions & 0 deletions release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ search = "dfw ([0-9]+\\.?)+"
replace = "dfw {{version}}"
prerelease = false

# Replace `dfw.rs/X.Y.Z/`
[[pre-release-replacements]]
file = "README.md"
search = "dfw\\.rs/([0-9]+\\.?)+/"
replace = "dfw.rs/{{version}}/"
prerelease = false
[[pre-release-replacements]]
file = "docs/GETTING-STARTED-nftables.md"
search = "dfw\\.rs/([0-9]+\\.?)+/"
replace = "dfw.rs/{{version}}/"
prerelease = false
[[pre-release-replacements]]
file = "docs/GETTING-STARTED-iptables.md"
search = "dfw\\.rs/([0-9]+\\.?)+/"
replace = "dfw.rs/{{version}}/"
prerelease = false

# Handle new section in CHANGELOG.md
# 1. Replace the fields in the unreleased header.
[[pre-release-replacements]]
Expand Down

0 comments on commit cc3897a

Please sign in to comment.