wireguard: parse conf mtu

This commit is contained in:
arm64v8a 2023-05-06 16:49:23 +09:00
parent 908002530b
commit 60dd5a4e3b

View File

@ -534,6 +534,7 @@ object RawUpdater : GroupUpdater() {
if (localAddresses.isNullOrEmpty()) error("Empty address in 'Interface' selection")
bean.localAddress = localAddresses.flatMap { it.split(",") }.joinToString("\n")
bean.privateKey = iface["PrivateKey"]
bean.mtu = iface["MTU"]?.toIntOrNull()
val peers = ini.getAll("Peer")
if (peers.isNullOrEmpty()) error("Missing 'Peer' selections")
val beans = mutableListOf<WireGuardBean>()