@@ -89,10 +89,15 @@ public boolean check(final Session<?> session, final CancelCallback callback) th
8989 }
9090 if (session .isConnected ()) {
9191 log .debug ("Skip opening connection for session {}" , session );
92- // Connection already open
92+ // Connection is already open
9393 return false ;
9494 }
95- // Obtain password from keychain or prompt
95+ final Host jumphost = JumpHostConfiguratorFactory .get (bookmark .getProtocol ()).getJumphost (bookmark .getHostname ());
96+ if (null != jumphost ) {
97+ log .debug ("Configure with jump host {}" , jumphost );
98+ bookmark .setJumphost (jumphost );
99+ }
100+ // Get password from the password store or prompt
96101 synchronized (login ) {
97102 login .validate (bookmark , session .getFeature (X509KeyManager .class ), prompt , new LoginOptions (bookmark .getProtocol ()));
98103 }
@@ -103,7 +108,7 @@ public boolean check(final Session<?> session, final CancelCallback callback) th
103108 @ Override
104109 public void close (final Session <?> session ) throws BackgroundException {
105110 listener .message (MessageFormat .format (LocaleFactory .localizedString ("Disconnecting {0}" , "Status" ),
106- session .getHost ().getHostname ()));
111+ session .getHost ().getHostname ()));
107112 // Close the underlying socket first
108113 session .interrupt ();
109114 }
@@ -131,24 +136,24 @@ public void connect(final Session<?> session, final CancelCallback cancel) throw
131136 }
132137 }
133138 listener .message (MessageFormat .format (LocaleFactory .localizedString ("Opening {0} connection to {1}" , "Status" ),
134- bookmark .getProtocol ().getName (), hostname ));
139+ bookmark .getProtocol ().getName (), hostname ));
135140 // The IP address could successfully be determined
136141 session .open (proxy , key , prompt , cancel );
137142 listener .message (MessageFormat .format (LocaleFactory .localizedString ("{0} connection opened" , "Status" ),
138- bookmark .getProtocol ().getName ()));
143+ bookmark .getProtocol ().getName ()));
139144 // Update last accessed timestamp
140145 bookmark .setTimestamp (new Date ());
141146 // Warning about insecure connection prior authenticating
142147 if (session .alert (prompt )) {
143148 // Warning if credentials are sent plaintext.
144149 prompt .warn (bookmark , MessageFormat .format (LocaleFactory .localizedString ("Unsecured {0} connection" , "Credentials" ),
145- bookmark .getProtocol ().getName ()),
146- MessageFormat .format ("{0} {1}." , MessageFormat .format (LocaleFactory .localizedString ("{0} will be sent in plaintext." , "Credentials" ),
147- bookmark .getProtocol ().getPasswordPlaceholder ()),
148- LocaleFactory .localizedString ("Please contact your web hosting service provider for assistance" , "Support" )),
149- LocaleFactory .localizedString ("Continue" , "Credentials" ),
150- LocaleFactory .localizedString ("Disconnect" , "Credentials" ),
151- String .format ("connection.unsecure.%s" , bookmark .getHostname ()));
150+ bookmark .getProtocol ().getName ()),
151+ MessageFormat .format ("{0} {1}." , MessageFormat .format (LocaleFactory .localizedString ("{0} will be sent in plaintext." , "Credentials" ),
152+ bookmark .getProtocol ().getPasswordPlaceholder ()),
153+ LocaleFactory .localizedString ("Please contact your web hosting service provider for assistance" , "Support" )),
154+ LocaleFactory .localizedString ("Continue" , "Credentials" ),
155+ LocaleFactory .localizedString ("Disconnect" , "Credentials" ),
156+ String .format ("connection.unsecure.%s" , bookmark .getHostname ()));
152157 }
153158 // Login
154159 try {
@@ -163,7 +168,7 @@ public void connect(final Session<?> session, final CancelCallback cancel) throw
163168 private void authenticate (final Session <?> session , final CancelCallback callback ) throws BackgroundException {
164169 if (!login .authenticate (session , listener , prompt , callback )) {
165170 if (session .isConnected ()) {
166- // Next attempt with updated credentials but cancel when prompt is dismissed
171+ // Next attempt with updated credentials but cancel when the prompt is dismissed
167172 this .authenticate (session , callback );
168173 }
169174 else {
0 commit comments