import os, sys import countershape from countershape import Page, Directory, PythonModule, markup import countershape.template sys.path.insert(0, "..") from libmproxy import filt MITMPROXY_SRC = "~/git/public/mitmproxy" if ns.options.website: ns.title = countershape.template.Template(None, "

@!this.title!@

") this.layout = countershape.Layout("_websitelayout.html") else: ns.title = countershape.template.Template(None, "

@!this.title!@

") this.layout = countershape.Layout("_layout.html") this.markup = markup.Markdown() ns.docMaintainer = "Aldo Cortesi" ns.docMaintainerEmail = "aldo@corte.si" ns.copyright = u"\u00a9 mitmproxy project, 2012" ns.index = countershape.widgets.SiblingPageIndex('/index.html', divclass="pageindex") def mpath(p): p = os.path.join(MITMPROXY_SRC, p) return os.path.expanduser(p) ns.license = file(mpath("LICENSE")).read() ns.index_contents = file(mpath("README.mkd")).read() top = os.path.abspath(os.getcwd()) def example(s): d = file(mpath(s)).read() extemp = """
%s
(%s)
""" return extemp%(countershape.template.Syntax("py")(d), s) ns.example = example filt_help = [] for i in filt.filt_unary: filt_help.append( ("~%s"%i.code, i.help) ) for i in filt.filt_rex: filt_help.append( ("~%s regex"%i.code, i.help) ) for i in filt.filt_int: filt_help.append( ("~%s int"%i.code, i.help) ) filt_help.sort() filt_help.extend( [ ("!", "unary not"), ("&", "and"), ("|", "or"), ("(...)", "grouping"), ] ) ns.filt_help = filt_help pages = [ Page("index.html", "docs"), Page("intro.html", "Introduction"), Page("install.html", "Installation"), Page("mitmproxy.html", "mitmproxy"), Page("mitmdump.html", "mitmdump"), Page("clientreplay.html", "Client-side replay"), Page("serverreplay.html", "Server-side replay"), Page("sticky.html", "Sticky cookies and auth"), Page("upstreamcerts.html", "Upstream Certs"), Page("replacements.html", "Replacements"), Page("reverseproxy.html", "Reverse proxy mode"), Page("anticache.html", "Anticache"), Page("filters.html", "Filter expressions"), Page("ssl.html", "Setting up SSL interception"), Directory("certinstall"), Directory("scripting"), Directory("tutorials"), Page("faq.html", "FAQ"), Page("admin.html", "Administrivia") ] html'>xen_config.html
blob: 13d621c82f73840f64142b7a04319254af60c01b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161