Skip to content

Instantly share code, notes, and snippets.

@tracyhatemice
tracyhatemice / route.bat
Created April 6, 2016 15:28
Windows 10 IKEv2 route
route add 0.0.0.1/1 mask 0.0.0.1 192.168.229.1
route add 128.0.0.1/1 mask 0.0.0.1 192.168.229.1
@tracyhatemice
tracyhatemice / ocserv.init
Created March 23, 2016 08:38 — forked from bolasblack/ocserv.init
/etc/init.d/ocserv
#!/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() {
# -*- coding: utf-8 -*-
'''
Created on 2013-1-31
@author: lwx
'''
import cookielib, urllib2, urllib, sys, time, json, os
class fetion:
@tracyhatemice
tracyhatemice / http_auth_module.py
Created January 31, 2016 05:33
python http auth module
from http.client import HTTPSConnection
from base64 import b64encode
#This sets up the https connection
c = HTTPSConnection("example.org")
#we need to base 64 encode it
#and then decode it to acsii as python 3 stores it as a byte string
userAndPass = b64encode(b"username:password").decode("ascii")
headers = { 'Authorization' : 'Basic %s' % userAndPass }
#then connect
c.request('GET', '/', headers=headers)
@tracyhatemice
tracyhatemice / README.md
Created December 29, 2015 17:14 — forked from magnetikonline/README.md
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@tracyhatemice
tracyhatemice / 0. remote.conf
Created December 29, 2015 13:31 — forked from clowwindy/0. remote.conf
SigmaVPN configure
[peername]
proto = nacltai
proto_publickey = LOCAL_PUBKEY
proto_privatekey = REMOTE_PRIKEY
local = tuntap
local_interface = tunnel
local_tunmode = 1
peer = udp
peer_localaddr = REMOTE_IP
peer_localport = 8000
@tracyhatemice
tracyhatemice / squid.conf
Created October 29, 2015 12:09
Squid cache configuration
acl Safe_ports port 80 21 443 563 70 210 280 488 591 777 1025-65535
acl SSL_ports port 443 563
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
http_port 0.0.0.0:21
via off
request_header_access Allow allow all
request_header_access Authorization allow all
@tracyhatemice
tracyhatemice / ipsec.sh
Created October 29, 2015 12:08 — forked from izhaomin/ipsec.sh
Deploy Strongswan IPSec VPN on Debian/Ubuntu (Experimental)
#!/bin/bash
# for KVM and XEN, modification required for OpenVZ
apt-get -y update
apt-get -y upgrade
apt-get -y install libpam0g-dev libssl-dev make gcc
wget http://download.strongswan.org/strongswan-5.3.0.tar.gz
tar zxvf strongswan-5.3.0.tar.gz
cd strongswan-5.3.0
./configure --enable-eap-identity --enable-eap-md5 --enable-eap-mschapv2 --enable-eap-tls --enable-eap-ttls --enable-eap-peap --enable-eap-tnc --enable-eap-dynamic --enable-eap-radius --enable-xauth-eap --enable-xauth-pam --enable-dhcp --enable-openssl --enable-addrblock --enable-unity --enable-certexpire --enable-radattr --enable-tools --enable-openssl --disable-gmp
make
@tracyhatemice
tracyhatemice / README.md
Created October 27, 2015 08:38 — forked from hwdsl2/.MOVED.md
IPsec L2TP VPN Auto Install Script for Ubuntu 14.04 & 12.04 and Debian 8