diff --git a/pom.xml b/pom.xml
index c6b7aaa..4076472 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.example.sshd
echo-sshd-server
- 1.4.4
+ 1.4.5
ECHO SSH SERVER
Learning Apache Mina SSHD library
diff --git a/src/main/java/com/example/sshd/core/EchoSessionListener.java b/src/main/java/com/example/sshd/core/EchoSessionListener.java
index ab8bb13..aecf521 100644
--- a/src/main/java/com/example/sshd/core/EchoSessionListener.java
+++ b/src/main/java/com/example/sshd/core/EchoSessionListener.java
@@ -4,18 +4,14 @@ import java.net.InetSocketAddress;
import java.util.List;
import java.util.Map;
-import org.apache.hc.client5.http.async.methods.SimpleHttpRequest;
-import org.apache.hc.client5.http.async.methods.SimpleHttpResponse;
-import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
-import org.apache.hc.core5.concurrent.FutureCallback;
import org.apache.sshd.common.Session;
import org.apache.sshd.common.SessionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
+import com.example.sshd.service.GeoIpLocator;
import com.example.sshd.service.JdbcService;
@Component
@@ -31,17 +27,11 @@ public class EchoSessionListener implements SessionListener {
Map ipInfoMapping;
@Autowired
- CloseableHttpAsyncClient asyncClient;
+ GeoIpLocator geoIpLocator;
@Autowired
JdbcService jdbcService;
- @Value("${ssh-server.ip-info-api.url:http://ip-api.com/json/%s}")
- private String ipInfoApiUrl;
-
- @Value("${ssh-server.ip-info-api.method:GET}")
- private String ipInfoApiMethod;
-
@Override
public void sessionCreated(Session session) {
logger.info("sessionCreated: {}", session);
@@ -55,7 +45,7 @@ public class EchoSessionListener implements SessionListener {
logger.info("new session: {} -> {}", remoteIpAddress, session);
remoteSessionMapping.put(remoteIpAddress, session);
if (!ipInfoMapping.containsKey(remoteIpAddress)) {
- List