Re: torrent sharing
Stu Midgley <[email protected]> Thu, 14 Sep 2017 21:48:07 +0800
| Newsgroups | gmane.network.lftp.user |
|---|---|
| Message-ID | <CAEM1RsWiWPqcDCobBq2m4==4_Sb12L8LKvam3sqUNOAmLgDxTw@mail.gmail.com> |
--===============3760236703411102458==
Content-Type: multipart/alternative; boundary="001a11375c20f7a48305592687d2"
--001a11375c20f7a48305592687d2
Content-Type: text/plain; charset="UTF-8"
Right... and line 743,1131 in DHT.cc and 575,586 in Torrent.cc
I modified the is_private function in network.cc to
bool sockaddr_u::is_private() const
{
if(sa.sa_family==AF_INET)
{
unsigned char *a=(unsigned char *)&in.sin_addr;
return (0==1);
}
#if INET6
if(family()==AF_INET6) {
return IN6_IS_ADDR_SITELOCAL(&in6.sin6_addr)
|| IN6_IS_ADDR_LINKLOCAL(&in6.sin6_addr);
}
#endif
return false;
}
and it still didn't work.
On Thu, Sep 14, 2017 at 9:25 PM, Alexander V. Lukyanov <[email protected]> wrote:
> On Thu, Sep 14, 2017 at 09:12:40PM +0800, Stu Midgley wrote:
> > Thanks for the quick response.
> >
> > I started the bootstrap-dht and the lftp client and server on the single
> > machine (172.16.250.40) which is a machine without external access to the
> > internet (hence why I want to run my own dht bootstrap service.
> ...
> > I don't see lftp contacting the bootstrap service.
>
> It appears that lftp refuses to talk DHT to private IP addresses (see
> DHT.cc:296). I don't know if that's correct, but I was thinking about
> security of private networks when I coded this.
>
> --
> Alexander.
>
--
Dr Stuart Midgley
[email protected]
--001a11375c20f7a48305592687d2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e,monospace">Right... and line 743,1131 in DHT.cc and 575,586 in Torrent.cc=
</div><div class=3D"gmail_default" style=3D"font-family:monospace,monospace=
"><br></div><div class=3D"gmail_default" style=3D"font-family:monospace,mon=
ospace">I modified the is_private function in network.cc to</div><div class=
=3D"gmail_default" style=3D"font-family:monospace,monospace"><br></div><div=
class=3D"gmail_default" style=3D"font-family:monospace,monospace"><p style=
=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rg=
b(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures">bool s=
ockaddr_u::</span><span style=3D"font-variant-ligatures:no-common-ligatures=
;color:rgb(255,255,255);background-color:rgb(0,0,0)">is_private</span><span=
style=3D"font-variant-ligatures:no-common-ligatures">() const</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">{</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0=C2=A0 if(sa.sa_family=3D=3DAF_INET)</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0=C2=A0 {</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0 =C2=A0 =C2=A0 unsigned char *a=3D(unsigned char *)&in.sin_addr=
;</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0 =C2=A0 =C2=A0 return (0=3D=3D1);</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0=C2=A0 }</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">#if INET6</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0=C2=A0 if(family()=3D=3DAF_INET6) {</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0 =C2=A0 =C2=A0 return IN6_IS_ADDR_SITELOCAL(&in6.sin6_addr)</sp=
an></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 || IN6_IS_ADDR_LINKLOCAL(&in6.sin6=
_addr);</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0=C2=A0 }</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">#endif</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">=C2=A0=C2=A0 return false;</span></p>
<p style=3D"margin:0px;font-size:11px;line-height:normal;font-family:Menlo;=
color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-common-ligatures=
">}</span></p><p style=3D"margin:0px;font-size:11px;line-height:normal;font=
-family:Menlo;color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-co=
mmon-ligatures"><br></span></p><p style=3D"margin:0px;font-size:11px;line-h=
eight:normal;font-family:Menlo;color:rgb(0,0,0)"><span style=3D"font-varian=
t-ligatures:no-common-ligatures"><br></span></p></div><div class=3D"gmail_d=
efault" style=3D"font-family:monospace,monospace">and it still didn't w=
ork.</div><div class=3D"gmail_default" style=3D"font-family:monospace,monos=
pace"><br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_qu=
ote">On Thu, Sep 14, 2017 at 9:25 PM, Alexander V. Lukyanov <span dir=3D"lt=
r"><<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g=
t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"">On Thu,=
Sep 14, 2017 at 09:12:40PM +0800, Stu Midgley wrote:<br>
> Thanks for the quick response.<br>
><br>
> I started the bootstrap-dht and the lftp client and server on the sing=
le<br>
> machine (172.16.250.40) which is a machine without external access to =
the<br>
> internet (hence why I want to run my own dht bootstrap service.<br>
</span><span class=3D"">...<br>
> I don't see lftp contacting the bootstrap service.<br>
<br>
</span>It appears that lftp refuses to talk DHT to private IP addresses (se=
e<br>
DHT.cc:296). I don't know if that's correct, but I was thinking abo=
ut<br>
security of private networks when I coded this.<br>
<br>
--<br>
=C2=A0 =C2=A0Alexander.<br>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div class=
=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><d=
iv><font face=3D"monospace, monospace">Dr Stuart Midgley<br><a href=3D"mail=
to:[email protected]" target=3D"_blank">[email protected]</a></font></div></d=
iv></div>
</div>
--001a11375c20f7a48305592687d2--
--===============3760236703411102458==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
lftp mailing list
[email protected]
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
--===============3760236703411102458==--