diff options
author | Kenny Root <kenny@the-b.org> | 2015-10-08 21:39:44 -0700 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2015-10-08 21:39:44 -0700 |
commit | 93f28ba0db2d4c3cfe699aa7b217362e608bdccd (patch) | |
tree | 35b6a67c0150422c8e74f79f799b1fd6ddda7f17 /app | |
parent | 02447d0586463b87696e086fb29dd1b09c905f96 (diff) | |
parent | cb578fe3aed5625fd4d1d31318a9af4ac1c76aff (diff) | |
download | connectbot-93f28ba0db2d4c3cfe699aa7b217362e608bdccd.tar.gz connectbot-93f28ba0db2d4c3cfe699aa7b217362e608bdccd.tar.bz2 connectbot-93f28ba0db2d4c3cfe699aa7b217362e608bdccd.zip |
Merge pull request #276 from jbcode42/master
Add IPv6 Host support to SSH.
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/org/connectbot/transport/SSH.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/org/connectbot/transport/SSH.java b/app/src/main/java/org/connectbot/transport/SSH.java index c1e0d17..79b1d99 100644 --- a/app/src/main/java/org/connectbot/transport/SSH.java +++ b/app/src/main/java/org/connectbot/transport/SSH.java @@ -101,7 +101,7 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC static final Pattern hostmask; static { - hostmask = Pattern.compile("^(.+)@([0-9a-z.-]+)(:(\\d+))?$", Pattern.CASE_INSENSITIVE); + hostmask = Pattern.compile("^(.+)@(([0-9a-z.-]+)|(\\[[a-f:0-9]+\\]))(:(\\d+))?$", Pattern.CASE_INSENSITIVE); } private boolean compression = false; @@ -770,9 +770,9 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC .append("://") .append(Uri.encode(matcher.group(1))) .append('@') - .append(matcher.group(2)); + .append(Uri.encode(matcher.group(2))); - String portString = matcher.group(4); + String portString = matcher.group(6); int port = DEFAULT_PORT; if (portString != null) { try { |