The catch is that when you have multiple peers connected to same interface, router must use something to determine what should it send to which client.
Well, each peer have unique set of keys which are not shared across other peers so why it can't be used?
They are used in logs for identifying peers
But i guess that's MT implementation, so I'll roll with it.
Sob is 99.9999% correct, no one is perfect ;-P
Discussion:
The most common error occurs when you have multiple endpoints for users
INTERNET TRAFFIC!.
Lets say you have subnet A going out WG1 Peer1 to NordVPN WG implementation
Lets say you have subnet B going out WG1 Peer2 to PureVPN WG implementation
Lets say you have subnet C going out WG2 to another MT device for internet
NETWORK SETUP
WG1 peers
Peer B allowed addresses=0.0.0.0/0
Peer A allowed addresses=0.0.0.0/0
WG2 peers
Peer C allowed addresses=0.0.0.0/0
/ip route
dst-address=0.0.0.0/0 gwy=WG1 routing-table=useWG1
dst-address=0.0.0.0/0 gwy=WG2 routing-table=useWG2
/routing table add name=useWG1 fib
/routing table add name=useWG2 fib
/routing rule src-address=subnetA action=lookup-only-in-table table=useWG1
/routing rule src-address=subnetB action=lookup-only-in-table table=useWG1
/routing rule src-address=subnetC action=lookup-only-in-table table=useWG2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Results/Observations:
(1) Regardless of PEER settings, the Router will attempt to find the correct Route FIRST, and then check, for the applicable interface, if there is a peer matching entry.
(2) The order of the peers, within each WG interface, in the wireguard settings, determines the order in which the router will attempt that matching.
(note: In the case of WG1, it will thus always be the Peer B.)
(2) User A Session: Router finds route for subnet A, out WG1. Router matches destination address to that assigned on Peer B. Traffic is sent out the wrong tunnel.
(note: the other end of the tunnel will probably filter out the traffic and thus the end result is FAILED BROWSING SESSION - nil return traffic)
(3) User B Session : Router finds route for subnet B, out WG1. Router matches destination address to that on Peer B. Traffic is sent out the correct tunnel.
(4) User C Session: Router finds route for Subnet C, out WG2. Router checks WG2 peers and finds match. Traffic is sent out the correct tunnel.
Conclusion: One cannot guarantee success of traffic when one has overlapping
Allowed Addresses in the Peers of a single wireguard interface. A separate wireguard interface with proper routing will ensure success.