Add stun.pagequit.net
This commit is contained in:
1 parent
62c749de73
commit
1d8e595b75
5 files changed
+13
-8
No files matched your search
@@ -10,9 +10,9 @@ explicit opt-in by both people; no relay is configured automatically.
|
|||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
1. The sender picks one file and configures STUN (Google by default, Cloudflare,
|
1. The sender picks one file and configures STUN (PageQuit by default, Google,
|
||||||
a custom provider, or None). They create a code and send it privately to the
|
Cloudflare, a custom provider, or None). They create a code and send it
|
||||||
intended receiver through an authenticated channel.
|
privately to the intended receiver through an authenticated channel.
|
||||||
2. The receiver pastes the code, creates an answer, and sends it back. The sender
|
2. The receiver pastes the code, creates an answer, and sends it back. The sender
|
||||||
pastes the answer. Gathering waits for completion, up to 30 seconds; a timeout
|
pastes the answer. Gathering waits for completion, up to 30 seconds; a timeout
|
||||||
fails rather than quietly exporting incomplete connection information.
|
fails rather than quietly exporting incomplete connection information.
|
||||||
@@ -249,7 +249,7 @@ The browser check requires Chromium at `/usr/bin/chromium` (override with
|
|||||||
The cross-browser check uses Brave and Firefox at `/usr/bin/brave` and
|
The cross-browser check uses Brave and Firefox at `/usr/bin/brave` and
|
||||||
`/usr/bin/firefox` (override with `BRAVE_PATH` and `FIREFOX_PATH`). It checks
|
`/usr/bin/firefox` (override with `BRAVE_PATH` and `FIREFOX_PATH`). It checks
|
||||||
that the received file remains downloadable after the sender disconnects.
|
that the received file remains downloadable after the sender disconnects.
|
||||||
Pass `--reverse` to test Firefox → Brave, or `--default-network` to use Google
|
Pass `--reverse` to test Firefox → Brave, or `--default-network` to use PageQuit
|
||||||
STUN instead of the local test's default None. These checks use temporary
|
STUN instead of the local test's default None. These checks use temporary
|
||||||
browser profiles and do not modify your normal browser settings.
|
browser profiles and do not modify your normal browser settings.
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { dirname, extname, join, resolve } from 'node:path';
|
|||||||
import { fileURLToPath, pathToFileURL } from 'node:url';
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
||||||
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
||||||
const axeSource = await readFile(join(root, 'node_modules/axe-core/axe.min.js'), 'utf8');
|
const axeSource = await readFile(join(root, 'node_modules/axe-core/axe.min.js'), 'utf8');
|
||||||
const provider = process.argv.includes('--default-network') ? 'google' : 'none';
|
const provider = process.argv.includes('--default-network') ? 'pagequit' : 'none';
|
||||||
const turn = process.argv.includes('--turn');
|
const turn = process.argv.includes('--turn');
|
||||||
const transport = process.argv.includes('--tcp') ? 'tcp' : 'udp';
|
const transport = process.argv.includes('--tcp') ? 'tcp' : 'udp';
|
||||||
const vite = turn ? await (await import('vite')).createServer({ server: { middlewareMode: true }, appType: 'spa' }) : null;
|
const vite = turn ? await (await import('vite')).createServer({ server: { middlewareMode: true }, appType: 'spa' }) : null;
|
||||||
@@ -160,9 +160,13 @@ async function connect(sender: string, receiver: string, size: number) {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const sender = await page(), receiver = await page();
|
const sender = await page(), receiver = await page();
|
||||||
|
if (!turn) {
|
||||||
|
assert.equal(await evaluate(sender, () => document.querySelector<HTMLSelectElement>('#stun-provider')?.value), 'pagequit');
|
||||||
|
}
|
||||||
if (!turn) {
|
if (!turn) {
|
||||||
const localUrl = pathToFileURL(join(root, 'dist/hellcon-local.html')).href;
|
const localUrl = pathToFileURL(join(root, 'dist/hellcon-local.html')).href;
|
||||||
const localReceiver = await page(localUrl);
|
const localReceiver = await page(localUrl);
|
||||||
|
assert.equal(await evaluate(localReceiver, () => document.querySelector<HTMLSelectElement>('#stun-provider')?.value), 'pagequit');
|
||||||
assert.equal(await evaluate(localReceiver, () => document.querySelector('h1')?.textContent), 'HellCon');
|
assert.equal(await evaluate(localReceiver, () => document.querySelector('h1')?.textContent), 'HellCon');
|
||||||
await click(localReceiver, 'Receive');
|
await click(localReceiver, 'Receive');
|
||||||
assert.equal(await evaluate(localReceiver, () => !!document.querySelector('#offer-input')), true);
|
assert.equal(await evaluate(localReceiver, () => !!document.querySelector('#offer-input')), true);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|||||||
const state: Record<string, unknown> = {};
|
const state: Record<string, unknown> = {};
|
||||||
const profiles: string[] = [];
|
const profiles: string[] = [];
|
||||||
const children: ChildProcess[] = [];
|
const children: ChildProcess[] = [];
|
||||||
const provider = process.argv.includes('--default-network') ? 'google' : 'none';
|
const provider = process.argv.includes('--default-network') ? 'pagequit' : 'none';
|
||||||
const reversed = process.argv.includes('--reverse');
|
const reversed = process.argv.includes('--reverse');
|
||||||
const driver = `(${installBrowserContext.toString()})(); (${crossBrowserDriver.toString()})(${JSON.stringify(provider)});`;
|
const driver = `(${installBrowserContext.toString()})(); (${crossBrowserDriver.toString()})(${JSON.stringify(provider)});`;
|
||||||
let finish: () => void = () => {};
|
let finish: () => void = () => {};
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const choosing = ref(false);
|
|||||||
const dragover = ref(false);
|
const dragover = ref(false);
|
||||||
const iceEndpoint = location.protocol === 'file:' ? '' : import.meta.env.VITE_ICE_ENDPOINT || '';
|
const iceEndpoint = location.protocol === 'file:' ? '' : import.meta.env.VITE_ICE_ENDPOINT || '';
|
||||||
const defaultStun = location.protocol === 'file:' ? '' : import.meta.env.VITE_STUN_URL || '';
|
const defaultStun = location.protocol === 'file:' ? '' : import.meta.env.VITE_STUN_URL || '';
|
||||||
const settings = ref<NetworkSettingsModel>({ stunChoice: defaultStun ? 'custom' : 'google', customStun: defaultStun, allowTurn: false, managedTurn: !!iceEndpoint, turnUrl: '', username: '', credential: '' });
|
const settings = ref<NetworkSettingsModel>({ stunChoice: defaultStun ? 'custom' : 'pagequit', customStun: defaultStun, allowTurn: false, managedTurn: !!iceEndpoint, turnUrl: '', username: '', credential: '' });
|
||||||
const managedCredentials = ref<IceOptions | null>(null);
|
const managedCredentials = ref<IceOptions | null>(null);
|
||||||
const canSaveToDisk = typeof window.showSaveFilePicker === 'function';
|
const canSaveToDisk = typeof window.showSaveFilePicker === 'function';
|
||||||
let active: Session | null = null;
|
let active: Session | null = null;
|
||||||
|
|||||||
+2
-1
@@ -10,7 +10,7 @@ export interface IceOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface NetworkSettings {
|
export interface NetworkSettings {
|
||||||
stunChoice: 'google' | 'cloudflare' | 'none' | 'custom';
|
stunChoice: 'pagequit' | 'google' | 'cloudflare' | 'none' | 'custom';
|
||||||
customStun: string;
|
customStun: string;
|
||||||
allowTurn: boolean;
|
allowTurn: boolean;
|
||||||
managedTurn: boolean;
|
managedTurn: boolean;
|
||||||
@@ -31,6 +31,7 @@ export const CHUNK_SIZE = 16 * 1024;
|
|||||||
export const MAX_BUFFERED = 1024 * 1024;
|
export const MAX_BUFFERED = 1024 * 1024;
|
||||||
export const MAX_SIGNAL_LENGTH = 64 * 1024;
|
export const MAX_SIGNAL_LENGTH = 64 * 1024;
|
||||||
export const STUN_PROVIDERS = [
|
export const STUN_PROVIDERS = [
|
||||||
|
{ id: 'pagequit', label: 'PageQuit', url: 'stun:stun.pagequit.net:3478' },
|
||||||
{ id: 'google', label: 'Google', url: 'stun:stun.l.google.com:19302' },
|
{ id: 'google', label: 'Google', url: 'stun:stun.l.google.com:19302' },
|
||||||
{ id: 'cloudflare', label: 'Cloudflare', url: 'stun:stun.cloudflare.com:3478' },
|
{ id: 'cloudflare', label: 'Cloudflare', url: 'stun:stun.cloudflare.com:3478' },
|
||||||
{ id: 'none', label: 'None (direct connections only)', url: null },
|
{ id: 'none', label: 'None (direct connections only)', url: null },
|
||||||
|
|||||||
Reference in new issue
Block a user