1
General Discussion / Modify config.xml at build time
« on: March 16, 2021, 09:26:15 am »
Hi,
I'd like to find a way to define a default wireguard's server tag to config.xml.
I've already read the Hello world module & plugin.
I think I need to edit the Server.php file, but I don't know how to do it.
I look forward to your response.
I'd like to find a way to define a default wireguard's server tag to config.xml.
I've already read the Hello world module & plugin.
I think I need to edit the Server.php file, but I don't know how to do it.
Code: [Select]
<OPNsense>
<wireguard>
<general version="0.0.1">
<enabled>0</enabled>
</general>
<client version="0.0.4">
<clients/>
</client>
<server version="0.0.2">
<servers>
<server uuid="148cd40d-46d3-0000-1111-463edfe3641a">
<enabled>1</enabled>
<name>wgtest</name>
<instance>0</instance>
<pubkey>1111111111111111111111111111111111111111111=</pubkey>
<privkey>2222222222222222222222222222222222222222222=</privkey>
<port>51820</port>
<mtu/>
<dns/>
<tunneladdress>10.10.0.1/24</tunneladdress>
<disableroutes>0</disableroutes>
<gateway/>
<peers/>
</server>
</servers>
</server>
</wireguard>
</OPNsense>
I look forward to your response.