mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 16:13:58 +00:00
SSH - force IPv4 (use 127.0.0.1 instead of localhost)
This commit is contained in:
@@ -228,9 +228,9 @@ class SSHConnection {
|
|||||||
options.toPort
|
options.toPort
|
||||||
);
|
);
|
||||||
connection.forwardOut(
|
connection.forwardOut(
|
||||||
'localhost',
|
'127.0.0.1',
|
||||||
options.fromPort,
|
options.fromPort,
|
||||||
options.toHost || 'localhost',
|
options.toHost || '127.0.0.1',
|
||||||
options.toPort,
|
options.toPort,
|
||||||
(error, stream) => {
|
(error, stream) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
@@ -241,7 +241,7 @@ class SSHConnection {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.listen(options.fromPort, 'localhost', () => {
|
.listen(options.fromPort, '127.0.0.1', () => {
|
||||||
return resolve();
|
return resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user