Thanks for your quick input. I try to explain further my setup:
I have two WAN.
WAN1 has global IPv4. Is therefore reachable from outside and is default route. My router is WG server here, some road warriers are connecting.
WAN2 is IPv4 CGNAT. Therefore outgoing only and should offload WAN1 for WireGuard traffic to certain peers. My router is WG client here and creates the WG connection to these peers.
There is one WG interface:
/ip address
add address=10.0.0.1/20 interface=LAN network=10.0.0.0
add address=10.5.0.1/24 interface=WG1 network=10.5.0.0
/interface wireguard
add listen-port=13231 mtu=1412 name=WG1
Some road warriors which should come in over WAN1:
/interface wireguard peers
add allowed-address=10.5.0.15/32 comment="mein-iphone (road warrior)" interface=WG1 public-key="xxx"
add allowed-address=10.5.0.17/32 comment="mein-ipad (road warrior)" interface=WG1 public-key="yyy"
And two outgoing WG connections that should go out over WAN2:
/interface wireguard peers
add allowed-address=10.5.0.12/32 endpoint-address=1.2.3.4 endpoint-port=13231 interface=WG1 public-key="zzz"
add allowed-address=10.5.0.9/32,10.3.0.0/24 endpoint-address=5.6.7.8 endpoint-port=13231 interface=WG1 public-key="qqq"
All WAN interfaces are masqueraded:
/interface list
add comment="All WAN interfaces" name=WAN
/interface list member
add comment="Telekom modem" interface=FTTH-1U1 list=WAN
add comment="DG modem" interface=FTTH-DG list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="Masquerade WAN for internet access" out-interface-list=WAN
The solution should be that only the WG connection/traffic to host 1.2.3.4 and 5.6.7.8 goe out through WAN2. All other WG connections should come in out go out over WAN1.
So far I tried to create a routing table for WAN2. Added a mangle rule to mark new connection to 1.2.3.4 udp 13231. Than mark routing for this connection. With no success.
A simple and working solution is to create a route to these two WG peers. But then all traffic to these hosts goes through WAN2 (arising other problems):
/ip route
add dst-address=1.2.3.4/32 gateway="WAN2-gw-ip"
add dst-address=5.6.7.8/32 gateway="WAN2-gw-ip"