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 | |
USER=`id -u -n` | |
GROUP=`id -g -n` | |
GENERATE_ROOT_CA_FILE="YES" | |
GENERATE_CA_DER_FILE="YES" | |
GENERATE_IM_CA_FILE="YES" | |
GENERATE_IM_DER_FILE="NO" | |
GENERATE_DH_FILE="NO" |
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 | |
REMOTE_CRT="/etc/ssl/certs/squidCA.crt" | |
REMOTE_URL="root@192.168.20.1" | |
FILENAME=`basename "$REMOTE_CRT"` | |
LOCAL_CRT="/tmp/$FILENAME" | |
KEYCHAIN="$HOME/Library/Keychains/login.keychain" | |
# More information about this here: | |
# http://lists.apple.com/archives/macos-x-server/2008/Feb/msg00187.html | |
SECURITY_TYPE="trustAsRoot" |
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 | |
VOLUME_NAME="LinuxServer" | |
REMOTE_USER=`whoami` | |
REMOTE_SERVER="xx.xx.xx.xx" | |
MOUNT_DIR="$HOME/$VOLUME_NAME" | |
REMOTE_DIR="/home/$REMOTE_USER" | |
SSH_KEY="$HOME/.ssh/id_rsa" | |
TIMEOUT=5 |
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 | |
FILE="CATEGORIES" | |
REDIS_KEY="categories" | |
while read line; do | |
category=`echo "$line" | cut -f1 -d'-'` | |
description=`echo "$line" | cut -f2 -d'-'` | |
redis-cli hset "$REDIS_KEY" "$category" "$description" | |
done < "$FILE" |
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
var request = require('request'); | |
var url1 = 'http://vanamco.com/ghostlab/'; | |
//var url = 'http://httpbin.org/get'; | |
var proxyUrl = 'http://127.0.0.1:3128'; | |
var proxiedRequest = request.defaults({'proxy': proxyUrl}); | |
console.log('Making a test request to',url1); | |
proxiedRequest(url1, function (error, response, body) { |
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
# | |
# Recommended minimum configuration: | |
# | |
cache_effective_user squid | |
cache_effective_group wheel | |
# Example rule allowing access from your local networks. | |
# Adapt to list your (internal) IP networks from where browsing | |
# should be allowed |
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/ash | |
NETCAT="netcat" | |
if [[ "$2" == "" || "$1" == "" ]]; then | |
echo "Invalid port or ip!" | |
echo "USAGE: $0 ip port" | |
exit 0 | |
fi |
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 | |
DEBUG="NO" | |
LOGGER_NAME="firewall" | |
PORTS="tcp:9443" | |
WAN="$1" | |
log() { | |
if [ "$DEBUG" == "YES" ]; then | |
echo "$1" |
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 | |
USAGE="USAGE: $0 server config.json" | |
SERVER="$1" | |
CONFIG="$2" | |
PID_DIR="/var/run" | |
SS_LOCAL_PID="$PID_DIR/ss-local.pid" | |
SS_TUNNEL_PID="$PID_DIR/ss-tunnel.pid" | |
DNS_FORWARD_REMOTE="8.8.8.8:53" |
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
HOSTNAME=`hostname` ssh-keygen -t rsa -C "$HOSTNAME" -f "$HOME/.ssh/id_rsa" -P "" && cat ~/.ssh/id_rsa.pub |