- 路由器固件: OpenWRT/DDWRT
- Gateway: WifiDog
- Auth Server: AuthPuppy
每个路由器就是一个节点(node)
| function replaceAll(str, find, replace) { | |
| return str.replace(new RegExp(find, 'g'), replace); | |
| } | |
| function dec2hex(dec, padding){ | |
| return parseInt(dec, 10).toString(16).padStart(padding, '0'); | |
| } | |
| function utf8StringToUtf16String(str) { | |
| var utf16 = []; |
| #import gevent | |
| #from ghost import Ghost, Session | |
| import requests | |
| import re | |
| import json | |
| import time | |
| import socket | |
| #from gevent import monkey; monkey.patch_all() | |
| timeout = 90 | |
| socket.setdefaulttimeout(timeout) |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| "strings" | |
| "github.com/PuerkitoBio/goquery" | |
| "github.com/parnurzeal/gorequest" |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>PayloadContent</key> | |
| <array> | |
| <dict> | |
| <key>PayloadContent</key> | |
| <dict> | |
| <key>com.google.Chrome</key> |
| <?php | |
| $url = 'https://my.frantech.ca/cart.php?a=add&pid=1'; | |
| $content = file_get_contents($url); | |
| if (preg_match("/Out of Stock/i", $content)) { | |
| echo "我擦,没货!"; | |
| } else { | |
| echo "我勒个去,终于有货了!"; | |
| sendMail(); |
| #!/bin/bash | |
| # CHANGE THESE | |
| auth_email="user@example.com" | |
| auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings | |
| zone_name="example.com" | |
| record_name="www.example.com" | |
| # MAYBE CHANGE THESE | |
| ip=$(curl -s http://ipv4.icanhazip.com) |
| good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。 | |
| 但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能) | |
| 本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考 | |
| https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks | |
| 1、 shadowsocks的timeout设置 | |
| 超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。 | |
| 2、 检查操作系统的各种限制 | |
| 对于openvz的vps,特别需要检查一下 |
| # -*-coding: utf-8 -*- | |
| import sys | |
| import os | |
| num = sys.argv[1] # num is the amount of *.ts files | |
| def add(x): | |
| """'x' is the amount of *.ts | |
| This function should add all other .ts combined into '1.ts' |
| #!/bin/bash | |
| while read album | |
| do | |
| echo -e "Will download album $album" | |
| google picasa get "$album" . | |
| pushd "$album" | |
| echo -e "Start to upload $album to Flickr" | |
| find -type f|sort|xargs -I{} flickr_upload {} | |
| popd |