mirror of https://github.com/grpc/grpc-node.git
grpc-js: initiate tls connection through http proxy
This commit is contained in:
parent
03fdeedc78
commit
af7f4f798d
|
@ -21,6 +21,7 @@ import { LogVerbosity } from './constants';
|
|||
import { parseTarget } from './resolver-dns';
|
||||
import { Socket } from 'net';
|
||||
import * as http from 'http';
|
||||
import * as tls from 'tls'
|
||||
import * as logging from './logging';
|
||||
import {
|
||||
SubchannelAddress,
|
||||
|
@ -202,9 +203,14 @@ export function getProxiedConnection(
|
|||
' through proxy ' +
|
||||
proxyAddressString
|
||||
);
|
||||
resolve({
|
||||
socket,
|
||||
realTarget,
|
||||
var cts = tls.connect({
|
||||
host: options.host,
|
||||
socket: socket
|
||||
}, function () {
|
||||
resolve({
|
||||
socket: cts,
|
||||
realTarget,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
log(
|
||||
|
|
Loading…
Reference in New Issue