Ldaptor Proxy using UDP
Matthew Robertson <[email protected]> Fri, 13 Dec 2019 12:29:38 -0600
| Newsgroups | gmane.comp.python.twisted |
|---|---|
| Message-ID | <CAHkF0gPCMMz5qxZhxh2ZyLFu-8t=9iuy8SDeH7YtDq7ei_PCXg@mail.gmail.com> |
--===============0451882217124933164== Content-Type: multipart/alternative; boundary="00000000000024052105999a0c0b" --00000000000024052105999a0c0b Content-Type: text/plain; charset="UTF-8" I've started from the ldaptor proxy example here: https://ldaptor.readthedocs.io/en/latest/cookbook/ldap-proxy.html and have a working application using tcp, However, now there is a requirement to access via UDP. I have been struggling to get this to work, nothing seems to work. Mainly been trying to duplicate how the DNS server works for both tcp & udp. class DNSDatagramProtocol(dns.DNSMixin, protocol.DatagramProtocol): but not sure if that is the right path or there is an easier way. thank you, --00000000000024052105999a0c0b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I've started from the ldaptor proxy example here:<div>= <br></div><div><a href=3D"https://ldaptor.readthedocs.io/en/latest/cookbook= /ldap-proxy.html">https://ldaptor.readthedocs.io/en/latest/cookbook/ldap-pr= oxy.html</a><br></div><div><br></div><div>and have a working application us= ing tcp, However, now there is a requirement=C2=A0to access via UDP.=C2=A0 = I have been struggling=C2=A0to get this to work,=C2=A0 nothing seems to wor= k.</div><div><br></div><div>Mainly=C2=A0been trying to duplicate how the DN= S server works for both tcp & udp.</div><div><br></div><div><span class= =3D"gmail-pl-k" style=3D"box-sizing:border-box;color:rgb(215,58,73);font-fa= mily:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;fo= nt-size:12px;white-space:pre">class</span><span style=3D"color:rgb(36,41,46= );font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,mon= ospace;font-size:12px;white-space:pre"> </span><span class=3D"gmail-pl-en" = style=3D"box-sizing:border-box;color:rgb(111,66,193);font-family:SFMono-Reg= ular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;wh= ite-space:pre"><span class=3D"gmail-pl-token" style=3D"box-sizing:border-bo= x">DNSDatagramProtocol</span></span><span style=3D"color:rgb(36,41,46);font= -family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace= ;font-size:12px;white-space:pre">(</span><span class=3D"gmail-pl-e" style= =3D"box-sizing:border-box;color:rgb(111,66,193);font-family:SFMono-Regular,= Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-s= pace:pre">dns</span><span style=3D"color:rgb(36,41,46);font-family:SFMono-R= egular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;= white-space:pre">.</span><span class=3D"gmail-pl-e" style=3D"box-sizing:bor= der-box;color:rgb(111,66,193);font-family:SFMono-Regular,Consolas,"Lib= eration Mono",Menlo,monospace;font-size:12px;white-space:pre">DNSMixin= </span><span style=3D"color:rgb(36,41,46);font-family:SFMono-Regular,Consol= as,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:p= re">, </span><span class=3D"gmail-pl-e" style=3D"box-sizing:border-box;colo= r:rgb(111,66,193);font-family:SFMono-Regular,Consolas,"Liberation Mono= ",Menlo,monospace;font-size:12px;white-space:pre">protocol</span><span= style=3D"color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Lib= eration Mono",Menlo,monospace;font-size:12px;white-space:pre">.</span>= <span class=3D"gmail-pl-e" style=3D"box-sizing:border-box;color:rgb(111,66,= 193);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,= monospace;font-size:12px;white-space:pre">DatagramProtocol</span><span styl= e=3D"color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberati= on Mono",Menlo,monospace;font-size:12px;white-space:pre">):</span><br>= </div><div><span style=3D"color:rgb(36,41,46);font-family:SFMono-Regular,Co= nsolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-spa= ce:pre"><br></span></div><div><span style=3D"color:rgb(36,41,46);font-famil= y:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-= size:12px;white-space:pre">but not sure if that is the right path or there = is an easier way.</span></div><div><br></div><div><span style=3D"color:rgb(= 36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",M= enlo,monospace;font-size:12px;white-space:pre">thank you,</span></div><div>= <span style=3D"color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quo= t;Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre"><br= ></span></div></div> --00000000000024052105999a0c0b-- --===============0451882217124933164== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVHdpc3RlZC1Q eXRob24gbWFpbGluZyBsaXN0ClR3aXN0ZWQtUHl0aG9uQHR3aXN0ZWRtYXRyaXguY29tCmh0dHBz Oi8vdHdpc3RlZG1hdHJpeC5jb20vY2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL3R3aXN0ZWQtcHl0 aG9uCg== --===============0451882217124933164==--