Skip to content

Instantly share code, notes, and snippets.

@prdn
prdn / bfx-market-data-mcast-udp.js
Created May 1, 2020 09:15
bfx-market-data-mcast-udp.js
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 => {
@bpinto
bpinto / gist:5afa8b05eec7a8a6e107fd39d12be4f3
Created March 22, 2018 00:03
Wireguard kill-switch ignoring docker
# 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