mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-15 17:09:59 +00:00
proxy support
This commit is contained in:
parent
3aa9aad854
commit
581d7a66c3
@ -30,7 +30,7 @@
|
|||||||
"native-process-working-directory": "^1.0.2",
|
"native-process-working-directory": "^1.0.2",
|
||||||
"npm": "6",
|
"npm": "6",
|
||||||
"rxjs": "^7.5.7",
|
"rxjs": "^7.5.7",
|
||||||
"russh": "^0.0.1-alpha.12",
|
"russh": "^0.0.1-alpha.13",
|
||||||
"source-map-support": "^0.5.20",
|
"source-map-support": "^0.5.20",
|
||||||
"v8-compile-cache": "^2.3.0",
|
"v8-compile-cache": "^2.3.0",
|
||||||
"yargs": "^17.7.2"
|
"yargs": "^17.7.2"
|
||||||
|
@ -3613,10 +3613,10 @@ run-queue@^1.0.0, run-queue@^1.0.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
aproba "^1.1.1"
|
aproba "^1.1.1"
|
||||||
|
|
||||||
russh@^0.0.1-alpha.12:
|
russh@^0.0.1-alpha.13:
|
||||||
version "0.0.1-alpha.12"
|
version "0.0.1-alpha.13"
|
||||||
resolved "https://registry.yarnpkg.com/russh/-/russh-0.0.1-alpha.12.tgz#fc8d54870fef24ce8b5c33fb372199027c6572a2"
|
resolved "https://registry.yarnpkg.com/russh/-/russh-0.0.1-alpha.13.tgz#51664cd13951647d9377091a91d6d7c4a53e657a"
|
||||||
integrity sha512-nxfOSaa5V6+lutNwhLQuemIeAgzK8TXwOXcoEsvmd90dQ3TyrTUoNLOifbv5x0SYCg9dPRUP3OSwqnGPBhchug==
|
integrity sha512-jWSOorimRb232xma0M8Dm8sdkhfK61D1VWtdycjihVbU4UnTI3M1BMNGt9hyJAy1+dmLjgzW8vpJVrNBI7EpOw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@napi-rs/cli" "^2.18.3"
|
"@napi-rs/cli" "^2.18.3"
|
||||||
|
|
||||||
|
@ -254,6 +254,22 @@ export class SSHSession {
|
|||||||
} else if (this.jumpChannel) {
|
} else if (this.jumpChannel) {
|
||||||
transport = await russh.SshTransport.newSshChannel(await this.jumpChannel.take())
|
transport = await russh.SshTransport.newSshChannel(await this.jumpChannel.take())
|
||||||
this.jumpChannel = null
|
this.jumpChannel = null
|
||||||
|
} else if (this.profile.options.socksProxyHost) {
|
||||||
|
this.emitServiceMessage(colors.bgBlue.black(' Proxy ') + ` Using ${this.profile.options.socksProxyHost}:${this.profile.options.socksProxyPort}`)
|
||||||
|
transport = await russh.SshTransport.newSocksProxy(
|
||||||
|
this.profile.options.socksProxyHost,
|
||||||
|
this.profile.options.socksProxyPort ?? 1080,
|
||||||
|
this.profile.options.host,
|
||||||
|
this.profile.options.port ?? 22,
|
||||||
|
)
|
||||||
|
} else if (this.profile.options.httpProxyHost) {
|
||||||
|
this.emitServiceMessage(colors.bgBlue.black(' Proxy ') + ` Using ${this.profile.options.httpProxyHost}:${this.profile.options.httpProxyPort}`)
|
||||||
|
transport = await russh.SshTransport.newHttpProxy(
|
||||||
|
this.profile.options.httpProxyHost,
|
||||||
|
this.profile.options.httpProxyPort ?? 8080,
|
||||||
|
this.profile.options.host,
|
||||||
|
this.profile.options.port ?? 22,
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
transport = await russh.SshTransport.newSocket(`${this.profile.options.host.trim()}:${this.profile.options.port ?? 22}`)
|
transport = await russh.SshTransport.newSocket(`${this.profile.options.host.trim()}:${this.profile.options.port ?? 22}`)
|
||||||
}
|
}
|
||||||
@ -329,19 +345,6 @@ export class SSHSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// if (this.profile.options.socksProxyHost) {
|
|
||||||
// this.emitServiceMessage(colors.bgBlue.black(' Proxy ') + ` Using ${this.profile.options.socksProxyHost}:${this.profile.options.socksProxyPort}`)
|
|
||||||
// this.proxyCommandStream = new SocksProxyStream(this.profile)
|
|
||||||
// }
|
|
||||||
// if (this.profile.options.httpProxyHost) {
|
|
||||||
// this.emitServiceMessage(colors.bgBlue.black(' Proxy ') + ` Using ${this.profile.options.httpProxyHost}:${this.profile.options.httpProxyPort}`)
|
|
||||||
// this.proxyCommandStream = new HTTPProxyStream(this.profile)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// await this.proxyCommandStream.start()
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// ssh.connect({
|
// ssh.connect({
|
||||||
// keepaliveInterval: this.profile.options.keepaliveInterval ?? 15000,
|
// keepaliveInterval: this.profile.options.keepaliveInterval ?? 15000,
|
||||||
// keepaliveCountMax: this.profile.options.keepaliveCountMax,
|
// keepaliveCountMax: this.profile.options.keepaliveCountMax,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user