Axum server on 127.0.0.1:9222 • Auth via X-API-Key: demo or VEIL- license • Tauri protected
curl http://127.0.0.1:9222/api/v1/status -H "X-API-Key: demo"
{"status":"ok","service":"Veil Browser Local API"}curl http://127.0.0.1:9222/api/v1/profiles/list -H "X-API-Key: demo"
{"success":true,"data":[...],"count":3}curl -X POST http://127.0.0.1:9222/api/v1/profiles/start -H "X-API-Key: demo" -d '{"profile_id":"prof_abc"}'
{"success":true,"data":{"profile_id":"prof_abc","ws_endpoint":"ws://..."}}curl -X POST http://127.0.0.1:9222/api/v1/profiles/stop -H "X-API-Key: demo" -d '{"profile_id":"prof_abc"}'curl -X POST http://127.0.0.1:9222/api/v1/profiles/create -H "X-API-Key: demo" -d '{"name":"Test","proxy":"socks5://1.2.3.4:1080"}'const puppeteer = require('puppeteer-core');
async function run() {
// 1. Start profile via local API
const res = await fetch('http://127.0.0.1:9222/api/v1/profiles/start', {
method: 'POST',
headers: { 'X-API-Key': 'demo', 'Content-Type': 'application/json' },
body: JSON.stringify({ profile_id: 'prof_abc123' })
});
const result = await res.json();
console.log('WS Endpoint:', result.data.ws_endpoint);
// 2. Connect Puppeteer
const browser = await puppeteer.connect({
browserWSEndpoint: result.data.ws_endpoint,
defaultViewport: null
});
const page = await browser.newPage();
await page.goto('https://pixelscan.net');
await page.waitForTimeout(3000);
await page.screenshot({ path: 'pixelscan-' + result.data.profile_id + '.png' });
// 3. Check fingerprint
const fp = await page.evaluate(() => {
return {
userAgent: navigator.userAgent,
platform: navigator.platform,
webdriver: navigator.webdriver
};
});
console.log('Fingerprint:', fp);
// 4. Stop profile
await fetch('http://127.0.0.1:9222/api/v1/profiles/stop', {
method: 'POST',
headers: { 'X-API-Key': 'demo', 'Content-Type': 'application/json' },
body: JSON.stringify({ profile_id: 'prof_abc123' })
});
await browser.disconnect();
}
run();