This repository has been archived by the owner on Jan 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
/
templates.go
184 lines (180 loc) · 6.24 KB
/
templates.go
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
184
package web
const indexPageHTML = `<!doctype html>
<html lang="en">
<head>
<title>dosxvpn</title>
<link href="/static/images/favicon.png" rel="icon" type="image/png">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" href="/static/css/fontawesome/css/font-awesome.min.css">
<script src="/static/js/jquery/jquery.js"></script>
</head>
<body>
<div class="login">
<p class="registration-message">d<img height="20" src="/static/images/logo.svg">sxvpn</p>
<form class="vertical-form sign-in">
<p>This installer will create a fully configured VPN on a new 512MB droplet in your DigitalOcean account.</p>
<a href="{{.InstallLink}}" class="btn-auth" type="submit"><i class="fa fa-sign-in fa-lg"></i> Authenticate</a>
<br><br>
</form>
<div class="footer">
<p>
Don't have an account?
<a href="https://cloud.digitalocean.com/registrations/new">Sign Up</a>
</p>
</div>
</div>
</body>
</html>`
const callbackHTML = `
<!DOCTYPE html>
<html>
<head>
<title>dosxvpn</title>
<link href="/static/images/favicon.png" rel="icon" type="image/png">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" href="/static/css/fontawesome/css/font-awesome.min.css">
<script src="/static/js/jquery/jquery.js"></script>
<script src="/static/js/callback.js"></script>
</head>
</html>
`
const dashboardPageHTML = `
<!DOCTYPE html>
<html>
<head>
<title>dosxvpn</title>
<link href="/static/images/favicon.png" rel="icon" type="image/png">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" href="/static/css/fontawesome/css/font-awesome.min.css">
<script src="/static/js/jquery/jquery.js"></script>
<script src="/static/js/dashboard.js"></script>
</head>
<body class="login">
<p class="registration-message">d<img height="20" src="/static/images/logo.svg">sxvpn</p>
<form id="regions" class="vertical-form sign-in">
<div class="region">Select Region:
<select id="region-dropdown" name="region-dropdown">
{{ range $key, $value := .Regions }}
<option value="{{ $key }}">{{ $value }}</option>
{{ end }}
</select>
</div>
<button type="submit" class="go-btn">Deploy New VPN</button>
</form>
<br>
{{ if .VPNList }}
<form id="advanced" class="vertical-form sign-in">
<div class="container">
<div class="row">
<div class="col"></div>
<div class="col-6">Manage Existing VPNs</div>
<div class="col"></div>
</div>
</div>
<div>
{{ range $index, $value := .VPNList }}
<button id="{{ $value }}" onClick="removeVPN({{ $value }})" class="btn-del">Remove {{ $value }}</button>
{{ end }}
<div class="loader">Loading...</div>
</div>
</form>
{{end}}
</body>
</html>
`
const deletePageHTML = `
<!DOCTYPE html>
<html>
<head>
<title>dosxvpn</title>
<link href="/static/images/favicon.png" rel="icon" type="image/png">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" href="/static/css/fontawesome/css/font-awesome.min.css">
<script src="/static/js/jquery/jquery.js"></script>
<script src="/static/js/delete.js"></script>
</head>
</html>
`
const progressPageHTML = `
<!DOCTYPE html>
<html>
<head>
<title>dosxvpn</title>
<link href="/static/images/favicon.png" rel="icon" type="image/png">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" href="/static/css/fontawesome/css/font-awesome.min.css">
<script src="/static/js/jquery/jquery.js"></script>
<script src="/static/js/progress_bar.js"></script>
</head>
<body class="login">
<p class="registration-message">d<img height="20" src="/static/images/logo.svg">sxvpn</p>
<form class="vertical-form sign-in">
<div id="progress-bar">
<div id="current-progress"></div>
</div>
<p id="status-line">Initializing droplet..</p>
<p id="initial-ip"></p>
</form>
</body>
</html>
`
const completePageHTML = `
<!DOCTYPE html>
<html>
<head>
<title>dosxvpn</title>
<link href="/static/images/favicon.png" rel="icon" type="image/png">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/bootstrap/bootstrap.css">
<link rel="stylesheet" href="/static/css/fontawesome/css/font-awesome.min.css">
<script src="/static/js/jquery/jquery.js"></script>
<script src="/static/js/complete.js"></script>
</head>
<body class="login">
<p class="registration-message">d<img height="20" src="/static/images/logo.svg">sxvpn</p>
<form class="vertical-form sign-in">
<div class="container">
<div class="row">
<div class="col"><h4 class="text-center">Install Complete</h4></div>
</div>
</div>
<p id="final-ip">VPN IP: <b>{{ .FinalIP }}</b></p>
<div id="showpass" style="text-align: center; font-size: 14px;">Show Certificate Password</div>
<div style="display:none; text-align: center; font-size: 11px;" id="password">{{ .Password }}</div>
<div class="container">
<div class="row">
<div class="col">
<a id="apple" type="submit" download="dosxvpn.apple.mobileconfig" href="/download?type=apple"><i class="fa fa-apple"></i> Download</a>
</div>
<div class="col">
<a id="android" type="submit" download="dosxvpn.android.sswan" href="/download?type=android"><i class="fa fa-android"></i> Download</a>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col">
<a href="http://pi.hole/admin/index.php?login" type="submit" target="_blank"><i class="fa fa-ban"></i> Adblock Settings</a>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col">
<a id="back" type="submit" style="background: #949495; font-size: 11px;" href="/dashboard"><i class="fa fa-arrow-left"></i> Back</a>
</div>
<div class="col"></div>
<div class="col">
<a id="exit" type="submit" style="background: #949495; font-size: 11px;" href="#">Exit</a>
</div>
</div>
</div>
</form>
</body>
</html>
`