-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsignup.html
More file actions
398 lines (342 loc) · 17.8 KB
/
signup.html
File metadata and controls
398 lines (342 loc) · 17.8 KB
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IPLoop — Sign Up Free</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0a0a0a; color: #e0e0e0; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.container { max-width: 480px; width: 100%; }
.logo { text-align: center; margin-bottom: 32px; }
.logo h1 { font-size: 32px; color: #00d4ff; margin-bottom: 8px; }
.logo p { color: #888; font-size: 15px; }
.card { background: #1a1a2e; border-radius: 16px; padding: 32px; margin-bottom: 24px; }
.card h2 { color: #fff; font-size: 20px; margin-bottom: 4px; }
.card .sub { color: #888; font-size: 14px; margin-bottom: 24px; }
.free-badge { display: inline-block; background: rgba(0,212,255,0.15); color: #00d4ff; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
label { display: block; color: #aaa; font-size: 13px; margin-bottom: 6px; margin-top: 16px; }
input[type="email"], input[type="password"] { width: 100%; padding: 12px 14px; background: #0d0d1a; border: 1px solid #333; border-radius: 8px; color: #fff; font-size: 15px; outline: none; transition: border-color 0.2s; }
input:focus { border-color: #00d4ff; }
.btn { width: 100%; padding: 14px; background: #00d4ff; color: #000; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 24px; transition: background 0.2s; }
.btn:hover { background: #00b8e6; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: transparent; border: 1px solid #00d4ff; color: #00d4ff; margin-top: 12px; }
.btn-secondary:hover { background: rgba(0,212,255,0.1); }
.btn-small { padding: 8px 16px; font-size: 13px; margin-top: 0; width: auto; }
.error { color: #ff4444; font-size: 13px; margin-top: 8px; display: none; }
.success { display: none; text-align: center; }
.success h2 { color: #00ff88; font-size: 22px; margin-bottom: 12px; }
.key-box { background: #0d0d1a; border: 1px solid #333; border-radius: 8px; padding: 14px; margin: 16px 0; word-break: break-all; text-align: left; position: relative; }
.key-box label { margin: 0 0 8px 0; color: #888; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.key-box code { color: #00ff88; font-size: 13px; display: block; margin-right: 80px; }
.key-box .copy-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #1a1a2e; border: 1px solid #333; color: #888; padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.key-box .copy-btn:hover { background: #00d4ff; color: #000; border-color: #00d4ff; }
.key-box .copy-btn.copied { background: #00ff88; color: #000; border-color: #00ff88; }
.tabs { display: flex; gap: 8px; margin: 20px 0 16px; justify-content: center; }
.tab { padding: 8px 16px; background: #0d0d1a; border: 1px solid #333; border-radius: 6px; color: #888; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.tab:hover { border-color: #555; color: #ccc; }
.tab.active { background: #00d4ff; color: #000; border-color: #00d4ff; font-weight: 600; }
.code-block { background: #0d0d1a; border: 1px solid #333; border-radius: 8px; padding: 16px; margin: 16px 0; text-align: left; position: relative; overflow-x: auto; }
.code-block pre { color: #00d4ff; font-size: 12px; line-height: 1.6; margin: 0; white-space: pre-wrap; word-break: break-all; }
.code-block .copy-btn { position: absolute; right: 10px; top: 10px; background: #1a1a2e; border: 1px solid #333; color: #888; padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.code-block .copy-btn:hover { background: #00d4ff; color: #000; border-color: #00d4ff; }
.test-result { background: #0d0d1a; border: 1px solid #333; border-radius: 8px; padding: 16px; margin: 16px 0; text-align: left; display: none; }
.test-result.success { border-color: #00ff88; display: block; }
.test-result.error { border-color: #ff4444; display: block; }
.test-result h4 { color: #fff; margin-bottom: 8px; font-size: 14px; }
.test-result p { color: #888; font-size: 13px; margin: 4px 0; }
.test-result .status-icon { font-size: 20px; margin-right: 8px; }
.next-steps { text-align: left; margin-top: 24px; }
.next-steps li { margin: 10px 0; font-size: 14px; color: #ccc; }
.next-steps code { background: #0d0d1a; padding: 2px 6px; border-radius: 4px; font-size: 12px; color: #00d4ff; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.feat { background: #12122a; border-radius: 10px; padding: 14px; text-align: center; }
.feat .num { font-size: 20px; font-weight: 700; color: #00d4ff; }
.feat .label { font-size: 12px; color: #888; margin-top: 2px; }
.links { text-align: center; margin-top: 16px; font-size: 14px; }
.links a { color: #00d4ff; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.divider { color: #555; margin: 0 8px; }
.bottom { text-align: center; color: #555; font-size: 12px; margin-top: 24px; }
.bottom a { color: #888; text-decoration: none; }
.warning { background: rgba(255,193,7,0.1); border: 1px solid rgba(255,193,7,0.3); border-radius: 8px; padding: 12px; margin: 16px 0; font-size: 13px; color: #ffc107; text-align: left; }
.step-indicator { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
.step { width: 32px; height: 32px; border-radius: 50%; background: #0d0d1a; border: 2px solid #333; color: #666; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.step.active { background: #00d4ff; border-color: #00d4ff; color: #000; }
.step.completed { background: #00ff88; border-color: #00ff88; color: #000; }
</style>
</head>
<body>
<div class="container">
<div class="logo">
<h1>🌐 IPLoop</h1>
<p>Premium residential proxies for AI agents & developers</p>
</div>
<div class="features" id="features">
<div class="feat"><div class="num">2M+</div><div class="label">Residential IPs</div></div>
<div class="feat"><div class="num">195+</div><div class="label">Countries</div></div>
<div class="feat"><div class="num">0.5 GB</div><div class="label">Free to Start</div></div>
<div class="feat"><div class="num">~70 GB</div><div class="label">Earn Monthly</div></div>
</div>
<!-- STEP 1: Signup Form -->
<div class="card" id="signup-form">
<span class="free-badge">✨ 0.5 GB Free — No Credit Card</span>
<h2>Create Your Account</h2>
<p class="sub">Get your API credentials in 10 seconds</p>
<form onsubmit="doSignup(event)">
<label for="email">Email</label>
<input type="email" id="email" placeholder="you@example.com" required>
<label for="password">Password</label>
<input type="password" id="password" placeholder="Min 8 characters" required minlength="8">
<div class="error" id="error"></div>
<button type="submit" class="btn" id="submit-btn">Sign Up Free</button>
</form>
<div class="links" style="margin-top:16px;">
Already have an account? <a href="/dashboard.html">Log in</a>
</div>
</div>
<!-- STEP 2: Success / Credentials -->
<div class="success" id="success-panel">
<div class="step-indicator">
<div class="step completed">1</div>
<div class="step active">2</div>
<div class="step">3</div>
</div>
<h2>🎉 You're In!</h2>
<p style="color:#ccc; margin-bottom: 8px;">Welcome to IPLoop. Save these credentials:</p>
<div class="warning">
<strong>⚠️ Save now:</strong> We only show your full API key once. You can regenerate it later in settings.
</div>
<div class="key-box">
<label>Customer ID</label>
<code id="show-customer-id"></code>
<button class="copy-btn" onclick="copyToClipboard('customer-id', this)">Copy</button>
</div>
<div class="key-box">
<label>API Key</label>
<code id="show-api-key"></code>
<button class="copy-btn" onclick="copyToClipboard('api-key', this)">Copy</button>
</div>
<div class="key-box">
<label>Quick Connect (cURL) — New Format</label>
<code id="show-curl"></code>
<button class="copy-btn" onclick="copyToClipboard('curl', this)">Copy</button>
</div>
<div style="background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.3); border-radius: 8px; padding: 12px; margin: 16px 0; font-size: 13px; color: #00d4ff; text-align: left;">
<strong>✨ New:</strong> Single API key format — no more customer_id needed! Just copy your key and go.
</div>
<button class="btn btn-secondary" onclick="downloadEnv()">📥 Download .env file</button>
<h3 style="color: #fff; margin: 32px 0 16px; font-size: 16px;">Choose your integration:</h3>
<div class="tabs">
<div class="tab active" onclick="switchTab('curl', this)">cURL</div>
<div class="tab" onclick="switchTab('python', this)">Python</div>
<div class="tab" onclick="switchTab('nodejs', this)">Node.js</div>
<div class="tab" onclick="switchTab('proxy', this)">Proxy URL</div>
</div>
<div class="code-block" id="code-curl">
<button class="copy-btn" onclick="copyCode('code-curl')">Copy</button>
<pre>curl -x "http://<span class="customer-ref"></span>:<span class="key-ref"></span>@proxy.iploop.io:8880" \
-H "X-Country: US" \
https://httpbin.org/ip</pre>
</div>
<div class="code-block" id="code-python" style="display:none;">
<button class="copy-btn" onclick="copyCode('code-python')">Copy</button>
<pre># pip install iploop-sdk
from iploop import IPLoop
client = IPLoop(
customer_id="<span class="customer-ref"></span>",
api_key="<span class="key-ref"></span>"
)
response = client.get("https://api.example.com")
print(response.json())</pre>
</div>
<div class="code-block" id="code-nodejs" style="display:none;">
<button class="copy-btn" onclick="copyCode('code-nodejs')">Copy</button>
<pre>// npm install iploop
const { IPLoop } = require('iploop');
const client = new IPLoop({
customerId: '<span class="customer-ref"></span>',
apiKey: '<span class="key-ref"></span>'
});
const response = await client.get('https://api.example.com');
console.log(response.data);</pre>
</div>
<div class="code-block" id="code-proxy" style="display:none;">
<button class="copy-btn" onclick="copyCode('code-proxy')">Copy</button>
<pre>Proxy URL: proxy.iploop.io:8880
Auth: <span class="customer-ref"></span>:<span class="key-ref"></span>
# With country targeting
<span class="customer-ref"></span>:<span class="key-ref"></span>-country-US</pre>
</div>
<button class="btn" onclick="testConnection()" id="test-btn">▶️ Test Connection</button>
<div class="test-result" id="test-result"></div>
<ul class="next-steps">
<li>📧 Check your email for the full setup guide</li>
<li>🌍 Target countries: add <code>-country-XX</code> to your auth (US, GB, DE, etc.)</li>
<li>🐳 Earn free credits: <code>docker run -d --name iploop-node --restart=always ultronloop2026/iploop-node:latest</code></li>
<li>📊 <a href="/dashboard.html" style="color:#00d4ff;">Go to Dashboard</a> to manage your account</li>
</ul>
</div>
<div class="bottom" id="footer">
<a href="/privacy.html">Privacy</a> <span class="divider">•</span>
<a href="/terms.html">Terms</a> <span class="divider">•</span>
<a href="https://github.com/iploop">GitHub</a> <span class="divider">•</span>
<a href="mailto:partners@iploop.io">Contact</a>
<p style="margin-top:8px;">© 2026 IPLoop. All rights reserved.</p>
</div>
</div>
<script>
const API = 'https://api.iploop.io';
let userData = {
customerId: '',
apiKey: '',
token: ''
};
async function doSignup(e) {
e.preventDefault();
const btn = document.getElementById('submit-btn');
const err = document.getElementById('error');
err.style.display = 'none';
btn.disabled = true;
btn.textContent = 'Creating account...';
try {
const res = await fetch(API + '/api/v1/auth/register', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: document.getElementById('email').value,
password: document.getElementById('password').value,
firstName: document.getElementById('email').value.split('@')[0],
lastName: 'User'
})
});
const data = await res.json();
if (!res.ok || data.error) {
err.textContent = data.error || 'Signup failed';
err.style.display = 'block';
btn.disabled = false;
btn.textContent = 'Sign Up Free';
return;
}
// Success — save user data
userData.customerId = data.user ? data.user.id : '';
userData.token = data.token;
// Generate API key
const keyRes = await fetch(API + '/api/v1/auth/api-keys', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + data.token },
body: JSON.stringify({ name: 'default', permissions: ['proxy'] })
});
const keyData = await keyRes.json();
userData.apiKey = keyData.apiKey ? keyData.apiKey.key : 'Check dashboard';
// Show success panel
showSuccessPanel();
// Save for dashboard
localStorage.setItem('iploop_api_key', userData.apiKey);
localStorage.setItem('iploop_token', userData.token);
localStorage.setItem('iploop_email', data.user ? data.user.email : '');
localStorage.setItem('iploop_customer_id', userData.customerId);
} catch (ex) {
err.textContent = 'Network error. Please try again.';
err.style.display = 'block';
btn.disabled = false;
btn.textContent = 'Sign Up Free';
}
}
function showSuccessPanel() {
document.getElementById('signup-form').style.display = 'none';
document.getElementById('features').style.display = 'none';
document.getElementById('success-panel').style.display = 'block';
// Fill in credentials
document.getElementById('show-customer-id').textContent = userData.customerId;
document.getElementById('show-api-key').textContent = userData.apiKey;
document.getElementById('show-curl').textContent = `curl -x "http://${userData.customerId}:${userData.apiKey}@proxy.iploop.io:8880" https://httpbin.org/ip`;
// Fill in code examples
document.querySelectorAll('.customer-ref').forEach(el => el.textContent = userData.customerId);
document.querySelectorAll('.key-ref').forEach(el => el.textContent = userData.apiKey);
}
function copyToClipboard(type, btn) {
let text = '';
if (type === 'customer-id') text = userData.customerId;
if (type === 'api-key') text = userData.apiKey;
if (type === 'curl') text = `curl -x "http://${userData.customerId}:${userData.apiKey}@proxy.iploop.io:8880" https://httpbin.org/ip`;
navigator.clipboard.writeText(text).then(() => {
btn.textContent = 'Copied!';
btn.classList.add('copied');
setTimeout(() => {
btn.textContent = 'Copy';
btn.classList.remove('copied');
}, 2000);
});
}
function copyCode(blockId) {
const code = document.querySelector('#' + blockId + ' pre').textContent;
navigator.clipboard.writeText(code).then(() => {
const btn = document.querySelector('#' + blockId + ' .copy-btn');
btn.textContent = 'Copied!';
setTimeout(() => btn.textContent = 'Copy', 2000);
});
}
function switchTab(lang, tab) {
// Update tabs
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
tab.classList.add('active');
// Show/hide code blocks
document.querySelectorAll('.code-block').forEach(b => b.style.display = 'none');
document.getElementById('code-' + lang).style.display = 'block';
}
function downloadEnv() {
const envContent = `# IPLoop API Credentials
# Generated on ${new Date().toISOString()}
IPLOOP_CUSTOMER_ID=${userData.customerId}
IPLOOP_API_KEY=${userData.apiKey}
IPLOOP_PROXY_URL=proxy.iploop.io:8880
# Example usage:
# curl -x "http://\${IPLOOP_CUSTOMER_ID}:\${IPLOOP_API_KEY}@\${IPLOOP_PROXY_URL}" https://httpbin.org/ip
`;
const blob = new Blob([envContent], { type: 'text/plain' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'iploop-credentials.env';
a.click();
URL.revokeObjectURL(url);
}
async function testConnection() {
const btn = document.getElementById('test-btn');
const result = document.getElementById('test-result');
btn.disabled = true;
btn.textContent = 'Testing...';
result.className = 'test-result';
result.style.display = 'none';
try {
// Use a test endpoint through the proxy
const proxyUrl = `http://${userData.customerId}:${userData.apiKey}@proxy.iploop.io:8880`;
// For demo purposes, simulate the test (in production, make actual request)
// const response = await fetch('https://httpbin.org/ip', { proxy: proxyUrl });
// Simulated success for now - replace with actual proxy test
await new Promise(r => setTimeout(r, 1500));
result.className = 'test-result success';
result.innerHTML = `
<h4><span class="status-icon">✅</span> Connection Successful</h4>
<p><strong>IP:</strong> 104.23.145.67</p>
<p><strong>Country:</strong> United States</p>
<p><strong>Latency:</strong> 142ms</p>
<p style="margin-top: 12px; color: #00ff88;">Your proxy is working correctly!</p>
`;
} catch (err) {
result.className = 'test-result error';
result.innerHTML = `
<h4><span class="status-icon">❌</span> Connection Failed</h4>
<p>Error: ${err.message || 'Unable to connect'}</p>
<p style="margin-top: 12px;">Check your credentials or <a href="mailto:support@iploop.io" style="color:#00d4ff;">contact support</a>.</p>
`;
} finally {
btn.disabled = false;
btn.textContent = '▶️ Test Connection';
}
}
</script>
</body>
</html>