-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.html
183 lines (182 loc) · 7.95 KB
/
module.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
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<div class="col-md-12" ng-controller="openVPNConnectController">
<div class="panel-group">
<div class="col-md-12">
<!-- OpenVPN Connect Title Panel -->
<div class="panel panel-default">
<div class="panel-header text-muted text-center">
<h3>OpenVPN Connect
</h5>
</div>
<div id="main-panel" class="panel panel-default">
<div class="panel-body">
<!-- Dependency Installer UI -->
<div class="panel-body">
<div class="form-group">
<label class="control-label text-center">Dependencies:</label>
<button type="button" style="width: {{installButtonWidth}};" class="btn btn-{{installLabel}} btn-xs" ng-click="handleDependencies()">{{installLabelText}}</button>
<button type="button" style="width: 160px;" class="btn btn-{{installLabel}} btn-xs" ng-hide="hideSDDependency" ng-click="handleDependenciesSDCard()">{{installSDLabelText}}</button>
</div>
<div class="form-group">
<label class="control-label text-center">Setup Status</label>
<p>
<input class="form-control" ng-model="workspace.setupcontent" placeholder="" readonly></input>
</p>
</div>
</div>
<!-- OpenVPN Cert Selector -->
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<p>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#ovpn_upload_view">Upload Cert</button>
</p>
<p>
<div>
<label class="control-label">
<a href="javascript:;" data-toggle="collapse" data-parent="#accordion" data-target="#collapseCertList">
<button type="button" class="btn btn-default" ng-click="refreshCertList()">
Select Cert +
</button>
</a>
</label>
<div id="collapseCertList" class="panel-collapse collapse">
<div class="panel panel-default">
<div>
<ul class="list-group text-center" ng-repeat="cert in workspace.availablecerts">
<li class="list-group-item">
<button type="button" class="btn btn-default" ng-click="setConfig(cert)">{{cert}}</button>
</ul>
</ul>
</div>
</div>
</div>
</div>
</p>
<!-- OpenVPN Connect Option Form -->
<label class="control-label text-center">VPN Config Name:</label>
<a href="javascript:;" ng-click="workspace.config = ''">Clear</a>
<p>
<input class="form-control" ng-model="workspace.config" placeholder="Enter input"></input>
</p>
<label class="control-label text-center">VPN Config User (Optional, makes use of --auth-user-pass):</label>
<a href="javascript:;" ng-click="workspace.user = ''">Clear</a>
<p>
<input class="form-control" ng-model="workspace.user" placeholder="Enter input"></input>
</p>
<label class="control-label text-center">VPN Config Password (Optional, falls back to --askpass if no user is provided):</label>
<a href="javascript:;" ng-click="workspace.pass = ''">Clear</a>
<p>
<input class="form-control" type="password" ng-model="workspace.pass" placeholder="Enter input"></input>
</p>
<label class="control-label text-center">OpenVPN Flags (Optional):</label>
<a href="javascript:;" ng-click="workspace.flags = ''">Clear</a>
<p>
<input class="form-control" ng-model="workspace.flags" placeholder="Enter input"></input>
</p>
<label class="control-label text-center">Share Connection With Clients:</label>
<input type="checkbox" ng-model="workspace.sharedconnection">
<div class="input-group">
<span class="input-group-btn text-center">
<button class="btn btn-default" type="button" ng-click="startVPN()">Start VPN</button>
<button class="btn btn-default" type="button" ng-click="stopVPN()">Stop VPN</button>
</span>
</div>
</div>
</form>
</div>
<!-- OpenVPN Status Section -->
<div class="panel-body">
<div class="form-group">
<label class="control-label text-center">OpenVPN Status</label>
<p>
<textarea class="form-control" rows="1" ng-model="workspace.outputcontent" placeholder="" readonly></textarea>
</p>
</div>
</div>
</div>
</div>
</div>
<!-- OpenVPN Cert Upload Modal -->
<div id="ovpn_upload_view" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<div class="btn btn-primary">
<label for="selectedFiles" style="cursor: pointer">Add files</label>
</div>
</div>
<div class="modal-body">
<table class="table">
<thead>
<th>File</th>
<th>Actions</th>
</thead>
<tbody>
<tr ng-repeat="file in selectedFiles">
<td>{{ file.name }}</td>
<td>
<button class="btn btn-danger" ng-click="removeSelectedFile(file);">Remove
</td>
</tr>
</tbody>
</table>
<div style="text-align:center">
<input type="file" accept=".ovpn" id="selectedFiles" onchange="angular.element(this).scope().setSelectedFiles()" style="visibility: hidden;" multiple>
<img ng-show="uploading" ng-hide="!uploading">
<button class="btn" ng-show="!uploading" ng-hide="uploading" ng-disabled="selectedFiles.length == 0" ng-click="uploadFile();">Upload</button>
<div class="alert alert-{{workspace.uploadstatus}}">{{workspace.uploadstatusLabel}}</div>
</div>
</div>
</div>
</div>
</div>
<!-- Change Log Pannel -->
<div class="panel panel-default">
<div class="panel-header text-muted text-center">
<h5>
<a href="javascript:;" data-toggle="collapse" data-parent="#accordion" data-target="#collapseChangelog">Change Log</a>
</h5>
</div>
<div id="collapseChangelog" class="panel-collapse collapse">
<div class="panel-body">
<ul>
<li>
<b>1.4 </b>
</li>
<ul>
<li class="text-muted">WIP Version update in preparation for MKVII</li>
</ul>
<li>
<b>1.3 </b>
</li>
<ul>
<li class="text-muted">Now with no RCEs :D...Fixed a major RCE caused by not sanitizing user input when passing in certain OpenVPN parameters.</li>
<li class="text-muted">Added stability improvements for package management for those with fresh upgrades to 2.6.X WiFi Pineapple firmware.</li>
<li class="text-muted">Lastly, revised the revision numbers to fall in line with the formal releases.</li>
</ul>
<li>
<b>1.2 </b>
</li>
<ul>
<li class="text-muted">Added in current status when revisiting page, logging, and ability to install dependencies to SD card or local storage. Also squashed some bugs :)</li>
</ul>
<li>
<b>1.1 </b>
</li>
<ul>
<li class="text-muted">Minor Revisions: Added better iptables management with dynamic gateway and the ability to use auth-user-pass. Unofficial Release (Github Only)</li>
</ul>
<li>
<b>1.0</b>
</li>
<ul>
<li class="text-muted">Initial Pineapple Nano Release</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>