Undocumented conditions/scripting?

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
hakito
OpenVpn Newbie
Posts: 2
Joined: Wed Jun 08, 2022 7:56 am

Undocumented conditions/scripting?

Post by hakito » Wed Jun 08, 2022 8:08 am

The man page shows for the option --server the following documentation:

Code: Select all

For example, --server 10.8.0.0 255.255.255.0 expands as follows:

 mode server
 tls-server
 push "topology [topology]"

 if dev tun AND (topology == net30 OR topology == p2p):
   ifconfig 10.8.0.1 10.8.0.2
   if !nopool:
     ifconfig-pool 10.8.0.4 10.8.0.251
So does the config support if statements or scripting (or is this just some pseudo code for the explanation)? Where can I find the documentation for this?

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Undocumented conditions/scripting?

Post by TinCanTech » Wed Jun 08, 2022 11:24 am

hakito wrote:
Wed Jun 08, 2022 8:08 am
or is this just some pseudo code for the explanation
That's all it is, the config is static, it is not interpreted, which means it does not expand shell commands.
hakito wrote:
Wed Jun 08, 2022 8:08 am
Where can I find the documentation for this?
We don't have documentation for documentation. That would be absurd ..

hakito
OpenVpn Newbie
Posts: 2
Joined: Wed Jun 08, 2022 7:56 am

Re: Undocumented conditions/scripting?

Post by hakito » Thu Jun 09, 2022 6:42 am

TinCanTech wrote:
Wed Jun 08, 2022 11:24 am
We don't have documentation for documentation. That would be absurd ..
In the meantime I had a look at the github repo to gain insight by myself. There I saw the hardcoded interpretation of the --server parameter and also found no possibilities for conditions.

So the code was the documentation for the documentation :D

Post Reply