Skip to content

Instantly share code, notes, and snippets.

View vdusart's full-sized avatar
🦅

Victor Dusart vdusart

🦅
View GitHub Profile
@vdusart
vdusart / README.md
Created June 19, 2024 16:06
Automatically route traffic for specific domains through your VPN with dynamic IP resolution.

WireGuard - Dynamic VPN Routing

Overview

This script is designed to selectively route traffic through a WireGuard VPN based on domain names.

By specifying domain names, this script dynamically resolves their IP addresses and updates routing rules so that only traffic destined for these domains is tunneled through the VPN. This ensures only necessary traffic is routed through it while other traffic remains unaffected.

VPN Configuration

@vdusart
vdusart / zellij-workspace.sh
Last active May 11, 2024 22:08
The purpose of this script is to directly launch the correct zellij session based on the workspace we are currently in.
#!/bin/bash
if [ $# -gt 1 ]; then
echo "Usage: $0 [new directory]"
exit 1
fi
# Allows the user to define the workspace when the command is run.
# This avoids having to move to the directory before launching the command.
if [ $# -eq 1 ]; then