Skip to content

Instantly share code, notes, and snippets.

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

David Stainton david415

💭
♥️Ⓐλ😼
View GitHub Profile
@david415
david415 / gist:8274636
Last active August 31, 2021 09:04
/etc/ufw/before.rules - for use with tor...
#
# rules.before
#
# Rules that should be run before the ufw command line added rules. Custom
# rules should be added to one of these chains:
# ufw-before-input
# ufw-before-output
# ufw-before-forward
#
@david415
david415 / gist:8274711
Created January 5, 2014 22:19
/etc/defaults/ufw
# /etc/default/ufw
#
# Set to yes to apply rules to support IPv6 (no means only IPv6 on loopback
# accepted). You will need to 'disable' and then 'enable' the firewall for
# the changes to take affect.
IPV6=yes
# Set the default input policy to ACCEPT, ACCEPT_NO_TRACK, DROP, or REJECT.
# ACCEPT enables connection tracking for NEW inbound packets on the INPUT
@david415
david415 / gist:9172399
Created February 23, 2014 14:53
dns-vpn-bridgeclient-torrc
Log notice stdout
SocksPort 8040
DataDirectory ./client-data
UseBridges 1
Bridge vpn-ponydns 127.0.0.1:4703 tundevice=tun0 tun_local_ip=10.9.6.1 tun_remote_ip=10.9.6.2 tun_netmask=255.255.255.0 dns_name=my.cute.pony.bridge.dns_root
ClientTransportPlugin vpn-ponydns exec /usr/local/bin/obfsproxy --log-min-severity=info --log-file=/var/log/tor/dawuud-obfsproxy/obfsproxy-client.log --role=vpnclient managed
@david415
david415 / gist:9172685
Created February 23, 2014 15:16
dns-vpn-bridgeserver-torrc
Log notice stdout
SocksPort 0
ORPort 7001
ExitPolicy reject *:*
DataDirectory ./bridge-data
BridgeRelay 1
PublishServerDescriptor 0
ServerTransportListenAddr vpn-ponydns 127.0.0.1:4703
@david415
david415 / gist:9991734
Last active August 29, 2015 13:58
ansible multi tor
---
- hosts: tor-relays
roles:
- { role: david415.ansible-tor,
tor_distribution_release: "wheezy",
tor_ExitPolicy: "reject *:*",
tor_instance_parent_dir: "/etc/tor/instances",
tor_instances: [ {
name: "relay1",
tor_ORPort: ["192.168.1.1:9002"],
@david415
david415 / gist:26a4ed59078d2e27376f
Last active August 29, 2015 14:00
parser for SOCKS5ClientEndpoint
#!/usr/bin/env python
from zope.interface import implementer
from twisted.plugin import IPlugin
from twisted.internet.protocol import Protocol, Factory
from twisted.internet import reactor
from twisted.internet.interfaces import IStreamClientEndpointStringParser
from twisted.internet.endpoints import clientFromString
from twisted.internet.endpoints import TCP4ClientEndpoint
#!/usr/bin/env python
from zope.interface import implements
from twisted.plugin import IPlugin
from twisted.internet.protocol import Protocol, Factory
from twisted.internet import reactor
from twisted.internet.interfaces import IStreamClientEndpointStringParser
from twisted.internet.endpoints import clientFromString
from twisted.internet.endpoints import TCP4ClientEndpoint
@david415
david415 / gist:9c6bcb1ab310788fe0b4
Created May 1, 2014 23:11
install endpoint parser in virtualenv
cd projects/virtualenv-1.11.1/
./virtualenv.py ~/virtenv-endpoints-test
. ~/virtenv-endpoints-test/bin/activate
usewithtor pip install twisted
cd ~/projects
git clone https://github.com/david415/txsocksx.git
cd txsocksx
git checkout endpoint_parsers
usewithtor python setup.py install
cd examples # CWD is now /home/human/projects/txsocksx/examples
@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 / gist:56a397d116a96248e093
Created July 6, 2014 09:06
generic tahoe client config
[node]
nickname = client
web.reveal_storage_furls = true
web.port = tcp:3456:interface=127.0.0.1
web.static = public_html
tub.location = client.fakelocation:1
[client]
introducer.furl = pb://MyTubID@tor:myHiddenService.onion:HiddenPort/introducer
shares.needed = 3
shares.happy = 5