diff --git a/src/transport/tcp-transport.cpp b/src/transport/tcp-transport.cpp
index 7ffe530..a5b311f 100644
--- a/src/transport/tcp-transport.cpp
+++ b/src/transport/tcp-transport.cpp
@@ -23,6 +23,7 @@
 
 #include "tcp-transport.hpp"
 #include "stream-transport.hpp"
+#include "util/face-uri.hpp"
 
 namespace ndn {
 
@@ -36,6 +37,58 @@
 {
 }
 
+shared_ptr<TcpTransport>
+TcpTransport::create(const ConfigFile& config)
+{
+  const auto hostAndPort(getDefaultSocketHostAndPort(config));
+  return make_shared<TcpTransport>(hostAndPort.first,
+                                   hostAndPort.second);
+}
+
+std::pair<std::string, std::string>
+TcpTransport::getDefaultSocketHostAndPort(const ConfigFile& config)
+{
+  const ConfigFile::Parsed& parsed = config.getParsedConfiguration();
+  std::string host = "localhost";
+  std::string port = "6363";
+
+  try
+    {
+      const util::FaceUri uri(parsed.get<std::string>("transport"));
+
+      const std::string scheme = uri.getScheme();
+      if (scheme != "tcp" && scheme != "tcp4" && scheme != "tcp6")
+        {
+          throw Transport::Error("Cannot create TcpTransport from \"" +
+                                 scheme + "\" URI");
+        }
+
+      if (!uri.getHost().empty())
+        {
+          host = uri.getHost();
+        }
+
+      if (!uri.getPort().empty())
+        {
+          port = uri.getPort();
+        }
+    }
+  catch (const boost::property_tree::ptree_bad_path& error)
+    {
+      // no transport specified, use default host and port
+    }
+  catch (const boost::property_tree::ptree_bad_data& error)
+    {
+      throw ConfigFile::Error(error.what());
+    }
+  catch (const util::FaceUri::Error& error)
+    {
+      throw ConfigFile::Error(error.what());
+    }
+
+  return std::make_pair(host, port);
+}
+
 void
 TcpTransport::connect(boost::asio::io_service& ioService,
                       const ReceiveCallback& receiveCallback)
diff --git a/src/transport/tcp-transport.hpp b/src/transport/tcp-transport.hpp
index 8afe007..13be254 100644
--- a/src/transport/tcp-transport.hpp
+++ b/src/transport/tcp-transport.hpp
@@ -24,6 +24,8 @@
 
 #include "../common.hpp"
 #include "transport.hpp"
+#include "util/config-file.hpp"
+
 
 // forward declaration
 namespace boost { namespace asio { namespace ip { class tcp; } } }
@@ -60,6 +62,14 @@
   virtual void
   send(const Block& header, const Block& payload);
 
+  static shared_ptr<TcpTransport>
+  create(const ConfigFile& config);
+
+NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
+
+  static std::pair<std::string, std::string>
+  getDefaultSocketHostAndPort(const ConfigFile& config);
+
 private:
   std::string m_host;
   std::string m_port;
diff --git a/src/transport/unix-transport.cpp b/src/transport/unix-transport.cpp
index 03ee8b6..df505d7 100644
--- a/src/transport/unix-transport.cpp
+++ b/src/transport/unix-transport.cpp
@@ -25,6 +25,7 @@
 #include "stream-transport.hpp"
 
 #include "../face.hpp"
+#include "util/face-uri.hpp"
 
 namespace ndn {
 
@@ -41,44 +42,45 @@
 UnixTransport::getDefaultSocketName(const ConfigFile& config)
 {
   const ConfigFile::Parsed& parsed = config.getParsedConfiguration();
-  try
-    {
-      return parsed.get<std::string>("unix_socket");
-    }
-  catch (boost::property_tree::ptree_bad_path& error)
-    {
-      // unix_socket not present, continue
-    }
-  catch (boost::property_tree::ptree_bad_data& error)
-    {
-      throw ConfigFile::Error(error.what());
-    }
 
-  // no unix_socket specified so the default socket name
-  // depends on the protocol we're using
   try
     {
-      const std::string protocol = parsed.get<std::string>("protocol");
-      if (protocol == "ndnd-tlv-0.7")
+      const util::FaceUri uri(parsed.get<std::string>("transport"));
+
+      if (uri.getScheme() != "unix")
         {
-          return "/tmp/.ndnd.sock";
+          throw Transport::Error("Cannot create UnixTransport from \"" +
+                                 uri.getScheme() + "\" URI");
+        }
+
+      if (!uri.getPath().empty())
+        {
+          return uri.getPath();
         }
     }
-  catch (boost::property_tree::ptree_bad_path& error)
+  catch (const boost::property_tree::ptree_bad_path& error)
     {
-      return "/var/run/nfd.sock";
+      // no transport specified
     }
-  catch (boost::property_tree::ptree_bad_data& error)
+  catch (const boost::property_tree::ptree_bad_data& error)
+    {
+      throw ConfigFile::Error(error.what());
+    }
+  catch (const util::FaceUri::Error& error)
     {
       throw ConfigFile::Error(error.what());
     }
 
-  // A we made here, then there's no unix_socket specified in the configuration
-  // file. A protocol is present, but it's not ndnd.
   // Assume the default nfd.sock location.
   return "/var/run/nfd.sock";
 }
 
+shared_ptr<UnixTransport>
+UnixTransport::create(const ConfigFile& config)
+{
+  return make_shared<UnixTransport>(getDefaultSocketName(config));
+}
+
 void
 UnixTransport::connect(boost::asio::io_service& ioService,
                        const ReceiveCallback& receiveCallback)
diff --git a/src/transport/unix-transport.hpp b/src/transport/unix-transport.hpp
index 25fa698..1c94225 100644
--- a/src/transport/unix-transport.hpp
+++ b/src/transport/unix-transport.hpp
@@ -19,12 +19,12 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-#ifndef NDN_UDPTRANSPORT_HPP
-#define NDN_UDPTRANSPORT_HPP
+#ifndef NDN_TRANSPORT_UNIX_TRANSPORT_HPP
+#define NDN_TRANSPORT_UNIX_TRANSPORT_HPP
 
 #include "../common.hpp"
 #include "transport.hpp"
-#include "../util/config-file.hpp"
+#include "util/config-file.hpp"
 
 // forward declaration
 namespace boost { namespace asio { namespace local { class stream_protocol; } } }
@@ -69,11 +69,15 @@
   virtual void
   send(const Block& header, const Block& payload);
 
+  static shared_ptr<UnixTransport>
+  create(const ConfigFile& config);
+
+NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   /**
    * Determine the default NFD unix socket
    *
-   * @returns unix_socket value if present in config, else /var/run/nfd.sock
-   * @throws ConfigFile::Error if fail to parse value of a present "unix_socket" field
+   * @returns transport value if present in config, else /var/run/nfd.sock
+   * @throws ConfigFile::Error if fail to parse value of a present "transport" field
    */
   static std::string
   getDefaultSocketName(const ConfigFile& config);
@@ -86,6 +90,6 @@
   shared_ptr< Impl > m_impl;
 };
 
-}
+} // namespace ndn
 
-#endif
+#endif // NDN_TRANSPORT_UNIX_TRANSPORT_HPP
