This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dgram = require('dgram') | |
const UInt64BE = require('int64-buffer').Uint64BE | |
const BN = require('bignumber.js') | |
const _ = require('lodash') | |
const process = require('process') | |
const PORT = 30000 | |
const MULTICAST_ADDR = '233.255.255.255' | |
const nBN = v => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adaptation from: https://git.zx2c4.com/WireGuard/about/src/tools/wg-quick.8 | |
PostUp = iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -s 172.0.0.0/8 -j REJECT | |
PreDown = iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL ! -s 172.0.0.0/8 -j REJECT |