mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2026-10-27 17:50:42 +00:00
17 lines
450 B
JavaScript
17 lines
450 B
JavaScript
function extractOnionUrl(line) {
|
|
const match = line.match(/Onion URL:\s*(https?:\/\/[a-z0-9.-]+\.onion)/i)
|
|
|| line.match(/OnionShare is hosting at\s*(https?:\/\/[a-z0-9.-]+\.onion)/i);
|
|
return match ? match[1] : null;
|
|
}
|
|
|
|
function platformDirName(platform = process.platform) {
|
|
if (platform === 'win32') return 'win';
|
|
if (platform === 'darwin') return 'mac';
|
|
return 'linux';
|
|
}
|
|
|
|
module.exports = {
|
|
extractOnionUrl,
|
|
platformDirName,
|
|
};
|