system: mark wireguard traffic

For use with nftables.
This commit is contained in:
Timotej Lazar 2025-07-18 18:39:01 +02:00
parent 2e4547119f
commit 18064e21c0

View file

@ -164,7 +164,7 @@ def save_config():
# Print wireguard config.
with open(output / 'etc/wireguard/wg.conf', 'w', encoding='utf-8') as f:
# Server configuration.
wg_intf = '[Interface]\nListenPort = {port}\nPrivateKey = {key}\n\n'
wg_intf = '[Interface]\nListenPort = {port}\nPrivateKey = {key}\nFwMark = 51820\n\n'
f.write(wg_intf.format(port=settings.get('wg_port') or 51820, key=settings.get('wg_key')))
# Client configuration.