diff --git a/pom.xml b/pom.xml
index 8286d1a..0b52948 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@
io.muserver
mu-server
- 1.1.0
+ 2.0.0
provided
diff --git a/src/main/java/com/hsbc/cranker/mucranker/CrankerMuHandler.java b/src/main/java/com/hsbc/cranker/mucranker/CrankerMuHandler.java
index 5a91c97..48ae8f3 100644
--- a/src/main/java/com/hsbc/cranker/mucranker/CrankerMuHandler.java
+++ b/src/main/java/com/hsbc/cranker/mucranker/CrankerMuHandler.java
@@ -4,8 +4,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.WebApplicationException;
+import jakarta.ws.rs.core.Response;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
diff --git a/src/main/java/com/hsbc/cranker/mucranker/CrankerRouterImpl.java b/src/main/java/com/hsbc/cranker/mucranker/CrankerRouterImpl.java
index 0a89e9c..67ee3df 100644
--- a/src/main/java/com/hsbc/cranker/mucranker/CrankerRouterImpl.java
+++ b/src/main/java/com/hsbc/cranker/mucranker/CrankerRouterImpl.java
@@ -4,8 +4,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.ws.rs.ClientErrorException;
-import javax.ws.rs.ForbiddenException;
+import jakarta.ws.rs.ClientErrorException;
+import jakarta.ws.rs.ForbiddenException;
import java.io.IOException;
import java.util.List;
import java.util.Set;
@@ -168,7 +168,7 @@ private static String getDomain(MuRequest request) {
}
private static void validateIpAddress(IPValidator ipValidator, MuRequest request) {
- String remoteAddress = request.remoteAddress();
+ String remoteAddress = request.connection().remoteAddress().getAddress().getHostAddress();
if (!ipValidator.allow(remoteAddress)) {
String errorMsg = "Fail to establish websocket connection to craker connector because of not supported ip address="
+ remoteAddress + " the routerName=" + Mutils.htmlEncode(request.headers().get("Route"));
diff --git a/src/main/java/com/hsbc/cranker/mucranker/FavIconHandler.java b/src/main/java/com/hsbc/cranker/mucranker/FavIconHandler.java
index 6a4fe6e..250ab4e 100644
--- a/src/main/java/com/hsbc/cranker/mucranker/FavIconHandler.java
+++ b/src/main/java/com/hsbc/cranker/mucranker/FavIconHandler.java
@@ -2,7 +2,7 @@
import io.muserver.*;
-import javax.ws.rs.NotFoundException;
+import jakarta.ws.rs.NotFoundException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
diff --git a/src/main/java/com/hsbc/cranker/mucranker/ProxyListener.java b/src/main/java/com/hsbc/cranker/mucranker/ProxyListener.java
index 9d876e5..98cafd7 100644
--- a/src/main/java/com/hsbc/cranker/mucranker/ProxyListener.java
+++ b/src/main/java/com/hsbc/cranker/mucranker/ProxyListener.java
@@ -2,7 +2,7 @@
import io.muserver.Headers;
-import javax.ws.rs.WebApplicationException;
+import jakarta.ws.rs.WebApplicationException;
import java.nio.ByteBuffer;
import java.util.List;
diff --git a/src/main/java/com/hsbc/cranker/mucranker/RouterSocket.java b/src/main/java/com/hsbc/cranker/mucranker/RouterSocket.java
index b775c7e..603abd7 100644
--- a/src/main/java/com/hsbc/cranker/mucranker/RouterSocket.java
+++ b/src/main/java/com/hsbc/cranker/mucranker/RouterSocket.java
@@ -4,7 +4,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.ws.rs.WebApplicationException;
+import jakarta.ws.rs.WebApplicationException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
diff --git a/src/main/java/com/hsbc/cranker/mucranker/RouterSocketV3.java b/src/main/java/com/hsbc/cranker/mucranker/RouterSocketV3.java
index d456d0c..c3be838 100644
--- a/src/main/java/com/hsbc/cranker/mucranker/RouterSocketV3.java
+++ b/src/main/java/com/hsbc/cranker/mucranker/RouterSocketV3.java
@@ -4,7 +4,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.ws.rs.WebApplicationException;
+import jakarta.ws.rs.WebApplicationException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
diff --git a/src/test/java/com/hsbc/cranker/mucranker/ProxyListenerTest.java b/src/test/java/com/hsbc/cranker/mucranker/ProxyListenerTest.java
index 462a059..0ff3863 100644
--- a/src/test/java/com/hsbc/cranker/mucranker/ProxyListenerTest.java
+++ b/src/test/java/com/hsbc/cranker/mucranker/ProxyListenerTest.java
@@ -14,7 +14,7 @@
import org.slf4j.LoggerFactory;
import scaffolding.ClientUtils;
-import javax.ws.rs.WebApplicationException;
+import jakarta.ws.rs.WebApplicationException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.List;