Clean up some code

pull/84/head
Kelvin Schoofs 6 years ago
parent beb00d63c3
commit ee0041402e

@ -16,7 +16,7 @@ type SFTPWrapper = SFTPWrapperReal;
const DEFAULT_CONFIG: ConnectConfig = {
tryKeyboard: true,
keepaliveInterval: 30e3,
}
};
function replaceVariables(string?: string) {
if (typeof string !== 'string') return string;

@ -45,12 +45,12 @@ export function http(config: FileSystemConfig): Promise<NodeJS.ReadableStream> {
reject(new Error(`Expected config.proxy.type' to be 'http'`));
}
try {
let req = request({
const req = request({
port: config.proxy!.port,
hostname: config.proxy!.host,
method: 'CONNECT',
path: `${config.host}:${config.port}`
})
path: `${config.host}:${config.port}`,
});
req.end();
req.on('connect', (res, socket) => {
resolve(socket as NodeJS.ReadableStream);

Loading…
Cancel
Save