wireguard-uwp-rs icon indicating copy to clipboard operation
wireguard-uwp-rs copied to clipboard

support multiple peers

Open hoyho opened this issue 3 years ago • 1 comments

This app work very well I would like to add multiple peers to to config

$vpnConfig = @'
<WireGuard>
    <Interface>
        <PrivateKey>foo</PrivateKey>
        <Address>10.0.0.2/32</Address>
        <Port>51820</Port>
    </Interface>
    <Peer>
        <PublicKey>bar</PublicKey>
        <AllowedIPs>10.0.0.254/32</AllowedIPs>
        <Port>51820</Port>
        <PersistentKeepalive>5</PersistentKeepalive>
    </Peer>
    <Peer>
        <PublicKey>baz</PublicKey>
        <AllowedIPs>10.0.0.253/32</AllowedIPs>
        <Port>51820</Port>
        <PersistentKeepalive>5</PersistentKeepalive>
    </Peer>
</WireGuard>
'@

Set-VpnConnection -Name wg-rust -CustomConfiguration $vpnConfig

It will failed at parsing the config : duplicate field Peer image

I think multiple peer is a common use case. Is there's any way to support that?

hoyho avatar Jan 26 '22 16:01 hoyho

Yup! That should be possible, unfortunately can't make any promises on when I'll be able to work on it.

luqmana avatar Feb 10 '22 06:02 luqmana