2018-02-22 13:04:56 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
value: true
|
|
|
|
});
|
2018-07-07 13:42:05 +00:00
|
|
|
exports.PROTOCOL_DEFAULT_PORTS = exports.CONNECT_TO_REMOTE = exports.PRESET_FAILED = exports.PIPE_DECODE = exports.PIPE_ENCODE = exports.APP_ID = undefined;
|
2018-02-22 13:04:56 +00:00
|
|
|
|
|
|
|
var _crypto = require('./utils/crypto');
|
|
|
|
|
|
|
|
const APP_ID = exports.APP_ID = (0, _crypto.randomBytes)(16).toString('hex');
|
|
|
|
const PIPE_ENCODE = exports.PIPE_ENCODE = 1;
|
|
|
|
const PIPE_DECODE = exports.PIPE_DECODE = -1;
|
2018-07-07 13:42:05 +00:00
|
|
|
|
|
|
|
const PRESET_FAILED = exports.PRESET_FAILED = 'PRESET_FAILED';
|
2018-05-05 07:53:02 +00:00
|
|
|
const CONNECT_TO_REMOTE = exports.CONNECT_TO_REMOTE = 'CONNECT_TO_REMOTE';
|
2018-06-13 14:34:46 +00:00
|
|
|
|
|
|
|
const PROTOCOL_DEFAULT_PORTS = exports.PROTOCOL_DEFAULT_PORTS = {
|
|
|
|
'ftp:': 21,
|
|
|
|
'gopher:': 70,
|
|
|
|
'http:': 80,
|
|
|
|
'https:': 443,
|
|
|
|
'ws:': 80,
|
2018-07-07 13:42:05 +00:00
|
|
|
'wss:': 443,
|
|
|
|
'h2:': 443
|
2018-06-13 14:34:46 +00:00
|
|
|
};
|