Since Wireguard uses another routing table than the default one, you can use ip rule
in order to exclude a certain type of traffic.
Wireguard will add a rule to match traffic after it is redirected to local, but before it goes to main.
You should then be able to add a rule before the wireguard one, which will redirect traffic from port 80and 443 (reply from your server) to the main table.
It should be as simple as:
ip rule add sport 80 table main
ip rule add sport 443 table main
You can verify the rule is placed before the wireguard one with:
ip rule
Although, if you want to make it persistent, you might want to add a PostUp action in your configuration file:
PostUp=ip rule add sport 80 table main && ip rule add sport 443 table main
PreDown=ip rule del sport 80 table main && ip rule del sport 443 table main
If you are only using NetworkManager, you can use dispatcher.d to place a script so it will be executed when a network is connected or disconnected.
#!/bin/bash
echo 'ip rule del sport 80 table custom
ip rule del sport 443 table custom
ip rule add sport 80 table custom
ip rule add sport 443 table custom' > /etc/NetworkManager/dispatcher.d/02-wg_exceptions.sh
chmod +x /etc/NetworkManager/dispatcher.d/02-wg_exceptions.sh
external VPN
? Does all of the traffic from the file server needs to go there?