Please note that this whole manual refers to the version 3.5.5 of Squid. You probably would have to adapt some commands to the version you will actually download.
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
// | |
// CCBlockTableViewDataSource.h | |
// | |
// Created by Tristan O'Tierney on 1/24/11. | |
// | |
#import <UIKit/UIKit.h> | |
@interface CCBlockTableViewDataSource : NSObject <UITableViewDataSource, UITableViewDelegate> { |
In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.
The script must be copied to an OpenWRT router (gargoyle firmware works fine, too).
For example, if the router is located at 192.168.1.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 | |
# Packets Loss Watch | |
# Simple SHELL script for Linux and UNIX system monitoring with | |
# ping command | |
# | |
# Copyright (c) 2006 nixCraft project <http://www.cyberciti.biz/fb/> | |
# Copyleft 2013 Stephen Larroque | |
# This script is licensed under GNU GPL version 2.0 or above | |
# | |
# This script was inspired by a nixCraft script http://www.cyberciti.biz/tips/simple-linux-and-unix-system-monitoring-with-ping-command-and-scripts.html |
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
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
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
#![feature(ip_addr, raw)] | |
extern crate pnet; | |
use std::net::{IpAddr, Ipv4Addr}; | |
use pnet::transport::TransportChannelType::Layer4; | |
use pnet::transport::TransportProtocol::Ipv4; | |
use pnet::transport::transport_channel; | |
use pnet::packet::ip::IpNextHeaderProtocols; | |
use pnet::packet::Packet; |
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
use std::thread; | |
use std::net::TcpStream; | |
fn check_open_port(host: &str, port: u16) -> bool { | |
TcpStream::connect((host, port)).is_ok() | |
} | |
fn main() { | |
const PORT : u16 = 22; |
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 | |
# | |
# angry_wifi.sh | |
# | |
# auto disconnects clients with a low signal strength on LEDE / OpenWRT. great | |
# for clients who hold onto a lower-signal-strength accesspoint instead of | |
# roaming. before running, make sure to download the latest MAC addresses with: | |
# | |
# wget --no-check-certificate -O - 'https://services13.ieee.org/RST/standards-ra-web/rest/assignments/download/?registry=MAC&text=apple' | cut -d, -f2 > apple_mac_addresses | |
# |
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
# ==================================================================================== | |
# Steps for Main Router (must have connected internet on WAN port) | |
# ==================================================================================== | |
# Set your network IP address configuration default is 192.168.1.0/24 | |
uci set network.lan.ipaddr='192.168.1.1' | |
# Recommended, to identify on network and when logged on | |
uci set system.@system[0].hostname='MainRouter' | |
uci set network.lan.hostname="`uci get system.@system[0].hostname`" |
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 | |
set -e -x | |
# for Ubuntu 16.04 | |
#PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion mercurial" | |
PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion" | |
sudo apt -y install $PACKAGES | |
if ! [ -d openwrt ]; then |
OlderNewer