diff --git a/daemon/face/websocket-transport.cpp b/daemon/face/websocket-transport.cpp
index 6423330..2fc331c 100644
--- a/daemon/face/websocket-transport.cpp
+++ b/daemon/face/websocket-transport.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,6 +30,24 @@
 
 NFD_LOG_INIT("WebSocketTransport");
 
+static bool
+isLoopback(const boost::asio::ip::address& addr)
+{
+  if (addr.is_loopback()) {
+    return true;
+  }
+  // Workaround for loopback IPv4-mapped IPv6 addresses
+  // see https://svn.boost.org/trac/boost/ticket/9084
+  else if (addr.is_v6()) {
+    auto addr6 = addr.to_v6();
+    if (addr6.is_v4_mapped()) {
+      return addr6.to_v4().is_loopback();
+    }
+  }
+
+  return false;
+}
+
 WebSocketTransport::WebSocketTransport(websocketpp::connection_hdl hdl,
                                        websocket::Server& server,
                                        time::milliseconds pingInterval)
@@ -41,11 +59,13 @@
   this->setLocalUri(FaceUri(sock.local_endpoint(), "ws"));
   this->setRemoteUri(FaceUri(sock.remote_endpoint(), "wsclient"));
 
-  if (sock.local_endpoint().address().is_loopback() &&
-      sock.remote_endpoint().address().is_loopback())
+  if (isLoopback(sock.local_endpoint().address()) &&
+      isLoopback(sock.remote_endpoint().address())) {
     this->setScope(ndn::nfd::FACE_SCOPE_LOCAL);
-  else
+  }
+  else {
     this->setScope(ndn::nfd::FACE_SCOPE_NON_LOCAL);
+  }
 
   this->setPersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
   this->setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT);
diff --git a/tests/daemon/face/websocket-transport.t.cpp b/tests/daemon/face/websocket-transport.t.cpp
index 8dbd717..993ebc2 100644
--- a/tests/daemon/face/websocket-transport.t.cpp
+++ b/tests/daemon/face/websocket-transport.t.cpp
@@ -115,7 +115,13 @@
                      const time::milliseconds& pongTimeout = time::seconds(1))
   {
     this->serverListen(ep, pongTimeout);
-    std::string uri = "ws://" + ep.address().to_string() + ":" + to_string(ep.port());
+    std::string uri;
+    if (ep.address().is_v6()) {
+      uri = "ws://[" + ep.address().to_string() + "]:" + to_string(ep.port());
+    }
+    else {
+      uri = "ws://" + ep.address().to_string() + ":" + to_string(ep.port());
+    }
     this->clientConnect(uri);
     BOOST_REQUIRE_EQUAL(limitedIo.run(2, // serverHandleOpen, clientHandleOpen
                         time::seconds(1)), LimitedIo::EXCEED_OPS);
@@ -248,6 +254,29 @@
   BOOST_CHECK_EQUAL(transport->getMtu(), MTU_UNLIMITED);
 }
 
+BOOST_AUTO_TEST_CASE(StaticPropertiesLocalIpv4MappedIpv6)
+{
+  auto address4 = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  SKIP_IF_IP_UNAVAILABLE(address4);
+  auto address6 = ip::address_v6::v4_mapped(address4);
+  BOOST_REQUIRE(address6.is_v4_mapped());
+  this->endToEndInitialize(ip::tcp::endpoint(address6, 20070));
+
+  checkStaticPropertiesInitialized(*transport);
+
+  BOOST_CHECK_EQUAL(transport->getLocalUri().getScheme(), "ws");
+  BOOST_CHECK_EQUAL(transport->getLocalUri().getHost(), "::ffff:127.0.0.1");
+  BOOST_CHECK_EQUAL(transport->getLocalUri().getPort(), "20070");
+  BOOST_CHECK_EQUAL(transport->getLocalUri().getPath(), "");
+  BOOST_CHECK_EQUAL(transport->getRemoteUri().getScheme(), "wsclient");
+  BOOST_CHECK_EQUAL(transport->getRemoteUri().getHost(), "::ffff:127.0.0.1");
+  BOOST_CHECK_EQUAL(transport->getRemoteUri().getPath(), "");
+  BOOST_CHECK_EQUAL(transport->getScope(), ndn::nfd::FACE_SCOPE_LOCAL);
+  BOOST_CHECK_EQUAL(transport->getPersistency(), ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
+  BOOST_CHECK_EQUAL(transport->getLinkType(), ndn::nfd::LINK_TYPE_POINT_TO_POINT);
+  BOOST_CHECK_EQUAL(transport->getMtu(), MTU_UNLIMITED);
+}
+
 BOOST_AUTO_TEST_CASE(PingPong)
 {
   auto address = getTestIp<ip::address_v4>();
