2018-02-17 04:19:31 +00:00
|
|
|
import { randomBytes } from './utils/crypto';
|
2018-02-04 14:34:31 +00:00
|
|
|
|
|
|
|
export const APP_ID = randomBytes(16).toString('hex');
|
2018-01-18 10:00:56 +00:00
|
|
|
export const PIPE_ENCODE = 1;
|
|
|
|
export const PIPE_DECODE = -1;
|
2018-05-04 14:09:06 +00:00
|
|
|
|
|
|
|
export const PRESET_FAILED = 'PRESET_FAILED';
|
|
|
|
export const CONNECT_TO_REMOTE = 'CONNECT_TO_REMOTE';
|
2018-06-13 14:34:22 +00:00
|
|
|
|
|
|
|
// https://url.spec.whatwg.org/#url-miscellaneous
|
|
|
|
export const PROTOCOL_DEFAULT_PORTS = {
|
|
|
|
'ftp:': 21,
|
|
|
|
'gopher:': 70,
|
|
|
|
'http:': 80,
|
|
|
|
'https:': 443,
|
|
|
|
'ws:': 80,
|
|
|
|
'wss:': 443,
|
2018-07-02 07:11:11 +00:00
|
|
|
'h2:': 443,
|
2018-06-13 14:34:22 +00:00
|
|
|
};
|