Skip to content

Instantly share code, notes, and snippets.

'use strict';
const process = require('process');
const dgram = require('dgram');
// Command line args:
let [listenport, fwdport, fwdaddr, mindelay, maxdelay] = process.argv.slice(2);
// It will listen on <listenport> and act as a reverse proxy for the UDP service
// at <fwdaddr>:<fwdport>. All packets will be delayed by a uniformly
@kriswebdev
kriswebdev / forcevpn.sh
Last active February 25, 2024 07:35
forcevpn: Force VPN for specific apps, in a better way than killswitch [Linux / OpenVPN]
#!/bin/bash
# === INFO ===
# ForceVPN
# Description: Force VPN tunnel for specific applications.
# If the VPN is down => blackhole the app network traffic.
# Better than a killswitch. IPv4.
VERSION="2.3.0"
# Author: KrisWebDev
# Requirements: Linux with kernel > 2.6.4 (released in 2008).