tang minghao commited on
Commit
881e918
·
verified ·
1 Parent(s): 10f7500

Upload 5 files

Browse files
Files changed (5) hide show
  1. debug.html +56 -0
  2. default.html +23 -0
  3. stats.html +95 -0
  4. tinyproxy +0 -0
  5. tinyproxy.conf +15 -0
debug.html ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5
+
6
+ <head>
7
+ <title>{errno} {cause}</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
9
+ </head>
10
+
11
+ <body>
12
+
13
+ <h1>{cause}</h1>
14
+
15
+ <p>{detail}</p>
16
+
17
+ <p>Here are the error variables:</p>
18
+
19
+ <dl>
20
+
21
+ <dt>request</dt>
22
+ <dd>{request}</dd>
23
+
24
+ <dt>cause</dt>
25
+ <dd>{cause}</dd>
26
+
27
+ <dt>clientip</dt>
28
+ <dd>{clientip}</dd>
29
+
30
+ <dt>clienthost</dt>
31
+ <dd>{clienthost}</dd>
32
+
33
+ <dt>version</dt>
34
+ <dd>{version}</dd>
35
+
36
+ <dt>package</dt>
37
+ <dd>{package}</dd>
38
+
39
+ <dt>date</dt>
40
+ <dd>{date}</dd>
41
+
42
+ <dt>detail</dt>
43
+ <dd>{detail}</dd>
44
+
45
+ <dt>url</dt>
46
+ <dd>{url}</dd>
47
+
48
+ </dl>
49
+
50
+ <hr />
51
+
52
+ <p><em>Generated by <a href="{website}">{package}</a> version {version}.</em></p>
53
+
54
+ </body>
55
+
56
+ </html>
default.html ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5
+
6
+ <head>
7
+ <title>{errno} {cause}</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
9
+ </head>
10
+
11
+ <body>
12
+
13
+ <h1>{cause}</h1>
14
+
15
+ <p>{detail}</p>
16
+
17
+ <hr />
18
+
19
+ <p><em>Generated by <a href="{website}">{package}</a> version {version}.</em></p>
20
+
21
+ </body>
22
+
23
+ </html>
stats.html ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+ <html lang="en">
4
+ <head>
5
+ <title>Stats [{package} v{version}]</title>
6
+ <meta charset="UTF-8" />
7
+ <style type="text/css">
8
+ body {
9
+ color: #eee;
10
+ background: #110d0d;
11
+ text-align: center;
12
+ font: 12pt/1.6 Open Sans, Segoe UI, sans-serif;
13
+ }
14
+ #container {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ margin: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ display: table;
22
+ }
23
+ #inner {
24
+ width: 100%;
25
+ display: table-cell;
26
+ vertical-align: middle;
27
+ }
28
+ table {
29
+ width: auto;
30
+ margin: auto;
31
+ height: auto;
32
+ background: #222020;
33
+ border: 1px solid #777373;
34
+ border-spacing: 3px;
35
+ }
36
+ th,
37
+ td {
38
+ padding: 6px 18px;
39
+ }
40
+ th {
41
+ font-weight: 700;
42
+ background: linear-gradient(to bottom, #777373, #555151);
43
+ }
44
+ .odd {
45
+ background: #444040;
46
+ }
47
+ .even {
48
+ background: #555151;
49
+ }
50
+ .center {
51
+ text-align: center;
52
+ }
53
+ .right {
54
+ text-align: right;
55
+ font-weight: 600;
56
+ }
57
+ </style>
58
+ </head>
59
+
60
+ <body>
61
+ <div id="container">
62
+ <div id="inner">
63
+ <table>
64
+ <tr>
65
+ <th colspan="2">{package} v{version} statistics</th>
66
+ </tr>
67
+ <tr class="odd">
68
+ <td class="right">Open connections</td>
69
+ <td class="center">{opens}</td>
70
+ </tr>
71
+
72
+ <tr class="even">
73
+ <td class="right">Bad connections</td>
74
+ <td class="center">{badconns}</td>
75
+ </tr>
76
+
77
+ <tr class="odd">
78
+ <td class="right">Denied connections</td>
79
+ <td class="center">{deniedconns}</td>
80
+ </tr>
81
+
82
+ <tr class="even">
83
+ <td class="right">Refused (high load)</td>
84
+ <td class="center">{refusedconns}</td>
85
+ </tr>
86
+
87
+ <tr class="odd">
88
+ <td class="right">Total requests</td>
89
+ <td class="center">{reqs}</td>
90
+ </tr>
91
+ </table>
92
+ </div>
93
+ </div>
94
+ </body>
95
+ </html>
tinyproxy ADDED
Binary file (418 kB). View file
 
tinyproxy.conf ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ User root
2
+ Group root
3
+ Port 8888
4
+ BindSame yes
5
+ Timeout 30
6
+ DefaultErrorFile "/usr/local/share/tinyproxy/default.html"
7
+ StatHost "127.0.0.1"
8
+ StatFile "/usr/local/share/tinyproxy/stats.html"
9
+ LogFile "/opt/tinyproxy/tinyproxy.log"
10
+ LogLevel Info
11
+ MaxClients 1024
12
+ ViaProxyName "baidu"
13
+ XTinyproxy no
14
+ DisableViaHeader yes
15
+ BasicAuth user pass