append_allowed_ip


Description:

public bool append_allowed_ip (string allowed_ip, bool accept_invalid)

Appends allowed_ip setting to the list.

This does not check for duplicates and always appends allowed_ip to the end of the list. If allowed_ip is valid, it will be normalized and a modified for might be appended. If allowed_ip is invalid, it will still be appended, but later verification will fail.

It is a bug trying to modify a sealed WireGuardPeer instance.

Parameters:

this

the unsealed WireGuardPeer instance

allowed_ip

the allowed-ip entry to set.

accept_invalid

if true, also invalid allowed_ip value will be appended. Otherwise, the function does nothing in face of invalid values and returns false.

Returns:

true if the value is a valid allowed-ips value, false otherwise. Depending on accept_invalid, also invalid values are added.