diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/CNAME b/CNAME index 8619ede..44ca6be 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -anyproxy.org +anyproxy.io diff --git a/github.css b/github.css new file mode 100644 index 0000000..791537e --- /dev/null +++ b/github.css @@ -0,0 +1,123 @@ +/* + +github.com style (c) Vasily Polovnyov + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; + -webkit-text-size-adjust: none; +} + +.hljs-comment, +.diff .hljs-header { + color: #998; + font-style: italic; +} + +.hljs-keyword, +.css .rule .hljs-keyword, +.hljs-winutils, +.nginx .hljs-title, +.hljs-subst, +.hljs-request, +.hljs-status { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-hexcolor, +.ruby .hljs-constant { + color: #008080; +} + +.hljs-string, +.hljs-tag .hljs-value, +.hljs-doctag, +.tex .hljs-formula { + color: #d14; +} + +.hljs-title, +.hljs-id, +.scss .hljs-preprocessor { + color: #900; + font-weight: bold; +} + +.hljs-list .hljs-keyword, +.hljs-subst { + font-weight: normal; +} + +.hljs-class .hljs-title, +.hljs-type, +.vhdl .hljs-literal, +.tex .hljs-command { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-tag .hljs-title, +.hljs-rule .hljs-property, +.django .hljs-tag .hljs-keyword { + color: #000080; + font-weight: normal; +} + +.hljs-attribute, +.hljs-variable, +.lisp .hljs-body, +.hljs-name { + color: #008080; +} + +.hljs-regexp { + color: #009926; +} + +.hljs-symbol, +.ruby .hljs-symbol .hljs-string, +.lisp .hljs-keyword, +.clojure .hljs-keyword, +.scheme .hljs-keyword, +.tex .hljs-special, +.hljs-prompt { + color: #990073; +} + +.hljs-built_in { + color: #0086b3; +} + +.hljs-preprocessor, +.hljs-pragma, +.hljs-pi, +.hljs-doctype, +.hljs-shebang, +.hljs-cdata { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.diff .hljs-change { + background: #0086b3; +} + +.hljs-chunk { + color: #aaa; +} diff --git a/images/bg_hr.png b/images/bg_hr.png deleted file mode 100644 index 514aee5..0000000 Binary files a/images/bg_hr.png and /dev/null differ diff --git a/images/blacktocat.png b/images/blacktocat.png deleted file mode 100644 index e160053..0000000 Binary files a/images/blacktocat.png and /dev/null differ diff --git a/images/checker.png b/images/checker.png deleted file mode 100644 index 7a65b23..0000000 Binary files a/images/checker.png and /dev/null differ diff --git a/images/icon_download.png b/images/icon_download.png deleted file mode 100644 index 5a793f1..0000000 Binary files a/images/icon_download.png and /dev/null differ diff --git a/images/sprite_download.png b/images/sprite_download.png deleted file mode 100644 index f9f8de2..0000000 Binary files a/images/sprite_download.png and /dev/null differ diff --git a/index.css b/index.css new file mode 100644 index 0000000..6b238ba --- /dev/null +++ b/index.css @@ -0,0 +1,189 @@ +@font-face { + font-family: 'iconfont'; + src: url('//at.alicdn.com/t/font_1438330832_106274.eot'); + src: url('//at.alicdn.com/t/font_1438330832_106274.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('//at.alicdn.com/t/font_1438330832_106274.woff') format('woff'), /* chrome、firefox */ url('//at.alicdn.com/t/font_1438330832_106274.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('//at.alicdn.com/t/font_1438330832_106274.svg#iconfont') format('svg'); + + /* IE9*/ + /* iOS 4.1- */ +} +i.iconfont { + font-family: "iconfont"; + font-style: normal; +} +body { + margin: 0; + padding: 0; + font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.wrapper .cornerBtn { + position: absolute; + right: 10px; + top: 10px; +} +.wrapper a, +.wrapper a:hover { + text-decoration: none; +} +.wrapper a { + font-size: 16px; + color: #00aaee; + line-height: 40px; +} +.wrapper h4.subTitle { + font-size: 30px; + margin: 0; + padding: 30px 0; + width: 100%; + text-align: center; +} +.wrapper code { + display: inline-block; +} +.wrapper .actionBtn.actionBtnWhite { + color: #FFF; + border: 1px solid #FFF; +} +.wrapper .actionBtn.actionBtnWhite:hover { + background: #f9f9f9; + color: #326eeb; +} +.wrapper .actionBtn { + color: #326eeb; + border: 1px solid #326eeb; + line-height: 30px; + font-size: 30px; + padding: 20px 45px; + border-radius: 30px; + display: inline-block; + transition: 0.3s; +} +.wrapper .actionBtn:hover { + background: #326eeb; + color: #f9f9f9; +} +.brief { + height: 300px; + width: 100%; + text-align: center; + padding: 100px 0; + position: relative; +} +.brief .slogan { + font-size: 16px; + color: #636373; +} +.feature { + background: #dedede; + width: 100%; +} +.feature .featureContent { + width: 1200px; + margin: 0 auto; +} +.feature .featureContent .item { + width: 280px; + height: 190px; + /*border: 1px solid #AAA;*/ + margin: 0 10px; + float: left; + box-sizing: border-box; + -webkit-box-sizing: border-box; + font-size: 30px; +} +.feature .featureContent .iconWrapper { + float: left; + display: inline-block; + height: 190px; + line-height: 190px; + width: 70px; + text-align: center; + font-size: 40px; + color: #636373; +} +.feature .featureContent h4 { + color: #636373; + margin: 60px 0 15px 0; + font-size: 20px; +} +.feature .featureContent h5 { + color: #777777; + margin: 0; + font-size: 14px; +} +.quickstart { + background: #f9f9f9; + width: 100%; +} +.quickstart .quickstartContent { + position: relative; +} +.quickstart .screenshot { + position: absolute; + right: 0; + bottom: 0; +} +.quickstart code.simpleBash { + font-family: monospace; + font-weight: bold; + color: #333; + padding: 0; +} +.listSection .listContent { + width: 1200px; + margin: 0 auto; +} +.listSection ul { + margin: 0 200px; +} +.listSection li { + color: #636373; + font-size: 16px; + line-height: 40px; +} +.sample { + background: #f9f9f9; +} +.sample .sampleContent { + width: 1200px; + margin: 0 auto; +} +.sample .item { + width: 1000px; + margin: 20px auto 0; +} +.sample .figure { + vertical-align: top; +} +.sample pre { + margin: 0; + display: inline-block; + vertical-align: top; +} +.sample code { + width: 530px; +} +.sample .readmore { + /*text-align: center;*/ + padding-bottom: 20px; +} +.readMore { + background: #f9f9f9; + padding-bottom: 50px; +} +.learnMore { + width: 100%; + height: 300px; + background: #326eeb; + text-align: center; + position: relative; +} +.learnMore .btnWrapper { + width: 100%; + text-align: center; + height: 60px; + margin-top: -30px; + position: absolute; + top: 50%; +} diff --git a/index.html b/index.html index a55009c..0b18ede 100644 --- a/index.html +++ b/index.html @@ -1,268 +1,221 @@ - + + AnyProxy + + + - - - - +
+ View on Github
- +
+ +

AnyProxy是一个开放式的HTTP/HTTPS代理,你可以灵活控制各种网络数据

+
+     + +
+
- Anyproxy - +
+
+
+ + + +

基于Node.js

+
全程JavaScript,学习无压力
+
+
+ + + +

支持Https

+
用AnyProxy自制根证书,明文解析Https请求数据 如何配置>>
+
+
+ + + +

Web界面

+
多终端共享,可视化观察每个请求
+
+
+ + + +

规则逻辑(Rule)

+
随心所欲编写处理规则,定制我的专属调试工具
+
+
+
+
- +
+
+

安装

+
    +
  • 安装 Node.js >= v0.12
  • +
  • npm install -g anyproxy, 可能需要sudo
  • +
  • More>>
  • +
+

使用

+
    +
  • 运行  anyproxy
  • +
  • 把浏览器http代理指向 127.0.0.1:8001
  • +
  • 访问界面:http://127.0.0.1:8002
  • +
  • 更多用法>>
  • +
+ +
+
- -
-
- View on GitHub +
-

Anyproxy

-

A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.

- -
- Download this project as a .zip file - Download this project as a tar.gz file -
-
-
- - -
-
-

-anyproxy

- -

A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.

- -

-Feature

- -
    -
  • work as http or https proxy
  • -
  • fully configurable, you can modify a request at any stage by your own javascript code
  • -
  • when working as https proxy, it can generate and intercept https requests for any domain without complaint by browser (after you trust its root CA)
  • -
  • provide a web interface
  • -
- -

screenshot

- -

-Usage

- -

-step 1 - install

- -
    -
  • install NodeJS -
  • -
  • -npm install -g anyproxy , may require sudo -
  • -
- -

-step 2 - start server

- -
    -
  • start with default settings : anyproxy -
  • -
  • start with a specific port: anyproxy --port 8001 -
  • -
- -

-step 3 - launch web interface

- - - -

-How to write your own rule file

- -
    -
  • with rule file, you can modify a request at any stage, no matter it's just before sending or after servers' responding.
  • -
  • actually ruleFile.js is a module for Nodejs, feel free to invoke your own modules.
  • -
  • anyproxy --rule /path/to/ruleFile.js
  • -
  • you may learn how it works by our samples: https://github.com/alipay-ct-wd/anyproxy/tree/master/rule_sample -
  • -
  • -

    samples in rule_sample

    - -
      -
    • rule__blank.js, blank rule file with some comments. You may read this before writing your own rule file.

    • -
    • rule_adjust_response_time.js, delay all the response for 1500ms

    • -
    • -rule_allow_CORS.js, add CORS headers to allow cross-domain ajax request
    • -
    • -rule_intercept_some_https_requests.js, intercept https requests toward github.com
    • -
    • -rule_remove_cache_header.js, remove all cache-related headers from server
    • -
    • -rule_replace_request_option.js, replace request parameters before sending to the server
    • -
    • -rule_replace_response_data.js, modify response data
    • -
    • -rule_replace_response_status_code.js, replace server's status code
    • -
    • -rule_use_local_data.js, map some requests to local file
    • -
    -
  • -
  • rule file scheme is as follows, you may also get it from rule__blank.js

  • -
- -
-module.exports = {
-    /*
-    these functions will overwrite the default ones, write your own when necessary.
-    */
-
-    //whether to intercept this request by local logic
-    //if the return value is true, anyproxy will call dealLocalResponse to get response data and will not send request to remote server anymore
-    shouldUseLocalResponse : function(req,reqBody){
-        return false;
-    },
-
-    //you may deal the response locally instead of sending it to server
-    //this function be called when shouldUseLocalResponse returns true
-    //callback(statusCode,resHeader,responseData)
-    //e.g. callback(200,{"content-type":"text/html"},"hello world")
-    dealLocalResponse : function(req,reqBody,callback){
-        callback(statusCode,resHeader,responseData)
-    },
-
-    //replace the request protocol when sending to the real server
-    //protocol : "http" or "https"
-    replaceRequestProtocol:function(req,protocol){
-        var newProtocol = protocol;
-        return newProtocol;
-    },
-
-    //req is user's request sent to the proxy server
-    //option is how the proxy server will send request to the real server. i.e. require("http").request(option,function(){...})
-    //you may return a customized option to replace the original option
-    //you should not write content-length header in options, since anyproxy will handle it for you
-    replaceRequestOption : function(req,option){
-        var newOption = option;
-        return newOption;
-    },
-
-    //replace the request body
-    replaceRequestData: function(req,data){
-        return data;
-    },
-
-    //replace the statusCode before it's sent to the user
-    replaceResponseStatusCode: function(req,res,statusCode){
-        var newStatusCode = statusCode;
-        return newStatusCode;
-    },
-
-    //replace the httpHeader before it's sent to the user
-    //Here header == res.headers
-    replaceResponseHeader: function(req,res,header){
-        var newHeader = header;
-        return newHeader;
-    },
-
-    //replace the response from the server before it's sent to the user
-    //you may return either a Buffer or a string
-    //serverResData is a Buffer, you may get its content by calling serverResData.toString()
-    replaceServerResData: function(req,res,serverResData){
-        return serverResData;
-    },
-
-    //add a pause before sending response to user
-    pauseBeforeSendingResponse : function(req,res){
-        var timeInMS = 1; //delay all requests for 1ms
-        return timeInMS; 
-    },
-
-    //should intercept https request, or it will be forwarded to real server
-    shouldInterceptHttpsReq :function(req){
-        return false;
-    }
+			
+

规则文件(rule)样例

+
+
+
+//remove cache related header
+//file : rule_remove_cache_header.js
+//rule : anyproxy --rule rule_remove_cache_header.js
+module.exports = {
+	replaceRequestOption : function(req,option){
+	    var newOption = option;
+	    delete newOption.headers['if-modified-since'];
 
+	    return newOption;
+	}
 };
-
+ +
+ + + +
-

-Using https features

+
+
+
+//append "hello world" to all web pages
+//file : rule_replace_response_data.js
+//run  : anyproxy --rule rule_replace_response_data.js
+module.exports = {
+    replaceServerResDataAsync: function(req,res,serverRes,callback){
 
-

-step 1 - install openssl

+ if(/html/i.test(res.headers['content-type'])){ + var newDataStr = serverRes.toString(); + newDataStr += "hello world!"; + callback(newDataStr); + } + } +}; +
+
+ + + +
-
    -
  • install openssl ,if you want to use HTTPS-related features. After that, the command openssl should be exposed to your shell
  • -
+
+
+
+//assign a specific IP adress for some request
+//file : rule_reverse_proxy.js
+//run  : anyproxy --rule anyproxy --rule rule_reverse_proxy.js
+module.exports = {
+    replaceRequestOption : function(req,option){
+        var newOption = option;
+        if(newOption.headers.host == "www.taobao.com"){
+            newOption.hostname = "192.168.1.3";
+            newOption.port     = "80";
+        }
 
-

-step 2 - generate a rootCA and trust it

+ return newOption; + } +}; +
+
+ + + +
-
    -
  • you should do this when it is the first time to start anyproxy
  • -
  • execute anyproxy --root ,follow the instructions on screen
  • -
  • you will see some tip like rootCA generated at : /usr/lib... . cd to that directory, add/trust the rootCA.crt file to your system keychain. In OSX, you may do that by open the *crt file directly
  • -
+
+
+
+//replace all the images with local one
+//file : rule_use_local_data.js
+//run  : anyproxy --rule anyproxy --rule rule_use_local_data.js
+var fs  = require("fs"),
+    img = fs.readFileSync("sample.jpg");
 
-

-step 3 - start a https proxy

+module.exports = { + shouldUseLocalResponse : function(req,reqBody){ + if(/\.(png|gif|jpg|jpeg)$/.test(req.url)){ + req.replaceLocalFile = true; + return true; + }else{ + return false; + } + }, -
    -
  • anyproxy --type https --host my.domain.com
  • -
  • the param host is required with https proxy and it should be kept exactly what it it when you config your browser. Otherwise, you may get some warning about security.
  • -
+ dealLocalResponse : function(req,reqBody,callback){ + if(req.replaceLocalFile){ + callback(200, {"content-type":"image/png"},img ); + } + } +}; +
+
+ + + +
-

-Others

+ +
+
-

-work as a module

+
+
+

其他特性

+ +

相关阅读

+ +
+
-
npm install anyproxy --save
-
+
+ +
-
var proxy = require("anyproxy");
+		
 
-!proxy.isRootCAFileExists() && proxy.generateRootCA(); //please manually trust this rootCA
-new proxy.proxyServer("http","8001", "localhost" ,"path/to/rule/file.js");
-
+ -

-clear all the temperary certificates

- -

anyproxy --clear

- -

-Contact

- - - - - - - - - - - - - - + + + + + \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..e69de29 diff --git a/index.less b/index.less new file mode 100644 index 0000000..b49b108 --- /dev/null +++ b/index.less @@ -0,0 +1,243 @@ +@main : #00AAEE; +@dark : #326EEB; +@gray : #F9F9F9; +@darkGray : #DEDEDE; +@textDark : #636373; +@textLight: #777; + +@wideContent : 1200px; + +@font-face { + font-family: 'iconfont'; + src: url('//at.alicdn.com/t/font_1438330832_106274.eot'); /* IE9*/ + src: url('//at.alicdn.com/t/font_1438330832_106274.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('//at.alicdn.com/t/font_1438330832_106274.woff') format('woff'), /* chrome、firefox */ + url('//at.alicdn.com/t/font_1438330832_106274.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ + url('//at.alicdn.com/t/font_1438330832_106274.svg#iconfont') format('svg'); /* iOS 4.1- */ +} + +i.iconfont{ + font-family: "iconfont"; + font-style: normal; +} + +body{ + margin: 0; + padding: 0; + font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.wrapper{ + .cornerBtn{ + position : absolute; + right : 10px; + top : 10px; + } + + a, + a:hover{ + text-decoration: none; + } + + a{ + font-size: 16px; + color: @main; + line-height: 40px; + } + + h4.subTitle{ + font-size: 30px; + margin: 0; + padding: 30px 0; + width: 100%; + text-align: center; + } + + code{ + display: inline-block; + } + + .actionBtn.actionBtnWhite{ + color: #FFF; + border: 1px solid #FFF; + + } + + .actionBtn.actionBtnWhite:hover{ + background: @gray; + color: @dark; + } + + .actionBtn{ + color: @dark; + border: 1px solid @dark; + line-height: 30px; + font-size: 30px; + padding: 20px 45px; + border-radius: 30px; + display: inline-block; + transition:0.3s; + } + + .actionBtn:hover{ + background: @dark; + color: @gray; + } +} + +.brief{ + height: 300px; + width: 100%; + text-align: center; + padding: 100px 0; + position: relative; + + .slogan{ + font-size: 16px; + color: @textDark; + } +} + +.feature{ + background: @darkGray; + width: 100%; + + .featureContent{ + width: @wideContent; + margin: 0 auto; + + @itemheight : 190px; + .item{ + width: 280px; + height: @itemheight; + /*border: 1px solid #AAA;*/ + margin: 0 10px; + float: left; + box-sizing:border-box; + -webkit-box-sizing:border-box; + font-size: 30px; + } + + .iconWrapper{ + float: left; + display: inline-block; + height: @itemheight; + line-height: @itemheight; + width: 70px; + text-align: center; + font-size: 40px; + color: @textDark; + } + + h4{ + color: @textDark; + margin: 60px 0 15px 0; + font-size: 20px; + } + + h5{ + color: @textLight; + margin: 0; + font-size: 14px; + } + } +} + +.quickstart{ + background: @gray; + width: 100%; + + .quickstartContent{ + position: relative; + } + + .screenshot{ + position: absolute; + right: 0; + bottom: 0; + } + + code.simpleBash{ + font-family: monospace; + font-weight: bold; + color: #333; + padding: 0; + } +} + +.listSection{ + .listContent{ + width: @wideContent; + margin: 0 auto; + } + + + ul{ + margin: 0 200px; + } + + li{ + color: @textDark; + font-size: 16px; + line-height: 40px; + } +} + +.sample{ + background: @gray; + + + .sampleContent{ + width: @wideContent; + margin: 0 auto; + } + + .item{ + width: 1000px; + margin: 20px auto 0; + } + + .figure{ + vertical-align: top; + } + + pre{ + margin: 0; + display: inline-block; + vertical-align: top; + } + + code{ + width: 530px; + } + + .readmore{ + /*text-align: center;*/ + padding-bottom: 20px; + } +} + +.readMore{ + background: @gray; + padding-bottom: 50px; +} + +.learnMore{ + width: 100%; + height: 300px; + background: @dark; + text-align: center; + position: relative; + + .btnWrapper{ + width: 100%; + text-align: center; + height: 60px; + margin-top: -30px; + position: absolute; + top:50%; + } +} + diff --git a/javascripts/main.js b/javascripts/main.js deleted file mode 100644 index d8135d3..0000000 --- a/javascripts/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log('This would be the main JS file.'); diff --git a/javascripts/scale.fix.js b/javascripts/scale.fix.js deleted file mode 100644 index 08716c0..0000000 --- a/javascripts/scale.fix.js +++ /dev/null @@ -1,20 +0,0 @@ -fixScale = function(doc) { - - var addEvent = 'addEventListener', - type = 'gesturestart', - qsa = 'querySelectorAll', - scales = [1, 1], - meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; - - function fix() { - meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; - doc.removeEventListener(type, fix, true); - } - - if ((meta = meta[meta.length - 1]) && addEvent in doc) { - fix(); - scales = [.25, 1.6]; - doc[addEvent](type, fix, true); - } - -}; \ No newline at end of file diff --git a/lib.js b/lib.js new file mode 100644 index 0000000..edbc256 --- /dev/null +++ b/lib.js @@ -0,0 +1,5 @@ +/* Zepto v1.1.6 - zepto event ajax form ie - zeptojs.com/license */ +var Zepto=function(){function L(t){return null==t?String(t):j[S.call(t)]||"object"}function Z(t){return"function"==L(t)}function _(t){return null!=t&&t==t.window}function $(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function D(t){return"object"==L(t)}function M(t){return D(t)&&!_(t)&&Object.getPrototypeOf(t)==Object.prototype}function R(t){return"number"==typeof t.length}function k(t){return s.call(t,function(t){return null!=t})}function z(t){return t.length>0?n.fn.concat.apply([],t):t}function F(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function q(t){return t in f?f[t]:f[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function H(t,e){return"number"!=typeof e||c[F(t)]?e:e+"px"}function I(t){var e,n;return u[t]||(e=a.createElement(t),a.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),u[t]=n),u[t]}function V(t){return"children"in t?o.call(t.children):n.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function B(n,i,r){for(e in i)r&&(M(i[e])||A(i[e]))?(M(i[e])&&!M(n[e])&&(n[e]={}),A(i[e])&&!A(n[e])&&(n[e]=[]),B(n[e],i[e],r)):i[e]!==t&&(n[e]=i[e])}function U(t,e){return null==e?n(t):n(t).filter(e)}function J(t,e,n,i){return Z(e)?e.call(t,n,i):e}function X(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function W(e,n){var i=e.className||"",r=i&&i.baseVal!==t;return n===t?r?i.baseVal:i:void(r?i.baseVal=n:e.className=n)}function Y(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?n.parseJSON(t):t):t}catch(e){return t}}function G(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)G(t.childNodes[n],e)}var t,e,n,i,C,N,r=[],o=r.slice,s=r.filter,a=window.document,u={},f={},c={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},l=/^\s*<(\w+|!)[^>]*>/,h=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,p=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,d=/^(?:body|html)$/i,m=/([A-Z])/g,g=["val","css","html","text","data","width","height","offset"],v=["after","prepend","before","append"],y=a.createElement("table"),x=a.createElement("tr"),b={tr:a.createElement("tbody"),tbody:y,thead:y,tfoot:y,td:x,th:x,"*":a.createElement("div")},w=/complete|loaded|interactive/,E=/^[\w-]*$/,j={},S=j.toString,T={},O=a.createElement("div"),P={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},A=Array.isArray||function(t){return t instanceof Array};return T.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=O).appendChild(t),i=~T.qsa(r,e).indexOf(t),o&&O.removeChild(t),i},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},N=function(t){return s.call(t,function(e,n){return t.indexOf(e)==n})},T.fragment=function(e,i,r){var s,u,f;return h.test(e)&&(s=n(a.createElement(RegExp.$1))),s||(e.replace&&(e=e.replace(p,"<$1>")),i===t&&(i=l.test(e)&&RegExp.$1),i in b||(i="*"),f=b[i],f.innerHTML=""+e,s=n.each(o.call(f.childNodes),function(){f.removeChild(this)})),M(r)&&(u=n(s),n.each(r,function(t,e){g.indexOf(t)>-1?u[t](e):u.attr(t,e)})),s},T.Z=function(t,e){return t=t||[],t.__proto__=n.fn,t.selector=e||"",t},T.isZ=function(t){return t instanceof T.Z},T.init=function(e,i){var r;if(!e)return T.Z();if("string"==typeof e)if(e=e.trim(),"<"==e[0]&&l.test(e))r=T.fragment(e,RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=T.qsa(a,e)}else{if(Z(e))return n(a).ready(e);if(T.isZ(e))return e;if(A(e))r=k(e);else if(D(e))r=[e],e=null;else if(l.test(e))r=T.fragment(e.trim(),RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=T.qsa(a,e)}}return T.Z(r,e)},n=function(t,e){return T.init(t,e)},n.extend=function(t){var e,n=o.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){B(t,n,e)}),t},T.qsa=function(t,e){var n,i="#"==e[0],r=!i&&"."==e[0],s=i||r?e.slice(1):e,a=E.test(s);return $(t)&&a&&i?(n=t.getElementById(s))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:o.call(a&&!i?r?t.getElementsByClassName(s):t.getElementsByTagName(e):t.querySelectorAll(e))},n.contains=a.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},n.type=L,n.isFunction=Z,n.isWindow=_,n.isArray=A,n.isPlainObject=M,n.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},n.inArray=function(t,e,n){return r.indexOf.call(e,t,n)},n.camelCase=C,n.trim=function(t){return null==t?"":String.prototype.trim.call(t)},n.uuid=0,n.support={},n.expr={},n.map=function(t,e){var n,r,o,i=[];if(R(t))for(r=0;r=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return r.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return Z(t)?this.not(this.not(t)):n(s.call(this,function(e){return T.matches(e,t)}))},add:function(t,e){return n(N(this.concat(n(t,e))))},is:function(t){return this.length>0&&T.matches(this[0],t)},not:function(e){var i=[];if(Z(e)&&e.call!==t)this.each(function(t){e.call(this,t)||i.push(this)});else{var r="string"==typeof e?this.filter(e):R(e)&&Z(e.item)?o.call(e):n(e);this.forEach(function(t){r.indexOf(t)<0&&i.push(t)})}return n(i)},has:function(t){return this.filter(function(){return D(t)?n.contains(this,t):n(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!D(t)?t:n(t)},last:function(){var t=this[this.length-1];return t&&!D(t)?t:n(t)},find:function(t){var e,i=this;return e=t?"object"==typeof t?n(t).filter(function(){var t=this;return r.some.call(i,function(e){return n.contains(e,t)})}):1==this.length?n(T.qsa(this[0],t)):this.map(function(){return T.qsa(this,t)}):n()},closest:function(t,e){var i=this[0],r=!1;for("object"==typeof t&&(r=n(t));i&&!(r?r.indexOf(i)>=0:T.matches(i,t));)i=i!==e&&!$(i)&&i.parentNode;return n(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=n.map(i,function(t){return(t=t.parentNode)&&!$(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return U(e,t)},parent:function(t){return U(N(this.pluck("parentNode")),t)},children:function(t){return U(this.map(function(){return V(this)}),t)},contents:function(){return this.map(function(){return o.call(this.childNodes)})},siblings:function(t){return U(this.map(function(t,e){return s.call(V(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return n.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=I(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=Z(t);if(this[0]&&!e)var i=n(t).get(0),r=i.parentNode||this.length>1;return this.each(function(o){n(this).wrapAll(e?t.call(this,o):r?i.cloneNode(!0):i)})},wrapAll:function(t){if(this[0]){n(this[0]).before(t=n(t));for(var e;(e=t.children()).length;)t=e.first();n(t).append(this)}return this},wrapInner:function(t){var e=Z(t);return this.each(function(i){var r=n(this),o=r.contents(),s=e?t.call(this,i):t;o.length?o.wrapAll(s):r.append(s)})},unwrap:function(){return this.parent().each(function(){n(this).replaceWith(n(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(e){return this.each(function(){var i=n(this);(e===t?"none"==i.css("display"):e)?i.show():i.hide()})},prev:function(t){return n(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return n(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var i=this.innerHTML;n(this).empty().append(J(this,t,e,i))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=J(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(n,i){var r;return"string"!=typeof n||1 in arguments?this.each(function(t){if(1===this.nodeType)if(D(n))for(e in n)X(this,e,n[e]);else X(this,n,J(this,i,t,this.getAttribute(n)))}):this.length&&1===this[0].nodeType?!(r=this[0].getAttribute(n))&&n in this[0]?this[0][n]:r:t},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){X(this,t)},this)})},prop:function(t,e){return t=P[t]||t,1 in arguments?this.each(function(n){this[t]=J(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(e,n){var i="data-"+e.replace(m,"-$1").toLowerCase(),r=1 in arguments?this.attr(i,n):this.attr(i);return null!==r?Y(r):t},val:function(t){return 0 in arguments?this.each(function(e){this.value=J(this,t,e,this.value)}):this[0]&&(this[0].multiple?n(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var i=n(this),r=J(this,t,e,i.offset()),o=i.offsetParent().offset(),s={top:r.top-o.top,left:r.left-o.left};"static"==i.css("position")&&(s.position="relative"),i.css(s)});if(!this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(t,i){if(arguments.length<2){var r,o=this[0];if(!o)return;if(r=getComputedStyle(o,""),"string"==typeof t)return o.style[C(t)]||r.getPropertyValue(t);if(A(t)){var s={};return n.each(t,function(t,e){s[e]=o.style[C(e)]||r.getPropertyValue(e)}),s}}var a="";if("string"==L(t))i||0===i?a=F(t)+":"+H(t,i):this.each(function(){this.style.removeProperty(F(t))});else for(e in t)t[e]||0===t[e]?a+=F(e)+":"+H(e,t[e])+";":this.each(function(){this.style.removeProperty(F(e))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(n(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?r.some.call(this,function(t){return this.test(W(t))},q(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){i=[];var r=W(this),o=J(this,t,e,r);o.split(/\s+/g).forEach(function(t){n(this).hasClass(t)||i.push(t)},this),i.length&&W(this,r+(r?" ":"")+i.join(" "))}}):this},removeClass:function(e){return this.each(function(n){if("className"in this){if(e===t)return W(this,"");i=W(this),J(this,e,n,i).split(/\s+/g).forEach(function(t){i=i.replace(q(t)," ")}),W(this,i.trim())}})},toggleClass:function(e,i){return e?this.each(function(r){var o=n(this),s=J(this,e,r,W(this));s.split(/\s+/g).forEach(function(e){(i===t?!o.hasClass(e):i)?o.addClass(e):o.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var n="scrollTop"in this[0];return e===t?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var n="scrollLeft"in this[0];return e===t?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),r=d.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(n(t).css("margin-top"))||0,i.left-=parseFloat(n(t).css("margin-left"))||0,r.top+=parseFloat(n(e[0]).css("border-top-width"))||0,r.left+=parseFloat(n(e[0]).css("border-left-width"))||0,{top:i.top-r.top,left:i.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||a.body;t&&!d.test(t.nodeName)&&"static"==n(t).css("position");)t=t.offsetParent;return t})}},n.fn.detach=n.fn.remove,["width","height"].forEach(function(e){var i=e.replace(/./,function(t){return t[0].toUpperCase()});n.fn[e]=function(r){var o,s=this[0];return r===t?_(s)?s["inner"+i]:$(s)?s.documentElement["scroll"+i]:(o=this.offset())&&o[e]:this.each(function(t){s=n(this),s.css(e,J(this,r,t,s[e]()))})}}),v.forEach(function(t,e){var i=e%2;n.fn[t]=function(){var t,o,r=n.map(arguments,function(e){return t=L(e),"object"==t||"array"==t||null==e?e:T.fragment(e)}),s=this.length>1;return r.length<1?this:this.each(function(t,u){o=i?u:u.parentNode,u=0==e?u.nextSibling:1==e?u.firstChild:2==e?u:null;var f=n.contains(a.documentElement,o);r.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!o)return n(t).remove();o.insertBefore(t,u),f&&G(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},n.fn[i?t+"To":"insert"+(e?"Before":"After")]=function(e){return n(e)[t](this),this}}),T.Z.prototype=n.fn,T.uniq=N,T.deserializeValue=Y,n.zepto=T,n}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(t){function l(t){return t._zid||(t._zid=e++)}function h(t,e,n,i){if(e=p(e),e.ns)var r=d(e.ns);return(s[l(t)]||[]).filter(function(t){return!(!t||e.e&&t.e!=e.e||e.ns&&!r.test(t.ns)||n&&l(t.fn)!==l(n)||i&&t.sel!=i)})}function p(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function d(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function m(t,e){return t.del&&!u&&t.e in f||!!e}function g(t){return c[t]||u&&f[t]||t}function v(e,i,r,o,a,u,f){var h=l(e),d=s[h]||(s[h]=[]);i.split(/\s/).forEach(function(i){if("ready"==i)return t(document).ready(r);var s=p(i);s.fn=r,s.sel=a,s.e in c&&(r=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?s.fn.apply(this,arguments):void 0}),s.del=u;var l=u||r;s.proxy=function(t){if(t=j(t),!t.isImmediatePropagationStopped()){t.data=o;var i=l.apply(e,t._args==n?[t]:[t].concat(t._args));return i===!1&&(t.preventDefault(),t.stopPropagation()),i}},s.i=d.length,d.push(s),"addEventListener"in e&&e.addEventListener(g(s.e),s.proxy,m(s,f))})}function y(t,e,n,i,r){var o=l(t);(e||"").split(/\s/).forEach(function(e){h(t,e,n,i).forEach(function(e){delete s[o][e.i],"removeEventListener"in t&&t.removeEventListener(g(e.e),e.proxy,m(e,r))})})}function j(e,i){return(i||!e.isDefaultPrevented)&&(i||(i=e),t.each(E,function(t,n){var r=i[t];e[t]=function(){return this[n]=x,r&&r.apply(i,arguments)},e[n]=b}),(i.defaultPrevented!==n?i.defaultPrevented:"returnValue"in i?i.returnValue===!1:i.getPreventDefault&&i.getPreventDefault())&&(e.isDefaultPrevented=x)),e}function S(t){var e,i={originalEvent:t};for(e in t)w.test(e)||t[e]===n||(i[e]=t[e]);return j(i,t)}var n,e=1,i=Array.prototype.slice,r=t.isFunction,o=function(t){return"string"==typeof t},s={},a={},u="onfocusin"in window,f={focus:"focusin",blur:"focusout"},c={mouseenter:"mouseover",mouseleave:"mouseout"};a.click=a.mousedown=a.mouseup=a.mousemove="MouseEvents",t.event={add:v,remove:y},t.proxy=function(e,n){var s=2 in arguments&&i.call(arguments,2);if(r(e)){var a=function(){return e.apply(n,s?s.concat(i.call(arguments)):arguments)};return a._zid=l(e),a}if(o(n))return s?(s.unshift(e[n],e),t.proxy.apply(null,s)):t.proxy(e[n],e);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var x=function(){return!0},b=function(){return!1},w=/^([A-Z]|returnValue$|layer[XY]$)/,E={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,s,a,u,f){var c,l,h=this;return e&&!o(e)?(t.each(e,function(t,e){h.on(t,s,a,e,f)}),h):(o(s)||r(u)||u===!1||(u=a,a=s,s=n),(r(a)||a===!1)&&(u=a,a=n),u===!1&&(u=b),h.each(function(n,r){f&&(c=function(t){return y(r,t.type,u),u.apply(this,arguments)}),s&&(l=function(e){var n,o=t(e.target).closest(s,r).get(0);return o&&o!==r?(n=t.extend(S(e),{currentTarget:o,liveFired:r}),(c||u).apply(o,[n].concat(i.call(arguments,1)))):void 0}),v(r,e,u,a,s,l||c)}))},t.fn.off=function(e,i,s){var a=this;return e&&!o(e)?(t.each(e,function(t,e){a.off(t,i,e)}),a):(o(i)||r(s)||s===!1||(s=i,i=n),s===!1&&(s=b),a.each(function(){y(this,e,s,i)}))},t.fn.trigger=function(e,n){return e=o(e)||t.isPlainObject(e)?t.Event(e):j(e),e._args=n,this.each(function(){e.type in f&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,n){var i,r;return this.each(function(s,a){i=S(o(e)?t.Event(e):e),i._args=n,i.target=a,t.each(h(a,e.type||e),function(t,e){return r=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),r},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){o(t)||(e=t,t=e.type);var n=document.createEvent(a[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),j(n)}}(Zepto),function(t){function h(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}function p(t,e,i,r){return t.global?h(e||n,i,r):void 0}function d(e){e.global&&0===t.active++&&p(e,null,"ajaxStart")}function m(e){e.global&&!--t.active&&p(e,null,"ajaxStop")}function g(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||p(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void p(e,n,"ajaxSend",[t,e])}function v(t,e,n,i){var r=n.context,o="success";n.success.call(r,t,o,e),i&&i.resolveWith(r,[t,o,e]),p(n,r,"ajaxSuccess",[e,n,t]),x(o,e,n)}function y(t,e,n,i,r){var o=i.context;i.error.call(o,n,e,t),r&&r.rejectWith(o,[n,e,t]),p(i,o,"ajaxError",[n,i,t||e]),x(e,n,i)}function x(t,e,n){var i=n.context;n.complete.call(i,e,t),p(n,i,"ajaxComplete",[e,n]),m(n)}function b(){}function w(t){return t&&(t=t.split(";",2)[0]),t&&(t==f?"html":t==u?"json":s.test(t)?"script":a.test(t)&&"xml")||"text"}function E(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function j(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=E(e.url,e.data),e.data=void 0)}function S(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}function C(e,n,i,r){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),r&&(n=i?r:r+"["+(a||"object"==o||"array"==o?n:"")+"]"),!r&&s?e.add(u.name,u.value):"array"==o||!i&&"object"==o?C(e,u,i,n):e.add(n,u)})}var i,r,e=0,n=window.document,o=/)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,a=/^(?:text|application)\/xml/i,u="application/json",f="text/html",c=/^\s*$/,l=n.createElement("a");l.href=window.location.href,t.active=0,t.ajaxJSONP=function(i,r){if(!("type"in i))return t.ajax(i);var f,h,o=i.jsonpCallback,s=(t.isFunction(o)?o():o)||"jsonp"+ ++e,a=n.createElement("script"),u=window[s],c=function(e){t(a).triggerHandler("error",e||"abort")},l={abort:c};return r&&r.promise(l),t(a).on("load error",function(e,n){clearTimeout(h),t(a).off().remove(),"error"!=e.type&&f?v(f[0],l,i,r):y(null,n||"error",l,i,r),window[s]=u,f&&t.isFunction(u)&&u(f[0]),u=f=void 0}),g(l,i)===!1?(c("abort"),l):(window[s]=function(){f=arguments},a.src=i.url.replace(/\?(.+)=\?/,"?$1="+s),n.head.appendChild(a),i.timeout>0&&(h=setTimeout(function(){c("timeout")},i.timeout)),l)},t.ajaxSettings={type:"GET",beforeSend:b,success:b,error:b,complete:b,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:u,xml:"application/xml, text/xml",html:f,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var a,o=t.extend({},e||{}),s=t.Deferred&&t.Deferred();for(i in t.ajaxSettings)void 0===o[i]&&(o[i]=t.ajaxSettings[i]);d(o),o.crossDomain||(a=n.createElement("a"),a.href=o.url,a.href=a.href,o.crossDomain=l.protocol+"//"+l.host!=a.protocol+"//"+a.host),o.url||(o.url=window.location.toString()),j(o);var u=o.dataType,f=/\?.+=\?/.test(o.url);if(f&&(u="jsonp"),o.cache!==!1&&(e&&e.cache===!0||"script"!=u&&"jsonp"!=u)||(o.url=E(o.url,"_="+Date.now())),"jsonp"==u)return f||(o.url=E(o.url,o.jsonp?o.jsonp+"=?":o.jsonp===!1?"":"callback=?")),t.ajaxJSONP(o,s);var C,h=o.accepts[u],p={},m=function(t,e){p[t.toLowerCase()]=[t,e]},x=/^([\w-]+:)\/\//.test(o.url)?RegExp.$1:window.location.protocol,S=o.xhr(),T=S.setRequestHeader;if(s&&s.promise(S),o.crossDomain||m("X-Requested-With","XMLHttpRequest"),m("Accept",h||"*/*"),(h=o.mimeType||h)&&(h.indexOf(",")>-1&&(h=h.split(",",2)[0]),S.overrideMimeType&&S.overrideMimeType(h)),(o.contentType||o.contentType!==!1&&o.data&&"GET"!=o.type.toUpperCase())&&m("Content-Type",o.contentType||"application/x-www-form-urlencoded"),o.headers)for(r in o.headers)m(r,o.headers[r]);if(S.setRequestHeader=m,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=b,clearTimeout(C);var e,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&"file:"==x){u=u||w(o.mimeType||S.getResponseHeader("content-type")),e=S.responseText;try{"script"==u?(1,eval)(e):"xml"==u?e=S.responseXML:"json"==u&&(e=c.test(e)?null:t.parseJSON(e))}catch(i){n=i}n?y(n,"parsererror",S,o,s):v(e,S,o,s)}else y(S.statusText||null,S.status?"error":"abort",S,o,s)}},g(S,o)===!1)return S.abort(),y(null,"abort",S,o,s),S;if(o.xhrFields)for(r in o.xhrFields)S[r]=o.xhrFields[r];var N="async"in o?o.async:!0;S.open(o.type,o.url,N,o.username,o.password);for(r in p)T.apply(S,p[r]);return o.timeout>0&&(C=setTimeout(function(){S.onreadystatechange=b,S.abort(),y(null,"timeout",S,o,s)},o.timeout)),S.send(o.data?o.data:null),S},t.get=function(){return t.ajax(S.apply(null,arguments))},t.post=function(){var e=S.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=S.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var a,r=this,s=e.split(/\s/),u=S(e,n,i),f=u.success;return s.length>1&&(u.url=s[0],a=s[1]),u.success=function(e){r.html(a?t("
").html(e.replace(o,"")).find(a):e),f&&f.apply(r,arguments)},t.ajax(u),this};var T=encodeURIComponent;t.param=function(e,n){var i=[];return i.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(T(e)+"="+T(n))},C(i,e,n),i.join("&").replace(/%20/g,"+")}}(Zepto),function(t){t.fn.serializeArray=function(){var e,n,i=[],r=function(t){return t.forEach?t.forEach(r):void i.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(i,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&r(t(o).val())}),i},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(Zepto),function(t){"__proto__"in{}||t.extend(t.zepto,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;window.getComputedStyle=function(t){try{return n(t)}catch(e){return null}}}}(Zepto); + +/* https://highlightjs.org/ */ +!function(e){"undefined"!=typeof exports?e(exports):(window.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&").replace(//gm,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/no-?highlight|plain|text/.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/.exec(i))return E(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(E(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset"}function u(e){f+=""}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,f="",l=[];e.length||r.length;){var g=i();if(f+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){l.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);l.reverse().forEach(o)}else"start"==g[0].event?l.push(g[0].node):l.pop(),c(g.splice(0,1)[0])}return f+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var f=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=f.length?t(f.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){for(var t=0;t";return i+=e+'">',i+n+o}function p(){if(!L.k)return n(y);var e="",t=0;L.lR.lastIndex=0;for(var r=L.lR.exec(y);r;){e+=n(y.substr(t,r.index-t));var a=g(L,r);a?(B+=a[1],e+=h(a[0],n(r[0]))):e+=n(r[0]),t=L.lR.lastIndex,r=L.lR.exec(y)}return e+n(y.substr(t))}function d(){var e="string"==typeof L.sL;if(e&&!x[L.sL])return n(y);var t=e?f(L.sL,y,!0,M[L.sL]):l(y,L.sL.length?L.sL:void 0);return L.r>0&&(B+=t.r),e&&(M[L.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){return void 0!==L.sL?d():p()}function v(e,t){var r=e.cN?h(e.cN,"",!0):"";e.rB?(k+=r,y=""):e.eB?(k+=n(t)+r,y=""):(k+=r,y=t),L=Object.create(e,{parent:{value:L}})}function m(e,t){if(y+=e,void 0===t)return k+=b(),0;var r=o(t,L);if(r)return k+=b(),v(r,t),r.rB?0:t.length;var a=u(L,t);if(a){var i=L;i.rE||i.eE||(y+=t),k+=b();do L.cN&&(k+=""),B+=L.r,L=L.parent;while(L!=a.parent);return i.eE&&(k+=n(t)),y="",a.starts&&v(a.starts,""),i.rE?0:t.length}if(c(t,L))throw new Error('Illegal lexeme "'+t+'" for mode "'+(L.cN||"")+'"');return y+=t,t.length||1}var N=E(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,L=i||N,M={},k="";for(R=L;R!=N;R=R.parent)R.cN&&(k=h(R.cN,"",!0)+k);var y="",B=0;try{for(var C,j,I=0;;){if(L.t.lastIndex=I,C=L.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),R=L;R.parent;R=R.parent)R.cN&&(k+="");return{r:B,value:k,language:e,top:L}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function l(e,t){t=t||w.languages||Object.keys(x);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(E(n)){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return w.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,w.tabReplace)})),w.useBR&&(e=e.replace(/\n/g,"
")),e}function h(e,n,t){var r=n?R[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n=i(e);if(!a(n)){var t;w.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e;var r=t.textContent,o=n?f(n,r,!0):l(r),s=u(t);if(s.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(s,u(p),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=h(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){w=o(w,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){R[e]=n})}function N(){return Object.keys(x)}function E(e){return x[e]||x[R[e]]}var w={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},x={},R={};return e.highlight=f,e.highlightAuto=l,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=E,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"pi",r:10,b:/^\s*['"]use (strict|asm)['"]/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{bK:"import",e:"[;$]",k:"import from as",c:[e.ASM,e.QSM]},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]}],i:/#/}});hljs.registerLanguage("xml",function(t){var s="[A-Za-z0-9\\._:-]+",c={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php"},e={eW:!0,i:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},t.C("",{r:10}),{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[e],starts:{e:"",rE:!0,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[e],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars"]}},c,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"title",b:/[^ \/><\n\t]+/,r:0},e]}]}}); \ No newline at end of file diff --git a/params.json b/params.json deleted file mode 100644 index f24d133..0000000 --- a/params.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Anyproxy","tagline":"A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.","body":"anyproxy\r\n==========\r\nA fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.\r\n\r\nFeature\r\n------------\r\n* work as http or https proxy\r\n* fully configurable, you can modify a request at any stage by your own javascript code\r\n* when working as https proxy, it can generate and intercept https requests for any domain without complaint by browser (after you trust its root CA)\r\n* provide a web interface\r\n\r\n![screenshot](http://gtms03.alicdn.com/tps/i3/TB1ddyqGXXXXXbXXpXXihxC1pXX-1000-549.jpg_640x640q90.jpg)\r\n \r\nUsage\r\n--------------\r\n\r\n### step 1 - install\r\n\r\n* install [NodeJS](http://nodejs.org/)\r\n* ``npm install -g anyproxy`` , may require ``sudo``\r\n\r\n### step 2 - start server\r\n\r\n* start with default settings : ``anyproxy``\r\n* start with a specific port: ``anyproxy --port 8001``\r\n\r\n### step 3 - launch web interface\r\n\r\n* visit [http://127.0.0.1:8002](http://127.0.0.1:8002) with modern browsers\r\n\r\nHow to write your own rule file\r\n-------------------\r\n* with rule file, you can modify a request at any stage, no matter it's just before sending or after servers' responding.\r\n* actually ruleFile.js is a module for Nodejs, feel free to invoke your own modules.\r\n* ``anyproxy --rule /path/to/ruleFile.js``\r\n* you may learn how it works by our samples: [https://github.com/alipay-ct-wd/anyproxy/tree/master/rule_sample](https://github.com/alipay-ct-wd/anyproxy/tree/master/rule_sample)\r\n* samples in [rule_sample](https://github.com/alipay-ct-wd/anyproxy/tree/master/rule_sample)\r\n * **rule__blank.js**, blank rule file with some comments. You may read this before writing your own rule file.\r\n\r\n * **rule_adjust_response_time.js**, delay all the response for 1500ms\r\n * **rule_allow_CORS.js**, add CORS headers to allow cross-domain ajax request\r\n * **rule_intercept_some_https_requests.js**, intercept https requests toward github.com\r\n * **rule_remove_cache_header.js**, remove all cache-related headers from server\r\n * **rule_replace_request_option.js**, replace request parameters before sending to the server\r\n * **rule_replace_response_data.js**, modify response data\r\n * **rule_replace_response_status_code.js**, replace server's status code\r\n * **rule_use_local_data.js**, map some requests to local file\r\n\r\n* rule file scheme is as follows, you may also get it from [rule__blank.js](https://github.com/alipay-ct-wd/anyproxy/blob/master/rule_sample/rule__blank.js)\r\n\r\n```javascript\r\n\r\nmodule.exports = {\r\n /*\r\n these functions will overwrite the default ones, write your own when necessary.\r\n */\r\n\r\n //whether to intercept this request by local logic\r\n //if the return value is true, anyproxy will call dealLocalResponse to get response data and will not send request to remote server anymore\r\n shouldUseLocalResponse : function(req,reqBody){\r\n return false;\r\n },\r\n\r\n //you may deal the response locally instead of sending it to server\r\n //this function be called when shouldUseLocalResponse returns true\r\n //callback(statusCode,resHeader,responseData)\r\n //e.g. callback(200,{\"content-type\":\"text/html\"},\"hello world\")\r\n dealLocalResponse : function(req,reqBody,callback){\r\n callback(statusCode,resHeader,responseData)\r\n },\r\n\r\n //replace the request protocol when sending to the real server\r\n //protocol : \"http\" or \"https\"\r\n replaceRequestProtocol:function(req,protocol){\r\n var newProtocol = protocol;\r\n return newProtocol;\r\n },\r\n\r\n //req is user's request sent to the proxy server\r\n //option is how the proxy server will send request to the real server. i.e. require(\"http\").request(option,function(){...})\r\n //you may return a customized option to replace the original option\r\n //you should not write content-length header in options, since anyproxy will handle it for you\r\n replaceRequestOption : function(req,option){\r\n var newOption = option;\r\n return newOption;\r\n },\r\n\r\n //replace the request body\r\n replaceRequestData: function(req,data){\r\n return data;\r\n },\r\n\r\n //replace the statusCode before it's sent to the user\r\n replaceResponseStatusCode: function(req,res,statusCode){\r\n var newStatusCode = statusCode;\r\n return newStatusCode;\r\n },\r\n\r\n //replace the httpHeader before it's sent to the user\r\n //Here header == res.headers\r\n replaceResponseHeader: function(req,res,header){\r\n var newHeader = header;\r\n return newHeader;\r\n },\r\n\r\n //replace the response from the server before it's sent to the user\r\n //you may return either a Buffer or a string\r\n //serverResData is a Buffer, you may get its content by calling serverResData.toString()\r\n replaceServerResData: function(req,res,serverResData){\r\n return serverResData;\r\n },\r\n\r\n //add a pause before sending response to user\r\n pauseBeforeSendingResponse : function(req,res){\r\n var timeInMS = 1; //delay all requests for 1ms\r\n return timeInMS; \r\n },\r\n\r\n //should intercept https request, or it will be forwarded to real server\r\n shouldInterceptHttpsReq :function(req){\r\n return false;\r\n }\r\n\r\n};\r\n\r\n```\r\n\r\nUsing https features\r\n----------------\r\n#### step 1 - install openssl\r\n* install [openssl](http://wiki.openssl.org/index.php/Compilation_and_Installation) ,if you want to use HTTPS-related features. After that, the command ``openssl`` should be exposed to your shell\r\n\r\n#### step 2 - generate a rootCA and trust it\r\n* you should do this when it is the first time to start anyproxy\r\n* execute ``anyproxy --root`` ,follow the instructions on screen\r\n* you will see some tip like *rootCA generated at : /usr/lib...* . ``cd`` to that directory, add/trust the rootCA.crt file to your system keychain. In OSX, you may do that by open the *crt file directly\r\n\r\n#### step 3 - start a https proxy\r\n* ``anyproxy --type https --host my.domain.com``\r\n* the param ``host`` is required with https proxy and it should be kept exactly what it it when you config your browser. Otherwise, you may get some warning about security.\r\n\r\n\r\nOthers\r\n-----------------\r\n#### work as a module\r\n```\r\nnpm install anyproxy --save\r\n```\r\n\r\n```javascript\r\nvar proxy = require(\"anyproxy\");\r\n\r\n!proxy.isRootCAFileExists() && proxy.generateRootCA(); //please manually trust this rootCA\r\nnew proxy.proxyServer(\"http\",\"8001\", \"localhost\" ,\"path/to/rule/file.js\");\r\n\r\n```\r\n\r\n#### clear all the temperary certificates\r\n``anyproxy --clear``\r\n\r\n\r\n## Contact\r\n* Please feel free to raise any issue about this project, or give us some advice on this doc. :)\r\n","google":"UA-57129650-1","note":"Don't delete this file! It's used internally to help with page regeneration."} \ No newline at end of file diff --git a/sampleA.png b/sampleA.png new file mode 100644 index 0000000..0c4c379 Binary files /dev/null and b/sampleA.png differ diff --git a/sampleB.png b/sampleB.png new file mode 100644 index 0000000..10e9f67 Binary files /dev/null and b/sampleB.png differ diff --git a/sampleC.png b/sampleC.png new file mode 100644 index 0000000..160ce0c Binary files /dev/null and b/sampleC.png differ diff --git a/sampleD.png b/sampleD.png new file mode 100644 index 0000000..aec4470 Binary files /dev/null and b/sampleD.png differ diff --git a/stylesheets/pygment_trac.css b/stylesheets/pygment_trac.css deleted file mode 100644 index e65cedf..0000000 --- a/stylesheets/pygment_trac.css +++ /dev/null @@ -1,70 +0,0 @@ -.highlight .hll { background-color: #ffffcc } -.highlight { background: #f0f3f3; } -.highlight .c { color: #0099FF; font-style: italic } /* Comment */ -.highlight .err { color: #AA0000; background-color: #FFAAAA } /* Error */ -.highlight .k { color: #006699; font-weight: bold } /* Keyword */ -.highlight .o { color: #555555 } /* Operator */ -.highlight .cm { color: #0099FF; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #009999 } /* Comment.Preproc */ -.highlight .c1 { color: #0099FF; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #0099FF; font-weight: bold; font-style: italic } /* Comment.Special */ -.highlight .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #FF0000 } /* Generic.Error */ -.highlight .gh { color: #003300; font-weight: bold } /* Generic.Heading */ -.highlight .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ -.highlight .go { color: #AAAAAA } /* Generic.Output */ -.highlight .gp { color: #000099; font-weight: bold } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #003300; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #99CC66 } /* Generic.Traceback */ -.highlight .kc { color: #006699; font-weight: bold } /* Keyword.Constant */ -.highlight .kd { color: #006699; font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { color: #006699; font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { color: #006699 } /* Keyword.Pseudo */ -.highlight .kr { color: #006699; font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #007788; font-weight: bold } /* Keyword.Type */ -.highlight .m { color: #FF6600 } /* Literal.Number */ -.highlight .s { color: #CC3300 } /* Literal.String */ -.highlight .na { color: #330099 } /* Name.Attribute */ -.highlight .nb { color: #336666 } /* Name.Builtin */ -.highlight .nc { color: #00AA88; font-weight: bold } /* Name.Class */ -.highlight .no { color: #336600 } /* Name.Constant */ -.highlight .nd { color: #9999FF } /* Name.Decorator */ -.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ -.highlight .ne { color: #CC0000; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #CC00FF } /* Name.Function */ -.highlight .nl { color: #9999FF } /* Name.Label */ -.highlight .nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */ -.highlight .nt { color: #330099; font-weight: bold } /* Name.Tag */ -.highlight .nv { color: #003333 } /* Name.Variable */ -.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mf { color: #FF6600 } /* Literal.Number.Float */ -.highlight .mh { color: #FF6600 } /* Literal.Number.Hex */ -.highlight .mi { color: #FF6600 } /* Literal.Number.Integer */ -.highlight .mo { color: #FF6600 } /* Literal.Number.Oct */ -.highlight .sb { color: #CC3300 } /* Literal.String.Backtick */ -.highlight .sc { color: #CC3300 } /* Literal.String.Char */ -.highlight .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ -.highlight .s2 { color: #CC3300 } /* Literal.String.Double */ -.highlight .se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */ -.highlight .sh { color: #CC3300 } /* Literal.String.Heredoc */ -.highlight .si { color: #AA0000 } /* Literal.String.Interpol */ -.highlight .sx { color: #CC3300 } /* Literal.String.Other */ -.highlight .sr { color: #33AAAA } /* Literal.String.Regex */ -.highlight .s1 { color: #CC3300 } /* Literal.String.Single */ -.highlight .ss { color: #FFCC33 } /* Literal.String.Symbol */ -.highlight .bp { color: #336666 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #003333 } /* Name.Variable.Class */ -.highlight .vg { color: #003333 } /* Name.Variable.Global */ -.highlight .vi { color: #003333 } /* Name.Variable.Instance */ -.highlight .il { color: #FF6600 } /* Literal.Number.Integer.Long */ - -.type-csharp .highlight .k { color: #0000FF } -.type-csharp .highlight .kt { color: #0000FF } -.type-csharp .highlight .nf { color: #000000; font-weight: normal } -.type-csharp .highlight .nc { color: #2B91AF } -.type-csharp .highlight .nn { color: #000000 } -.type-csharp .highlight .s { color: #A31515 } -.type-csharp .highlight .sc { color: #A31515 } diff --git a/stylesheets/styles.css b/stylesheets/styles.css deleted file mode 100644 index 466b9d6..0000000 --- a/stylesheets/styles.css +++ /dev/null @@ -1,356 +0,0 @@ -@import url(https://fonts.googleapis.com/css?family=Lato:300italic,700italic,300,700); -html { - background: #6C7989; - background: #6c7989 -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6c7989), color-stop(100%, #434b55)) fixed; - background: #6c7989 -webkit-linear-gradient(#6c7989, #434b55) fixed; - background: #6c7989 -moz-linear-gradient(#6c7989, #434b55) fixed; - background: #6c7989 -o-linear-gradient(#6c7989, #434b55) fixed; - background: #6c7989 -ms-linear-gradient(#6c7989, #434b55) fixed; - background: #6c7989 linear-gradient(#6c7989, #434b55) fixed; -} - -body { - padding: 50px 0; - margin: 0; - font: 14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif; - color: #555; - font-weight: 300; - background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAeCAYAAABNChwpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAUdEVYdENyZWF0aW9uIFRpbWUAMy82LzEygrTcTAAAAFRJREFUSIljfPDggZRf5RIGGNjUHsNATz6jXmSL1Kb2GLiAX+USBnrymRgGGDCORgFmoNAXjEbBaBSMRsFoFIxGwWgUjEbBaBSMRsFoFIxGwWgUAABYNujumib3wAAAAABJRU5ErkJggg==') fixed; -} - -.wrapper { - width: 640px; - margin: 0 auto; - background: #DEDEDE; - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - -ms-border-radius: 8px; - -o-border-radius: 8px; - border-radius: 8px; - -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; - -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; - box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; -} - -header, section, footer { - display: block; -} - -a { - color: #069; - text-decoration: none; -} - -p { - margin: 0 0 20px; - padding: 0; -} - -strong { - color: #222; - font-weight: 700; -} - -header { - -webkit-border-radius: 8px 8px 0 0; - -moz-border-radius: 8px 8px 0 0; - -ms-border-radius: 8px 8px 0 0; - -o-border-radius: 8px 8px 0 0; - border-radius: 8px 8px 0 0; - background: #C6EAFA; - background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ddfbfc), color-stop(100%, #c6eafa)); - background: -webkit-linear-gradient(#ddfbfc, #c6eafa); - background: -moz-linear-gradient(#ddfbfc, #c6eafa); - background: -o-linear-gradient(#ddfbfc, #c6eafa); - background: -ms-linear-gradient(#ddfbfc, #c6eafa); - background: linear-gradient(#ddfbfc, #c6eafa); - position: relative; - padding: 15px 20px; - border-bottom: 1px solid #B2D2E1; -} -header h1 { - margin: 0; - padding: 0; - font-size: 24px; - line-height: 1.2; - color: #069; - text-shadow: rgba(255, 255, 255, 0.9) 0 1px 0; -} -header.without-description h1 { - margin: 10px 0; -} -header p { - margin: 0; - color: #61778B; - width: 300px; - font-size: 13px; -} -header p.view { - display: none; - font-weight: 700; - text-shadow: rgba(255, 255, 255, 0.9) 0 1px 0; - -webkit-font-smoothing: antialiased; -} -header p.view a { - color: #06c; -} -header p.view small { - font-weight: 400; -} -header ul { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - z-index: 1; - right: 20px; - top: 20px; - height: 38px; - padding: 1px 0; - background: #5198DF; - background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #77b9fb), color-stop(100%, #3782cd)); - background: -webkit-linear-gradient(#77b9fb, #3782cd); - background: -moz-linear-gradient(#77b9fb, #3782cd); - background: -o-linear-gradient(#77b9fb, #3782cd); - background: -ms-linear-gradient(#77b9fb, #3782cd); - background: linear-gradient(#77b9fb, #3782cd); - border-radius: 5px; - -webkit-box-shadow: inset rgba(255, 255, 255, 0.45) 0 1px 0, inset rgba(0, 0, 0, 0.2) 0 -1px 0; - -moz-box-shadow: inset rgba(255, 255, 255, 0.45) 0 1px 0, inset rgba(0, 0, 0, 0.2) 0 -1px 0; - box-shadow: inset rgba(255, 255, 255, 0.45) 0 1px 0, inset rgba(0, 0, 0, 0.2) 0 -1px 0; - width: auto; -} -header ul:before { - content: ''; - position: absolute; - z-index: -1; - left: -5px; - top: -4px; - right: -5px; - bottom: -6px; - background: rgba(0, 0, 0, 0.1); - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - -ms-border-radius: 8px; - -o-border-radius: 8px; - border-radius: 8px; - -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0, inset rgba(255, 255, 255, 0.7) 0 -1px 0; - -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0, inset rgba(255, 255, 255, 0.7) 0 -1px 0; - box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 0, inset rgba(255, 255, 255, 0.7) 0 -1px 0; -} -header ul li { - width: 79px; - float: left; - border-right: 1px solid #3A7CBE; - height: 38px; -} -header ul li.single { - border: none; -} -header ul li + li { - width: 78px; - border-left: 1px solid #8BBEF3; -} -header ul li + li + li { - border-right: none; - width: 79px; -} -header ul a { - line-height: 1; - font-size: 11px; - color: #fff; - color: rgba(255, 255, 255, 0.8); - display: block; - text-align: center; - font-weight: 400; - padding-top: 6px; - height: 40px; - text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0; -} -header ul a strong { - font-size: 14px; - display: block; - color: #fff; - -webkit-font-smoothing: antialiased; -} - -section { - padding: 15px 20px; - font-size: 15px; - border-top: 1px solid #fff; - background: -webkit-gradient(linear, 50% 0%, 50% 700, color-stop(0%, #fafafa), color-stop(100%, #dedede)); - background: -webkit-linear-gradient(#fafafa, #dedede 700px); - background: -moz-linear-gradient(#fafafa, #dedede 700px); - background: -o-linear-gradient(#fafafa, #dedede 700px); - background: -ms-linear-gradient(#fafafa, #dedede 700px); - background: linear-gradient(#fafafa, #dedede 700px); - -webkit-border-radius: 0 0 8px 8px; - -moz-border-radius: 0 0 8px 8px; - -ms-border-radius: 0 0 8px 8px; - -o-border-radius: 0 0 8px 8px; - border-radius: 0 0 8px 8px; - position: relative; -} - -h1, h2, h3, h4, h5, h6 { - color: #222; - padding: 0; - margin: 0 0 20px; - line-height: 1.2; -} - -p, ul, ol, table, pre, dl { - margin: 0 0 20px; -} - -h1, h2, h3 { - line-height: 1.1; -} - -h1 { - font-size: 28px; -} - -h2 { - color: #393939; -} - -h3, h4, h5, h6 { - color: #494949; -} - -blockquote { - margin: 0 -20px 20px; - padding: 15px 20px 1px 40px; - font-style: italic; - background: #ccc; - background: rgba(0, 0, 0, 0.06); - color: #222; -} - -img { - max-width: 100%; -} - -code, pre { - font-family: Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; - color: #333; - font-size: 12px; - overflow-x: auto; -} - -pre { - padding: 20px; - background: #3A3C42; - color: #f8f8f2; - margin: 0 -20px 20px; -} -pre code { - color: #f8f8f2; -} -li pre { - margin-left: -60px; - padding-left: 60px; -} - -table { - width: 100%; - border-collapse: collapse; -} - -th, td { - text-align: left; - padding: 5px 10px; - border-bottom: 1px solid #aaa; -} - -dt { - color: #222; - font-weight: 700; -} - -th { - color: #222; -} - -small { - font-size: 11px; -} - -hr { - border: 0; - background: #aaa; - height: 1px; - margin: 0 0 20px; -} - -footer { - width: 640px; - margin: 0 auto; - padding: 20px 0 0; - color: #ccc; - overflow: hidden; -} -footer a { - color: #fff; - font-weight: bold; -} -footer p { - float: left; -} -footer p + p { - float: right; -} - -@media print, screen and (max-width: 740px) { - body { - padding: 0; - } - - .wrapper { - -webkit-border-radius: 0; - -moz-border-radius: 0; - -ms-border-radius: 0; - -o-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - width: 100%; - } - - footer { - -webkit-border-radius: 0; - -moz-border-radius: 0; - -ms-border-radius: 0; - -o-border-radius: 0; - border-radius: 0; - padding: 20px; - width: auto; - } - footer p { - float: none; - margin: 0; - } - footer p + p { - float: none; - } -} -@media print, screen and (max-width:580px) { - header ul { - display: none; - } - - header p.view { - display: block; - } - - header p { - width: 100%; - } -} -@media print { - header p.view a small:before { - content: 'at http://github.com/'; - } -} diff --git a/stylesheets/stylesheet.css b/stylesheets/stylesheet.css deleted file mode 100644 index 619d19d..0000000 --- a/stylesheets/stylesheet.css +++ /dev/null @@ -1,425 +0,0 @@ -/******************************************************************************* -Slate Theme for GitHub Pages -by Jason Costello, @jsncostello -*******************************************************************************/ - -@import url(pygment_trac.css); - -/******************************************************************************* -MeyerWeb Reset -*******************************************************************************/ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font: inherit; - vertical-align: baseline; -} - -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} - -ol, ul { - list-style: none; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -/******************************************************************************* -Theme Styles -*******************************************************************************/ - -body { - box-sizing: border-box; - color:#373737; - background: #212121; - font-size: 16px; - font-family: 'Myriad Pro', Calibri, Helvetica, Arial, sans-serif; - line-height: 1.5; - -webkit-font-smoothing: antialiased; -} - -h1, h2, h3, h4, h5, h6 { - margin: 10px 0; - font-weight: 700; - color:#222222; - font-family: 'Lucida Grande', 'Calibri', Helvetica, Arial, sans-serif; - letter-spacing: -1px; -} - -h1 { - font-size: 36px; - font-weight: 700; -} - -h2 { - padding-bottom: 10px; - font-size: 32px; - background: url('../images/bg_hr.png') repeat-x bottom; -} - -h3 { - font-size: 24px; -} - -h4 { - font-size: 21px; -} - -h5 { - font-size: 18px; -} - -h6 { - font-size: 16px; -} - -p { - margin: 10px 0 15px 0; -} - -footer p { - color: #f2f2f2; -} - -a { - text-decoration: none; - color: #007edf; - text-shadow: none; - - transition: color 0.5s ease; - transition: text-shadow 0.5s ease; - -webkit-transition: color 0.5s ease; - -webkit-transition: text-shadow 0.5s ease; - -moz-transition: color 0.5s ease; - -moz-transition: text-shadow 0.5s ease; - -o-transition: color 0.5s ease; - -o-transition: text-shadow 0.5s ease; - -ms-transition: color 0.5s ease; - -ms-transition: text-shadow 0.5s ease; -} - -a:hover, a:focus {text-decoration: underline;} - -footer a { - color: #F2F2F2; - text-decoration: underline; -} - -em { - font-style: italic; -} - -strong { - font-weight: bold; -} - -img { - position: relative; - margin: 0 auto; - max-width: 739px; - padding: 5px; - margin: 10px 0 10px 0; - border: 1px solid #ebebeb; - - box-shadow: 0 0 5px #ebebeb; - -webkit-box-shadow: 0 0 5px #ebebeb; - -moz-box-shadow: 0 0 5px #ebebeb; - -o-box-shadow: 0 0 5px #ebebeb; - -ms-box-shadow: 0 0 5px #ebebeb; -} - -p img { - display: inline; - margin: 0; - padding: 0; - vertical-align: middle; - text-align: center; - border: none; -} - -pre, code { - width: 100%; - color: #222; - background-color: #fff; - - font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; - font-size: 14px; - - border-radius: 2px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; -} - -pre { - width: 100%; - padding: 10px; - box-shadow: 0 0 10px rgba(0,0,0,.1); - overflow: auto; -} - -code { - padding: 3px; - margin: 0 3px; - box-shadow: 0 0 10px rgba(0,0,0,.1); -} - -pre code { - display: block; - box-shadow: none; -} - -blockquote { - color: #666; - margin-bottom: 20px; - padding: 0 0 0 20px; - border-left: 3px solid #bbb; -} - - -ul, ol, dl { - margin-bottom: 15px -} - -ul { - list-style-position: inside; - list-style: disc; - padding-left: 20px; -} - -ol { - list-style-position: inside; - list-style: decimal; - padding-left: 20px; -} - -dl dt { - font-weight: bold; -} - -dl dd { - padding-left: 20px; - font-style: italic; -} - -dl p { - padding-left: 20px; - font-style: italic; -} - -hr { - height: 1px; - margin-bottom: 5px; - border: none; - background: url('../images/bg_hr.png') repeat-x center; -} - -table { - border: 1px solid #373737; - margin-bottom: 20px; - text-align: left; - } - -th { - font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif; - padding: 10px; - background: #373737; - color: #fff; - } - -td { - padding: 10px; - border: 1px solid #373737; - } - -form { - background: #f2f2f2; - padding: 20px; -} - -/******************************************************************************* -Full-Width Styles -*******************************************************************************/ - -.outer { - width: 100%; -} - -.inner { - position: relative; - max-width: 640px; - padding: 20px 10px; - margin: 0 auto; -} - -#forkme_banner { - display: block; - position: absolute; - top:0; - right: 10px; - z-index: 10; - padding: 10px 50px 10px 10px; - color: #fff; - background: url('../images/blacktocat.png') #0090ff no-repeat 95% 50%; - font-weight: 700; - box-shadow: 0 0 10px rgba(0,0,0,.5); - border-bottom-left-radius: 2px; - border-bottom-right-radius: 2px; -} - -#header_wrap { - background: #212121; - background: -moz-linear-gradient(top, #373737, #212121); - background: -webkit-linear-gradient(top, #373737, #212121); - background: -ms-linear-gradient(top, #373737, #212121); - background: -o-linear-gradient(top, #373737, #212121); - background: linear-gradient(top, #373737, #212121); -} - -#header_wrap .inner { - padding: 50px 10px 30px 10px; -} - -#project_title { - margin: 0; - color: #fff; - font-size: 42px; - font-weight: 700; - text-shadow: #111 0px 0px 10px; -} - -#project_tagline { - color: #fff; - font-size: 24px; - font-weight: 300; - background: none; - text-shadow: #111 0px 0px 10px; -} - -#downloads { - position: absolute; - width: 210px; - z-index: 10; - bottom: -40px; - right: 0; - height: 70px; - background: url('../images/icon_download.png') no-repeat 0% 90%; -} - -.zip_download_link { - display: block; - float: right; - width: 90px; - height:70px; - text-indent: -5000px; - overflow: hidden; - background: url(../images/sprite_download.png) no-repeat bottom left; -} - -.tar_download_link { - display: block; - float: right; - width: 90px; - height:70px; - text-indent: -5000px; - overflow: hidden; - background: url(../images/sprite_download.png) no-repeat bottom right; - margin-left: 10px; -} - -.zip_download_link:hover { - background: url(../images/sprite_download.png) no-repeat top left; -} - -.tar_download_link:hover { - background: url(../images/sprite_download.png) no-repeat top right; -} - -#main_content_wrap { - background: #f2f2f2; - border-top: 1px solid #111; - border-bottom: 1px solid #111; -} - -#main_content { - padding-top: 40px; -} - -#footer_wrap { - background: #212121; -} - - - -/******************************************************************************* -Small Device Styles -*******************************************************************************/ - -@media screen and (max-width: 480px) { - body { - font-size:14px; - } - - #downloads { - display: none; - } - - .inner { - min-width: 320px; - max-width: 480px; - } - - #project_title { - font-size: 32px; - } - - h1 { - font-size: 28px; - } - - h2 { - font-size: 24px; - } - - h3 { - font-size: 21px; - } - - h4 { - font-size: 18px; - } - - h5 { - font-size: 14px; - } - - h6 { - font-size: 12px; - } - - code, pre { - min-width: 320px; - max-width: 480px; - font-size: 11px; - } - -}