Skip to content

Instantly share code, notes, and snippets.

View david415's full-sized avatar
💭
♥️Ⓐλ😼

David Stainton david415

💭
♥️Ⓐλ😼
View GitHub Profile
Congestion Control
[E2ECONGESTION] Floyd, S., Fall, K.,
"Promoting the Use of End-to-End Congestion Control in the Internet",
IEEE/ACM Transactions on Networking, May 1999,
<https://www.icir.org/floyd/papers/collapse.may99.pdf>.
[RFC896] Nagle, J., "Congestion Control in IP/TCP Internetworks",
@david415
david415 / gist:da33d2a9f7090faf2a80
Last active November 13, 2017 05:06
use Ansible to configure a Tails system as a Tahoe-LAFS onion grid client
step 1:
get the latest stable python virtualenv and cryptographically verify it.
save it to: ~/Persistent/virtualenv-x.xx.x/
step 2:
create a virtual env to run ansible:
Persistent/virtualenv-x.xx.x/virtualenv.py --system-site-packages Persistent/virtenv-ansible
New python executable in Persistent/virtenv-ansible/bin/python
Installing setuptools, pip...done.
@david415
david415 / detect_tor_network_partitions
Last active September 22, 2017 01:52
how to scan the tor network for partitions
how to scan the tor network for partitions
------------------------------------------
1. setup a machine running Tor and expose its control port as either a tcp port or unix domain socket
with no authentication
*edit* /etc/tor/torrc
blah blah easy rtfm
@david415
david415 / mixnet_graph.dot
Last active February 18, 2017 22:01
mixnet logo
# dot mixnet_graph.dot -Tpng -o rgb_mix.png -Tpng -o rgb_mix.png
digraph rgb_mixnet {
ratio = fill;
size="3,3";
rank = min;
nodesep=1.4;
subgraph cluster0 {
#rankdir = RL;
node [shape = doublecircle, fillcolor=black, style="filled", width=1,height=1]; e;
node [shape = circle, fillcolor="black", width=1, height=1];
@david415
david415 / gist:e541d4f1d70a7e06161128490f52462b
Created December 14, 2016 06:11
rust lioness error handling?
extern crate crypto;
use std::error::Error;
use std::fmt;
use crypto::mac::Mac;
use crypto::blake2b::Blake2b;
const LIONESS_KEY_SIZE: u32 = 208;
@david415
david415 / gist:be36195beff358e36644
Created January 17, 2016 19:52
leif's new magic-folder proposal
multi-party conflict detection
==============================
The current Magic-Folder remote conflict detection design does not properly detect remote conflicts
for groups of three or more parties. This design is specified in the "Fire Dragon" section of this document:
https://github.com/tahoe-lafs/tahoe-lafs/blob/2551.wip.2/docs/proposed/magic-folder/remote-to-local-sync.rst#fire-dragons-distinguishing-conflicts-from-overwrites
This Tahoe-LAFS trac ticket comment outlines a scenario with
three parties in which a remote conflict is falsely detected:
@david415
david415 / gist:8274463
Created January 5, 2014 21:55
bananaphone-client-torrc
Log notice stdout
SocksPort 8040
#ORPort 8001
DataDirectory ./client-data
UseBridges 1
Bridge bananaphone 127.0.0.1:4703 modelName=markov corpus=/usr/share/dict/words encodingSpec=words,sha1,4 order=1
@david415
david415 / gist:8274448
Created January 5, 2014 21:54
bananaphone-bridge-torrc
Log notice stdout
SocksPort 0
ORPort 7001
ExitPolicy reject *:*
DataDirectory ./bridge-data
BridgeRelay 1
PublishServerDescriptor 0
@david415
david415 / new_laptop_setup.sh
Last active December 28, 2015 17:39
ubuntu 12.04 laptop setup notes
#!/bin/bash
apt-get update
apt-get install xorg openbox wicd sysstat wireshark macchanger openvpn xlockmore emacs23 chromium-browser nmap netcat -y
# after install grsec kernel
paxctl -m -x -e /usr/lib/chromium-browser/chrome-sandbox -c
paxctl -P -m -x -e -R /usr/lib/chromium-browser/chromium-browser -c
# edit /etc/default/grub
@david415
david415 / gist:7534597
Created November 18, 2013 20:18
python nacl secret box
#!/usr/bin/env python
import nacl.secret
import nacl.utils
key = nacl.utils.random(nacl.secret.SecretBox.KEY_SIZE)
box = nacl.secret.SecretBox(key)
message = b"secret message"
nonce = nacl.utils.random(nacl.secret.SecretBox.NONCE_SIZE)