Skip to content

Instantly share code, notes, and snippets.

View loneops's full-sized avatar

Mayank loneops

View GitHub Profile
@loneops
loneops / polipo.conf
Created January 27, 2017 07:04
Polipo conf.
proxyAddress = "127.0.0.1"
proxyPort = 8118
allowedClients = 127.0.0.1
allowedPorts = 1-65535
proxyName = "localhost"
cacheIsShared = false
socksParentProxy = "localhost:9050"
socksProxyType = socks5
chunkHighMark = 67108864
dnsUseGethostbyname = yes
@loneops
loneops / server.conf
Created July 20, 2016 08:27
OPENVPN server config.
proto tcp-server
dev tun1
ca /path/to/ca.crt
cert /path/to/vpn.crt
key /path/to/vpn.key
tls-auth /path/to/ta.key 1
dh /path/to/dhparam.pem
local M = {}
-----
local nix_uuid, tmp1, dec_random_seed
nix_uuid = io.open("/proc/sys/kernel/random/uuid"):read() -- Read uuid from proc
io.close()
tmp1 = nix_uuid:gsub('%W','') -- Remove hyphens
tmp1 = tmp1:sub(1, 9) -- Chop-off extra numbers
dec_random_seed = tonumber(tmp1, 16) -- Convert to decimal base
math.randomseed( os.time() + dec_random_seed ) -- Add to current time and seed the randomizer
math.random()