Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| package main | |
| import ( | |
| "crypto/tls" | |
| "flag" | |
| "io" | |
| "log" | |
| "net" | |
| "net/http" | |
| "net/http/httputil" |
| #!/bin/bash | |
| number=$1 | |
| method=$2 | |
| ss-tunnel -k test -m $method -l 8387 -L 127.0.0.1:8388 -s 127.0.0.1 -p 8389 & | |
| ss_tunnel_pid=$! | |
| ss-server -k test -m $method -s 127.0.0.1 -p 8389 & | |
| ss_server_pid=$! |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/bin/bash | |
| echo ". {" > Corefile | |
| echo " forward . 208.67.222.222:443 208.67.222.222:5353 208.67.220.220:443 208.67.220.220:5353 127.0.0.1:5301 127.0.0.1:5302 127.0.0.1:5303 {" >> Corefile | |
| china=`curl https://cdn.jsdelivr.net/gh/felixonmars/dnsmasq-china-list/accelerated-domains.china.conf -s | while read line; do awk -F '/' '{print $2}' | grep -v '#' ; done | paste -sd " " -` | |
| apple=`curl https://cdn.jsdelivr.net/gh/felixonmars/dnsmasq-china-list/apple.china.conf -s | while read line; do awk -F '/' '{print $2}' | grep -v '#' ; done | paste -sd " " -` | |
| google=`curl https://cdn.jsdelivr.net/gh/felixonmars/dnsmasq-china-list/google.china.conf -s | while read line; do awk -F '/' '{print $2}' | grep -v '#' ; done | paste -sd " " -` | |
| echo " except $china $apple $google" >> Corefile | |
| echo " }" >> Corefile | |
| echo " proxy . 116.228.111.118 180.168.255.18" >> Corefile | |
| echo " log" >> Corefile |
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...]
[-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw]
[[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm]
[no-dso] [no-krb5] [sctp] [386] [--prefix=DIR]
| #!/bin/bash | |
| apt-get install -y distcc distcc-pump ccache | |
| sed -ie 's/STARTDISTCC="false"/STARTDISTCC="true"/' /etc/default/distcc | |
| sed -ie 's/ALLOWEDNETS="127.0.0.1"/ALLOWEDNETS="192.168.0.0\/16 172.16.0.0\/12 10.0.0.0\/8"/' /etc/default/distcc | |
| sed -ie 's/LISTENER="127.0.0.1"/LISTENER="0.0.0.0"/' /etc/default/distcc | |
| sed -ie "s/JOBS=\"\"/JOBS=\"`grep processor /proc/cpuinfo | wc -l`\"/" /etc/default/distcc | |
| sed -ie 's/ZEROCONF="false"/ZEROCONF="true"/' /etc/default/distcc | |
| #PATH here? https://midnightyell.wordpress.com/2012/10/14/a-good-compromise-cross-compiling-with-distcc/ |
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean && sudo apt-get install build-essential haveged -y
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install curl -y
sudo apt-get install shadowsocks-libev -y
sudo apt-get install cron -y
sudo apt-get install screen -y
Install ss-server: https://github.com/shadowsocks/shadowsocks-libev
Download v2ray-plugin: https://github.com/shadowsocks/v2ray-plugin/releases
Download v2ray: https://github.com/v2ray/v2ray-core/releases
> ss-server -c server_config.json --plugin v2ray-plugin_linux_amd64 --plugin-opts "server;mode=websocket;path=/;loglevel=info"| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset='UTF-8' /> | |
| <style type="text/css"> | |
| <!-- | |
| .chat_wrapper { | |
| width: 500px; | |
| margin-right: auto; | |
| margin-left: auto; |
由于路由管控系统的建立,实时动态黑洞路由已成为最有效的封锁手段,TCP连接重置和DNS污染成为次要手段,利用漏洞的穿墙方法已不再具有普遍意义。对此应对方法是多样化协议的VPN来抵抗识别。这里介绍一种太简单、有时很朴素的“穷人VPN”。
朴素VPN只需要一次内核配置(Linux内核),即可永久稳定运行,不需要任何用户态守护进程。所有流量转换和加密全部由内核完成,原生性能,开销几乎没有。静态配置,避免动态握手和参数协商产生指纹特征导致被识别。并且支持NAT,移动的内网用户可以使用此方法。支持广泛,基于L2TPv3标准,Linux内核3.2+都有支持,其他操作系统原则上也能支持。但有两个局限:需要root权限;一个隧道只支持一个用户。
朴素VPN利用UDP封装的静态L2TP隧道实现VPN,内核XFRM实现静态IPsec。实际上IP-in-IP隧道即可实现VPN,但是这种协议无法穿越NAT,因此必须利用UDP封装。内核3.18将支持Foo-over-UDP,在UDP里面直接封装IP,与静态的L2TP-over-UDP很类似。