Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| server { | |
| listen 80; | |
| server_name dl.cuoluo.me; | |
| location / { | |
| proxy_redirect off; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_pass http://dl.dropbox.com/u/1812807/dl.cuoluo.me/index.html; | |
| if ($request_method = POST) { |
| # this script will be executed after loading the routing rules in vpnup.sh | |
| # current vpngw: 172.10.253.1 | |
| # Example: | |
| # route add -host 208.67.222.222 gw $VPNGW | |
| # route add -net 74.125.0.0/16 gw $VPNGW | |
| route add -net 31.13.0.0/16 gw $VPNGW | |
| route add -net 61.238.0.0/16 gw $VPNGW | |
| route add -host 184.154.128.246 gw $VPNGW | |
| route add -host 173.255.115.197 gw $VPNGW |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import requests | |
| from pyquery import PyQuery as pq | |
| class V2User(object): | |
| def __init__(self, username, password): | |
| self.username = username | |
| self.password = password |
| 1 普通匹配,遵循最长匹配规则,假设一个请求匹配到了两个普通规则,则选择匹配长度大的那个 | |
| 例如: | |
| location /{ | |
| [matches] | |
| } | |
| location /test{ | |
| [matches] | |
| } | |
| 2 精确匹配 | |
| location = /{ |
| [General] | |
| skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local | |
| bypass-tun = 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 59.64.0.0/10, 59.128.0.0/9, 60.0.0.0/10, 60.160.0.0/11, 60.192.0.0/10, 61.0.0.0/10, 61.64.0.0/11, 61.128.0.0/10, 61.224.0.0/11, 100.64.0.0/10, 101.0.0.0/9, 101.128.0.0/11, 101.192.0.0/10, 103.0.0.0/10, 103.192.0.0/10, 106.0.0.0/9, 106.224.0.0/11, 110.0.0.0/7, 112.0.0.0/9, 112.128.0.0/11, 112.192.0.0/10, 113.0.0.0/9, 113.128.0.0/11, 113.192.0.0/10, 114.0.0.0/9, 114.128.0.0/11, 114.192.0.0/10, 115.0.0.0/8, 116.0.0.0/8, 117.0.0.0/9, 117.128.0.0/10, 118.0.0.0/11, 118.64.0.0/10, 118.128.0.0/9, 119.0. |
| :root { | |
| font-size: 16px; | |
| } | |
| // Or you can use html | |
| // html { | |
| // font-size: 16px; | |
| // } | |
| body { |
| # 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf | |
| # 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备 | |
| # Version 2.0 | |
| [General] | |
| # 日志等级: warning, notify, info, verbose (默认值: notify) | |
| loglevel = notify | |
| # 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS | |
| # 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理 | |
| # 设置中.) |
| (function () { | |
| // IndexedDB | |
| function BrowserType() { | |
| var n = navigator.appName; | |
| var ua = navigator.userAgent; | |
| var tem; | |
| var m = ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); | |
| if (m && (tem = ua.match(/version\/([\.\d]+)/i)) != null) m[2] = tem[1]; | |
| m = m ? [m[1], m[2]] : [n, navigator.appVersion, '-?']; |
| Byobu Commands | |
| ============== | |
| byobu Screen manager | |
| Level 0 Commands (Quick Start) | |
| ------------------------------ | |
| <F2> Create a new window |