This file contains 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
Roll your own dynamic DNS service using Route53 |
This file contains 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
127.0.0.1 api.ad.xiaomi.com | |
127.0.0.1 sdkconfig.ad.xiaomi.com | |
127.0.0.1 ad.mi.com | |
127.0.0.1 ad.xiaomi.com | |
127.0.0.1 ad1.xiaomi.com | |
127.0.0.1 adv.sec.miui.com | |
127.0.0.1 test.ad.xiaomi.com | |
127.0.0.1 new.api.ad.xiaomi.com |
This file contains 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
#!/bin/bash | |
# installs/updates rtorrent from source on Ubuntu | |
TMPDIR=$(mktemp -d) | |
mkdir $TMPDIR/logs | |
install_dependencies () { | |
apt-get update | |
apt-get install -y git subversion build-essential automake libtool libcppunit-dev zlib1g-dev libcurl4-openssl-dev libncurses5-dev |
This file contains 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
#!/bin/sh | |
# Script to route traffic from home network through VPN selectively. | |
# Based off the discussion at http://www.smallnetbuilder.com/forums/showthread.php?t=9311 | |
# The setup is a Roku box, a Home PC running Plex, and a Synology NAS with a torrent client running a web interface. | |
# The aim is to have all traffic from Roku go through the VPN, all traffic from the Home PC (and all other devices) bypassing the VPN, | |
# and the Synology NAS using the VPN. There are however some exceptions. Since Plex uses port 32400, Roku has to bypass the VPN when | |
# using that port. In addition, port 9091 has to bypass the VPN as well in order to access the Synology torrent client. | |
# | |
# Requirements: Asuswrt-Merlin with OpenVPN already set up |
This file contains 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
# take one | |
# subdirectory (one server, multiple services) | |
location /btsync/ { | |
rewrite ^/btsync/gui(.*) /btsync$1 last; | |
proxy_pass http://127.0.0.1:8888/gui/; | |
proxy_redirect /gui/ /btsync/; | |
proxy_buffering off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; |
This file contains 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
auth_basic "Restricted"; | |
auth_basic_user_file /etc/nginx/htpasswd; |
This file contains 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
#!/usr/bin/env python | |
#encoding: utf-8 | |
import urllib2 | |
from base64 import b64decode | |
LIST_URL = 'https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt' | |
BLACK_FILE = 'gfw.url_regex.lst' | |
WHITE_FILE = 'cn.url_regex.lst' |
This file contains 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
echo "this file isn't supposed to run" | |
exit 0 | |
# <------------------------------ Enviroment Variables -------------------------------> | |
FQDN = <Server DNS Name> # can also get from PTR record | |
ORG_NAME = <Org name> | |
RELEASE_NAME = $(lsb_release -sc) | |
# <------------------------------ Network Stack Setups -------------------------------> | |
# Please edit /etc/default/ufw first |
This file contains 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
#!/usr/bin/env python | |
""" | |
Code to read a squid log file | |
Sample usage: | |
f = SquidLog('access.log.1.gz') | |
for l in f: | |
print l.ts, l.remhost, l.url |
This file contains 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
#!/sbin/runscript | |
DAEMON=/usr/local/sbin/ocserv | |
PIDFILE=/var/run/ocserv.pid | |
LOGFILE=/var/log/ocserv.log | |
DAEMON_ARGS="-f -d 1" | |
extra_commands="debug" | |
depend() { |
NewerOlder