Re: torrent sharing

Stu Midgley <[email protected]> Thu, 14 Sep 2017 22:11:21 +0800
Newsgroups gmane.network.lftp.user
Message-ID <CAEM1RsXV9g-AP1_6p5PuOVaocwvEGrnkHneE3+58ZQZzFv7Viw@mail.gmail.com>
--===============1737412418773026954==
Content-Type: multipart/alternative; boundary="001a11375c200555ee055926dbe7"

--001a11375c200555ee055926dbe7
Content-Type: text/plain; charset="UTF-8"

That would be great, thanks.

On Thu, Sep 14, 2017 at 10:05 PM, Alexander V. Lukyanov <[email protected]>
wrote:

> On Thu, Sep 14, 2017 at 09:56:19PM +0800, Stu Midgley wrote:
> > and of course... their was a similar test in dht-bootstrap .
> >
> > I have removed both tests and they at least talk to each other.
>
> I think I'll make a new setting allowing DHT and bittorrent to private
> networks (off by default).
>
> --
>    Alexander.
>
> > On Thu, Sep 14, 2017 at 9:48 PM, Stu Midgley <[email protected]> wrote:
> >
> > > 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]
> > >
> >
> >
> >
> > --
> > Dr Stuart Midgley
> > [email protected]
>
> > _______________________________________________
> > lftp mailing list
> > [email protected]
> > http://univ.uniyar.ac.ru/mailman/listinfo/lftp
>



-- 
Dr Stuart Midgley
[email protected]

--001a11375c200555ee055926dbe7
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">That would be great, thanks.</div></div><div class=3D"gmail_ex=
tra"><br><div class=3D"gmail_quote">On Thu, Sep 14, 2017 at 10:05 PM, Alexa=
nder V. Lukyanov <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" targ=
et=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex"><span class=3D"">On Thu, Sep 14, 2017 at 09:56:19PM +0800, Stu Midg=
ley wrote:<br>
&gt; and of course... their was a similar test in dht-bootstrap .<br>
&gt;<br>
&gt; I have removed both tests and they at least talk to each other.<br>
<br>
</span>I think I&#39;ll make a new setting allowing DHT and bittorrent to p=
rivate<br>
networks (off by default).<br>
<br>
--<br>
=C2=A0 =C2=A0Alexander.<br>
<div><div class=3D"h5"><br>
&gt; On Thu, Sep 14, 2017 at 9:48 PM, Stu Midgley &lt;<a href=3D"mailto:sdm=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Right... and line 743,1131 in DHT.cc and 575,586 in Torrent.cc<br=
>
&gt; &gt;<br>
&gt; &gt; I modified the is_private function in network.cc to<br>
&gt; &gt;<br>
&gt; &gt; bool sockaddr_u::is_private() const<br>
&gt; &gt;<br>
&gt; &gt; {<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 if(sa.sa_family=3D=3DAF_INET)<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 {<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0unsigned char *a=3D(unsigned char *)&am=
p;in.sin_addr;<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0=3D=3D1);<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 }<br>
&gt; &gt;<br>
&gt; &gt; #if INET6<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 if(family()=3D=3DAF_INET6) {<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0return IN6_IS_ADDR_SITELOCAL(&amp;in6.<=
wbr>sin6_addr)<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|| IN6_IS_ADDR_LINKLOCAL(=
&amp;in6.<wbr>sin6_addr);<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 }<br>
&gt; &gt;<br>
&gt; &gt; #endif<br>
&gt; &gt;<br>
&gt; &gt;=C2=A0 =C2=A0 return false;<br>
&gt; &gt;<br>
&gt; &gt; }<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; and it still didn&#39;t work.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Thu, Sep 14, 2017 at 9:25 PM, Alexander V. Lukyanov &lt;<a hre=
f=3D"mailto:[email protected]">[email protected]</a>&gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; On Thu, Sep 14, 2017 at 09:12:40PM +0800, Stu Midgley wrote:<=
br>
&gt; &gt;&gt; &gt; Thanks for the quick response.<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; I started the bootstrap-dht and the lftp client and serv=
er on the single<br>
&gt; &gt;&gt; &gt; machine (172.16.250.40) which is a machine without exter=
nal access to<br>
&gt; &gt;&gt; the<br>
&gt; &gt;&gt; &gt; internet (hence why I want to run my own dht bootstrap s=
ervice.<br>
&gt; &gt;&gt; ...<br>
&gt; &gt;&gt; &gt; I don&#39;t see lftp contacting the bootstrap service.<b=
r>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; It appears that lftp refuses to talk DHT to private IP addres=
ses (see<br>
&gt; &gt;&gt; DHT.cc:296). I don&#39;t know if that&#39;s correct, but I wa=
s thinking about<br>
&gt; &gt;&gt; security of private networks when I coded this.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt;=C2=A0 =C2=A0 Alexander.<br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Dr Stuart Midgley<br>
&gt; &gt; <a href=3D"mailto:[email protected]">[email protected]</a><br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Dr Stuart Midgley<br>
&gt; <a href=3D"mailto:[email protected]">[email protected]</a><br>
<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; lftp mailing list<br>
&gt; <a href=3D"mailto:[email protected]">[email protected]</a><br>
&gt; <a href=3D"http://univ.uniyar.ac.ru/mailman/listinfo/lftp" rel=3D"nore=
ferrer" target=3D"_blank">http://univ.uniyar.ac.ru/<wbr>mailman/listinfo/lf=
tp</a><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>

--001a11375c200555ee055926dbe7--

--===============1737412418773026954==
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

--===============1737412418773026954==--