mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 18:06:01 +00:00
ssh tunnel WIP
This commit is contained in:
@@ -130,7 +130,7 @@ class SSHConnection {
|
||||
const connectionToBastion = await this.connect(bastionHost);
|
||||
return new Promise((resolve, reject) => {
|
||||
connectionToBastion.forwardOut(
|
||||
'127.0.0.1',
|
||||
this.options.bindHost,
|
||||
22,
|
||||
this.options.endHost,
|
||||
this.options.endPort || 22,
|
||||
@@ -228,9 +228,9 @@ class SSHConnection {
|
||||
options.toPort
|
||||
);
|
||||
connection.forwardOut(
|
||||
'127.0.0.1',
|
||||
this.options.bindHost,
|
||||
options.fromPort,
|
||||
options.toHost || '127.0.0.1',
|
||||
options.toHost || this.options.bindHost,
|
||||
options.toPort,
|
||||
(error, stream) => {
|
||||
if (error) {
|
||||
@@ -241,7 +241,7 @@ class SSHConnection {
|
||||
}
|
||||
);
|
||||
})
|
||||
.listen(options.fromPort, '127.0.0.1', () => {
|
||||
.listen(options.fromPort, this.options.bindHost, () => {
|
||||
return resolve();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user