proxymode
This commit is contained in:
parent
a932d7e1c3
commit
cfb6017f32
3 changed files with 102 additions and 7 deletions
|
@ -41,5 +41,6 @@ At first glance we can see that we have a selection of five configuration option
|
||||||
|
|
||||||
preliminary
|
preliminary
|
||||||
proxymode
|
proxymode
|
||||||
|
porttype
|
||||||
tutorial
|
tutorial
|
||||||
|
|
||||||
|
|
|
@ -223,14 +223,108 @@ Everything is OK:
|
||||||
- the `proxy_mode` value is in green because its value is set by default
|
- the `proxy_mode` value is in green because its value is set by default
|
||||||
- the `address` value is in black because its value has been set by a user
|
- the `address` value is in black because its value has been set by a user
|
||||||
|
|
||||||
|
Variables can have parameters
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
.. questions:: Question
|
||||||
|
|
||||||
|
**question**: Does our `address` domain name variable accepts IP addresses ?
|
||||||
|
|
||||||
|
**answer**: Well it depends.
|
||||||
|
|
||||||
|
We need to specify whether our variable accepts to be filled using an IP or a domain name only.
|
||||||
|
This is where the ability to parameterize our variable comes in.
|
||||||
|
|
||||||
|
..
|
||||||
|
---
|
||||||
|
manual:
|
||||||
|
description: Manual proxy configuration
|
||||||
|
|
||||||
|
http_proxy:
|
||||||
|
description: HTTP Proxy
|
||||||
|
|
||||||
|
address:
|
||||||
|
description: HTTP address
|
||||||
|
type: domainname
|
||||||
|
params:
|
||||||
|
allow_ip: true
|
||||||
|
|
||||||
|
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_025/firefox/10-manual.yml
|
||||||
|
:language: yaml
|
||||||
|
:caption: The `address` has a parameter set in the :file:`firefox/10-manual.yml` structure file
|
||||||
|
:name: RougailAddressParameter
|
||||||
|
:linenos:
|
||||||
|
..
|
||||||
|
---
|
||||||
|
manual:
|
||||||
|
description: Manual proxy configuration
|
||||||
|
|
||||||
|
http_proxy:
|
||||||
|
description: HTTP Proxy
|
||||||
|
|
||||||
|
address:
|
||||||
|
description: HTTP address
|
||||||
|
type: domainname
|
||||||
|
params:
|
||||||
|
allow_ip: true
|
||||||
|
|
||||||
|
We can see line 11 and 12 that the params allow the domain name `address` variable to be set
|
||||||
|
with IPs.
|
||||||
|
|
||||||
|
.. type-along:: One more variable
|
||||||
|
|
||||||
|
Let's create a `port` variable in the `http_proxy` family:
|
||||||
|
|
||||||
|
.. confval:: port
|
||||||
|
:type: `port`
|
||||||
|
:default: 8080
|
||||||
|
|
||||||
|
The HTTP Port
|
||||||
|
|
||||||
|
Here is the new :file:`firefox/10-manual.yml` structure file:
|
||||||
|
|
||||||
|
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_026/firefox/10-manual.yml
|
||||||
|
:language: yaml
|
||||||
|
:caption: A rougail structure description file with a hierarchy.
|
||||||
|
:name: RogailPortVariable
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
..
|
||||||
|
---
|
||||||
|
manual:
|
||||||
|
description: Manual proxy configuration
|
||||||
|
|
||||||
|
http_proxy:
|
||||||
|
description: HTTP Proxy
|
||||||
|
|
||||||
|
address:
|
||||||
|
description: HTTP address
|
||||||
|
type: domainname
|
||||||
|
params:
|
||||||
|
allow_ip: true
|
||||||
|
|
||||||
|
port:
|
||||||
|
description: HTTP Port
|
||||||
|
type: port
|
||||||
|
default: 8080
|
||||||
|
|
||||||
|
Take a look at lines 14 to 17.
|
||||||
|
|
||||||
|
.. glossary::
|
||||||
|
|
||||||
|
parameter
|
||||||
|
|
||||||
|
A parameter is a property of a variable that can refine its behavior
|
||||||
|
|
||||||
.. keypoints:: Key points progress
|
.. keypoints:: Key points progress
|
||||||
|
|
||||||
**Keywords**
|
**Keywords**
|
||||||
|
|
||||||
- we know how to define :term:`variable`\ s inside of a family
|
- we know how to define :term:`variable`\ s inside of a family
|
||||||
- we now know what a :term:`mandatory` variable is
|
- we now know what a :term:`mandatory` variable is
|
||||||
- we kwow how to set a variable's user value (in a :term:`user file`)
|
- we kwow how to set a variable's user value (in a :term:`user file`)
|
||||||
- we have the big picture : the :term:`configuration`, which is (the structure files + the user files)
|
- we have the big picture : the :term:`configuration`, which is (the structure files + the user files)
|
||||||
|
- we can add :term:`parameters` to variables to refine their behavior
|
||||||
|
|
||||||
**Progress**
|
**Progress**
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
The Firefox proxy: the manual configuration
|
The Firefox proxy: the manual configuration
|
||||||
==============================================
|
=============================================
|
||||||
|
|
||||||
|
|
||||||
.. objectives:: Objectives
|
.. objectives:: Objectives
|
||||||
|
|
||||||
We will learn how to:
|
We will learn how to: FIXME
|
||||||
|
|
||||||
|
|
||||||
.. prerequisites:: Reminders
|
.. prerequisites:: Reminders
|
||||||
|
|
||||||
- We have two variables: :confval:`proxy_mode` and :confval:`address`.
|
FIXME
|
||||||
|
|
||||||
|
|
||||||
.. type-along:: So we have this choice type variable in the structure file
|
|
||||||
|
|
||||||
The manual mode
|
The manual mode
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
.. questions:: OK then. What happens when you select the "Manual proxy configuration"?
|
.. questions:: Question
|
||||||
|
|
||||||
|
**question**: OK then. What happens when you select the "Manual proxy configuration"?
|
||||||
|
|
||||||
A good configuration design is to place all the proxy's manual configuration in a :term:`family`.
|
A good configuration design is to place all the proxy's manual configuration in a :term:`family`.
|
||||||
Let's create the :file:`dict/02-proxy_manual.yml` dictionary:
|
Let's create the :file:`dict/02-proxy_manual.yml` dictionary:
|
||||||
|
|
Loading…
Reference in a new issue