mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-01 15:11:16 +03:00
support IPv6 in SSH quick connect field - fixes #3957
This commit is contained in:
parent
6d0293975d
commit
6197215500
@ -262,8 +262,11 @@ export class SSHService {
|
||||
host = parts[parts.length - 1]
|
||||
user = parts.slice(0, parts.length - 1).join('@')
|
||||
}
|
||||
if (host.includes(':')) {
|
||||
port = parseInt(host.split(':')[1])
|
||||
if (host.includes('[')) {
|
||||
port = parseInt(host.split(']')[1].substring(1))
|
||||
host = host.split(']')[0].substring(1)
|
||||
} else if (host.includes(':')) {
|
||||
port = parseInt(host.split(/:/g)[1])
|
||||
host = host.split(':')[0]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user