-
Notifications
You must be signed in to change notification settings - Fork 3
/
managesurrogate.html
133 lines (121 loc) · 3.59 KB
/
managesurrogate.html
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
{% extends "base.html" %}
{% block content %}
{% if f_login %}
<form method="post" action="addsurrogate">
<table border=7>
<caption>surrogates</caption>
<tr>
<th>ip address</th>
<th>preference (*1)</th>
<th>target AS(*2)</th>
<th>target CIDR(*3)</th>
<th>country (*4)</th>
<th>continent</th>
<th>hostname</th>
</tr>
<tr class="prefadd">
<th><input name="ip" type="text" /></th>
<th>
<select name="preference">
<option value="10">High</option>
<option value="100">Middle</option>
<option value="1000">Low</option>
<option value="9999">Minimum</option>
</select>
</th>
<th><input name="targetas" type="integer" /></th>
<th><input name="targetnet" type="text" /></th>
<th><input name="country" type="text" /></th>
<th>
<select name="continent">
<option value="AF">Africa</option>
<option value="AS">Asia</option>
<option value="EU">Europe</option>
<option value="NA">North America</option>
<option value="OC">Oceania</option>
<option value="SA">South America</option>
</select>
</th>
<th>
<select name="hostname">
<option value="deb.cdn.araki.net">deb.cdn.araki.net</option>
<option value="jp.cdn.araki.net">jp.cdn.araki.net</option>
</select>
</th>
</tr>
</table>
(*1)"Preference" High = 10, Middle = 100, Low = 1000, Minimum = 9999.
<br>
(*2)cf. 2516
You can check your BGP Prefix by whois -h whois.cymru.com " -v 1.2.3.4".
<br>
(*3)cf. "128.59.0.0/16", "130.34.0.0/16".
You can check your BGP Prefix by whois -h whois.cymru.com " -v 1.2.3.4".
<br>
(*4)Please fill country name in three-letter country codes. ((<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3">ISO-3166</a>, cf. DEU, FRA, JPN, USA))
<br>
<input type="submit" value="add surrogate">
</form>
{% endif %}
<hr>
{% if keika %}
Process time: {{ keika }}
{% endif %}
{% if f_login %}
<form method="post" action="removesurrogate">
<input type="submit" value="update">
{% endif %}
<table border=12>
<tr>
<th>Delete</th>
<th>ip address</th>
<th>preference</th>
<th>time</th>
<th>lastModifiedTime</th>
<th>alive</th>
<th>target AS</th>
<th>target net</th>
<th>country</th>
<th>continent</th>
<th>checkpref</th>
<th>remark</th>
<th>hostname</th>
</tr>
{% for surrogate in surrogates%}
{% if surrogate.checkpref %}
<tr class="prefred">
{% else %}
<tr class="prefgreen">
{% endif %}
<th>
{% if f_login %}
{% if surrogate.remove %}
<input name="deleteid" type="checkbox" value="{{ surrogate.key }}" checked>
{% else %}
<input name="deleteid" type="checkbox" value="{{ surrogate.key }}">
{% endif %}
{% endif %}
</th>
<th><a href="http://{{ surrogate.ip }}/debian/" target="_blank">{{ surrogate.ip }}</a>
(<a href="http://www.geoipview.com/?q={{ surrogate.ip }}&x=0&y=0" target="_blank">L</a>)
(<a href="/picksurrogate?id={{ surrogate.key }}" target="_blank">Update</a>)
</th>
<th>{{ surrogate.preference }}</th>
<th>{{ surrogate.time }}</th>
<th><a href="http://{{ surrogate.ip }}/debian/project/trace/ftp-master.debian.org" target="_blank">{{ surrogate.lastModifiedTime }}</a></th>
<th>{{ surrogate.alive }}</th>
<th>{{ surrogate.targetasnum }}</th>
<th>{{ surrogate.targetnet }}</th>
<th>{{ surrogate.country|escape }}</th>
<th>{{ surrogate.continent }}</th>
<th>{{ surrogate.checkpref }}</th>
<th>{{ surrogate.failreason }}</th>
<th>{{ surrogate.hostname }}</th>
</tr>
{% endfor %}
</table>
{% if f_login %}
<input type="submit" value="update">
</form>
{% endif %}
{% endblock %}