<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>NFD team, any suggestions on scope violation connecting to WebSocket locally?</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>"Ashlesh Gawande (agawande)" <<a href="mailto:agawande@memphis.edu">agawande@memphis.edu</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, July 20, 2016 at 14:11:00<br>
<span style="font-weight:bold">To: </span>Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu">jefft0@remap.ucla.edu</a>>, "El Mimouni, Omar Ilias (IntlAssoc)" <<a href="mailto:omarilias.elmimouni@nist.gov">omarilias.elmimouni@nist.gov</a>>, "<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>"
 <<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] (NDN-js) query localhost from browser?<br>
</div>
<div><br>
</div>
<div><style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>nfd.conf is same as nfd.conf.sample.<br>
</p>
<br>
I have confirmed the scope violation issue by disabling scope checking in NFD.<br>
(Commented out lines 116, 227, 320, 406 in daemon/fw/forwarder.cpp.)<br>
Then the browser gets the data.<br>
<br>
Ashlesh<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri,sans-serif" color="#000000"><b>From:</b> Thompson, Jeff <<a href="mailto:jefft0@remap.ucla.edu">jefft0@remap.ucla.edu</a>><br>
<b>Sent:</b> Wednesday, July 20, 2016 3:55 PM<br>
<b>To:</b> Ashlesh Gawande (agawande); El Mimouni, Omar Ilias (IntlAssoc); <a href="mailto:ndn-interest@lists.cs.ucla.edu">
ndn-interest@lists.cs.ucla.edu</a><br>
<b>Subject:</b> Re: [Ndn-interest] (NDN-js) query localhost from browser?</font>
<div> </div>
</div>
<div>
<div>See inline below.</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; border-bottom:medium none; border-left:medium none; padding-bottom:0in; padding-left:0in; padding-right:0in; border-top:#b5c4df 1pt solid; border-right:medium none; padding-top:3pt">
<span style="font-weight:bold">From: </span>"Ashlesh Gawande (agawande)" <<a href="mailto:agawande@memphis.edu">agawande@memphis.edu</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, July 20, 2016 at 13:41:00<br>
</div>
<div>
<div style="word-wrap:break-word; color:rgb(0,0,0); font-size:14px; font-family:Calibri,sans-serif">
</div>
</div>
</blockquote>
</span>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div><br>
</div>
</blockquote>
<span id="OLK_SRC_BODY_SECTION">
<div>
<div style="word-wrap:break-word; color:rgb(0,0,0); font-size:14px; font-family:Calibri,sans-serif">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<p>I have tried that example and the browser does not get anything.</p>
<p>NFD logs show that the interest for <span>/localhost/nfd/faces/list is dropped due to scope violation.</span></p>
</blockquote>
</div>
</div>
</div>
</span>
<div><br>
</div>
<div>Is your nfd.conf modified from <span style="font-family:Menlo; font-size:12px">/usr/local/etc/ndn/nfd.conf.sample</span> , especially in the websocket section? </div>
<span id="OLK_SRC_BODY_SECTION">
<div>
<div style="word-wrap:break-word; color:rgb(0,0,0); font-size:14px; font-family:Calibri,sans-serif">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<p><span><br>
</span></p>
<p><span>In <a href="https://github.com/named-data/ndn-js/blob/master/examples/browser/test-list-faces.html#L47" class="OWAAutoLink" id="LPlnk866716">https://github.com/named-data/ndn-js/blob/master/examples/browser/test-list-faces.html#L47</a></span></p>
<p>it says that a Unix socket is used to connect to the local forwarder, but nfd-status shows websocket.</p>
</blockquote>
</div>
</div>
</div>
</span>
<div><br>
</div>
<div>Whoopsie!  (Thatís a typo from copying from the Node.js example.) Youíre right. it connects with WebSocket. I fixed the comment.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>- Jeff T</div>
<span id="OLK_SRC_BODY_SECTION">
<div>
<div style="word-wrap:break-word; color:rgb(0,0,0); font-size:14px; font-family:Calibri,sans-serif">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<p><br>
</p>
</blockquote>
<p></p>
</div>
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri,sans-serif" color="#000000"><b>From:</b> Ndn-interest <<a href="mailto:ndn-interest-bounces@lists.cs.ucla.edu">ndn-interest-bounces@lists.cs.ucla.edu</a>> on behalf of Thompson, Jeff
 <<a href="mailto:jefft0@remap.ucla.edu">jefft0@remap.ucla.edu</a>><br>
<b>Sent:</b> Wednesday, July 20, 2016 3:25:27 PM<br>
<b>To:</b> El Mimouni, Omar Ilias (IntlAssoc); <a href="mailto:ndn-interest@lists.cs.ucla.edu">
ndn-interest@lists.cs.ucla.edu</a><br>
<b>Subject:</b> Re: [Ndn-interest] (NDN-js) query localhost from browser?</font>
<div> </div>
</div>
<div>
<div>See the example test-list-faces:</div>
<div><a href="https://github.com/named-data/ndn-js/blob/master/examples/browser/test-list-faces.html">https://github.com/named-data/ndn-js/blob/master/examples/browser/test-list-faces.html</a></div>
<div><br>
</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; border-bottom:medium none; border-left:medium none; padding-bottom:0in; padding-left:0in; padding-right:0in; border-top:#b5c4df 1pt solid; border-right:medium none; padding-top:3pt">
<span style="font-weight:bold">From: </span>Ndn-interest <<a href="mailto:ndn-interest-bounces@lists.cs.ucla.edu">ndn-interest-bounces@lists.cs.ucla.edu</a>> on behalf of "El Mimouni, Omar Ilias (IntlAssoc)" <<a href="mailto:omarilias.elmimouni@nist.gov">omarilias.elmimouni@nist.gov</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, July 20, 2016 at 13:16:00<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu">ndn-interest@lists.cs.ucla.edu</a>><br>
<span style="font-weight:bold">Subject: </span>[Ndn-interest] (NDN-js) query localhost from browser?<br>
</div>
<div><br>
</div>
<div>
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<div lang="EN-US">
<div class="WordSection1">
<p class="MsoNormal">Hi all,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I am currently playing with NDN-js library, and I was wondering if it is possible to query the localhost (e.g.  <b>ndn:/localhost/nfd/faces/list</b>) .</p>
<p class="MsoNormal">I could do that with node using UnixSocket. Is it possible to do it from a browser (knowing that the browser uses WebSockets) ?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks. </p>
</div>
</div>
</div>
</span></div>
</div>
</div>
</span></div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>