pax_global_header00006660000000000000000000000064122233510150014504gustar00rootroot0000000000000052 comment=600689fc8f97e6e72dd9750d06fb38fa1b8a1f2d pyptlib-0.0.5/000077500000000000000000000000001222335101500131715ustar00rootroot00000000000000pyptlib-0.0.5/ChangeLog000066400000000000000000000014601222335101500147440ustar00rootroot00000000000000Changes in version 0.0.5 - 2013-09-30 - API change to expose server-side transport options. Fixes #8979. Changes in version 0.0.4 - 2013-09-11 - Add a subprocess management module, which should make it easier to write composed plugins such as obfs-flash, and the 2-INT termination behaviour specified in the PT spec. - Present a more object-oriented public API, and refactor internals to have better separation of concerns. Add a more complete set of tests. Changes in version 0.0.3 - 2013-02-18 - Restrict the MANIFEST.in file some more, so that no .pyc files sneak into the release tarballs. Changes in version 0.0.2 - 2013-02-17 - Add a MANIFEST.in file so that we can specify which files should get into the release tarballs. Changes in version 0.0.1 - 2013-02-15 - Initial release. pyptlib-0.0.5/LICENSE000066400000000000000000000026351222335101500142040ustar00rootroot00000000000000Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the names of the copyright owners nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. pyptlib-0.0.5/MANIFEST.in000066400000000000000000000003051222335101500147250ustar00rootroot00000000000000recursive-include doc * recursive-include examples * recursive-include pyptlib *.py recursive-include sphinx * global-exclude *.pyc include TODO include README.rst include LICENSE include ChangeLogpyptlib-0.0.5/PKG-INFO000066400000000000000000000015301222335101500142650ustar00rootroot00000000000000Metadata-Version: 1.1 Name: pyptlib Version: 0.0.5 Summary: A python implementation of the Pluggable Transports for Circumvention specification for Tor Home-page: UNKNOWN Author: asn, Brandon Wiley Author-email: asn@torproject.org, brandon@blanu.net License: BSD Description: A python implementation of the Pluggable Transports for Circumvention specification for Tor Keywords: cryptography privacy internet Platform: UNKNOWN Classifier: Development Status :: 3 - Alpha Classifier: Environment :: No Input/Output (Daemon) Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Topic :: Internet Classifier: Topic :: Security :: Cryptography Classifier: Topic :: Software Development :: Libraries :: Python Modules pyptlib-0.0.5/README.rst000066400000000000000000000024471222335101500146670ustar00rootroot00000000000000pyptlib README =============== - What is pyptlib? pyptlib is a little Python library which understands the `pluggable transport managed-proxy protocol `_. - Who is interested in pyptlib? You might be interested in pyptlib if you have an application that obfuscates TCP traffic and you want to integrate it easily with Tor. - What does pyptlib do? pyptlib speaks with Tor and informs your application about which pluggable transports Tor needs, in which ports they should listen for connections, in which filesystem directory they should keep state, etc. - What does pyptlib not do? pyptlib doesn't help your application do networking or obfuscation. - What does pyptlib expect from an application? pyptlib assumes that your application is executed by Tor as a managed-proxy. pyptlib assumes that your application acts as a proxy: it listens for traffic on a TCP port and pushes the traffic somewhere else. pyptlib assumes that your application has a SOCKS server when it acts as a client. This is needed because Tor needs to dynamically select where its data will be pushed to. - How do I use pyptlib? Read the documentation, the examples and the source. - What are these buzzwords? :file:`glossary.rst` pyptlib-0.0.5/TODO000066400000000000000000000003601222335101500136600ustar00rootroot00000000000000- Add unit test to test the stdout output of pyptlib (check if all CMETHOD and CMETHOD-ERROR lines appear as they should) - Make the API a bit more elegant. checkClientMode() is probably unnecessary. - Switch camelCase to underscores?pyptlib-0.0.5/doc/000077500000000000000000000000001222335101500137365ustar00rootroot00000000000000pyptlib-0.0.5/doc/doctrees/000077500000000000000000000000001222335101500155465ustar00rootroot00000000000000pyptlib-0.0.5/doc/doctrees/API.doctree000066400000000000000000001145561222335101500175420ustar00rootroot00000000000000€cdocutils.nodes document q)q}q(U nametypesq}q(X$0) find if it's a client or a serverqNX'server case (skip if you are a client):qNX&client case (skip if you are a server)qNX54) stop using pyptlib and start accepting connectionsq NXgeneral overviewq NXdetailed api overviewq NX3) report results back to tor.q NX'client case (skip if you are a server):q NX2) launch transportsqNX api overviewqNX%1) get transport information from torqNuUsubstitution_defsq}qUparse_messagesq]qcdocutils.nodes system_message q)q}q(U rawsourceqUUparentqcdocutils.nodes section q)q}q(hUU referencedqKhh)q}q(hUhh)q }q!(hUhh)q"}q#(hUhhUsourceq$cdocutils.nodes reprunicode q%X,/home/f/Computers/tor/pyptlib/sphinx/API.rstq&…q'}q(bUtagnameq)Usectionq*U attributesq+}q,(Udupnamesq-]Uclassesq.]Ubackrefsq/]Uidsq0]q1U api-overviewq2aUnamesq3]q4hauUlineq5KUdocumentq6hUchildrenq7]q8(cdocutils.nodes title q9)q:}q;(hX API overviewq(h-]h.]h/]h0]h3]uh5Kh6hh7]q?cdocutils.nodes Text q@X API overviewqA…qB}qC(hh(h-]h.]h/]h0]h3]uh5K/h6hh7]r?(h@X5The application should store the return value of the r@…rA}rB(hX5The application should store the return value of the hj<ubh¹)rC}rD(hX :func:`init`rEhj<h$h'h)h½h+}rF(UreftypeXfunch¿‰hÀXinitU refdomainXpyrGh0]h/]U refexplicit‰h-]h.]h3]hÂhÃhÄNhÅNuh5K/h7]rHhM)rI}rJ(hjEh+}rK(h-]h.]rL(hËjGXpy-funcrMeh/]h0]h3]uhjCh7]rNh@Xinit()rO…rP}rQ(hUhjIubah)hWubaubh@X function.rR…rS}rT(hX function.hj<ubeubhD)rU}rV(hXÐConsider an example of the fictional application *rot0r* which implements the pluggable transports *rot13* and *rot26*. If *rot0r*, in step 1, learned that Tor expects it to act as a client, it should now do:hhÔh$h'h)hGh+}rW(h-]h.]h/]h0]h3]uh5K2h6hh7]rX(h@X1Consider an example of the fictional application rY…rZ}r[(hX1Consider an example of the fictional application hjUubcdocutils.nodes emphasis r\)r]}r^(hX*rot0r*h+}r_(h-]h.]h/]h0]h3]uhjUh7]r`h@Xrot0rra…rb}rc(hUhj]ubah)Uemphasisrdubh@X+ which implements the pluggable transports re…rf}rg(hX+ which implements the pluggable transports hjUubj\)rh}ri(hX*rot13*h+}rj(h-]h.]h/]h0]h3]uhjUh7]rkh@Xrot13rl…rm}rn(hUhjhubah)jdubh@X and ro…rp}rq(hX and hjUubj\)rr}rs(hX*rot26*h+}rt(h-]h.]h/]h0]h3]uhjUh7]ruh@Xrot26rv…rw}rx(hUhjrubah)jdubh@X. If ry…rz}r{(hX. If hjUubj\)r|}r}(hX*rot0r*h+}r~(h-]h.]h/]h0]h3]uhjUh7]rh@Xrot0rr€…r}r‚(hUhj|ubah)jdubh@XN, in step 1, learned that Tor expects it to act as a client, it should now do:rƒ…r„}r…(hXN, in step 1, learned that Tor expects it to act as a client, it should now do:hjUubeubcdocutils.nodes literal_block r†)r‡}rˆ(hXÌimport pyptlib.client import pyptlib.config try: managed_info = pyptlib.client.init(["rot13", "rot26"]) except pyptlib.config.EnvError, err: print "pyptlib could not bootstrap ('%s')." % str(err)hhÔh$h'h)U literal_blockr‰h+}rŠ(Ulinenosr‹‰UlanguagerŒXpythonU xml:spacerUpreserverŽh0]h/]h-]h.]h3]uh5K7h6hh7]rh@XÌimport pyptlib.client import pyptlib.config try: managed_info = pyptlib.client.init(["rot13", "rot26"]) except pyptlib.config.EnvError, err: print "pyptlib could not bootstrap ('%s')." % str(err)r…r‘}r’(hUhj‡ubaubeubh)r“}r”(hUhh h$h'h)h*h+}r•(h-]h.]h/]h0]r–Ulaunch-transportsr—ah3]r˜hauh5KCh6hh7]r™(h9)rš}r›(hX2) Launch transportsrœhj“h$h'h)h=h+}r(h-]h.]h/]h0]h3]uh5KCh6hh7]ržh@X2) Launch transportsrŸ…r }r¡(hjœhjšubaubh)r¢}r£(hUhj“h$h'h)h*h+}r¤(h-]h.]h/]h0]r¥U$client-case-skip-if-you-are-a-serverr¦ah3]r§hauh5KFh6hh7]r¨(h9)r©}rª(hX&Client case (skip if you are a server)r«hj¢h$h'h)h=h+}r¬(h-]h.]h/]h0]h3]uh5KFh6hh7]r­h@X&Client case (skip if you are a server)r®…r¯}r°(hj«hj©ubaubhD)r±}r²(hXoIf your application is a client, the return value of :func:`pyptlib.client.init` is a dictionary of the format:hj¢h$h'h)hGh+}r³(h-]h.]h/]h0]h3]uh5KHh6hh7]r´(h@X5If your application is a client, the return value of rµ…r¶}r·(hX5If your application is a client, the return value of hj±ubh¹)r¸}r¹(hX:func:`pyptlib.client.init`rºhj±h$h'h)h½h+}r»(UreftypeXfunch¿‰hÀXpyptlib.client.initU refdomainXpyr¼h0]h/]U refexplicit‰h-]h.]h3]hÂhÃhÄNhÅNuh5KHh7]r½hM)r¾}r¿(hjºh+}rÀ(h-]h.]rÁ(hËj¼Xpy-funcrÂeh/]h0]h3]uhj¸h7]rÃh@Xpyptlib.client.init()rÄ…rÅ}rÆ(hUhj¾ubah)hWubaubh@X is a dictionary of the format:rÇ…rÈ}rÉ(hX is a dictionary of the format:hj±ubeubcdocutils.nodes table rÊ)rË}rÌ(hUhj¢h$h'h)UtablerÍh+}rÎ(h-]h.]h/]h0]h3]uh5Nh6hh7]rÏcdocutils.nodes tgroup rÐ)rÑ}rÒ(hUh+}rÓ(h0]h/]h-]h.]h3]UcolsKuhjËh7]rÔ(cdocutils.nodes colspec rÕ)rÖ}r×(hUh+}rØ(h0]h/]h-]h.]h3]UcolwidthK uhjÑh7]h)UcolspecrÙubjÕ)rÚ}rÛ(hUh+}rÜ(h0]h/]h-]h.]h3]UcolwidthK uhjÑh7]h)jÙubjÕ)rÝ}rÞ(hUh+}rß(h0]h/]h-]h.]h3]UcolwidthKVuhjÑh7]h)jÙubcdocutils.nodes thead rà)rá}râ(hUh+}rã(h-]h.]h/]h0]h3]uhjÑh7]räcdocutils.nodes row rå)ræ}rç(hUh+}rè(h-]h.]h/]h0]h3]uhjáh7]ré(cdocutils.nodes entry rê)rë}rì(hUh+}rí(h-]h.]h/]h0]h3]uhjæh7]rîhD)rï}rð(hXKeyrñhjëh$h'h)hGh+}rò(h-]h.]h/]h0]h3]uh5KLh7]róh@XKeyrô…rõ}rö(hjñhjïubaubah)Uentryr÷ubjê)rø}rù(hUh+}rú(h-]h.]h/]h0]h3]uhjæh7]rûhD)rü}rý(hXTyperþhjøh$h'h)hGh+}rÿ(h-]h.]h/]h0]h3]uh5KLh7]rh@XTyper…r}r(hjþhjüubaubah)j÷ubjê)r}r(hUh+}r(h-]h.]h/]h0]h3]uhjæh7]rhD)r}r (hXValuer hjh$h'h)hGh+}r (h-]h.]h/]h0]h3]uh5KLh7]r h@XValuer …r}r(hj hjubaubah)j÷ubeh)Urowrubah)Utheadrubcdocutils.nodes tbody r)r}r(hUh+}r(h-]h.]h/]h0]h3]uhjÑh7]r(jå)r}r(hUh+}r(h-]h.]h/]h0]h3]uhjh7]r(jê)r}r(hUh+}r(h-]h.]h/]h0]h3]uhjh7]rhD)r}r (hX state_locr!hjh$h'h)hGh+}r"(h-]h.]h/]h0]h3]uh5KNh7]r#h@X state_locr$…r%}r&(hj!hjubaubah)j÷ubjê)r'}r((hUh+}r)(h-]h.]h/]h0]h3]uhjh7]r*hD)r+}r,(hXstringr-hj'h$h'h)hGh+}r.(h-]h.]h/]h0]h3]uh5KNh7]r/h@Xstringr0…r1}r2(hj-hj+ubaubah)j÷ubjê)r3}r4(hUh+}r5(h-]h.]h/]h0]h3]uhjh7]r6hD)r7}r8(hXJDirectory where the managed proxy should dump its state files (if needed).r9hj3h$h'h)hGh+}r:(h-]h.]h/]h0]h3]uh5KNh7]r;h@XJDirectory where the managed proxy should dump its state files (if needed).r<…r=}r>(hj9hj7ubaubah)j÷ubeh)jubjå)r?}r@(hUh+}rA(h-]h.]h/]h0]h3]uhjh7]rB(jê)rC}rD(hUh+}rE(h-]h.]h/]h0]h3]uhj?h7]rFhD)rG}rH(hX transportsrIhjCh$h'h)hGh+}rJ(h-]h.]h/]h0]h3]uh5KOh7]rKh@X transportsrL…rM}rN(hjIhjGubaubah)j÷ubjê)rO}rP(hUh+}rQ(h-]h.]h/]h0]h3]uhj?h7]rRhD)rS}rT(hXlistrUhjOh$h'h)hGh+}rV(h-]h.]h/]h0]h3]uh5KOh7]rWh@XlistrX…rY}rZ(hjUhjSubaubah)j÷ubjê)r[}r\(hUh+}r](h-]h.]h/]h0]h3]uhj?h7]r^hD)r_}r`(hXVStrings of the names of the transports that should be launched. The list can be empty.rahj[h$h'h)hGh+}rb(h-]h.]h/]h0]h3]uh5KOh7]rch@XVStrings of the names of the transports that should be launched. The list can be empty.rd…re}rf(hjahj_ubaubah)j÷ubeh)jubeh)Utbodyrgubeh)UtgrouprhubaubhD)ri}rj(hXaYour application should then use the *transports* key to learn which transports it should launch.rkhj¢h$h'h)hGh+}rl(h-]h.]h/]h0]h3]uh5KRh6hh7]rm(h@X%Your application should then use the rn…ro}rp(hX%Your application should then use the hjiubj\)rq}rr(hX *transports*h+}rs(h-]h.]h/]h0]h3]uhjih7]rth@X transportsru…rv}rw(hUhjqubah)jdubh@X0 key to learn which transports it should launch.rx…ry}rz(hX0 key to learn which transports it should launch.hjiubeubhD)r{}r|(hX%Proceeding with the previous example:r}hj¢h$h'h)hGh+}r~(h-]h.]h/]h0]h3]uh5KTh6hh7]rh@X%Proceeding with the previous example:r€…r}r‚(hj}hj{ubaubj†)rƒ}r„(hX‡if 'rot13' in managed_info['transports']: launch_rot13_client() if 'rot26' in managed_info['transports']: launch_rot26_client()hj¢h$h'h)j‰h+}r…(j‹‰jŒXpythonjjŽh0]h/]h-]h.]h3]uh5KVh6hh7]r†h@X‡if 'rot13' in managed_info['transports']: launch_rot13_client() if 'rot26' in managed_info['transports']: launch_rot26_client()r‡…rˆ}r‰(hUhjƒubaubcdocutils.nodes note rŠ)r‹}rŒ(hXjSince the application runs as a client, it should launch a SOCKS server in the upstream side of the proxy.hj¢h$h'h)Unoterh+}rŽ(h-]h.]h/]h0]h3]uh5Nh6hh7]rhD)r}r‘(hXjSince the application runs as a client, it should launch a SOCKS server in the upstream side of the proxy.r’hj‹h$h'h)hGh+}r“(h-]h.]h/]h0]h3]uh5K_h7]r”h@XjSince the application runs as a client, it should launch a SOCKS server in the upstream side of the proxy.r•…r–}r—(hj’hjubaubaubeubh)r˜}r™(hUhKhj“h$h'h)h*h+}rš(h-]r›X'server case (skip if you are a client):rœah.]h/]h0]rU$server-case-skip-if-you-are-a-clientržah3]uh5Kch6hh7]rŸ(h9)r }r¡(hX'Server case (skip if you are a client):r¢hj˜h$h'h)h=h+}r£(h-]h.]h/]h0]h3]uh5Kch6hh7]r¤h@X'Server case (skip if you are a client):r¥…r¦}r§(hj¢hj ubaubhD)r¨}r©(hXoIf your application is a server, the return value of :func:`pyptlib.server.init` is a dictionary of the format:hj˜h$h'h)hGh+}rª(h-]h.]h/]h0]h3]uh5Keh6hh7]r«(h@X5If your application is a server, the return value of r¬…r­}r®(hX5If your application is a server, the return value of hj¨ubh¹)r¯}r°(hX:func:`pyptlib.server.init`r±hj¨h$h'h)h½h+}r²(UreftypeXfunch¿‰hÀXpyptlib.server.initU refdomainXpyr³h0]h/]U refexplicit‰h-]h.]h3]hÂhÃhÄNhÅNuh5Keh7]r´hM)rµ}r¶(hj±h+}r·(h-]h.]r¸(hËj³Xpy-funcr¹eh/]h0]h3]uhj¯h7]rºh@Xpyptlib.server.init()r»…r¼}r½(hUhjµubah)hWubaubh@X is a dictionary of the format:r¾…r¿}rÀ(hX is a dictionary of the format:hj¨ubeubjÊ)rÁ}rÂ(hUhj˜h$h'h)jÍh+}rÃ(h-]h.]h/]h0]h3]uh5Nh6hh7]rÄjÐ)rÅ}rÆ(hUh+}rÇ(h0]h/]h-]h.]h3]UcolsKuhjÁh7]rÈ(jÕ)rÉ}rÊ(hUh+}rË(h0]h/]h-]h.]h3]UcolwidthK uhjÅh7]h)jÙubjÕ)rÌ}rÍ(hUh+}rÎ(h0]h/]h-]h.]h3]UcolwidthK uhjÅh7]h)jÙubjÕ)rÏ}rÐ(hUh+}rÑ(h0]h/]h-]h.]h3]UcolwidthKÊuhjÅh7]h)jÙubjà)rÒ}rÓ(hUh+}rÔ(h-]h.]h/]h0]h3]uhjÅh7]rÕjå)rÖ}r×(hUh+}rØ(h-]h.]h/]h0]h3]uhjÒh7]rÙ(jê)rÚ}rÛ(hUh+}rÜ(h-]h.]h/]h0]h3]uhjÖh7]rÝhD)rÞ}rß(hXKeyràhjÚh$h'h)hGh+}rá(h-]h.]h/]h0]h3]uh5Kih7]râh@XKeyrã…rä}rå(hjàhjÞubaubah)j÷ubjê)ræ}rç(hUh+}rè(h-]h.]h/]h0]h3]uhjÖh7]réhD)rê}rë(hXTyperìhjæh$h'h)hGh+}rí(h-]h.]h/]h0]h3]uh5Kih7]rîh@XTyperï…rð}rñ(hjìhjêubaubah)j÷ubjê)rò}ró(hUh+}rô(h-]h.]h/]h0]h3]uhjÖh7]rõhD)rö}r÷(hXValuerøhjòh$h'h)hGh+}rù(h-]h.]h/]h0]h3]uh5Kih7]rúh@XValuerû…rü}rý(hjøhjöubaubah)j÷ubeh)jubah)jubj)rþ}rÿ(hUh+}r(h-]h.]h/]h0]h3]uhjÅh7]r(jå)r}r(hUh+}r(h-]h.]h/]h0]h3]uhjþh7]r(jê)r}r(hUh+}r(h-]h.]h/]h0]h3]uhjh7]r hD)r }r (hX state_locr hjh$h'h)hGh+}r (h-]h.]h/]h0]h3]uh5Kkh7]rh@X state_locr…r}r(hj hj ubaubah)j÷ubjê)r}r(hUh+}r(h-]h.]h/]h0]h3]uhjh7]rhD)r}r(hXstringrhjh$h'h)hGh+}r(h-]h.]h/]h0]h3]uh5Kkh7]rh@Xstringr…r}r(hjhjubaubah)j÷ubjê)r}r(hUh+}r (h-]h.]h/]h0]h3]uhjh7]r!hD)r"}r#(hXJDirectory where the managed proxy should dump its state files (if needed).r$hjh$h'h)hGh+}r%(h-]h.]h/]h0]h3]uh5Kkh7]r&h@XJDirectory where the managed proxy should dump its state files (if needed).r'…r(}r)(hj$hj"ubaubah)j÷ubeh)jubjå)r*}r+(hUh+}r,(h-]h.]h/]h0]h3]uhjþh7]r-(jê)r.}r/(hUh+}r0(h-]h.]h/]h0]h3]uhj*h7]r1hD)r2}r3(hXorportr4hj.h$h'h)hGh+}r5(h-]h.]h/]h0]h3]uh5Klh7]r6h@Xorportr7…r8}r9(hj4hj2ubaubah)j÷ubjê)r:}r;(hUh+}r<(h-]h.]h/]h0]h3]uhj*h7]r=hD)r>}r?(hXtupler@hj:h$h'h)hGh+}rA(h-]h.]h/]h0]h3]uh5Klh7]rBh@XtuplerC…rD}rE(hj@hj>ubaubah)j÷ubjê)rF}rG(hUh+}rH(h-]h.]h/]h0]h3]uhj*h7]rIhD)rJ}rK(hX)(ip,port) tuple pointing to Tor's ORPort.rLhjFh$h'h)hGh+}rM(h-]h.]h/]h0]h3]uh5Klh7]rNh@X)(ip,port) tuple pointing to Tor's ORPort.rO…rP}rQ(hjLhjJubaubah)j÷ubeh)jubjå)rR}rS(hUh+}rT(h-]h.]h/]h0]h3]uhjþh7]rU(jê)rV}rW(hUh+}rX(h-]h.]h/]h0]h3]uhjRh7]rYhD)rZ}r[(hX ext_orportr\hjVh$h'h)hGh+}r](h-]h.]h/]h0]h3]uh5Kmh7]r^h@X ext_orportr_…r`}ra(hj\hjZubaubah)j÷ubjê)rb}rc(hUh+}rd(h-]h.]h/]h0]h3]uhjRh7]rehD)rf}rg(hXtuplerhhjbh$h'h)hGh+}ri(h-]h.]h/]h0]h3]uh5Kmh7]rjh@Xtuplerk…rl}rm(hjhhjfubaubah)j÷ubjê)rn}ro(hUh+}rp(h-]h.]h/]h0]h3]uhjRh7]rqhD)rr}rs(hX\(ip,port) tuple pointing to Tor's Extended ORPort. None if Extended ORPort is not supported.rthjnh$h'h)hGh+}ru(h-]h.]h/]h0]h3]uh5Kmh7]rvh@X\(ip,port) tuple pointing to Tor's Extended ORPort. None if Extended ORPort is not supported.rw…rx}ry(hjthjrubaubah)j÷ubeh)jubjå)rz}r{(hUh+}r|(h-]h.]h/]h0]h3]uhjþh7]r}(jê)r~}r(hUh+}r€(h-]h.]h/]h0]h3]uhjzh7]rhD)r‚}rƒ(hX transportsr„hj~h$h'h)hGh+}r…(h-]h.]h/]h0]h3]uh5Knh7]r†h@X transportsr‡…rˆ}r‰(hj„hj‚ubaubah)j÷ubjê)rŠ}r‹(hUh+}rŒ(h-]h.]h/]h0]h3]uhjzh7]rhD)rŽ}r(hXdictrhjŠh$h'h)hGh+}r‘(h-]h.]h/]h0]h3]uh5Knh7]r’h@Xdictr“…r”}r•(hjhjŽubaubah)j÷ubjê)r–}r—(hUh+}r˜(h-]h.]h/]h0]h3]uhjzh7]r™hD)rš}r›(hXÊA dictionary 'transport => (ip,port)' where 'transport' is the name of the transport that should be spawned, and '(ip,port)' is the location where the transport should bind. The dictionary can be empty.rœhj–h$h'h)hGh+}r(h-]h.]h/]h0]h3]uh5Knh7]ržh@XÊA dictionary 'transport => (ip,port)' where 'transport' is the name of the transport that should be spawned, and '(ip,port)' is the location where the transport should bind. The dictionary can be empty.rŸ…r }r¡(hjœhjšubaubah)j÷ubeh)jubeh)jgubeh)jhubaubhD)r¢}r£(hXYour application should then use the *transports* key and attempt to launch the appropriate transports. Furthermore, since the application runs as a server, it should push data to Tor's ORPort. The TCP/IP location of the ORPort is provided in the *orport* key.hj˜h$h'h)hGh+}r¤(h-]h.]h/]h0]h3]uh5Kqh6hh7]r¥(h@X%Your application should then use the r¦…r§}r¨(hX%Your application should then use the hj¢ubj\)r©}rª(hX *transports*h+}r«(h-]h.]h/]h0]h3]uhj¢h7]r¬h@X transportsr­…r®}r¯(hUhj©ubah)jdubh@XÆ key and attempt to launch the appropriate transports. Furthermore, since the application runs as a server, it should push data to Tor's ORPort. The TCP/IP location of the ORPort is provided in the r°…r±}r²(hXÆ key and attempt to launch the appropriate transports. Furthermore, since the application runs as a server, it should push data to Tor's ORPort. The TCP/IP location of the ORPort is provided in the hj¢ubj\)r³}r´(hX*orport*h+}rµ(h-]h.]h/]h0]h3]uhj¢h7]r¶h@Xorportr·…r¸}r¹(hUhj³ubah)jdubh@X key.rº…r»}r¼(hX key.hj¢ubeubhD)r½}r¾(hX%Proceeding with the previous example:r¿hj˜h$h'h)hGh+}rÀ(h-]h.]h/]h0]h3]uh5Kvh6hh7]rÁh@X%Proceeding with the previous example:rÂ…rÃ}rÄ(hj¿hj½ubaubj†)rÅ}rÆ(hXýif 'rot13' in managed_info['transports']: launch_rot13_server(managed_info['transports']['rot13'], managed_info['orport']) if 'rot26' in managed_info['transports']: launch_rot26_server(managed_info['transports']['rot26'], managed_info['orport'])hj˜h$h'h)j‰h+}rÇ(j‹‰jŒXpythonjjŽh0]h/]h-]h.]h3]uh5Kxh6hh7]rÈh@Xýif 'rot13' in managed_info['transports']: launch_rot13_server(managed_info['transports']['rot13'], managed_info['orport']) if 'rot26' in managed_info['transports']: launch_rot26_server(managed_info['transports']['rot26'], managed_info['orport'])rÉ…rÊ}rË(hUhjÅubaubeubeubhh)rÌ}rÍ(hUhh h$h'h)h*h+}rÎ(h-]h.]h/]h0]rÏU2stop-using-pyptlib-and-start-accepting-connectionsrÐah3]rÑh auh5KÀh6hh7]rÒ(h9)rÓ}rÔ(hX54) Stop using pyptlib and start accepting connectionsrÕhjÌh$h'h)h=h+}rÖ(h-]h.]h/]h0]h3]uh5KÀh6hh7]r×h@X54) Stop using pyptlib and start accepting connectionsrØ…rÙ}rÚ(hjÕhjÓubaubhD)rÛ}rÜ(hXWhen the application finishes launching connections, it should call :func:`pyptlib.client.reportEnd` (or :func:`pyptlib.server.reportEnd`), to announce to pyptlib that all transports were launched. This way, Tor knows that it can start pushing traffic to the application.hjÌh$h'h)hGh+}rÝ(h-]h.]h/]h0]h3]uh5KÂh6hh7]rÞ(h@XDWhen the application finishes launching connections, it should call rß…rà}rá(hXDWhen the application finishes launching connections, it should call hjÛubh¹)râ}rã(hX :func:`pyptlib.client.reportEnd`rähjÛh$h'h)h½h+}rå(UreftypeXfunch¿‰hÀXpyptlib.client.reportEndU refdomainXpyræh0]h/]U refexplicit‰h-]h.]h3]hÂhÃhÄNhÅNuh5KÂh7]rçhM)rè}ré(hjäh+}rê(h-]h.]rë(hËjæXpy-funcrìeh/]h0]h3]uhjâh7]ríh@Xpyptlib.client.reportEnd()rî…rï}rð(hUhjèubah)hWubaubh@X (or rñ…rò}ró(hX (or hjÛubh¹)rô}rõ(hX :func:`pyptlib.server.reportEnd`röhjÛh$h'h)h½h+}r÷(UreftypeXfunch¿‰hÀXpyptlib.server.reportEndU refdomainXpyrøh0]h/]U refexplicit‰h-]h.]h3]hÂhÃhÄNhÅNuh5KÂh7]rùhM)rú}rû(hjöh+}rü(h-]h.]rý(hËjøXpy-funcrþeh/]h0]h3]uhjôh7]rÿh@Xpyptlib.server.reportEnd()r…r}r(hUhjúubah)hWubaubh@X†), to announce to pyptlib that all transports were launched. This way, Tor knows that it can start pushing traffic to the application.r…r}r(hX†), to announce to pyptlib that all transports were launched. This way, Tor knows that it can start pushing traffic to the application.hjÛubeubhD)r}r(hX+After this point, pyptlib has no other use.rhjÌh$h'h)hGh+}r (h-]h.]h/]h0]h3]uh5KÈh6hh7]r h@X+After this point, pyptlib has no other use.r …r }r (hjhjubaubeubeubh$h'h)h*h+}r(h-]h.]h/]h0]rUreport-results-back-to-torrah3]rh auh5Kh6hh7]r(h9)r}r(hX3) Report results back to Tor.rhhh$h'h)h=h+}r(h-]h.]h/]h0]h3]uh5Kh6hh7]rh@X3) Report results back to Tor.r…r}r(hjhjubaubhD)r}r(hXÂFor every transport that the application launches, it reports to pyptlib whether it was launched successfully or not. This way, Tor is informed on whether a transport is expected to work or not.rhhh$h'h)hGh+}r(h-]h.]h/]h0]h3]uh5Kƒh6hh7]rh@XÂFor every transport that the application launches, it reports to pyptlib whether it was launched successfully or not. This way, Tor is informed on whether a transport is expected to work or not.r …r!}r"(hjhjubaubh)r#}r$(hUhhh$h'h)h*h+}r%(h-]h.]h/]h0]r&Uid1r'ah3]r(h auh5Kˆh6hh7]r)(h9)r*}r+(hX'Client case (skip if you are a server):r,hj#h$h'h)h=h+}r-(h-]h.]h/]h0]h3]uh5Kˆh6hh7]r.h@X'Client case (skip if you are a server):r/…r0}r1(hj,hj*ubaubhD)r2}r3(hXEverytime a transport is successfully launched, the application calls :func:`pyptlib.client.reportSuccess` with the name of the transport that was launched, the address where it is listening for connections, and the SOCKS version that the upstream SOCKS server supports.hj#h$h'h)hGh+}r4(h-]h.]h/]h0]h3]uh5KŠh6hh7]r5(h@XFEverytime a transport is successfully launched, the application calls r6…r7}r8(hXFEverytime a transport is successfully launched, the application calls hj2ubh¹)r9}r:(hX$:func:`pyptlib.client.reportSuccess`r;hj2h$h'h)h½h+}r<(UreftypeXfunch¿‰hÀXpyptlib.client.reportSuccessU refdomainXpyr=h0]h/]U refexplicit‰h-]h.]h3]hÂhÃhÄNhÅNuh5KŠh7]r>hM)r?}r@(hj;h+}rA(h-]h.]rB(hËj=Xpy-funcrCeh/]h0]h3]uhj9h7]rDh@Xpyptlib.client.reportSuccess()rE…rF}rG(hUhj?ubah)hWubaubh@X¤ with the name of the transport that was launched, the address where it is listening for connections, and the SOCKS version that the upstream SOCKS server supports.rH…rI}rJ(hX¤ with the name of the transport that was launched, the address where it is listening for connections, and the SOCKS version that the upstream SOCKS server supports.hj2ubeubhD)rK}rL(hX’For example, if *rot13* was launched successfully, waits for connections in '127.0.0.1:42042' and supports SOCKSv4, the appropriate call would be:hj#h$h'h)hGh+}rM(h-]h.]h/]h0]h3]uh5Kh6hh7]rN(h@XFor example, if rO…rP}rQ(hXFor example, if hjKubj\)rR}rS(hX*rot13*h+}rT(h-]h.]h/]h0]h3]uhjKh7]rUh@Xrot13rV…rW}rX(hUhjRubah)jdubh@X{ was launched successfully, waits for connections in '127.0.0.1:42042' and supports SOCKSv4, the appropriate call would be:rY…rZ}r[(hX{ was launched successfully, waits for connections in '127.0.0.1:42042' and supports SOCKSv4, the appropriate call would be:hjKubeubj†)r\}r](hX>pyptlib.client.reportSuccess('rot13', 5, ('127.0.0.1', 42042))hj#h$h'h)j‰h+}r^(j‹‰jŒXpythonjjŽh0]h/]h-]h.]h3]uh5K“h6hh7]r_h@X>pyptlib.client.reportSuccess('rot13', 5, ('127.0.0.1', 42042))r`…ra}rb(hUhj\ubaubhD)rc}rd(hXEverytime a transport failed to launch, the application calls :func:`pyptlib.client.reportFailure` with the name of the transport and a message.hj#h$h'h)hGh+}re(h-]h.]h/]h0]h3]uh5K˜h6hh7]rf(h@X>Everytime a transport failed to launch, the application calls rg…rh}ri(hX>Everytime a transport failed to launch, the application calls hjcubh¹)rj}rk(hX$:func:`pyptlib.client.reportFailure`rlhjch$h'h)h½h+}rm(UreftypeXfunch¿‰hÀXpyptlib.client.reportFailureU refdomainXpyrnh0]h/]U refexplicit‰h-]h.]h3]hÂhÃhÄNhÅNuh5K˜h7]rohM)rp}rq(hjlh+}rr(h-]h.]rs(hËjnXpy-funcrteh/]h0]h3]uhjjh7]ruh@Xpyptlib.client.reportFailure()rv…rw}rx(hUhjpubah)hWubaubh@X. with the name of the transport and a message.ry…rz}r{(hX. with the name of the transport and a message.hjcubeubhD)r|}r}(hXHFor example, if *rot26* failed to launch, the appropriate call would be:hj#h$h'h)hGh+}r~(h-]h.]h/]h0]h3]uh5Kœh6hh7]r(h@XFor example, if r€…r}r‚(hXFor example, if hj|ubj\)rƒ}r„(hX*rot26*h+}r…(h-]h.]h/]h0]h3]uhj|h7]r†h@Xrot26r‡…rˆ}r‰(hUhjƒubah)jdubh@X1 failed to launch, the appropriate call would be:rŠ…r‹}rŒ(hX1 failed to launch, the appropriate call would be:hj|ubeubj†)r}rŽ(hXbpyptlib.client.reportFailure('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)')hj#h$h'h)j‰h+}r(j‹‰jŒXpythonjjŽh0]h/]h-]h.]h3]uh5KŸh6hh7]rh@Xbpyptlib.client.reportFailure('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)')r‘…r’}r“(hUhjubaubeubheubh$h'h)h*h+}r”(h-]r•jœah.]h/]h0]r–Uid2r—ah3]uh5K¥h6hh7]r˜(h9)r™}rš(hX'Server case (skip if you are a client):r›hhh$h'h)h=h+}rœ(h-]h.]h/]h0]h3]uh5K¥h6hh7]rh@X'Server case (skip if you are a client):rž…rŸ}r (hj›hj™ubaubhD)r¡}r¢(hXÓEverytime a transport is successfully launched, the application calls :func:`pyptlib.server.reportSuccess` with the name of the transport that was launched, and the address where it is listening for connections.hhh$h'h)hGh+}r£(h-]h.]h/]h0]h3]uh5K§h6hh7]r¤(h@XFEverytime a transport is successfully launched, the application calls r¥…r¦}r§(hXFEverytime a transport is successfully launched, the application calls hj¡ubh¹)r¨}r©(hX$:func:`pyptlib.server.reportSuccess`rªhj¡h$h'h)h½h+}r«(UreftypeXfunch¿‰hÀXpyptlib.server.reportSuccessU refdomainXpyr¬h0]h/]U refexplicit‰h-]h.]h3]hÂhÃhÄNhÅNuh5K§h7]r­hM)r®}r¯(hjªh+}r°(h-]h.]r±(hËj¬Xpy-funcr²eh/]h0]h3]uhj¨h7]r³h@Xpyptlib.server.reportSuccess()r´…rµ}r¶(hUhj®ubah)hWubaubh@Xi with the name of the transport that was launched, and the address where it is listening for connections.r·…r¸}r¹(hXi with the name of the transport that was launched, and the address where it is listening for connections.hj¡ubeubhD)rº}r»(hX€For example, if *rot13* was launched successfully and waits for connections in '127.0.0.1:42042', the appropriate call would be:hhh$h'h)hGh+}r¼(h-]h.]h/]h0]h3]uh5K«h6hh7]r½(h@XFor example, if r¾…r¿}rÀ(hXFor example, if hjºubj\)rÁ}rÂ(hX*rot13*h+}rÃ(h-]h.]h/]h0]h3]uhjºh7]rÄh@Xrot13rÅ…rÆ}rÇ(hUhjÁubah)jdubh@Xi was launched successfully and waits for connections in '127.0.0.1:42042', the appropriate call would be:rÈ…rÉ}rÊ(hXi was launched successfully and waits for connections in '127.0.0.1:42042', the appropriate call would be:hjºubeubj†)rË}rÌ(hX;pyptlib.server.reportSuccess('rot13', ('127.0.0.1', 42042))hhh$h'h)j‰h+}rÍ(j‹‰jŒXpythonjjŽh0]h/]h-]h.]h3]uh5K®h6hh7]rÎh@X;pyptlib.server.reportSuccess('rot13', ('127.0.0.1', 42042))rÏ…rÐ}rÑ(hUhjËubaubhD)rÒ}rÓ(hXEverytime a transport failed to launch, the application calls :func:`pyptlib.server.reportFailure` with the name of the transport and a message.hhh$h'h)hGh+}rÔ(h-]h.]h/]h0]h3]uh5K³h6hh7]rÕ(h@X>Everytime a transport failed to launch, the application calls rÖ…r×}rØ(hX>Everytime a transport failed to launch, the application calls hjÒubh¹)rÙ}rÚ(hX$:func:`pyptlib.server.reportFailure`rÛhjÒh$h'h)h½h+}rÜ(UreftypeXfunch¿‰hÀXpyptlib.server.reportFailureU refdomainXpyrÝh0]h/]U refexplicit‰h-]h.]h3]hÂhÃhÄNhÅNuh5K³h7]rÞhM)rß}rà(hjÛh+}rá(h-]h.]râ(hËjÝXpy-funcrãeh/]h0]h3]uhjÙh7]räh@Xpyptlib.server.reportFailure()rå…ræ}rç(hUhjßubah)hWubaubh@X. with the name of the transport and a message.rè…ré}rê(hX. with the name of the transport and a message.hjÒubeubhD)rë}rì(hXHFor example, if *rot26* failed to launch, the appropriate call would be:hhh$h'h)hGh+}rí(h-]h.]h/]h0]h3]uh5K·h6hh7]rî(h@XFor example, if rï…rð}rñ(hXFor example, if hjëubj\)rò}ró(hX*rot26*h+}rô(h-]h.]h/]h0]h3]uhjëh7]rõh@Xrot26rö…r÷}rø(hUhjòubah)jdubh@X1 failed to launch, the appropriate call would be:rù…rú}rû(hX1 failed to launch, the appropriate call would be:hjëubeubj†)rü}rý(hXbpyptlib.server.reportFailure('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)')hhh$h'h)j‰h+}rþ(j‹‰jŒXpythonjjŽh0]h/]h-]h.]h3]uh5Kºh6hh7]rÿh@Xbpyptlib.server.reportFailure('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)')r…r}r(hUhjüubaubeubh$h'h)Usystem_messagerh+}r(h-]UlevelKh0]h/]rj—aUsourceh'h.]h3]UlineK¥UtypeUINFOruh5K¥h6hh7]rhD)r}r (hUh+}r (h-]h.]h/]h0]h3]uhhh7]r h@XJDuplicate implicit target name: "server case (skip if you are a client):".r …r }r(hUhjubah)hGubaubaUcurrent_sourcerNU decorationrNUautofootnote_startrKUnameidsr}r(hh§hNhj¦h jÐh hkh h˜h jh j'hj—hh2hhØuh7]rh"ahUU transformerrNU footnote_refsr}rUrefnamesr}rUsymbol_footnotesr]rUautofootnote_refsr]rUsymbol_footnote_refsr]rU citationsr ]r!h6hU current_liner"NUtransform_messagesr#]r$Ureporterr%NUid_startr&KU autofootnotesr']r(U citation_refsr)}r*Uindirect_targetsr+]r,Usettingsr-(cdocutils.frontend Values r.or/}r0(Ufootnote_backlinksr1KUrecord_dependenciesr2NU rfc_base_urlr3Uhttp://tools.ietf.org/html/r4U tracebackr5KUpep_referencesr6NUstrip_commentsr7NU toc_backlinksr8j÷U language_coder9Uenr:U datestampr;NU report_levelr<KU _destinationr=NU halt_levelr>KU strip_classesr?Nh=NUerror_encoding_error_handlerr@UbackslashreplacerAUdebugrBNUembed_stylesheetrC‰Uoutput_encoding_error_handlerrDUstrictrEU sectnum_xformrFKUdump_transformsrGNU docinfo_xformrHKUwarning_streamrINUpep_file_url_templaterJUpep-%04drKUexit_status_levelrLKUconfigrMNUstrict_visitorrNNUcloak_email_addressesrOˆUtrim_footnote_reference_spacerP‰UenvrQNUdump_pseudo_xmlrRNUexpose_internalsrSNUsectsubtitle_xformrT‰U source_linkrUNUrfc_referencesrVNUoutput_encodingrWUutf-8rXU source_urlrYNUinput_encodingrZU utf-8-sigr[U_disable_configr\NU id_prefixr]UU tab_widthr^KUerror_encodingr_UUTF-8r`U_sourceraU,/home/f/Computers/tor/pyptlib/sphinx/API.rstrbUgettext_compactrcˆU generatorrdNUdump_internalsreNU pep_base_urlrfUhttp://www.python.org/dev/peps/rgUinput_encoding_error_handlerrhjEUauto_id_prefixriUidrjUdoctitle_xformrk‰Ustrip_elements_with_classesrlNU _config_filesrm]Ufile_insertion_enabledrnKU raw_enabledroKU dump_settingsrpNubUsymbol_footnote_startrqKUidsrr}rs(jÐjÌh2h"j—hj—j“j¦j¢hØhÔjhh§h£hkhgj'j#h˜h jžj˜uUsubstitution_namesrt}ruh)h6h+}rv(h-]h0]h/]Usourceh'h.]h3]uU footnotesrw]rxUrefidsry}rzub.pyptlib-0.0.5/doc/doctrees/README.doctree000066400000000000000000000220441222335101500200540ustar00rootroot00000000000000€cdocutils.nodes document q)q}q(U nametypesq}q(X*pluggable transport managed-proxy protocolqKXpyptlib readmeqNuUsubstitution_defsq}q Uparse_messagesq ]q Ucurrent_sourceq NU decorationq NUautofootnote_startqKUnameidsq}q(hU*pluggable-transport-managed-proxy-protocolqhUpyptlib-readmequUchildrenq]qcdocutils.nodes section q)q}q(U rawsourceqUUparentqhUsourceqcdocutils.nodes reprunicode qX//home/f/Computers/tor/pyptlib/sphinx/README.rstq…q}qbUtagnameqUsectionq U attributesq!}q"(Udupnamesq#]Uclassesq$]Ubackrefsq%]Uidsq&]q'haUnamesq(]q)hauUlineq*KUdocumentq+hh]q,(cdocutils.nodes title q-)q.}q/(hXpyptlib READMEq0hhhhhUtitleq1h!}q2(h#]h$]h%]h&]h(]uh*Kh+hh]q3cdocutils.nodes Text q4Xpyptlib READMEq5…q6}q7(hh0hh.ubaubcdocutils.nodes bullet_list q8)q9}q:(hUhhhhhU bullet_listq;h!}q<(Ubulletq=X-h&]h%]h#]h$]h(]uh*Kh+hh]q>cdocutils.nodes list_item q?)q@}qA(hXWhat is pyptlib? hh9hhhU list_itemqBh!}qC(h#]h$]h%]h&]h(]uh*Nh+hh]qDcdocutils.nodes paragraph qE)qF}qG(hXWhat is pyptlib?qHhh@hhhU paragraphqIh!}qJ(h#]h$]h%]h&]h(]uh*Kh]qKh4XWhat is pyptlib?qL…qM}qN(hhHhhFubaubaubaubhE)qO}qP(hXÊpyptlib is a little Python library which understands the `pluggable transport managed-proxy protocol `_.hhhhhhIh!}qQ(h#]h$]h%]h&]h(]uh*Kh+hh]qR(h4X9pyptlib is a little Python library which understands the qS…qT}qU(hX9pyptlib is a little Python library which understands the hhOubcdocutils.nodes reference qV)qW}qX(hX`pluggable transport managed-proxy protocol `_h!}qY(UnameX*pluggable transport managed-proxy protocolUrefuriqZX`https://gitweb.torproject.org/torspec.git/blob_plain/HEAD:/proposals/180-pluggable-transport.txtq[h&]h%]h#]h$]h(]uhhOh]q\h4X*pluggable transport managed-proxy protocolq]…q^}q_(hUhhWubahU referenceq`ubcdocutils.nodes target qa)qb}qc(hXc h!}qd(Urefurih[h&]qehah%]h#]h$]h(]qfhauhhOh]hUtargetqgubh4X.…qh}qi(hX.hhOubeubh8)qj}qk(hUhhhhhh;h!}ql(h=X-h&]h%]h#]h$]h(]uh*K h+hh]qmh?)qn}qo(hXWho is interested in pyptlib? hhjhhhhBh!}qp(h#]h$]h%]h&]h(]uh*Nh+hh]qqhE)qr}qs(hXWho is interested in pyptlib?qthhnhhhhIh!}qu(h#]h$]h%]h&]h(]uh*K h]qvh4XWho is interested in pyptlib?qw…qx}qy(hhthhrubaubaubaubhE)qz}q{(hX‡You might be interested in pyptlib if you have an application that obfuscates TCP traffic and you want to integrate it easily with Tor.q|hhhhhhIh!}q}(h#]h$]h%]h&]h(]uh*K h+hh]q~h4X‡You might be interested in pyptlib if you have an application that obfuscates TCP traffic and you want to integrate it easily with Tor.q…q€}q(hh|hhzubaubh8)q‚}qƒ(hUhhhhhh;h!}q„(h=X-h&]h%]h#]h$]h(]uh*Kh+hh]q…h?)q†}q‡(hXWhat does pyptlib do? hh‚hhhhBh!}qˆ(h#]h$]h%]h&]h(]uh*Nh+hh]q‰hE)qŠ}q‹(hXWhat does pyptlib do?qŒhh†hhhhIh!}q(h#]h$]h%]h&]h(]uh*Kh]qŽh4XWhat does pyptlib do?q…q}q‘(hhŒhhŠubaubaubaubhE)q’}q“(hXÎpyptlib speaks with Tor and informs your application about which pluggable transports Tor needs, in which ports they should listen for connections, in which filesystem directory they should keep state, etc.q”hhhhhhIh!}q•(h#]h$]h%]h&]h(]uh*Kh+hh]q–h4XÎpyptlib speaks with Tor and informs your application about which pluggable transports Tor needs, in which ports they should listen for connections, in which filesystem directory they should keep state, etc.q—…q˜}q™(hh”hh’ubaubh8)qš}q›(hUhhhhhh;h!}qœ(h=X-h&]h%]h#]h$]h(]uh*Kh+hh]qh?)qž}qŸ(hXWhat does pyptlib not do? hhšhhhhBh!}q (h#]h$]h%]h&]h(]uh*Nh+hh]q¡hE)q¢}q£(hXWhat does pyptlib not do?q¤hhžhhhhIh!}q¥(h#]h$]h%]h&]h(]uh*Kh]q¦h4XWhat does pyptlib not do?q§…q¨}q©(hh¤hh¢ubaubaubaubhE)qª}q«(hXCpyptlib doesn't help your application do networking or obfuscation.q¬hhhhhhIh!}q­(h#]h$]h%]h&]h(]uh*Kh+hh]q®h4XCpyptlib doesn't help your application do networking or obfuscation.q¯…q°}q±(hh¬hhªubaubh8)q²}q³(hUhhhhhh;h!}q´(h=X-h&]h%]h#]h$]h(]uh*Kh+hh]qµh?)q¶}q·(hX.What does pyptlib expect from an application? hh²hhhhBh!}q¸(h#]h$]h%]h&]h(]uh*Nh+hh]q¹hE)qº}q»(hX-What does pyptlib expect from an application?q¼hh¶hhhhIh!}q½(h#]h$]h%]h&]h(]uh*Kh]q¾h4X-What does pyptlib expect from an application?q¿…qÀ}qÁ(hh¼hhºubaubaubaubhE)qÂ}qÃ(hXLpyptlib assumes that your application is executed by Tor as a managed-proxy.qÄhhhhhhIh!}qÅ(h#]h$]h%]h&]h(]uh*Kh+hh]qÆh4XLpyptlib assumes that your application is executed by Tor as a managed-proxy.qÇ…qÈ}qÉ(hhÄhhÂubaubhE)qÊ}qË(hX‚pyptlib assumes that your application acts as a proxy: it listens for traffic on a TCP port and pushes the traffic somewhere else.qÌhhhhhhIh!}qÍ(h#]h$]h%]h&]h(]uh*Kh+hh]qÎh4X‚pyptlib assumes that your application acts as a proxy: it listens for traffic on a TCP port and pushes the traffic somewhere else.qÏ…qÐ}qÑ(hhÌhhÊubaubhE)qÒ}qÓ(hX«pyptlib assumes that your application has a SOCKS server when it acts as a client. This is needed because Tor needs to dynamically select where its data will be pushed to.qÔhhhhhhIh!}qÕ(h#]h$]h%]h&]h(]uh*K h+hh]qÖh4X«pyptlib assumes that your application has a SOCKS server when it acts as a client. This is needed because Tor needs to dynamically select where its data will be pushed to.q×…qØ}qÙ(hhÔhhÒubaubh8)qÚ}qÛ(hUhhhhhh;h!}qÜ(h=X-h&]h%]h#]h$]h(]uh*K$h+hh]qÝh?)qÞ}qß(hXHow do I use pyptlib? hhÚhhhhBh!}qà(h#]h$]h%]h&]h(]uh*Nh+hh]qáhE)qâ}qã(hXHow do I use pyptlib?qähhÞhhhhIh!}qå(h#]h$]h%]h&]h(]uh*K$h]qæh4XHow do I use pyptlib?qç…qè}qé(hhähhâubaubaubaubhE)qê}që(hX4Read the documentation, the examples and the source.qìhhhhhhIh!}qí(h#]h$]h%]h&]h(]uh*K&h+hh]qîh4X4Read the documentation, the examples and the source.qï…qð}qñ(hhìhhêubaubh8)qò}qó(hUhhhhhh;h!}qô(h=X-h&]h%]h#]h$]h(]uh*K(h+hh]qõh?)qö}q÷(hXWhat are these buzzwords? hhòhhhhBh!}qø(h#]h$]h%]h&]h(]uh*Nh+hh]qùhE)qú}qû(hXWhat are these buzzwords?qühhöhhhhIh!}qý(h#]h$]h%]h&]h(]uh*K(h]qþh4XWhat are these buzzwords?qÿ…r}r(hhühhúubaubaubaubhE)r}r(hX:file:`glossary.rst`rhhhhhhIh!}r(h#]h$]h%]h&]h(]uh*K*h+hh]rcdocutils.nodes literal r)r}r (hUh!}r (h&]h%]h#]h$]r Xfiler aUrolej h(]uhjh]r h4X glossary.rstr…r}r(hX glossary.rsthjubahUliteralrubaubeubahUU transformerrNU footnote_refsr}rUrefnamesr}rUsymbol_footnotesr]rUautofootnote_refsr]rUsymbol_footnote_refsr]rU citationsr]rh+hU current_linerNUtransform_messagesr ]r!cdocutils.nodes system_message r")r#}r$(hUh!}r%(h#]UlevelKh&]h%]Usourcehh$]h(]UlineKUtypeUINFOr&uh]r'hE)r(}r)(hUh!}r*(h#]h$]h%]h&]h(]uhj#h]r+h4XPHyperlink target "pluggable transport managed-proxy protocol" is not referenced.r,…r-}r.(hUhj(ubahhIubahUsystem_messager/ubaUreporterr0NUid_startr1KU autofootnotesr2]r3U citation_refsr4}r5Uindirect_targetsr6]r7Usettingsr8(cdocutils.frontend Values r9or:}r;(Ufootnote_backlinksr<KUrecord_dependenciesr=NU rfc_base_urlr>Uhttp://tools.ietf.org/html/r?U tracebackr@KUpep_referencesrANUstrip_commentsrBNU toc_backlinksrCUentryrDU language_coderEUenrFU datestamprGNU report_levelrHKU _destinationrINU halt_levelrJKU strip_classesrKNh1NUerror_encoding_error_handlerrLUbackslashreplacerMUdebugrNNUembed_stylesheetrO‰Uoutput_encoding_error_handlerrPUstrictrQU sectnum_xformrRKUdump_transformsrSNU docinfo_xformrTKUwarning_streamrUNUpep_file_url_templaterVUpep-%04drWUexit_status_levelrXKUconfigrYNUstrict_visitorrZNUcloak_email_addressesr[ˆUtrim_footnote_reference_spacer\‰Uenvr]NUdump_pseudo_xmlr^NUexpose_internalsr_NUsectsubtitle_xformr`‰U source_linkraNUrfc_referencesrbNUoutput_encodingrcUutf-8rdU source_urlreNUinput_encodingrfU utf-8-sigrgU_disable_configrhNU id_prefixriUU tab_widthrjKUerror_encodingrkUUTF-8rlU_sourcermU//home/f/Computers/tor/pyptlib/sphinx/README.rstrnUgettext_compactroˆU generatorrpNUdump_internalsrqNU pep_base_urlrrUhttp://www.python.org/dev/peps/rsUinput_encoding_error_handlerrtjQUauto_id_prefixruUidrvUdoctitle_xformrw‰Ustrip_elements_with_classesrxNU _config_filesry]rzUfile_insertion_enabledr{KU raw_enabledr|KU dump_settingsr}NubUsymbol_footnote_startr~KUidsr}r€(hhbhhuUsubstitution_namesr}r‚hh+h!}rƒ(h#]h&]h%]Usourcehh$]h(]uU footnotesr„]r…Urefidsr†}r‡ub.pyptlib-0.0.5/doc/doctrees/environment.pickle000066400000000000000000001423341222335101500213120ustar00rootroot00000000000000€(csphinx.environment BuildEnvironment qoq}q(Udlfilesqcsphinx.util FilenameUniqDict q)qc__builtin__ set q]…RqbUappq NU _warnfuncq NUtitlesq }q (Uindexq cdocutils.nodes title q)q}q(U rawsourceqUU attributesq}q(Udupnamesq]Uclassesq]Ubackrefsq]Uidsq]Unamesq]uUchildrenq]qcdocutils.nodes Text qXWelcome to pyptlib!q…q}q(hXWelcome to pyptlib!qUparentq hubaUtagnameq!Utitleq"ubUglossaryq#h)q$}q%(hUh}q&(h]h]h]h]h]uh]q'hXPluggable transports glossaryq(…q)}q*(hXPluggable transports glossaryq+h h$ubah!h"ubUmodulesq,h)q-}q.(hUh}q/(h]h]h]h]h]uh]q0hXpyptlibq1…q2}q3(hXpyptlibq4h h-ubah!h"ubUAPIq5h)q6}q7(hUh}q8(h]h]h]h]h]uh]q9hX API overviewq:…q;}q<(hX API overviewq=h h6ubah!h"ubUpyptlibq>h)q?}q@(hUh}qA(h]h]h]h]h]uh]qBhXpyptlib PackageqC…qD}qE(hXpyptlib PackageqFh h?ubah!h"ubUREADMEqGh)qH}qI(hUh}qJ(h]h]h]h]h]uh]qKhXpyptlib READMEqL…qM}qN(hXpyptlib READMEqOh hHubah!h"ubuU domaindataqP}qQ(UstdqR}qS(UversionqTKU anonlabelsqU}qV(UmodindexqWU py-modindexU†UgenindexqXhXU†UsearchqYUsearchU†uUlabelsqZ}q[(hWU py-modindexUcsphinx.locale _TranslationProxy q\csphinx.locale mygettext q]U Module Indexq^†q_h]h^…q`†b‡hXhXUh\h]UIndexqa†qbh]ha…qc†b‡hYhYUh\h]U Search Pageqd†qeh]hd…qf†b‡uU progoptionsqg}qhUobjectsqi}qjuUc}qk(hi}qlhTKuUpyqm}qn(hi}qo(X pyptlib.utilqph>Umoduleqq†X"pyptlib.client_config.ClientConfigqrh>Xclassqs†Xpyptlib.client.reportEndqth>Xfunctionqu†X'pyptlib.config.Config.writeVersionErrorqvh>Xmethodqw†Xpyptlib.config.Config.emitqxh>Xmethodqy†Xpyptlib.configqzh>hq†X pyptlib.config.Config.transportsq{h>X attributeq|†Xpyptlib.clientq}h>hq†X1pyptlib.server_config.ServerConfig.writeMethodEndq~h>Xmethodq†X9pyptlib.server_config.ServerConfig.getServerBindAddressesq€h>Xmethodq†Xpyptlib.serverq‚h>hq†Xpyptlib.util.checkClientModeqƒh>Xfunctionq„†Xpyptlib.server.reportFailureq…h>Xfunctionq††X)pyptlib.config.Config.managedTransportVerq‡h>X attributeqˆ†X4pyptlib.server_config.ServerConfig.getAuthCookieFileq‰h>XmethodqІXpyptlib.client_configq‹h>hq†Xpyptlib.server.reportSuccessqŒh>Xfunctionq†X#pyptlib.config.Config.stateLocationqŽh>X attributeq†X3pyptlib.client_config.ClientConfig.writeMethodErrorqh>Xmethodq‘†X.pyptlib.server_config.ServerConfig.writeMethodq’h>Xmethodq“†X-pyptlib.config.Config.getAllTransportsEnabledq”h>Xmethodq•†X+pyptlib.config.Config.checkTransportEnabledq–h>Xmethodq—†Xpyptlib.server.reportEndq˜h>Xfunctionq™†Xpyptlib.server_configqšh>hq†X2pyptlib.config.Config.checkManagedTransportVersionq›h>Xmethodqœ†Xpyptlib.config.Config.getqh>Xmethodqž†Xpyptlib.client.reportFailureqŸh>Xfunctionq †Xpyptlib.config.EnvErrorq¡h>X exceptionq¢†X3pyptlib.server_config.ServerConfig.writeMethodErrorq£h>Xmethodq¤†X.pyptlib.client_config.ClientConfig.writeMethodq¥h>Xmethodq¦†X6pyptlib.server_config.ServerConfig.getServerTransportsq§h>Xmethodq¨†X"pyptlib.config.Config.writeVersionq©h>Xmethodqª†X,pyptlib.server_config.ServerConfig.getORPortq«h>Xmethodq¬†X4pyptlib.server_config.ServerConfig.getExtendedORPortq­h>Xmethodq®†Xpyptlib.server.initq¯h>Xfunctionq°†X%pyptlib.config.Config.checkClientModeq±h>Xmethodq²†X&pyptlib.config.Config.getStateLocationq³h>Xmethodq´†Xpyptlib.client.initqµh>Xfunctionq¶†X#pyptlib.config.Config.writeEnvErrorq·h>Xmethodq¸†X1pyptlib.client_config.ClientConfig.writeMethodEndq¹h>Xmethodqº†X*pyptlib.config.Config.allTransportsEnabledq»h>X attributeq¼†X6pyptlib.client_config.ClientConfig.getClientTransportsq½h>Xmethodq¾†X;pyptlib.server_config.ServerConfig.get_addrport_from_stringq¿h>XmethodqÀ†Xpyptlib.config.ConfigqÁh>Xclassq†Xpyptlib.client.reportSuccessqÃh>XfunctionqĆX/pyptlib.server_config.ServerConfig.get_addrportqÅh>XmethodqƆX1pyptlib.config.Config.getManagedTransportVersionsqÇh>XmethodqȆX"pyptlib.server_config.ServerConfigqÉh>XclassqʆXpyptlib.config.Config.checkqËh>Xmethodq̆uUmodulesqÍ}qÎ(hp(h>UU‰th‹(h>UU‰thz(h>UU‰th}(h>UU‰th‚(h>UU‰thš(h>UU‰tuhTKuUjsqÏ}qÐ(hi}qÑhTKuUrstqÒ}qÓ(hi}qÔhTKuUcppqÕ}qÖ(hi}q×hTKuuU glob_toctreesqØh]…RqÙU reread_alwaysqÚh]…RqÛU doctreedirqÜU*/home/f/Computers/tor/pyptlib/doc/doctreesqÝUversioning_conditionqÞ‰U citationsqß}hTK)UsrcdirqàU$/home/f/Computers/tor/pyptlib/sphinxqáUconfigqâcsphinx.config Config qã)qä}qå(Upygments_styleqæUsphinxqçUhtmlhelp_basenameqèU pyptlibdocU html_themeqéUhaikuqêU master_docqëUindexqìU source_suffixqíU.rstUtexinfo_documentsqî]qï(UindexqðUpyptlibqñXpyptlib DocumentationqòX Brandon WileyqóhñU One line description of project.U MiscellaneoustqôaU copyrightqõX2012, Brandon WileyUexclude_patternsqö]q÷U_buildqøahTU0.0.1qùU man_pagesqú]qû(hìhñhò]qühóaKtqýaUtemplates_pathqþ]qÿU _templatesraUlatex_documentsr]r(hðU pyptlib.texhòhóUmanualtraUhtml_static_pathr]rU_staticraU needs_sphinxrU1.1Ulatex_elementsr}U overridesr }Uprojectr XpyptlibUhtml_short_titler Upyptlib documentationU extensionsr ]r (Usphinx.ext.autodocrUsphinx.ext.ifconfigrUsphinx.ext.viewcodereUreleaserhùUsetuprNubUmetadatar}r(h }h#}h,}h5}h>}hG}uUversionchangesr}U_viewcode_modulesr}r(cdocutils.nodes reprunicode rX pyptlib.utilr…r}rbX¸#!/usr/bin/python # -*- coding: utf-8 -*- """ Utility functions. """ from pyptlib.config import Config, EnvError def checkClientMode(): # XXX WTF!???! This also exists in config.py. """ Check whether Tor wants us to run as a client or as a server. :returns: bool -- True if Tor wants us to run as a client. """ try: c = Config() return c.checkClientMode() except EnvError: return False r}rXcheckClientModerXdefrK K‡s}r XcheckClientModer!h>s‡jXpyptlib.client_configr"…r#}r$bX #!/usr/bin/python # -*- coding: utf-8 -*- """ Low-level parts of pyptlib that are only useful to clients. """ from pyptlib.config import Config class ClientConfig(Config): """ A client-side pyptlib configuration. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ def __init__(self): Config.__init__(self) self.transports = self.get('TOR_PT_CLIENT_TRANSPORTS').split(',') if '*' in self.transports: self.allTransportsEnabled = True self.transports.remove('*') def getClientTransports(self): # XXX why is this client-specific ??? """ Return a list of strings representing the client transports reported by Tor. If present, the wildcard transport, '*', is stripped from this list and used to set allTransportsEnabled to True. :returns: list of transports """ return self.transports def writeMethod(self, name, socksVersion, addrport, args=None, optArgs=None): """ Write a message to stdout announcing that a transport was successfully launched. :param str name: Name of transport. :param int socksVersion: The SOCKS protocol version. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str args: ARGS field for this transport. :param str optArgs: OPT-ARGS field for this transport. """ methodLine = 'CMETHOD %s socks%s %s:%s' % (name, socksVersion, addrport[0], addrport[1]) if args and len(args) > 0: methodLine = methodLine + ' ARGS=' + args.join(',') if optArgs and len(optArgs) > 0: methodLine = methodLine + ' OPT-ARGS=' + args.join(',') self.emit(methodLine) def writeMethodError(self, name, message): """ Write a message to stdout announcing that we failed to launch a transport. :param str name: Name of transport. :param str message: Error message. """ self.emit('CMETHOD-ERROR %s %s' % (name, message)) def writeMethodEnd(self): """ Write a message to stdout announcing that we finished launching transports.. """ self.emit('CMETHODS DONE') r%}r&(X ClientConfigr'Xclassr(K KI‡XClientConfig.writeMethodErrorXdefr)K7KA‡XClientConfig.__init__Xdefr*KK‡XClientConfig.writeMethodXdefr+K#K7‡XClientConfig.writeMethodEndXdefr,KAKI‡X ClientConfig.getClientTransportsXdefr-KK#‡u}r.(XClientConfig.writeMethodEndr/h>X ClientConfig.getClientTransportsr0h>X ClientConfigr1h>XClientConfig.writeMethodr2h>XClientConfig.writeMethodErrorr3h>u‡jXpyptlib.configr4…r5}r6bX#!/usr/bin/python # -*- coding: utf-8 -*- """ Parts of pyptlib that are useful both to clients and servers. """ import os, sys class Config(object): """ pyptlib's configuration. :var string stateLocation: Location where application should store state. :var list managedTransportVer: List of managed-proxy protocol versions that Tor supports. :var list transports: Strings of pluggable transport names that Tor wants us to handle. :var bool allTransportsEnabled: True if Tor wants us to spawn all the transports. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ stateLocation = None # TOR_PT_STATE_LOCATION managedTransportVer = [] # TOR_PT_MANAGED_TRANSPORT_VER transports = [] # TOR_PT_SERVER_TRANSPORTS or TOR_PT_CLIENT_TRANSPORTS allTransportsEnabled = False def __init__(self): self.stateLocation = self.get('TOR_PT_STATE_LOCATION') self.managedTransportVer = self.get('TOR_PT_MANAGED_TRANSPORT_VER').split(',') def checkClientMode(self): """ Check whether Tor wants us to run as a client or as a server. :returns: bool -- True if Tor wants us to run as a client. """ return self.check('TOR_PT_CLIENT_TRANSPORTS') def getStateLocation(self): """ :returns: string -- The state location. """ return self.stateLocation def getManagedTransportVersions(self): """ :returns: list -- The managed-proxy protocol versions that Tor supports. """ return self.managedTransportVer def checkManagedTransportVersion(self, version): """ Check if Tor supports a specific managed-proxy protocol version. :param string version: A managed-proxy protocol version. :returns: bool -- True if version is supported. """ return version in self.managedTransportVer def getAllTransportsEnabled(self): """ Check if Tor wants the application to spawn all its transpotrs. :returns: bool -- True if Tor wants the application to spawn all its transports. """ return self.allTransportsEnabled def checkTransportEnabled(self, transport): """ Check if Tor wants the application to spawn a specific transport. :param string transport: The name of a pluggable transport. :returns: bool -- True if Tor wants the application to spawn that transport. """ return self.allTransportsEnabled or transport in self.transports def writeEnvError(self, message): # ENV-ERROR """ Announce that an error occured while parsing the environment. :param str message: Error message. """ self.emit('ENV-ERROR %s' % message) def writeVersion(self, version): # VERSION """ Announce that a specific managed-proxy protocol version is supported. :param str version: A managed-proxy protocol version. """ self.emit('VERSION %s' % version) def writeVersionError(self): # VERSION-ERROR """ Announce that we could not find a supported managed-proxy protocol version. """ self.emit('VERSION-ERROR no-version') def check(self, key): """ Check the environment for a specific environment variable. :param str key: Environment variable key. :returns: bool -- True if the environment variable is set. """ return key in os.environ def get(self, key): """ Get the value of an environment variable. :param str key: Environment variable key. :returns: str -- The value of the envrionment variable. :raises: :class:`pyptlib.config.EnvError` if environment variable could not be found. """ if key in os.environ: return os.environ[key] else: message = 'Missing environment variable %s' % key self.writeEnvError(message) raise EnvError(message) def emit(self, msg): """ Announce a message. :param str msg: A message. """ print msg sys.stdout.flush() class EnvError(Exception): """ Thrown when the environment is incomplete or corrupted. """ pass r7}r8(XConfig.getAllTransportsEnabledXdefr9KAKJ‡XConfig.checkClientModeXdefr:KK(‡XConfig.writeEnvErrorXdefr;KUK^‡XEnvErrorr<Xclassr=K—Kœ‡XConfig.checkTransportEnabledXdefr>KJKU‡X"Config.getManagedTransportVersionsXdefr?K/K6‡X Config.emitXdefr@KK—‡X Config.checkXdefrAKoKz‡X Config.getXdefrBKzK‡XConfig.getStateLocationXdefrCK(K/‡XConfig.writeVersionXdefrDK^Kg‡XConfig.__init__XdefrEKK‡XConfig.writeVersionErrorXdefrFKgKo‡XConfigrGXclassrHK K—‡X#Config.checkManagedTransportVersionXdefrIK6KA‡u}rJ(XConfig.getAllTransportsEnabledrKh>XConfig.checkClientModerLh>XConfig.writeEnvErrorrMh>XEnvErrorrNh>XConfig.checkTransportEnabledrOh>X"Config.getManagedTransportVersionsrPh>X Config.emitrQh>X Config.checkrRh>X Config.getrSh>XConfig.writeVersionrTh>XConfig.getStateLocationrUh>XConfig.writeVersionErrorrVh>XConfigrWh>X#Config.checkManagedTransportVersionrXh>u‡jXpyptlib.clientrY…rZ}r[bXb #!/usr/bin/python # -*- coding: utf-8 -*- """ Public client-side pyptlib API. """ from pyptlib.config import EnvError from pyptlib.client_config import ClientConfig def init(supported_transports): """ Bootstrap client-side managed-proxy mode. *Call in the beginning of your application.* :param list supported_transports: Names of the transports that the application supports. :returns: dictionary that contains information for the application. ========== ========== ========== Key Type Value ========== ========== ========== state_loc string Directory where the managed proxy should dump its state files (if needed). transports list Strings of the names of the transports that should be launched. The list can be empty. ========== ========== ========== :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ supportedTransportVersion = '1' config = ClientConfig() if config.checkManagedTransportVersion(supportedTransportVersion): config.writeVersion(supportedTransportVersion) else: config.writeVersionError() raise EnvError("Unsupported managed proxy protocol version (%s)" % str(config.getManagedTransportVersions())) retval = {} retval['state_loc'] = config.getStateLocation() retval['transports'] = _getTransportsList(supported_transports, config) return retval def reportSuccess(name, socksVersion, addrport, args=None, optArgs=None): """ Report that a client transport was launched succesfully. *Always call after successfully launching a transport.* :param str name: Name of transport. :param int socksVersion: The SOCKS protocol version. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str args: ARGS field for this transport. :param str args: OPT-ARGS field for this transport. """ config = ClientConfig() config.writeMethod(name, socksVersion, addrport, args, optArgs) def reportFailure(name, message): """ Report that a client transport failed to launch. *Always call after failing to launch a transport.* :param str name: Name of transport. :param str message: Error message. """ config = ClientConfig() config.writeMethodError(name, message) def reportEnd(): """ Report that we are done launching transports. *Call after you have launched all the transports you could launch.* """ config = ClientConfig() config.writeMethodEnd() def _getTransportsList(supported_transports, config): """ Figure out which transports the application should launch, based on the transports it supports and on the transports that Tor wants it to spawn. :param list supported_transports: Transports that the application supports. :param :class:`pyptlib.client_config.ClientConfig` config: Configuration of Tor. :returns: A list of transports that the application should launch. """ transports = [] if config.getAllTransportsEnabled(): return supported_transports for transport in config.getClientTransports(): if transport in supported_transports: transports.append(transport) else: config.writeMethodError(transport, "not supported") return transports r\}r](X_getTransportsListr^Xdefr_KYKq‡Xinitr`XdefraK K0‡X reportEndrbXdefrcKOKY‡X reportSuccessrdXdefreK0KA‡X reportFailurerfXdefrgKAKO‡u}rh(Xinitrih>X reportSuccessrjh>X reportEndrkh>X reportFailurerlh>u‡jXpyptlib.serverrm…rn}robX<#!/usr/bin/python # -*- coding: utf-8 -*- """ Public server-side pyptlib API. """ from pyptlib.config import EnvError from pyptlib.server_config import ServerConfig def init(supported_transports): """ Bootstrap server-side managed-proxy mode. *Call in the beginning of your application.* :param list supported_transports: Names of the transports that the application supports. :returns: dictionary that contains information for the application: =============== ========== ========== Key Type Value ================ ========== ========== state_loc string Directory where the managed proxy should dump its state files (if needed). orport tuple (ip,port) tuple pointing to Tor's ORPort. ext_orport tuple (ip,port) tuple pointing to Tor's Extended ORPort. None if Extended ORPort is not supported. transports dict A dictionary 'transport => (ip,port)' where 'transport' is the name of the transport that should be spawned, and '(ip,port)' is the location where the transport should bind. The dictionary can be empty. auth_cookie_file string Directory where the managed proxy should find the Extended ORPort authentication cookie. ================ ========== ========== :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ supportedTransportVersion = '1' config = ServerConfig() if config.checkManagedTransportVersion(supportedTransportVersion): config.writeVersion(supportedTransportVersion) else: config.writeVersionError() raise EnvError("Unsupported managed proxy protocol version (%s)" % str(config.getManagedTransportVersions())) retval = {} retval['state_loc'] = config.getStateLocation() retval['orport'] = config.getORPort() retval['ext_orport'] = config.getExtendedORPort() retval['transports'] = _getTransportsDict(supported_transports, config) retval['auth_cookie_file'] = config.getAuthCookieFile() return retval def reportSuccess(name, addrport, options): """ Report that a server transport was launched succesfully. *Always call after successfully launching a transport.* :param str name: Name of transport. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str options: Transport options. """ config = ServerConfig() config.writeMethod(name, addrport, options) def reportFailure(name, message): """ Report that a server transport failed to launch. *Always call after failing to launch a transport.* :param str name: Name of transport. :param str message: Error message. """ config = ServerConfig() config.writeMethodError(name, message) def reportEnd(): """ Report that we are done launching transports. *Call after you have launched all the transports you could launch.* """ config = ServerConfig() config.writeMethodEnd() def _getTransportsDict(supported_transports, config): """ Figure out which transports the application should launch, based on the transports it supports and on the transports that Tor wants it to spawn. :param list supported_transports: Transports that the application supports. :param :class:`pyptlib.client_config.ClientConfig` config: Configuration of Tor. :returns: A dictionary of 'transport => bind address' of transports that the application should launch. """ transports = {} if config.getAllTransportsEnabled(): return config.getServerBindAddresses() for transport in config.getServerTransports(): if transport in supported_transports: assert(transport in config.getServerBindAddresses()) transports[transport] = config.getServerBindAddresses()[transport] else: # Issue SMETHOD-ERROR when Tor asks us to spawn a # transport that we do not support. config.writeMethodError(transport, "not supported") return transports rp}rq(X_getTransportsDictrrXdefrsK^Kx‡XinitrtXdefruK K7‡X reportEndrvXdefrwKTK^‡X reportSuccessrxXdefryK7KF‡X reportFailurerzXdefr{KFKT‡u}r|(Xinitr}h>X reportSuccessr~h>X reportEndrh>X reportFailurer€h>u‡jXpyptlib.server_configr…r‚}rƒbX´#!/usr/bin/python # -*- coding: utf-8 -*- """ Low-level parts of pyptlib that are only useful to servers. """ import pyptlib.config as config class ServerConfig(config.Config): """ A client-side pyptlib configuration. :var tuple ORPort: (ip,port) pointing to Tor's ORPort. :var tuple extendedORPort: (ip,port) pointing to Tor's Extended ORPort. None if Extended ORPort is not supported. :var dict serverBindAddr: A dictionary { : [, ]}, where is the name of the transport that must be spawned, and [, ] is a list containing the location where that transport should bind. The dictionary can be empty. :var string authCookieFile: String representing the filesystem path where the Extended ORPort Authentication cookie is stored. None if Extended ORPort authentication is not supported. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ def __init__(self): config.Config.__init__(self) """ TOR_PT_EXTENDED_SERVER_PORT is optional; tor uses the empty string as its value if it does not support the Extended ORPort. """ ext_orport_tmp = self.get('TOR_PT_EXTENDED_SERVER_PORT') if ext_orport_tmp == '': self.extendedORPort = None else: self.extendedORPort = self.get_addrport('TOR_PT_EXTENDED_SERVER_PORT') if self.check('TOR_PT_AUTH_COOKIE_FILE'): self.authCookieFile = self.get('TOR_PT_AUTH_COOKIE_FILE') else: self.authCookieFile = None # Check that either both Extended ORPort and the Extended # ORPort Authentication Cookie are present, or none. if self.extendedORPort and not self.authCookieFile: raise config.EnvError("Extended ORPort address provided, but no cookie file.") elif self.authCookieFile and not self.extendedORPort: raise config.EnvError("Extended ORPort Authentication cookie file provided, but no Extended ORPort address.") # Get ORPort. self.ORPort = self.get_addrport('TOR_PT_ORPORT') # Get bind addresses. self.serverBindAddr = {} bindaddrs = self.get('TOR_PT_SERVER_BINDADDR').split(',') for bindaddr in bindaddrs: (transport_name, addrport) = bindaddr.split('-') (addr, port) = self.get_addrport_from_string(addrport) self.serverBindAddr[transport_name] = (addr, port) # Get transports. self.transports = self.get('TOR_PT_SERVER_TRANSPORTS').split(',') if '*' in self.transports: self.allTransportsEnabled = True self.transports.remove('*') if sorted(self.transports) != sorted(self.serverBindAddr.keys()): raise config.EnvError("Can't match transports with bind addresses (%s, %s)" % (self.transports, self.serverBindAddr.keys())) def getExtendedORPort(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.extendedORPort` """ return self.extendedORPort def getORPort(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.ORPort` """ return self.ORPort def getServerBindAddresses(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.serverBindAddr` """ return self.serverBindAddr def getServerTransports(self): """ :returns: :attr:`pyptlib.config.Config.transports` """ return self.transports def getAuthCookieFile(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.authCookieFile` """ return self.authCookieFile def writeMethod(self, name, addrport, options): """ Write a message to stdout announcing that a server transport was successfully launched. :param str name: Name of transport. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str options: Transport options. """ if options: self.emit('SMETHOD %s %s:%s %s' % (name, addrport[0], addrport[1], options)) else: self.emit('SMETHOD %s %s:%s' % (name, addrport[0], addrport[1])) def writeMethodError(self, name, message): # SMETHOD-ERROR """ Write a message to stdout announcing that we failed to launch a transport. :param str name: Name of transport. :param str message: Error message. """ self.emit('SMETHOD-ERROR %s %s' % (name, message)) def writeMethodEnd(self): # SMETHODS DONE """ Write a message to stdout announcing that we finished launching transports.. """ self.emit('SMETHODS DONE') def get_addrport(self, key): """ Parse an environment variable holding an address:port value. :param str key: Environment variable key. :returns: tuple -- (address,port) :raises: :class:`pyptlib.config.EnvError` if string was not in address:port format. """ string = self.get(key) return self.get_addrport_from_string(string) def get_addrport_from_string(self, string): """ Parse a string holding an address:port value. :param str string: A string. :returns: tuple -- (address,port) :raises: :class:`pyptlib.config.EnvError` if string was not in address:port format. """ addrport = string.split(':') if (len(addrport) != 2) or (not addrport[1].isdigit()): message = 'Parsing error (%s).' % (string) self.writeEnvError(message) raise config.EnvError(message) # XXX maybe return ValueError if (not 0 <= int(addrport[1]) < 65536): message = 'Port out of range (%s).' % (string) self.writeEnvError(message) raise config.EnvError(message) return addrport r„}r…(XServerConfig.getAuthCookieFileXdefr†K[Ka‡XServerConfig.getExtendedORPortXdefr‡KCKI‡XServerConfig.writeMethodEndXdefrˆK}K…‡X%ServerConfig.get_addrport_from_stringXdefr‰K“K¬‡X ServerConfig.getServerTransportsXdefrŠKUK[‡XServerConfig.__init__Xdefr‹KKC‡X ServerConfigrŒXclassrK K¬‡XServerConfig.getORPortXdefrŽKIKO‡XServerConfig.writeMethodErrorXdefrKrK}‡XServerConfig.get_addrportXdefrK…K“‡X#ServerConfig.getServerBindAddressesXdefr‘KOKU‡XServerConfig.writeMethodXdefr’KaKr‡u}r“(XServerConfig.getAuthCookieFiler”h>XServerConfig.getExtendedORPortr•h>XServerConfig.writeMethodEndr–h>X%ServerConfig.get_addrport_from_stringr—h>X ServerConfig.getServerTransportsr˜h>X ServerConfigr™h>XServerConfig.getORPortršh>XServerConfig.writeMethodErrorr›h>XServerConfig.writeMethodrœh>X#ServerConfig.getServerBindAddressesrh>XServerConfig.get_addrportržh>u‡uUtoc_num_entriesrŸ}r (h Kh#K h,Kh5K h>KhGKuUimagesr¡h)r¢h]…Rr£bUnumbered_toctreesr¤h]…Rr¥U found_docsr¦h]r§(h h#h,h5h>hGe…Rr¨U longtitlesr©}rª(h hh#h$h,h-h5h6h>h?hGhHuU dependenciesr«}r¬h>h]r­(U../pyptlib/client_config.pyr®U../pyptlib/client.pyr¯U../pyptlib/util.pyr°U../pyptlib/server_config.pyr±U../pyptlib/server.pyr²U../pyptlib/config.pyr³e…Rr´sUtoctree_includesrµ}r¶(h ]r·(XREADMEr¸XAPIr¹Xglossaryrºeh,]r»Xpyptlibr¼auU temp_datar½}Utocsr¾}r¿(h cdocutils.nodes bullet_list rÀ)rÁ}rÂ(hUh}rÃ(h]h]h]h]h]uh]rÄ(cdocutils.nodes list_item rÅ)rÆ}rÇ(hUh}rÈ(h]h]h]h]h]uh jÁh]rÉ(csphinx.addnodes compact_paragraph rÊ)rË}rÌ(hUh}rÍ(h]h]h]h]h]uh jÆh]rÎcdocutils.nodes reference rÏ)rÐ}rÑ(hUh}rÒ(U anchornameUUrefurih h]h]h]h]h]Uinternalˆuh jËh]rÓhXWelcome to pyptlib!rÔ…rÕ}rÖ(hhh jÐubah!U referencer×ubah!Ucompact_paragraphrØubjÀ)rÙ}rÚ(hUh}rÛ(h]h]h]h]h]uh jÆh]rÜ(csphinx.addnodes toctree rÝ)rÞ}rß(hUh}rà(UnumberedKUparenth U titlesonly‰Uglob‰h]h]h]h]h]Uentries]rá(Nj¸†râNj¹†rãNjº†räeUhidden‰U includefiles]rå(j¸j¹jºeUmaxdepthKuh jÙh]h!UtoctreeræubjÅ)rç}rè(hUh}ré(h]h]h]h]h]uh jÙh]rêjÊ)rë}rì(hUh}rí(h]h]h]h]h]uh jçh]rîjÏ)rï}rð(hUh}rñ(U anchornameU#pyptlib-clientUrefurih h]h]h]h]h]Uinternalˆuh jëh]ròcdocutils.nodes literal ró)rô}rõ(hXpyptlib.clienth}rö(h]h]h]h]h]uh jïh]r÷hXpyptlib.clientrø…rù}rú(hUh jôubah!Uliteralrûubah!j×ubah!jØubah!U list_itemrüubjÅ)rý}rþ(hUh}rÿ(h]h]h]h]h]uh jÙh]rjÊ)r}r(hUh}r(h]h]h]h]h]uh jýh]rjÏ)r}r(hUh}r(U anchornameU#pyptlib-serverUrefurih h]h]h]h]h]Uinternalˆuh jh]rjó)r }r (hXpyptlib.serverh}r (h]h]h]h]h]uh jh]r hXpyptlib.serverr …r}r(hUh j ubah!jûubah!j×ubah!jØubah!jüubjÅ)r}r(hUh}r(h]h]h]h]h]uh jÙh]rjÊ)r}r(hUh}r(h]h]h]h]h]uh jh]rjÏ)r}r(hUh}r(U anchornameU #pyptlib-utilUrefurih h]h]h]h]h]Uinternalˆuh jh]rjó)r}r(hX pyptlib.utilh}r(h]h]h]h]h]uh jh]rhX pyptlib.utilr …r!}r"(hUh jubah!jûubah!j×ubah!jØubah!jüubeh!U bullet_listr#ubeh!jüubjÅ)r$}r%(hUh}r&(h]h]h]h]h]uh jÁh]r'jÊ)r(}r)(hUh}r*(h]h]h]h]h]uh j$h]r+jÏ)r,}r-(hUh}r.(U anchornameU#indices-and-tablesUrefurih h]h]h]h]h]Uinternalˆuh j(h]r/hXIndices and tablesr0…r1}r2(hXIndices and tablesh j,ubah!j×ubah!jØubah!jüubeh!j#ubh#jÀ)r3}r4(hUh}r5(h]h]h]h]h]uh]r6jÅ)r7}r8(hUh}r9(h]h]h]h]h]uh j3h]r:(jÊ)r;}r<(hUh}r=(h]h]h]h]h]uh j7h]r>jÏ)r?}r@(hUh}rA(U anchornameUUrefurih#h]h]h]h]h]Uinternalˆuh j;h]rBhXPluggable transports glossaryrC…rD}rE(hh+h j?ubah!j×ubah!jØubjÀ)rF}rG(hUh}rH(h]h]h]h]h]uh j7h]rI(jÅ)rJ}rK(hUh}rL(h]h]h]h]h]uh jFh]rMjÊ)rN}rO(hUh}rP(h]h]h]h]h]uh jJh]rQjÏ)rR}rS(hUh}rT(U anchornameU4#pluggable-transport-sometimes-also-called-transportUrefurih#h]h]h]h]h]Uinternalˆuh jNh]rUhX7pluggable transport (sometimes also called 'transport')rV…rW}rX(hX7pluggable transport (sometimes also called 'transport')h jRubah!j×ubah!jØubah!jüubjÅ)rY}rZ(hUh}r[(h]h]h]h]h]uh jFh]r\jÊ)r]}r^(hUh}r_(h]h]h]h]h]uh jYh]r`jÏ)ra}rb(hUh}rc(U anchornameU#pluggable-transport-proxyUrefurih#h]h]h]h]h]Uinternalˆuh j]h]rdhXpluggable transport proxyre…rf}rg(hXpluggable transport proxyh jaubah!j×ubah!jØubah!jüubjÅ)rh}ri(hUh}rj(h]h]h]h]h]uh jFh]rkjÊ)rl}rm(hUh}rn(h]h]h]h]h]uh jhh]rojÏ)rp}rq(hUh}rr(U anchornameU #obfsproxyUrefurih#h]h]h]h]h]Uinternalˆuh jlh]rshX obfsproxyrt…ru}rv(hX obfsproxyh jpubah!j×ubah!jØubah!jüubjÅ)rw}rx(hUh}ry(h]h]h]h]h]uh jFh]rzjÊ)r{}r|(hUh}r}(h]h]h]h]h]uh jwh]r~jÏ)r}r€(hUh}r(U anchornameU#upstream-downstreamUrefurih#h]h]h]h]h]Uinternalˆuh j{h]r‚hXupstream/downstreamrƒ…r„}r…(hXupstream/downstreamh jubah!j×ubah!jØubah!jüubjÅ)r†}r‡(hUh}rˆ(h]h]h]h]h]uh jFh]r‰jÊ)rŠ}r‹(hUh}rŒ(h]h]h]h]h]uh j†h]rjÏ)rŽ}r(hUh}r(U anchornameU#client-mode-server-modeUrefurih#h]h]h]h]h]Uinternalˆuh jŠh]r‘hXclient-mode / server-moder’…r“}r”(hXclient-mode / server-modeh jŽubah!j×ubah!jØubah!jüubjÅ)r•}r–(hUh}r—(h]h]h]h]h]uh jFh]r˜jÊ)r™}rš(hUh}r›(h]h]h]h]h]uh j•h]rœjÏ)r}rž(hUh}rŸ(U anchornameU#external-mode-proxyUrefurih#h]h]h]h]h]Uinternalˆuh j™h]r hXexternal-mode proxyr¡…r¢}r£(hXexternal-mode proxyh jubah!j×ubah!jØubah!jüubjÅ)r¤}r¥(hUh}r¦(h]h]h]h]h]uh jFh]r§jÊ)r¨}r©(hUh}rª(h]h]h]h]h]uh j¤h]r«jÏ)r¬}r­(hUh}r®(U anchornameU#managed-mode-proxyUrefurih#h]h]h]h]h]Uinternalˆuh j¨h]r¯hXmanaged-mode proxyr°…r±}r²(hXmanaged-mode proxyh j¬ubah!j×ubah!jØubah!jüubjÅ)r³}r´(hUh}rµ(h]h]h]h]h]uh jFh]r¶jÊ)r·}r¸(hUh}r¹(h]h]h]h]h]uh j³h]rºjÏ)r»}r¼(hUh}r½(U anchornameU#pyptlibUrefurih#h]h]h]h]h]Uinternalˆuh j·h]r¾hXpyptlibr¿…rÀ}rÁ(hXpyptlibh j»ubah!j×ubah!jØubah!jüubjÅ)rÂ}rÃ(hUh}rÄ(h]h]h]h]h]uh jFh]rÅjÊ)rÆ}rÇ(hUh}rÈ(h]h]h]h]h]uh jÂh]rÉjÏ)rÊ}rË(hUh}rÌ(U anchornameU#extended-orportUrefurih#h]h]h]h]h]Uinternalˆuh jÆh]rÍhXextended orportrÎ…rÏ}rÐ(hXextended orporth jÊubah!j×ubah!jØubah!jüubeh!j#ubeh!jüubah!j#ubh,jÀ)rÑ}rÒ(hUh}rÓ(h]h]h]h]h]uh]rÔjÅ)rÕ}rÖ(hUh}r×(h]h]h]h]h]uh jÑh]rØ(jÊ)rÙ}rÚ(hUh}rÛ(h]h]h]h]h]uh jÕh]rÜjÏ)rÝ}rÞ(hUh}rß(U anchornameUUrefurih,h]h]h]h]h]Uinternalˆuh jÙh]ràhXpyptlibrá…râ}rã(hh4h jÝubah!j×ubah!jØubjÀ)rä}rå(hUh}ræ(h]h]h]h]h]uh jÕh]rçjÝ)rè}ré(hUh}rê(UnumberedKUparenth,U titlesonly‰Uglob‰h]h]h]h]h]Uentries]rëNj¼†rìaUhidden‰U includefiles]ríj¼aUmaxdepthKuh jäh]h!jæubah!j#ubeh!jüubah!j#ubh5jÀ)rî}rï(hUh}rð(h]h]h]h]h]uh]rñjÅ)rò}ró(hUh}rô(h]h]h]h]h]uh jîh]rõ(jÊ)rö}r÷(hUh}rø(h]h]h]h]h]uh jòh]rùjÏ)rú}rû(hUh}rü(U anchornameUUrefurih5h]h]h]h]h]Uinternalˆuh jöh]rýhX API overviewrþ…rÿ}r(hh=h júubah!j×ubah!jØubjÀ)r}r(hUh}r(h]h]h]h]h]uh jòh]r(jÅ)r}r(hUh}r(h]h]h]h]h]uh jh]rjÊ)r }r (hUh}r (h]h]h]h]h]uh jh]r jÏ)r }r(hUh}r(U anchornameU#general-overviewUrefurih5h]h]h]h]h]Uinternalˆuh j h]rhXGeneral Overviewr…r}r(hXGeneral Overviewh j ubah!j×ubah!jØubah!jüubjÅ)r}r(hUh}r(h]h]h]h]h]uh jh]r(jÊ)r}r(hUh}r(h]h]h]h]h]uh jh]rjÏ)r}r(hUh}r(U anchornameU#detailed-api-overviewUrefurih5h]h]h]h]h]Uinternalˆuh jh]rhXDetailed API Overviewr …r!}r"(hXDetailed API Overviewh jubah!j×ubah!jØubjÀ)r#}r$(hUh}r%(h]h]h]h]h]uh jh]r&(jÅ)r'}r((hUh}r)(h]h]h]h]h]uh j#h]r*jÊ)r+}r,(hUh}r-(h]h]h]h]h]uh j'h]r.jÏ)r/}r0(hUh}r1(U anchornameU"#find-if-it-s-a-client-or-a-serverUrefurih5h]h]h]h]h]Uinternalˆuh j+h]r2hX$0) Find if it's a client or a serverr3…r4}r5(hX$0) Find if it's a client or a serverh j/ubah!j×ubah!jØubah!jüubjÅ)r6}r7(hUh}r8(h]h]h]h]h]uh j#h]r9jÊ)r:}r;(hUh}r<(h]h]h]h]h]uh j6h]r=jÏ)r>}r?(hUh}r@(U anchornameU##get-transport-information-from-torUrefurih5h]h]h]h]h]Uinternalˆuh j:h]rAhX%1) Get transport information from TorrB…rC}rD(hX%1) Get transport information from Torh j>ubah!j×ubah!jØubah!jüubjÅ)rE}rF(hUh}rG(h]h]h]h]h]uh j#h]rH(jÊ)rI}rJ(hUh}rK(h]h]h]h]h]uh jEh]rLjÏ)rM}rN(hUh}rO(U anchornameU#launch-transportsUrefurih5h]h]h]h]h]Uinternalˆuh jIh]rPhX2) Launch transportsrQ…rR}rS(hX2) Launch transportsh jMubah!j×ubah!jØubjÀ)rT}rU(hUh}rV(h]h]h]h]h]uh jEh]rW(jÅ)rX}rY(hUh}rZ(h]h]h]h]h]uh jTh]r[jÊ)r\}r](hUh}r^(h]h]h]h]h]uh jXh]r_jÏ)r`}ra(hUh}rb(U anchornameU%#client-case-skip-if-you-are-a-serverUrefurih5h]h]h]h]h]Uinternalˆuh j\h]rchX&Client case (skip if you are a server)rd…re}rf(hX&Client case (skip if you are a server)h j`ubah!j×ubah!jØubah!jüubjÅ)rg}rh(hUh}ri(h]h]h]h]h]uh jTh]rjjÊ)rk}rl(hUh}rm(h]h]h]h]h]uh jgh]rnjÏ)ro}rp(hUh}rq(U anchornameU%#server-case-skip-if-you-are-a-clientUrefurih5h]h]h]h]h]Uinternalˆuh jkh]rrhX'Server case (skip if you are a client):rs…rt}ru(hX'Server case (skip if you are a client):h joubah!j×ubah!jØubah!jüubeh!j#ubeh!jüubjÅ)rv}rw(hUh}rx(h]h]h]h]h]uh j#h]ry(jÊ)rz}r{(hUh}r|(h]h]h]h]h]uh jvh]r}jÏ)r~}r(hUh}r€(U anchornameU#report-results-back-to-torUrefurih5h]h]h]h]h]Uinternalˆuh jzh]rhX3) Report results back to Tor.r‚…rƒ}r„(hX3) Report results back to Tor.h j~ubah!j×ubah!jØubjÀ)r…}r†(hUh}r‡(h]h]h]h]h]uh jvh]rˆ(jÅ)r‰}rŠ(hUh}r‹(h]h]h]h]h]uh j…h]rŒjÊ)r}rŽ(hUh}r(h]h]h]h]h]uh j‰h]rjÏ)r‘}r’(hUh}r“(U anchornameU#id1Urefurih5h]h]h]h]h]Uinternalˆuh jh]r”hX'Client case (skip if you are a server):r•…r–}r—(hX'Client case (skip if you are a server):h j‘ubah!j×ubah!jØubah!jüubjÅ)r˜}r™(hUh}rš(h]h]h]h]h]uh j…h]r›jÊ)rœ}r(hUh}rž(h]h]h]h]h]uh j˜h]rŸjÏ)r }r¡(hUh}r¢(U anchornameU#id2Urefurih5h]h]h]h]h]Uinternalˆuh jœh]r£hX'Server case (skip if you are a client):r¤…r¥}r¦(hX'Server case (skip if you are a client):h j ubah!j×ubah!jØubah!jüubeh!j#ubeh!jüubjÅ)r§}r¨(hUh}r©(h]h]h]h]h]uh j#h]rªjÊ)r«}r¬(hUh}r­(h]h]h]h]h]uh j§h]r®jÏ)r¯}r°(hUh}r±(U anchornameU3#stop-using-pyptlib-and-start-accepting-connectionsUrefurih5h]h]h]h]h]Uinternalˆuh j«h]r²hX54) Stop using pyptlib and start accepting connectionsr³…r´}rµ(hX54) Stop using pyptlib and start accepting connectionsh j¯ubah!j×ubah!jØubah!jüubeh!j#ubeh!jüubeh!j#ubeh!jüubah!j#ubh>jÀ)r¶}r·(hUh}r¸(h]h]h]h]h]uh]r¹jÅ)rº}r»(hUh}r¼(h]h]h]h]h]uh j¶h]r½(jÊ)r¾}r¿(hUh}rÀ(h]h]h]h]h]uh jºh]rÁjÏ)rÂ}rÃ(hUh}rÄ(U anchornameUUrefurih>h]h]h]h]h]Uinternalˆuh j¾h]rÅhXpyptlib PackagerÆ…rÇ}rÈ(hhFh jÂubah!j×ubah!jØubjÀ)rÉ}rÊ(hUh}rË(h]h]h]h]h]uh jºh]rÌ(jÅ)rÍ}rÎ(hUh}rÏ(h]h]h]h]h]uh jÉh]rÐjÊ)rÑ}rÒ(hUh}rÓ(h]h]h]h]h]uh jÍh]rÔjÏ)rÕ}rÖ(hUh}r×(U anchornameX#module-pyptlib.clientUrefurih>h]h]h]h]h]Uinternalˆuh jÑh]rØ(jó)rÙ}rÚ(hXclienth}rÛ(h]h]h]h]h]uh jÕh]rÜhXclientrÝ…rÞ}rß(hUh jÙubah!jûubhX Modulerà…rá}râ(hX Modulerãh jÕubeh!j×ubah!jØubah!jüubjÅ)rä}rå(hUh}ræ(h]h]h]h]h]uh jÉh]rçjÊ)rè}ré(hUh}rê(h]h]h]h]h]uh jäh]rëjÏ)rì}rí(hUh}rî(U anchornameX#module-pyptlib.client_configUrefurih>h]h]h]h]h]Uinternalˆuh jèh]rï(jó)rð}rñ(hX client_configh}rò(h]h]h]h]h]uh jìh]róhX client_configrô…rõ}rö(hUh jðubah!jûubhX Moduler÷…rø}rù(hX Modulerúh jìubeh!j×ubah!jØubah!jüubjÅ)rû}rü(hUh}rý(h]h]h]h]h]uh jÉh]rþjÊ)rÿ}r(hUh}r(h]h]h]h]h]uh jûh]rjÏ)r}r(hUh}r(U anchornameX#module-pyptlib.configUrefurih>h]h]h]h]h]Uinternalˆuh jÿh]r(jó)r}r(hXconfigh}r (h]h]h]h]h]uh jh]r hXconfigr …r }r (hUh jubah!jûubhX Moduler…r}r(hX Modulerh jubeh!j×ubah!jØubah!jüubjÅ)r}r(hUh}r(h]h]h]h]h]uh jÉh]rjÊ)r}r(hUh}r(h]h]h]h]h]uh jh]rjÏ)r}r(hUh}r(U anchornameX#module-pyptlib.serverUrefurih>h]h]h]h]h]Uinternalˆuh jh]r(jó)r}r(hXserverh}r (h]h]h]h]h]uh jh]r!hXserverr"…r#}r$(hUh jubah!jûubhX Moduler%…r&}r'(hX Moduler(h jubeh!j×ubah!jØubah!jüubjÅ)r)}r*(hUh}r+(h]h]h]h]h]uh jÉh]r,jÊ)r-}r.(hUh}r/(h]h]h]h]h]uh j)h]r0jÏ)r1}r2(hUh}r3(U anchornameX#module-pyptlib.server_configUrefurih>h]h]h]h]h]Uinternalˆuh j-h]r4(jó)r5}r6(hX server_configh}r7(h]h]h]h]h]uh j1h]r8hX server_configr9…r:}r;(hUh j5ubah!jûubhX Moduler<…r=}r>(hX Moduler?h j1ubeh!j×ubah!jØubah!jüubjÅ)r@}rA(hUh}rB(h]h]h]h]h]uh jÉh]rCjÊ)rD}rE(hUh}rF(h]h]h]h]h]uh j@h]rGjÏ)rH}rI(hUh}rJ(U anchornameX#module-pyptlib.utilUrefurih>h]h]h]h]h]Uinternalˆuh jDh]rK(jó)rL}rM(hXutilh}rN(h]h]h]h]h]uh jHh]rOhXutilrP…rQ}rR(hUh jLubah!jûubhX ModulerS…rT}rU(hX ModulerVh jHubeh!j×ubah!jØubah!jüubeh!j#ubeh!jüubah!j#ubhGjÀ)rW}rX(hUh}rY(h]h]h]h]h]uh]rZjÅ)r[}r\(hUh}r](h]h]h]h]h]uh jWh]r^jÊ)r_}r`(hUh}ra(h]h]h]h]h]uh j[h]rbjÏ)rc}rd(hUh}re(U anchornameUUrefurihGh]h]h]h]h]Uinternalˆuh j_h]rfhXpyptlib READMErg…rh}ri(hhOh jcubah!j×ubah!jØubah!jüubah!j#ubuU indexentriesrj}rk(h ]h#]h,]h5]h>]rl((UsinglermXpyptlib.client (module)Xmodule-pyptlib.clientUtrn(jmX!init() (in module pyptlib.client)hµUtro(jmX&reportEnd() (in module pyptlib.client)htUtrp(jmX*reportFailure() (in module pyptlib.client)hŸUtrq(jmX*reportSuccess() (in module pyptlib.client)hÃUtrr(jmXpyptlib.client_config (module)Xmodule-pyptlib.client_configUtrs(jmX-ClientConfig (class in pyptlib.client_config)hrUtrt(jmXAgetClientTransports() (pyptlib.client_config.ClientConfig method)h½Utru(jmX9writeMethod() (pyptlib.client_config.ClientConfig method)h¥Utrv(jmX<writeMethodEnd() (pyptlib.client_config.ClientConfig method)h¹Utrw(jmX>writeMethodError() (pyptlib.client_config.ClientConfig method)hUtrx(jmXpyptlib.config (module)Xmodule-pyptlib.configUtry(jmX Config (class in pyptlib.config)hÁUtrz(jmX6allTransportsEnabled (pyptlib.config.Config attribute)h»Utr{(jmX&check() (pyptlib.config.Config method)hËUtr|(jmX0checkClientMode() (pyptlib.config.Config method)h±Utr}(jmX=checkManagedTransportVersion() (pyptlib.config.Config method)h›Utr~(jmX6checkTransportEnabled() (pyptlib.config.Config method)h–Utr(jmX%emit() (pyptlib.config.Config method)hxUtr€(jmX$get() (pyptlib.config.Config method)hUtr(jmX8getAllTransportsEnabled() (pyptlib.config.Config method)h”Utr‚(jmX<getManagedTransportVersions() (pyptlib.config.Config method)hÇUtrƒ(jmX1getStateLocation() (pyptlib.config.Config method)h³Utr„(jmX5managedTransportVer (pyptlib.config.Config attribute)h‡Utr…(jmX/stateLocation (pyptlib.config.Config attribute)hŽUtr†(jmX,transports (pyptlib.config.Config attribute)h{Utr‡(jmX.writeEnvError() (pyptlib.config.Config method)h·Utrˆ(jmX-writeVersion() (pyptlib.config.Config method)h©Utr‰(jmX2writeVersionError() (pyptlib.config.Config method)hvUtrŠ(jmjNh¡Utr‹(jmXpyptlib.server (module)Xmodule-pyptlib.serverUtrŒ(jmX!init() (in module pyptlib.server)h¯Utr(jmX&reportEnd() (in module pyptlib.server)h˜UtrŽ(jmX*reportFailure() (in module pyptlib.server)h…Utr(jmX*reportSuccess() (in module pyptlib.server)hŒUtr(jmXpyptlib.server_config (module)Xmodule-pyptlib.server_configUtr‘(jmX-ServerConfig (class in pyptlib.server_config)hÉUtr’(jmX?getAuthCookieFile() (pyptlib.server_config.ServerConfig method)h‰Utr“(jmX?getExtendedORPort() (pyptlib.server_config.ServerConfig method)h­Utr”(jmX7getORPort() (pyptlib.server_config.ServerConfig method)h«Utr•(jmXDgetServerBindAddresses() (pyptlib.server_config.ServerConfig method)h€Utr–(jmXAgetServerTransports() (pyptlib.server_config.ServerConfig method)h§Utr—(jmX:get_addrport() (pyptlib.server_config.ServerConfig method)hÅUtr˜(jmXFget_addrport_from_string() (pyptlib.server_config.ServerConfig method)h¿Utr™(jmX9writeMethod() (pyptlib.server_config.ServerConfig method)h’Utrš(jmX<writeMethodEnd() (pyptlib.server_config.ServerConfig method)h~Utr›(jmX>writeMethodError() (pyptlib.server_config.ServerConfig method)h£Utrœ(jmXpyptlib.util (module)Xmodule-pyptlib.utilUtr(jmX*checkClientMode() (in module pyptlib.util)hƒUtržehG]uUall_docsrŸ}r (h GAÔ,/7—1h#GAÔ,/6d•h,GAÔ,/82Óh5GAÔ,/2Ÿh>GAÔ,/T’’hGGAÔ,/5C‘uUsettingsr¡}r¢(Ucloak_email_addressesr£ˆUtrim_footnote_reference_spacer¤‰U halt_levelr¥KUsectsubtitle_xformr¦‰Uembed_stylesheetr§‰U pep_base_urlr¨Uhttp://www.python.org/dev/peps/r©Udoctitle_xformrª‰Uwarning_streamr«csphinx.util.nodes WarningStream r¬)r­}r®(U_rer¯cre _compile r°U+\((DEBUG|INFO|WARNING|ERROR|SEVERE)/[0-4]\)r±K†Rr²Uwarnfuncr³NubUenvr´hU rfc_base_urlrµUhttp://tools.ietf.org/html/r¶Ugettext_compactr·ˆUinput_encodingr¸U utf-8-sigr¹uUfiles_to_rebuildrº}r»(j¸h]r¼h a…Rr½jºh]r¾h a…Rr¿j¹h]rÀh a…RrÁj¼h]rÂh,a…RrÃuUtoc_secnumbersrÄ}U_nitpick_ignorerÅh]…RrÆub.pyptlib-0.0.5/doc/doctrees/glossary.doctree000066400000000000000000000317711222335101500207710ustar00rootroot00000000000000€cdocutils.nodes document q)q}q(U nametypesq}q(Xpluggable transports glossaryqNXpluggable transport proxyqNXmanaged-mode proxyqNXobfs2q KXupstream/downstreamq NX!pluggable transport specificationq KX obfsproxyq KXextended orportq NXclient-mode / server-modeqNX7pluggable transport (sometimes also called 'transport')qNXpyptlibqNXexternal-mode proxyqNuUsubstitution_defsq}qUparse_messagesq]qcdocutils.nodes system_message q)q}q(U rawsourceqUUparentqcdocutils.nodes section q)q}q(hUU referencedqKhh)q}q (hUhhUsourceq!cdocutils.nodes reprunicode q"X1/home/f/Computers/tor/pyptlib/sphinx/glossary.rstq#…q$}q%bUtagnameq&Usectionq'U attributesq(}q)(Udupnamesq*]Uclassesq+]Ubackrefsq,]Uidsq-]q.Upluggable-transports-glossaryq/aUnamesq0]q1hauUlineq2KUdocumentq3hUchildrenq4]q5(cdocutils.nodes title q6)q7}q8(hXPluggable transports glossaryq9hhh!h$h&Utitleq:h(}q;(h*]h+]h,]h-]h0]uh2Kh3hh4]q…q?}q@(hh9hh7ubaubh)qA}qB(hUhhh!h$h&h'h(}qC(h*]h+]h,]h-]qDU3pluggable-transport-sometimes-also-called-transportqEah0]qFhauh2Kh3hh4]qG(h6)qH}qI(hX7pluggable transport (sometimes also called 'transport')qJhhAh!h$h&h:h(}qK(h*]h+]h,]h-]h0]uh2Kh3hh4]qLh=X7pluggable transport (sometimes also called 'transport')qM…qN}qO(hhJhhHubaubcdocutils.nodes paragraph qP)qQ}qR(hX/Pluggable transports obfuscate network traffic.qShhAh!h$h&U paragraphqTh(}qU(h*]h+]h,]h-]h0]uh2Kh3hh4]qVh=X/Pluggable transports obfuscate network traffic.qW…qX}qY(hhShhQubaubhP)qZ}q[(hXøSpecifically, pluggable transports transform the Tor traffic flow between the client and the bridge. This way, censors who monitor traffic between the client and the bridge see innocent-looking transformed traffic instead of the actual Tor traffic.q\hhAh!h$h&hTh(}q](h*]h+]h,]h-]h0]uh2K h3hh4]q^h=XøSpecifically, pluggable transports transform the Tor traffic flow between the client and the bridge. This way, censors who monitor traffic between the client and the bridge see innocent-looking transformed traffic instead of the actual Tor traffic.q_…q`}qa(hh\hhZubaubeubh)qb}qc(hUhhh!h$h&h'h(}qd(h*]h+]h,]h-]qeUpluggable-transport-proxyqfah0]qghauh2Kh3hh4]qh(h6)qi}qj(hXpluggable transport proxyqkhhbh!h$h&h:h(}ql(h*]h+]h,]h-]h0]uh2Kh3hh4]qmh=Xpluggable transport proxyqn…qo}qp(hhkhhiubaubhP)qq}qr(hXµPluggable transport proxies are programs that implement pluggable transports. They also implement the networking system that a pluggable transport needs (so that it can proxy data).qshhbh!h$h&hTh(}qt(h*]h+]h,]h-]h0]uh2Kh3hh4]quh=XµPluggable transport proxies are programs that implement pluggable transports. They also implement the networking system that a pluggable transport needs (so that it can proxy data).qv…qw}qx(hhshhqubaubeubhh)qy}qz(hUhhh!h$h&h'h(}q{(h*]h+]h,]h-]q|Uupstream-downstreamq}ah0]q~h auh2Kh3hh4]q(h6)q€}q(hXupstream/downstreamq‚hhyh!h$h&h:h(}qƒ(h*]h+]h,]h-]h0]uh2Kh3hh4]q„h=Xupstream/downstreamq……q†}q‡(hh‚hh€ubaubhP)qˆ}q‰(hXyThe upstream side of a pluggable transport proxy is the side that communicates with Tor. Upstream data is non-obfuscated.qŠhhyh!h$h&hTh(}q‹(h*]h+]h,]h-]h0]uh2K!h3hh4]qŒh=XyThe upstream side of a pluggable transport proxy is the side that communicates with Tor. Upstream data is non-obfuscated.q…qŽ}q(hhŠhhˆubaubhP)q}q‘(hX™The downstream side of a pluggable transport proxy is the side that communicates with the other pluggable transport proxy. Downstream data is obfuscated.q’hhyh!h$h&hTh(}q“(h*]h+]h,]h-]h0]uh2K$h3hh4]q”h=X™The downstream side of a pluggable transport proxy is the side that communicates with the other pluggable transport proxy. Downstream data is obfuscated.q•…q–}q—(hh’hhubaubeubh)q˜}q™(hUhhh!h$h&h'h(}qš(h*]h+]h,]h-]q›Uclient-mode-server-modeqœah0]qhauh2K)h3hh4]qž(h6)qŸ}q (hXclient-mode / server-modeq¡hh˜h!h$h&h:h(}q¢(h*]h+]h,]h-]h0]uh2K)h3hh4]q£h=Xclient-mode / server-modeq¤…q¥}q¦(hh¡hhŸubaubhP)q§}q¨(hXNA pluggable transport is a client if it has a Tor client in its upstream side.q©hh˜h!h$h&hTh(}qª(h*]h+]h,]h-]h0]uh2K+h3hh4]q«h=XNA pluggable transport is a client if it has a Tor client in its upstream side.q¬…q­}q®(hh©hh§ubaubhP)q¯}q°(hXNA pluggable transport is a server if it has a Tor bridge in its upstream side.q±hh˜h!h$h&hTh(}q²(h*]h+]h,]h-]h0]uh2K.h3hh4]q³h=XNA pluggable transport is a server if it has a Tor bridge in its upstream side.q´…qµ}q¶(hh±hh¯ubaubeubh)q·}q¸(hUhhh!h$h&h'h(}q¹(h*]h+]h,]h-]qºUexternal-mode-proxyq»ah0]q¼hauh2K2h3hh4]q½(h6)q¾}q¿(hXexternal-mode proxyqÀhh·h!h$h&h:h(}qÁ(h*]h+]h,]h-]h0]uh2K2h3hh4]qÂh=Xexternal-mode proxyqÃ…qÄ}qÅ(hhÀhh¾ubaubhP)qÆ}qÇ(hXvA pluggable transport proxy is in external-mode if the user explicitly configures it using its command-line interface.qÈhh·h!h$h&hTh(}qÉ(h*]h+]h,]h-]h0]uh2K4h3hh4]qÊh=XvA pluggable transport proxy is in external-mode if the user explicitly configures it using its command-line interface.qË…qÌ}qÍ(hhÈhhÆubaubeubh)qÎ}qÏ(hUhhh!h$h&h'h(}qÐ(h*]h+]h,]h-]qÑUmanaged-mode-proxyqÒah0]qÓhauh2K8h3hh4]qÔ(h6)qÕ}qÖ(hXmanaged-mode proxyq×hhÎh!h$h&h:h(}qØ(h*]h+]h,]h-]h0]uh2K8h3hh4]qÙh=Xmanaged-mode proxyqÚ…qÛ}qÜ(hh×hhÕubaubhP)qÝ}qÞ(hX@A pluggable transport proxy is in managed-mode if it's launched and managed by Tor using the managed-proxy configuration protocol. The managed-proxy configuration protocol is defined in the `pluggable transport specification `_.hhÎh!h$h&hTh(}qß(h*]h+]h,]h-]h0]uh2K:h3hh4]qà(h=X¾A pluggable transport proxy is in managed-mode if it's launched and managed by Tor using the managed-proxy configuration protocol. The managed-proxy configuration protocol is defined in the qá…qâ}qã(hX¾A pluggable transport proxy is in managed-mode if it's launched and managed by Tor using the managed-proxy configuration protocol. The managed-proxy configuration protocol is defined in the hhÝubcdocutils.nodes reference qä)qå}qæ(hX`pluggable transport specification `_h(}qç(UnameX!pluggable transport specificationUrefuriqèXZhttps://gitweb.torproject.org/torspec.git/blob/HEAD:/proposals/180-pluggable-transport.txtqéh-]h,]h*]h+]h0]uhhÝh4]qêh=X!pluggable transport specificationqë…qì}qí(hUhhåubah&U referenceqîubcdocutils.nodes target qï)qð}qñ(hX] h(}qò(Urefurihéh-]qóU!pluggable-transport-specificationqôah,]h*]h+]h0]qõh auhhÝh4]h&Utargetqöubh=X.…q÷}qø(hX.hhÝubeubeubh)qù}qú(hUhhh!h$h&h'h(}qû(h*]h+]h,]h-]qüUpyptlibqýah0]qþhauh2KAh3hh4]qÿ(h6)r}r(hXpyptlibrhhùh!h$h&h:h(}r(h*]h+]h,]h-]h0]uh2KAh3hh4]rh=Xpyptlibr…r}r(hjhjubaubhP)r}r (hXpyptlib is a library that implements the managed-proxy configuration protocol and makes it easier for application to be used as managed proxies.r hhùh!h$h&hTh(}r (h*]h+]h,]h-]h0]uh2KCh3hh4]r h=Xpyptlib is a library that implements the managed-proxy configuration protocol and makes it easier for application to be used as managed proxies.r …r}r(hj hjubaubeubh)r}r(hUhhh!h$h&h'h(}r(h*]h+]h,]h-]rUextended-orportrah0]rh auh2KHh3hh4]r(h6)r}r(hXextended orportrhjh!h$h&h:h(}r(h*]h+]h,]h-]h0]uh2KHh3hh4]rh=Xextended orportr…r}r(hjhjubaubhP)r}r (hX‚Extended ORPort is an non-implemented feature of Tor that allows a pluggable transport proxy to communicate with Tor in real-time.r!hjh!h$h&hTh(}r"(h*]h+]h,]h-]h0]uh2KJh3hh4]r#h=X‚Extended ORPort is an non-implemented feature of Tor that allows a pluggable transport proxy to communicate with Tor in real-time.r$…r%}r&(hj!hjubaubeubeubh!h$h&h'h(}r'(h*]r(X obfsproxyr)ah+]h,]h-]r*U obfsproxyr+ah0]uh2Kh3hh4]r,(h6)r-}r.(hX obfsproxyr/hhh!h$h&h:h(}r0(h*]h+]h,]h-]h0]uh2Kh3hh4]r1h=X obfsproxyr2…r3}r4(hj/hj-ubaubhP)r5}r6(hXö`obfsproxy `_ is a pluggable transport proxy written in C. It implements the `obfs2 `_ pluggable transport.hhh!h$h&hTh(}r7(h*]h+]h,]h-]h0]uh2Kh3hh4]r8(hä)r9}r:(hXD`obfsproxy `_h(}r;(Unamej)hèX5https://www.torproject.org/projects/obfsproxy.html.enr<h-]h,]h*]h+]h0]uhj5h4]r=h=X obfsproxyr>…r?}r@(hUhj9ubah&hîubhï)rA}rB(hX8 h(}rC(Urefurij<h-]rDUid1rEah,]h*]h+]h0]rFj)auhj5h4]h&höubh=X@ is a pluggable transport proxy written in C. It implements the rG…rH}rI(hX@ is a pluggable transport proxy written in C. It implements the hj5ubhä)rJ}rK(hX]`obfs2 `_h(}rL(Unameh hèXRhttps://gitweb.torproject.org/obfsproxy.git/blob/HEAD:/doc/obfs2/protocol-spec.txtrMh-]h,]h*]h+]h0]uhj5h4]rNh=Xobfs2rO…rP}rQ(hUhjJubah&hîubhï)rR}rS(hXU h(}rT(UrefurijMh-]rUUobfs2rVah,]h*]h+]h0]rWh auhj5h4]h&höubh=X pluggable transport.rX…rY}rZ(hX pluggable transport.hj5ubeubeubh!h$h&Usystem_messager[h(}r\(h*]UlevelKh-]h,]r]jEaUsourceh$h+]h0]UlineKUtypeUINFOr^uh2Kh3hh4]r_hP)r`}ra(hUh(}rb(h*]h+]h,]h-]h0]uhhh4]rch=X,Duplicate implicit target name: "obfsproxy".rd…re}rf(hUhj`ubah&hTubaubaUcurrent_sourcergNU decorationrhNUautofootnote_startriKUnameidsrj}rk(hh/hhfhhÒh jVh h}h hôh jEh jhhœhhEhhýhh»uh4]rlhahUU transformerrmNU footnote_refsrn}roUrefnamesrp}rqUsymbol_footnotesrr]rsUautofootnote_refsrt]ruUsymbol_footnote_refsrv]rwU citationsrx]ryh3hU current_linerzNUtransform_messagesr{]r|(h)r}}r~(hUh(}r(h*]UlevelKh-]h,]Usourceh$h+]h0]UlineKUtypej^uh4]r€hP)r}r‚(hUh(}rƒ(h*]h+]h,]h-]h0]uhj}h4]r„h=X/Hyperlink target "obfsproxy" is not referenced.r……r†}r‡(hUhjubah&hTubah&j[ubh)rˆ}r‰(hUh(}rŠ(h*]UlevelKh-]h,]Usourceh$h+]h0]UlineKUtypej^uh4]r‹hP)rŒ}r(hUh(}rŽ(h*]h+]h,]h-]h0]uhjˆh4]rh=X+Hyperlink target "obfs2" is not referenced.r…r‘}r’(hUhjŒubah&hTubah&j[ubh)r“}r”(hUh(}r•(h*]UlevelKh-]h,]Usourceh$h+]h0]UlineK:Utypej^uh4]r–hP)r—}r˜(hUh(}r™(h*]h+]h,]h-]h0]uhj“h4]ršh=XGHyperlink target "pluggable transport specification" is not referenced.r›…rœ}r(hUhj—ubah&hTubah&j[ubeUreporterržNUid_startrŸKU autofootnotesr ]r¡U citation_refsr¢}r£Uindirect_targetsr¤]r¥Usettingsr¦(cdocutils.frontend Values r§or¨}r©(Ufootnote_backlinksrªKUrecord_dependenciesr«NU rfc_base_urlr¬Uhttp://tools.ietf.org/html/r­U tracebackr®KUpep_referencesr¯NUstrip_commentsr°NU toc_backlinksr±Uentryr²U language_coder³Uenr´U datestamprµNU report_levelr¶KU _destinationr·NU halt_levelr¸KU strip_classesr¹Nh:NUerror_encoding_error_handlerrºUbackslashreplacer»Udebugr¼NUembed_stylesheetr½‰Uoutput_encoding_error_handlerr¾Ustrictr¿U sectnum_xformrÀKUdump_transformsrÁNU docinfo_xformrÂKUwarning_streamrÃNUpep_file_url_templaterÄUpep-%04drÅUexit_status_levelrÆKUconfigrÇNUstrict_visitorrÈNUcloak_email_addressesrɈUtrim_footnote_reference_spacerʉUenvrËNUdump_pseudo_xmlrÌNUexpose_internalsrÍNUsectsubtitle_xformrΉU source_linkrÏNUrfc_referencesrÐNUoutput_encodingrÑUutf-8rÒU source_urlrÓNUinput_encodingrÔU utf-8-sigrÕU_disable_configrÖNU id_prefixr×UU tab_widthrØKUerror_encodingrÙUUTF-8rÚU_sourcerÛU1/home/f/Computers/tor/pyptlib/sphinx/glossary.rstrÜUgettext_compactr݈U generatorrÞNUdump_internalsrßNU pep_base_urlràUhttp://www.python.org/dev/peps/ráUinput_encoding_error_handlerrâj¿Uauto_id_prefixrãUidräUdoctitle_xformrå‰Ustrip_elements_with_classesræNU _config_filesrç]Ufile_insertion_enabledrèKU raw_enabledréKU dump_settingsrêNubUsymbol_footnote_startrëKUidsrì}rí(jVjRhôhðh»h·hœh˜jjjEjAh}hyhýhùhfhbhÒhÎj+hh/hhEhAuUsubstitution_namesrî}rïh&h3h(}rð(h*]h-]h,]Usourceh$h+]h0]uU footnotesrñ]ròUrefidsró}rôub.pyptlib-0.0.5/doc/doctrees/index.doctree000066400000000000000000000172321222335101500202310ustar00rootroot00000000000000€cdocutils.nodes document q)q}q(U nametypesq}q(X pyptlib.utilqNXpyptlib.clientqNXindices and tablesqNXwelcome to pyptlib!q NXpyptlib.serverq NuUsubstitution_defsq }q Uparse_messagesq ]qUcurrent_sourceqNU decorationqNUautofootnote_startqKUnameidsq}q(hU pyptlib-utilqhUpyptlib-clientqhUindices-and-tablesqh Uwelcome-to-pyptlibqh Upyptlib-serverquUchildrenq]q(cdocutils.nodes comment q)q}q(U rawsourceqXÌpyptlib documentation master file, created by sphinx-quickstart on Fri Oct 5 11:46:40 2012. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive.UparentqhUsourceq cdocutils.nodes reprunicode q!X./home/f/Computers/tor/pyptlib/sphinx/index.rstq"…q#}q$bUtagnameq%Ucommentq&U attributesq'}q((U xml:spaceq)Upreserveq*Uidsq+]Ubackrefsq,]Udupnamesq-]Uclassesq.]Unamesq/]uUlineq0KUdocumentq1hh]q2cdocutils.nodes Text q3XÌpyptlib documentation master file, created by sphinx-quickstart on Fri Oct 5 11:46:40 2012. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive.q4…q5}q6(hUhhubaubcdocutils.nodes section q7)q8}q9(hUhhh h#h%Usectionq:h'}q;(h-]h.]h,]h+]q(cdocutils.nodes title q?)q@}qA(hXWelcome to pyptlib!qBhh8h h#h%UtitleqCh'}qD(h-]h.]h,]h+]h/]uh0Kh1hh]qEh3XWelcome to pyptlib!qF…qG}qH(hhBhh@ubaubcdocutils.nodes paragraph qI)qJ}qK(hX]pyptlib is a little Python library that makes the job of writing pluggable transports easier.qLhh8h h#h%U paragraphqMh'}qN(h-]h.]h,]h+]h/]uh0K h1hh]qOh3X]pyptlib is a little Python library that makes the job of writing pluggable transports easier.qP…qQ}qR(hhLhhJubaubcdocutils.nodes compound qS)qT}qU(hUhh8h h#h%UcompoundqVh'}qW(h-]h.]qXUtoctree-wrapperqYah,]h+]h/]uh0Nh1hh]qZcsphinx.addnodes toctree q[)q\}q](hUhhTh h#h%Utoctreeq^h'}q_(Unumberedq`KhUindexqaU titlesonlyqb‰Uglobqc‰h+]h,]h-]h.]h/]Uentriesqd]qe(NXREADMEqf†qgNXAPIqh†qiNXglossaryqj†qkeUhiddenql‰U includefilesqm]qn(hfhhhjeUmaxdepthqoKuh0K h]ubaubh7)qp}qq(hUhh8h h#h%h:h'}qr(h-]h.]h,]h+]qshah/]qthauh0Kh1hh]qu(h?)qv}qw(hX:mod:`pyptlib.client`qxhhph h#h%hCh'}qy(h-]h.]h,]h+]h/]uh0Kh1hh]qzcsphinx.addnodes pending_xref q{)q|}q}(hhxhhvh h#h%U pending_xrefq~h'}q(UreftypeXmodUrefwarnq€‰U reftargetqXpyptlib.clientU refdomainXpyq‚h+]h,]U refexplicit‰h-]h.]h/]UrefdocqƒhaUpy:classq„NU py:moduleq…Nuh0Kh]q†cdocutils.nodes literal q‡)qˆ}q‰(hhxh'}qŠ(h-]h.]q‹(UxrefqŒh‚Xpy-modqeh,]h+]h/]uhh|h]qŽh3Xpyptlib.clientq…q}q‘(hUhhˆubah%Uliteralq’ubaubaubhI)q“}q”(hXClient-side pyptlib API.q•hhph h#h%hMh'}q–(h-]h.]h,]h+]h/]uh0Kh1hh]q—h3XClient-side pyptlib API.q˜…q™}qš(hh•hh“ubaubeubh7)q›}qœ(hUhh8h h#h%h:h'}q(h-]h.]h,]h+]qžhah/]qŸh auh0Kh1hh]q (h?)q¡}q¢(hX:mod:`pyptlib.server`q£hh›h h#h%hCh'}q¤(h-]h.]h,]h+]h/]uh0Kh1hh]q¥h{)q¦}q§(hh£hh¡h h#h%h~h'}q¨(UreftypeXmodh€‰hXpyptlib.serverU refdomainXpyq©h+]h,]U refexplicit‰h-]h.]h/]hƒhah„Nh…Nuh0Kh]qªh‡)q«}q¬(hh£h'}q­(h-]h.]q®(hŒh©Xpy-modq¯eh,]h+]h/]uhh¦h]q°h3Xpyptlib.serverq±…q²}q³(hUhh«ubah%h’ubaubaubhI)q´}qµ(hXServer-side pyptlib API.q¶hh›h h#h%hMh'}q·(h-]h.]h,]h+]h/]uh0Kh1hh]q¸h3XServer-side pyptlib API.q¹…qº}q»(hh¶hh´ubaubeubh7)q¼}q½(hUhh8h h#h%h:h'}q¾(h-]h.]h,]h+]q¿hah/]qÀhauh0K h1hh]qÁ(h?)qÂ}qÃ(hX:mod:`pyptlib.util`qÄhh¼h h#h%hCh'}qÅ(h-]h.]h,]h+]h/]uh0K h1hh]qÆh{)qÇ}qÈ(hhÄhhÂh h#h%h~h'}qÉ(UreftypeXmodh€‰hX pyptlib.utilU refdomainXpyqÊh+]h,]U refexplicit‰h-]h.]h/]hƒhah„Nh…Nuh0Kh]qËh‡)qÌ}qÍ(hhÄh'}qÎ(h-]h.]qÏ(hŒhÊXpy-modqÐeh,]h+]h/]uhhÇh]qÑh3X pyptlib.utilqÒ…qÓ}qÔ(hUhhÌubah%h’ubaubaubhI)qÕ}qÖ(hXpyptlib utilities.q×hh¼h h#h%hMh'}qØ(h-]h.]h,]h+]h/]uh0K"h1hh]qÙh3Xpyptlib utilities.qÚ…qÛ}qÜ(hh×hhÕubaubeubeubh7)qÝ}qÞ(hUhhh h#h%h:h'}qß(h-]h.]h,]h+]qàhah/]qáhauh0K&h1hh]qâ(h?)qã}qä(hXIndices and tablesqåhhÝh h#h%hCh'}qæ(h-]h.]h,]h+]h/]uh0K&h1hh]qçh3XIndices and tablesqè…qé}qê(hhåhhãubaubcdocutils.nodes bullet_list që)qì}qí(hUhhÝh h#h%U bullet_listqîh'}qï(UbulletqðX*h+]h,]h-]h.]h/]uh0K(h1hh]qñ(cdocutils.nodes list_item qò)qó}qô(hX:ref:`genindex`qõhhìh h#h%U list_itemqöh'}q÷(h-]h.]h,]h+]h/]uh0Nh1hh]qøhI)qù}qú(hhõhhóh h#h%hMh'}qû(h-]h.]h,]h+]h/]uh0K(h]qüh{)qý}qþ(hhõhhùh h#h%h~h'}qÿ(UreftypeXrefh€ˆhXgenindexU refdomainXstdrh+]h,]U refexplicit‰h-]h.]h/]hƒhauh0K(h]rcdocutils.nodes emphasis r)r}r(hhõh'}r(h-]h.]r(hŒjXstd-refreh,]h+]h/]uhhýh]rh3Xgenindexr …r }r (hUhjubah%Uemphasisr ubaubaubaubhò)r }r(hX:ref:`modindex`rhhìh h#h%höh'}r(h-]h.]h,]h+]h/]uh0Nh1hh]rhI)r}r(hjhj h h#h%hMh'}r(h-]h.]h,]h+]h/]uh0K)h]rh{)r}r(hjhjh h#h%h~h'}r(UreftypeXrefh€ˆhXmodindexU refdomainXstdrh+]h,]U refexplicit‰h-]h.]h/]hƒhauh0K)h]rj)r}r(hjh'}r(h-]h.]r(hŒjXstd-refreh,]h+]h/]uhjh]r h3Xmodindexr!…r"}r#(hUhjubah%j ubaubaubaubhò)r$}r%(hX:ref:`search` hhìh h#h%höh'}r&(h-]h.]h,]h+]h/]uh0Nh1hh]r'hI)r(}r)(hX :ref:`search`r*hj$h h#h%hMh'}r+(h-]h.]h,]h+]h/]uh0K*h]r,h{)r-}r.(hj*hj(h h#h%h~h'}r/(UreftypeXrefh€ˆhXsearchU refdomainXstdr0h+]h,]U refexplicit‰h-]h.]h/]hƒhauh0K*h]r1j)r2}r3(hj*h'}r4(h-]h.]r5(hŒj0Xstd-refr6eh,]h+]h/]uhj-h]r7h3Xsearchr8…r9}r:(hUhj2ubah%j ubaubaubaubeubeubehUU transformerr;NU footnote_refsr<}r=Urefnamesr>}r?Usymbol_footnotesr@]rAUautofootnote_refsrB]rCUsymbol_footnote_refsrD]rEU citationsrF]rGh1hU current_linerHNUtransform_messagesrI]rJUreporterrKNUid_startrLKU autofootnotesrM]rNU citation_refsrO}rPUindirect_targetsrQ]rRUsettingsrS(cdocutils.frontend Values rTorU}rV(Ufootnote_backlinksrWKUrecord_dependenciesrXNU rfc_base_urlrYUhttp://tools.ietf.org/html/rZU tracebackr[KUpep_referencesr\NUstrip_commentsr]NU toc_backlinksr^Uentryr_U language_coder`UenraU datestamprbNU report_levelrcKU _destinationrdNU halt_levelreKU strip_classesrfNhCNUerror_encoding_error_handlerrgUbackslashreplacerhUdebugriNUembed_stylesheetrj‰Uoutput_encoding_error_handlerrkUstrictrlU sectnum_xformrmKUdump_transformsrnNU docinfo_xformroKUwarning_streamrpNUpep_file_url_templaterqUpep-%04drrUexit_status_levelrsKUconfigrtNUstrict_visitorruNUcloak_email_addressesrvˆUtrim_footnote_reference_spacerw‰UenvrxNUdump_pseudo_xmlryNUexpose_internalsrzNUsectsubtitle_xformr{‰U source_linkr|NUrfc_referencesr}NUoutput_encodingr~Uutf-8rU source_urlr€NUinput_encodingrU utf-8-sigr‚U_disable_configrƒNU id_prefixr„UU tab_widthr…KUerror_encodingr†UUTF-8r‡U_sourcerˆU./home/f/Computers/tor/pyptlib/sphinx/index.rstr‰Ugettext_compactrŠˆU generatorr‹NUdump_internalsrŒNU pep_base_urlrUhttp://www.python.org/dev/peps/rŽUinput_encoding_error_handlerrjlUauto_id_prefixrUidr‘Udoctitle_xformr’‰Ustrip_elements_with_classesr“NU _config_filesr”]r•Ufile_insertion_enabledr–KU raw_enabledr—KU dump_settingsr˜NubUsymbol_footnote_startr™KUidsrš}r›(hhphh8hh¼hh›hhÝuUsubstitution_namesrœ}rh%h1h'}rž(h-]h+]h,]Usourceh#h.]h/]uU footnotesrŸ]r Urefidsr¡}r¢ub.pyptlib-0.0.5/doc/doctrees/modules.doctree000066400000000000000000000052631222335101500205730ustar00rootroot00000000000000€cdocutils.nodes document q)q}q(U nametypesq}qXpyptlibqNsUsubstitution_defsq}qUparse_messagesq ]q Ucurrent_sourceq NU decorationq NUautofootnote_startq KUnameidsq}qhUpyptlibqsUchildrenq]qcdocutils.nodes section q)q}q(U rawsourceqUUparentqhUsourceqcdocutils.nodes reprunicode qX0/home/f/Computers/tor/pyptlib/sphinx/modules.rstq…q}qbUtagnameqUsectionqU attributesq}q (Udupnamesq!]Uclassesq"]Ubackrefsq#]Uidsq$]q%haUnamesq&]q'hauUlineq(KUdocumentq)hh]q*(cdocutils.nodes title q+)q,}q-(hXpyptlibq.hhhhhUtitleq/h}q0(h!]h"]h#]h$]h&]uh(Kh)hh]q1cdocutils.nodes Text q2Xpyptlibq3…q4}q5(hh.hh,ubaubcdocutils.nodes compound q6)q7}q8(hUhhhhhUcompoundq9h}q:(h!]h"]q;Utoctree-wrapperq)q?}q@(hUhh7hhhUtoctreeqAh}qB(UnumberedqCKhUmodulesqDU titlesonlyqE‰UglobqF‰h$]h#]h!]h"]h&]UentriesqG]qHNXpyptlibqI†qJaUhiddenqK‰U includefilesqL]qMhIaUmaxdepthqNKuh(Kh]ubaubeubahUU transformerqONU footnote_refsqP}qQUrefnamesqR}qSUsymbol_footnotesqT]qUUautofootnote_refsqV]qWUsymbol_footnote_refsqX]qYU citationsqZ]q[h)hU current_lineq\NUtransform_messagesq]]q^Ureporterq_NUid_startq`KU autofootnotesqa]qbU citation_refsqc}qdUindirect_targetsqe]qfUsettingsqg(cdocutils.frontend Values qhoqi}qj(Ufootnote_backlinksqkKUrecord_dependenciesqlNU rfc_base_urlqmUhttp://tools.ietf.org/html/qnU tracebackqoKUpep_referencesqpNUstrip_commentsqqNU toc_backlinksqrUentryqsU language_codeqtUenquU datestampqvNU report_levelqwKU _destinationqxNU halt_levelqyKU strip_classesqzNh/NUerror_encoding_error_handlerq{Ubackslashreplaceq|Udebugq}NUembed_stylesheetq~‰Uoutput_encoding_error_handlerqUstrictq€U sectnum_xformqKUdump_transformsq‚NU docinfo_xformqƒKUwarning_streamq„NUpep_file_url_templateq…Upep-%04dq†Uexit_status_levelq‡KUconfigqˆNUstrict_visitorq‰NUcloak_email_addressesqŠˆUtrim_footnote_reference_spaceq‹‰UenvqŒNUdump_pseudo_xmlqNUexpose_internalsqŽNUsectsubtitle_xformq‰U source_linkqNUrfc_referencesq‘NUoutput_encodingq’Uutf-8q“U source_urlq”NUinput_encodingq•U utf-8-sigq–U_disable_configq—NU id_prefixq˜UU tab_widthq™KUerror_encodingqšUUTF-8q›U_sourceqœU0/home/f/Computers/tor/pyptlib/sphinx/modules.rstqUgettext_compactqžˆU generatorqŸNUdump_internalsq NU pep_base_urlq¡Uhttp://www.python.org/dev/peps/q¢Uinput_encoding_error_handlerq£h€Uauto_id_prefixq¤Uidq¥Udoctitle_xformq¦‰Ustrip_elements_with_classesq§NU _config_filesq¨]Ufile_insertion_enabledq©KU raw_enabledqªKU dump_settingsq«NubUsymbol_footnote_startq¬KUidsq­}q®hhsUsubstitution_namesq¯}q°hh)h}q±(h!]h$]h#]Usourcehh"]h&]uU footnotesq²]q³Urefidsq´}qµub.pyptlib-0.0.5/doc/doctrees/pyptlib.doctree000066400000000000000000004535431222335101500206160ustar00rootroot00000000000000€cdocutils.nodes document q)q}q(U nametypesq}q(X"pyptlib.client_config.ClientConfigqKXpyptlib.client.reportEndqKX"pyptlib.config.Config.writeVersionqKX'pyptlib.config.Config.writeVersionErrorq KXserver_config moduleq NXpyptlib.config.Config.emitq KX pyptlib.config.Config.transportsq KX util moduleq NX1pyptlib.server_config.ServerConfig.writeMethodEndqKX9pyptlib.server_config.ServerConfig.getServerBindAddressesqKX/pyptlib.server_config.ServerConfig.get_addrportqKXpyptlib.util.checkClientModeqKXpyptlib.server.reportFailureqKX)pyptlib.config.Config.managedTransportVerqKXpyptlib.config.ConfigqKXpyptlib.server.reportSuccessqKX#pyptlib.config.Config.stateLocationqKX3pyptlib.client_config.ClientConfig.writeMethodErrorqKX.pyptlib.server_config.ServerConfig.writeMethodqKX-pyptlib.config.Config.getAllTransportsEnabledqKX+pyptlib.config.Config.checkTransportEnabledqKXpyptlib.server.reportEndqKX2pyptlib.config.Config.checkManagedTransportVersionqKXpyptlib.config.Config.getqKXclient_config moduleqNXpyptlib.client.reportFailureqKXpyptlib.config.EnvErrorq KX3pyptlib.server_config.ServerConfig.writeMethodErrorq!KX.pyptlib.client_config.ClientConfig.writeMethodq"KX6pyptlib.server_config.ServerConfig.getServerTransportsq#KXpyptlib packageq$NX,pyptlib.server_config.ServerConfig.getORPortq%KX4pyptlib.server_config.ServerConfig.getExtendedORPortq&KXpyptlib.server.initq'KX client moduleq(NX%pyptlib.config.Config.checkClientModeq)KX&pyptlib.config.Config.getStateLocationq*KXpyptlib.client.initq+KX#pyptlib.config.Config.writeEnvErrorq,KX1pyptlib.client_config.ClientConfig.writeMethodEndq-KX*pyptlib.config.Config.allTransportsEnabledq.KX server moduleq/NX6pyptlib.client_config.ClientConfig.getClientTransportsq0KX;pyptlib.server_config.ServerConfig.get_addrport_from_stringq1KX4pyptlib.server_config.ServerConfig.getAuthCookieFileq2KXpyptlib.client.reportSuccessq3KX config moduleq4NX1pyptlib.config.Config.getManagedTransportVersionsq5KX"pyptlib.server_config.ServerConfigq6KXpyptlib.config.Config.checkq7KuUsubstitution_defsq8}q9Uparse_messagesq:]q;(cdocutils.nodes system_message q<)q=}q>(U rawsourceq?UUparentq@csphinx.addnodes desc_content qA)qB}qC(h?Uh@csphinx.addnodes desc qD)qE}qF(h?Uh@hA)qG}qH(h?Uh@hD)qI}qJ(h?Uh@cdocutils.nodes section qK)qL}qM(h?Uh@hK)qN}qO(h?Uh@hUsourceqPcdocutils.nodes reprunicode qQX0/home/f/Computers/tor/pyptlib/sphinx/pyptlib.rstqR…qS}qTbUtagnameqUUsectionqVU attributesqW}qX(UdupnamesqY]UclassesqZ]Ubackrefsq[]Uidsq\]q]Upyptlib-packageq^aUnamesq_]q`h$auUlineqaKUdocumentqbhUchildrenqc]qd(cdocutils.nodes title qe)qf}qg(h?Xpyptlib Packageqhh@hNhPhShUUtitleqihW}qj(hY]hZ]h[]h\]h_]uhaKhbhhc]qkcdocutils.nodes Text qlXpyptlib Packageqm…qn}qo(h?hhh@hfubaubhK)qp}qq(h?Uh@hNhPhShUhVhW}qr(hY]hZ]h[]h\]qs(Xmodule-pyptlib.clientqtU client-modulequeh_]qvh(auhaKhbhhc]qw(he)qx}qy(h?X:mod:`client` Moduleqzh@hphPhShUhihW}q{(hY]hZ]h[]h\]h_]uhaKhbhhc]q|(csphinx.addnodes pending_xref q})q~}q(h?X :mod:`client`q€h@hxhPhShUU pending_xrefqhW}q‚(UreftypeXmodUrefwarnqƒ‰U reftargetq„XclientU refdomainXpyq…h\]h[]U refexplicit‰hY]hZ]h_]Urefdocq†Upyptlibq‡Upy:classqˆNU py:moduleq‰NuhaKhc]qŠcdocutils.nodes literal q‹)qŒ}q(h?h€hW}qŽ(hY]hZ]q(Uxrefqh…Xpy-modq‘eh[]h\]h_]uh@h~hc]q’hlXclientq“…q”}q•(h?Uh@hŒubahUUliteralq–ubaubhlX Moduleq—…q˜}q™(h?X Moduleqšh@hxubeubcsphinx.addnodes index q›)qœ}q(h?Uh@hphPU qžhUUindexqŸhW}q (h\]h[]hY]hZ]h_]Uentries]q¡(Usingleq¢Xpyptlib.client (module)Xmodule-pyptlib.clientUtq£auhaKhbhhc]ubcdocutils.nodes paragraph q¤)q¥}q¦(h?XPublic client-side pyptlib API.q§h@hphPXK/home/f/Computers/tor/pyptlib/pyptlib/client.py:docstring of pyptlib.clienthUU paragraphq¨hW}q©(hY]hZ]h[]h\]h_]uhaKhbhhc]qªhlXPublic client-side pyptlib API.q«…q¬}q­(h?h§h@h¥ubaubh›)q®}q¯(h?Uh@hphPNhUhŸhW}q°(h\]h[]hY]hZ]h_]Uentries]q±(h¢X!init() (in module pyptlib.client)h+Utq²auhaNhbhhc]ubhD)q³}q´(h?Uh@hphPNhUUdescqµhW}q¶(Unoindexq·‰Udomainq¸Xpyq¹h\]h[]hY]hZ]h_]UobjtypeqºXfunctionq»Udesctypeq¼h»uhaNhbhhc]q½(csphinx.addnodes desc_signature q¾)q¿}qÀ(h?Xinit(supported_transports)h@h³hPU qÁhUUdesc_signatureqÂhW}qÃ(h\]qÄh+aUmoduleqÅhQXpyptlib.clientqÆ…qÇ}qÈbh[]hY]hZ]h_]qÉh+aUfullnameqÊXinitqËUclassqÌUUfirstq͉uhaNhbhhc]qÎ(csphinx.addnodes desc_addname qÏ)qÐ}qÑ(h?Xpyptlib.client.h@h¿hPhÁhUU desc_addnameqÒhW}qÓ(hY]hZ]h[]h\]h_]uhaNhbhhc]qÔhlXpyptlib.client.qÕ…qÖ}q×(h?Uh@hÐubaubcsphinx.addnodes desc_name qØ)qÙ}qÚ(h?hËh@h¿hPhÁhUU desc_nameqÛhW}qÜ(hY]hZ]h[]h\]h_]uhaNhbhhc]qÝhlXinitqÞ…qß}qà(h?Uh@hÙubaubcsphinx.addnodes desc_parameterlist qá)qâ}qã(h?Uh@h¿hPhÁhUUdesc_parameterlistqähW}qå(hY]hZ]h[]h\]h_]uhaNhbhhc]qæcsphinx.addnodes desc_parameter qç)qè}qé(h?Xsupported_transportshW}qê(hY]hZ]h[]h\]h_]uh@hâhc]qëhlXsupported_transportsqì…qí}qî(h?Uh@hèubahUUdesc_parameterqïubaubcsphinx.addnodes only qð)qñ}qò(h?Uh@h¿hPNhUUonlyqóhW}qô(UexprUhtmlqõh\]h[]hY]hZ]h_]uhaNhbhhc]qöh})q÷}qø(h?UhW}qù(UreftypeUviewcodeqúUrefdoch‡U refdomainUstdqûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/clientUrefidhËuh@hñhc]qücdocutils.nodes inline qý)qþ}qÿ(h?UhW}r(hY]hZ]rU viewcode-linkrah[]h\]h_]uh@h÷hc]rhlX[source]r…r}r(h?Uh@hþubahUUinlinerubahUhubaubeubhA)r}r (h?Uh@h³hPhÁhUU desc_contentr hW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]r (h¤)r }r(h?X)Bootstrap client-side managed-proxy mode.rh@jhPXP/home/f/Computers/tor/pyptlib/pyptlib/client.py:docstring of pyptlib.client.initrhUh¨hW}r(hY]hZ]h[]h\]h_]uhaKhbhhc]rhlX)Bootstrap client-side managed-proxy mode.r…r}r(h?jh@j ubaubh¤)r}r(h?X,*Call in the beginning of your application.*rh@jhPjhUh¨hW}r(hY]hZ]h[]h\]h_]uhaKhbhhc]rcdocutils.nodes emphasis r)r}r(h?jhW}r(hY]hZ]h[]h\]h_]uh@jhc]rhlX*Call in the beginning of your application.r …r!}r"(h?Uh@jubahUUemphasisr#ubaubcdocutils.nodes field_list r$)r%}r&(h?Uh@jhPNhUU field_listr'hW}r((hY]hZ]h[]h\]h_]uhaNhbhhc]r)(cdocutils.nodes field r*)r+}r,(h?UhW}r-(hY]hZ]h[]h\]h_]uh@j%hc]r.(cdocutils.nodes field_name r/)r0}r1(h?UhW}r2(hY]hZ]h[]h\]h_]uh@j+hc]r3hlX Parametersr4…r5}r6(h?Uh@j0ubahUU field_namer7ubcdocutils.nodes field_body r8)r9}r:(h?UhW}r;(hY]hZ]h[]h\]h_]uh@j+hc]r<h¤)r=}r>(h?UhW}r?(hY]hZ]h[]h\]h_]uh@j9hc]r@(cdocutils.nodes strong rA)rB}rC(h?Xsupported_transportshW}rD(hY]hZ]h[]h\]h_]uh@j=hc]rEhlXsupported_transportsrF…rG}rH(h?Uh@jBubahUUstrongrIubhlX (rJ…rK}rL(h?Uh@j=ubh})rM}rN(h?UhW}rO(UreftypeUobjrPU reftargetXlistrQU refdomainh¹h\]h[]U refexplicit‰hY]hZ]h_]uh@j=hc]rRj)rS}rT(h?jQhW}rU(hY]hZ]h[]h\]h_]uh@jMhc]rVhlXlistrW…rX}rY(h?Uh@jSubahUj#ubahUhubhlX)…rZ}r[(h?Uh@j=ubhlX -- r\…r]}r^(h?Uh@j=ubhlX6Names of the transports that the application supports.r_…r`}ra(h?X6Names of the transports that the application supports.h@j=ubehUh¨ubahUU field_bodyrbubehUUfieldrcubj*)rd}re(h?UhW}rf(hY]hZ]h[]h\]h_]uh@j%hc]rg(j/)rh}ri(h?UhW}rj(hY]hZ]h[]h\]h_]uh@jdhc]rkhlXReturnsrl…rm}rn(h?Uh@jhubahUj7ubj8)ro}rp(h?UhW}rq(hY]hZ]h[]h\]h_]uh@jdhc]rrh¤)rs}rt(h?UhW}ru(hY]hZ]h[]h\]h_]uh@johc]rv(h¤)rw}rx(h?X9dictionary that contains information for the application.ryh@jshPjhUh¨hW}rz(hY]hZ]h[]h\]h_]uhaKhc]r{hlX9dictionary that contains information for the application.r|…r}}r~(h?jyh@jwubaubcdocutils.nodes table r)r€}r(h?UhW}r‚(hY]hZ]h[]h\]h_]uh@jshc]rƒcdocutils.nodes tgroup r„)r…}r†(h?UhW}r‡(h\]h[]hY]hZ]h_]UcolsKuh@j€hc]rˆ(cdocutils.nodes colspec r‰)rŠ}r‹(h?UhW}rŒ(h\]h[]hY]hZ]h_]UcolwidthK uh@j…hc]hUUcolspecrubj‰)rŽ}r(h?UhW}r(h\]h[]hY]hZ]h_]UcolwidthK uh@j…hc]hUjubj‰)r‘}r’(h?UhW}r“(h\]h[]hY]hZ]h_]UcolwidthKVuh@j…hc]hUjubcdocutils.nodes thead r”)r•}r–(h?UhW}r—(hY]hZ]h[]h\]h_]uh@j…hc]r˜cdocutils.nodes row r™)rš}r›(h?UhW}rœ(hY]hZ]h[]h\]h_]uh@j•hc]r(cdocutils.nodes entry rž)rŸ}r (h?UhW}r¡(hY]hZ]h[]h\]h_]uh@jšhc]r¢h¤)r£}r¤(h?XKeyr¥h@jŸhPjhUh¨hW}r¦(hY]hZ]h[]h\]h_]uhaK hc]r§hlXKeyr¨…r©}rª(h?j¥h@j£ubaubahUUentryr«ubjž)r¬}r­(h?UhW}r®(hY]hZ]h[]h\]h_]uh@jšhc]r¯h¤)r°}r±(h?XTyper²h@j¬hPjhUh¨hW}r³(hY]hZ]h[]h\]h_]uhaK hc]r´hlXTyperµ…r¶}r·(h?j²h@j°ubaubahUj«ubjž)r¸}r¹(h?UhW}rº(hY]hZ]h[]h\]h_]uh@jšhc]r»h¤)r¼}r½(h?XValuer¾h@j¸hPjhUh¨hW}r¿(hY]hZ]h[]h\]h_]uhaK hc]rÀhlXValuerÁ…rÂ}rÃ(h?j¾h@j¼ubaubahUj«ubehUUrowrÄubahUUtheadrÅubcdocutils.nodes tbody rÆ)rÇ}rÈ(h?UhW}rÉ(hY]hZ]h[]h\]h_]uh@j…hc]rÊ(j™)rË}rÌ(h?UhW}rÍ(hY]hZ]h[]h\]h_]uh@jÇhc]rÎ(jž)rÏ}rÐ(h?UhW}rÑ(hY]hZ]h[]h\]h_]uh@jËhc]rÒh¤)rÓ}rÔ(h?X state_locrÕh@jÏhPjhUh¨hW}rÖ(hY]hZ]h[]h\]h_]uhaK hc]r×hlX state_locrØ…rÙ}rÚ(h?jÕh@jÓubaubahUj«ubjž)rÛ}rÜ(h?UhW}rÝ(hY]hZ]h[]h\]h_]uh@jËhc]rÞh¤)rß}rà(h?Xstringráh@jÛhPjhUh¨hW}râ(hY]hZ]h[]h\]h_]uhaK hc]rãhlXstringrä…rå}ræ(h?jáh@jßubaubahUj«ubjž)rç}rè(h?UhW}ré(hY]hZ]h[]h\]h_]uh@jËhc]rêh¤)rë}rì(h?XJDirectory where the managed proxy should dump its state files (if needed).ríh@jçhPjhUh¨hW}rî(hY]hZ]h[]h\]h_]uhaK hc]rïhlXJDirectory where the managed proxy should dump its state files (if needed).rð…rñ}rò(h?jíh@jëubaubahUj«ubehUjÄubj™)ró}rô(h?UhW}rõ(hY]hZ]h[]h\]h_]uh@jÇhc]rö(jž)r÷}rø(h?UhW}rù(hY]hZ]h[]h\]h_]uh@jóhc]rúh¤)rû}rü(h?X transportsrýh@j÷hPjhUh¨hW}rþ(hY]hZ]h[]h\]h_]uhaK hc]rÿhlX transportsr…r}r(h?jýh@jûubaubahUj«ubjž)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jóhc]rh¤)r}r(h?Xlistr h@jhPjhUh¨hW}r (hY]hZ]h[]h\]h_]uhaK hc]r hlXlistr …r }r(h?j h@jubaubahUj«ubjž)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jóhc]rh¤)r}r(h?XVStrings of the names of the transports that should be launched. The list can be empty.rh@jhPjhUh¨hW}r(hY]hZ]h[]h\]h_]uhaK hc]rhlXVStrings of the names of the transports that should be launched. The list can be empty.r…r}r(h?jh@jubaubahUj«ubehUjÄubehUUtbodyrubehUUtgrouprubahUUtablerubehUh¨ubahUjbubehUjcubj*)r}r(h?Uh@j%hPjhUjchW}r (hY]hZ]h[]h\]h_]uhaKhbhhc]r!(j/)r"}r#(h?XraiseshW}r$(hY]hZ]h[]h\]h_]uh@jhc]r%hlXRaises r&…r'}r((h?Uh@j"ubahUj7ubj8)r)}r*(h?XL:class:`pyptlib.config.EnvError` if environment was incomplete or corrupted.r+hW}r,(hY]hZ]h[]h\]h_]uh@jhc]r-h¤)r.}r/(h?j+h@j)hPjhUh¨hW}r0(hY]hZ]h[]h\]h_]uhaKhc]r1(h})r2}r3(h?X :class:`pyptlib.config.EnvError`r4h@j.hPhShUhhW}r5(UreftypeXclasshƒ‰h„Xpyptlib.config.EnvErrorU refdomainXpyr6h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆNh‰Xpyptlib.clientr7uhaKhc]r8h‹)r9}r:(h?j4hW}r;(hY]hZ]r<(hj6Xpy-classr=eh[]h\]h_]uh@j2hc]r>hlXpyptlib.config.EnvErrorr?…r@}rA(h?Uh@j9ubahUh–ubaubhlX, if environment was incomplete or corrupted.rB…rC}rD(h?X, if environment was incomplete or corrupted.h@j.ubeubahUjbubeubeubeubeubh›)rE}rF(h?Uh@hphPXU/home/f/Computers/tor/pyptlib/pyptlib/client.py:docstring of pyptlib.client.reportEndrGhUhŸhW}rH(h\]h[]hY]hZ]h_]Uentries]rI(h¢X&reportEnd() (in module pyptlib.client)hUtrJauhaNhbhhc]ubhD)rK}rL(h?Uh@hphPjGhUhµhW}rM(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXfunctionrNh¼jNuhaNhbhhc]rO(h¾)rP}rQ(h?X reportEnd()h@jKhPhÁhUhÂhW}rR(h\]rShahÅhQXpyptlib.clientrT…rU}rVbh[]hY]hZ]h_]rWhahÊX reportEndrXhÌUh͉uhaNhbhhc]rY(hÏ)rZ}r[(h?Xpyptlib.client.h@jPhPhÁhUhÒhW}r\(hY]hZ]h[]h\]h_]uhaNhbhhc]r]hlXpyptlib.client.r^…r_}r`(h?Uh@jZubaubhØ)ra}rb(h?jXh@jPhPhÁhUhÛhW}rc(hY]hZ]h[]h\]h_]uhaNhbhhc]rdhlX reportEndre…rf}rg(h?Uh@jaubaubhá)rh}ri(h?Uh@jPhPhÁhUhähW}rj(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rk}rl(h?Uh@jPhPNhUhóhW}rm(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rnh})ro}rp(h?UhW}rq(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/clientUrefidjXuh@jkhc]rrhý)rs}rt(h?UhW}ru(hY]hZ]rvjah[]h\]h_]uh@johc]rwhlX[source]rx…ry}rz(h?Uh@jsubahUjubahUhubaubeubhA)r{}r|(h?Uh@jKhPhÁhUj hW}r}(hY]hZ]h[]h\]h_]uhaNhbhhc]r~(h¤)r}r€(h?X-Report that we are done launching transports.rh@j{hPjGhUh¨hW}r‚(hY]hZ]h[]h\]h_]uhaKhbhhc]rƒhlX-Report that we are done launching transports.r„…r…}r†(h?jh@jubaubh¤)r‡}rˆ(h?XC*Call after you have launched all the transports you could launch.*r‰h@j{hPjGhUh¨hW}rŠ(hY]hZ]h[]h\]h_]uhaKhbhhc]r‹j)rŒ}r(h?j‰hW}rŽ(hY]hZ]h[]h\]h_]uh@j‡hc]rhlXACall after you have launched all the transports you could launch.r…r‘}r’(h?Uh@jŒubahUj#ubaubeubeubh›)r“}r”(h?Uh@hphPNhUhŸhW}r•(h\]h[]hY]hZ]h_]Uentries]r–(h¢X*reportFailure() (in module pyptlib.client)hUtr—auhaNhbhhc]ubhD)r˜}r™(h?Uh@hphPNhUhµhW}rš(h·‰h¸Xpyr›h\]h[]hY]hZ]h_]hºXfunctionrœh¼jœuhaNhbhhc]r(h¾)rž}rŸ(h?XreportFailure(name, message)h@j˜hPhÁhUhÂhW}r (h\]r¡hahÅhQXpyptlib.clientr¢…r£}r¤bh[]hY]hZ]h_]r¥hahÊX reportFailurer¦hÌUh͉uhaNhbhhc]r§(hÏ)r¨}r©(h?Xpyptlib.client.h@jžhPhÁhUhÒhW}rª(hY]hZ]h[]h\]h_]uhaNhbhhc]r«hlXpyptlib.client.r¬…r­}r®(h?Uh@j¨ubaubhØ)r¯}r°(h?j¦h@jžhPhÁhUhÛhW}r±(hY]hZ]h[]h\]h_]uhaNhbhhc]r²hlX reportFailurer³…r´}rµ(h?Uh@j¯ubaubhá)r¶}r·(h?Uh@jžhPhÁhUhähW}r¸(hY]hZ]h[]h\]h_]uhaNhbhhc]r¹(hç)rº}r»(h?XnamehW}r¼(hY]hZ]h[]h\]h_]uh@j¶hc]r½hlXnamer¾…r¿}rÀ(h?Uh@jºubahUhïubhç)rÁ}rÂ(h?XmessagehW}rÃ(hY]hZ]h[]h\]h_]uh@j¶hc]rÄhlXmessagerÅ…rÆ}rÇ(h?Uh@jÁubahUhïubeubhð)rÈ}rÉ(h?Uh@jžhPNhUhóhW}rÊ(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rËh})rÌ}rÍ(h?UhW}rÎ(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/clientUrefidj¦uh@jÈhc]rÏhý)rÐ}rÑ(h?UhW}rÒ(hY]hZ]rÓjah[]h\]h_]uh@jÌhc]rÔhlX[source]rÕ…rÖ}r×(h?Uh@jÐubahUjubahUhubaubeubhA)rØ}rÙ(h?Uh@j˜hPhÁhUj hW}rÚ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÛ(h¤)rÜ}rÝ(h?X0Report that a client transport failed to launch.rÞh@jØhPXY/home/f/Computers/tor/pyptlib/pyptlib/client.py:docstring of pyptlib.client.reportFailurerßhUh¨hW}rà(hY]hZ]h[]h\]h_]uhaKhbhhc]ráhlX0Report that a client transport failed to launch.râ…rã}rä(h?jÞh@jÜubaubh¤)rå}ræ(h?X2*Always call after failing to launch a transport.*rçh@jØhPjßhUh¨hW}rè(hY]hZ]h[]h\]h_]uhaKhbhhc]réj)rê}rë(h?jçhW}rì(hY]hZ]h[]h\]h_]uh@jåhc]ríhlX0Always call after failing to launch a transport.rî…rï}rð(h?Uh@jêubahUj#ubaubj$)rñ}rò(h?Uh@jØhPNhUj'hW}ró(hY]hZ]h[]h\]h_]uhaNhbhhc]rôj*)rõ}rö(h?UhW}r÷(hY]hZ]h[]h\]h_]uh@jñhc]rø(j/)rù}rú(h?UhW}rû(hY]hZ]h[]h\]h_]uh@jõhc]rühlX Parametersrý…rþ}rÿ(h?Uh@jùubahUj7ubj8)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jõhc]rcdocutils.nodes bullet_list r)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]r(cdocutils.nodes list_item r )r }r (h?UhW}r (hY]hZ]h[]h\]h_]uh@jhc]r h¤)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@j hc]r(jA)r}r(h?XnamehW}r(hY]hZ]h[]h\]h_]uh@jhc]rhlXnamer…r}r(h?Uh@jubahUjIubhlX (r…r}r(h?Uh@jubh})r}r(h?UhW}r(UreftypejPU reftargetXstrrU refdomainj›h\]h[]U refexplicit‰hY]hZ]h_]uh@jhc]r j)r!}r"(h?jhW}r#(hY]hZ]h[]h\]h_]uh@jhc]r$hlXstrr%…r&}r'(h?Uh@j!ubahUj#ubahUhubhlX)…r(}r)(h?Uh@jubhlX -- r*…r+}r,(h?Uh@jubhlXName of transport.r-…r.}r/(h?XName of transport.h@jubehUh¨ubahUU list_itemr0ubj )r1}r2(h?UhW}r3(hY]hZ]h[]h\]h_]uh@jhc]r4h¤)r5}r6(h?UhW}r7(hY]hZ]h[]h\]h_]uh@j1hc]r8(jA)r9}r:(h?XmessagehW}r;(hY]hZ]h[]h\]h_]uh@j5hc]r<hlXmessager=…r>}r?(h?Uh@j9ubahUjIubhlX (r@…rA}rB(h?Uh@j5ubh})rC}rD(h?UhW}rE(UreftypejPU reftargetXstrrFU refdomainj›h\]h[]U refexplicit‰hY]hZ]h_]uh@j5hc]rGj)rH}rI(h?jFhW}rJ(hY]hZ]h[]h\]h_]uh@jChc]rKhlXstrrL…rM}rN(h?Uh@jHubahUj#ubahUhubhlX)…rO}rP(h?Uh@j5ubhlX -- rQ…rR}rS(h?Uh@j5ubhlXError message.rT…rU}rV(h?XError message.h@j5ubehUh¨ubahUj0ubehUU bullet_listrWubahUjbubehUjcubaubeubeubh›)rX}rY(h?Uh@hphPNhUhŸhW}rZ(h\]h[]hY]hZ]h_]Uentries]r[(h¢X*reportSuccess() (in module pyptlib.client)h3Utr\auhaNhbhhc]ubhD)r]}r^(h?Uh@hphPNhUhµhW}r_(h·‰h¸Xpyr`h\]h[]hY]hZ]h_]hºXfunctionrah¼jauhaNhbhhc]rb(h¾)rc}rd(h?XDreportSuccess(name, socksVersion, addrport, args=None, optArgs=None)h@j]hPhÁhUhÂhW}re(h\]rfh3ahÅhQXpyptlib.clientrg…rh}ribh[]hY]hZ]h_]rjh3ahÊX reportSuccessrkhÌUh͉uhaNhbhhc]rl(hÏ)rm}rn(h?Xpyptlib.client.h@jchPhÁhUhÒhW}ro(hY]hZ]h[]h\]h_]uhaNhbhhc]rphlXpyptlib.client.rq…rr}rs(h?Uh@jmubaubhØ)rt}ru(h?jkh@jchPhÁhUhÛhW}rv(hY]hZ]h[]h\]h_]uhaNhbhhc]rwhlX reportSuccessrx…ry}rz(h?Uh@jtubaubhá)r{}r|(h?Uh@jchPhÁhUhähW}r}(hY]hZ]h[]h\]h_]uhaNhbhhc]r~(hç)r}r€(h?XnamehW}r(hY]hZ]h[]h\]h_]uh@j{hc]r‚hlXnamerƒ…r„}r…(h?Uh@jubahUhïubhç)r†}r‡(h?X socksVersionhW}rˆ(hY]hZ]h[]h\]h_]uh@j{hc]r‰hlX socksVersionrŠ…r‹}rŒ(h?Uh@j†ubahUhïubhç)r}rŽ(h?XaddrporthW}r(hY]hZ]h[]h\]h_]uh@j{hc]rhlXaddrportr‘…r’}r“(h?Uh@jubahUhïubhç)r”}r•(h?X args=NonehW}r–(hY]hZ]h[]h\]h_]uh@j{hc]r—hlX args=Noner˜…r™}rš(h?Uh@j”ubahUhïubhç)r›}rœ(h?X optArgs=NonehW}r(hY]hZ]h[]h\]h_]uh@j{hc]ržhlX optArgs=NonerŸ…r }r¡(h?Uh@j›ubahUhïubeubhð)r¢}r£(h?Uh@jchPNhUhóhW}r¤(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r¥h})r¦}r§(h?UhW}r¨(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/clientUrefidjkuh@j¢hc]r©hý)rª}r«(h?UhW}r¬(hY]hZ]r­jah[]h\]h_]uh@j¦hc]r®hlX[source]r¯…r°}r±(h?Uh@jªubahUjubahUhubaubeubhA)r²}r³(h?Uh@j]hPhÁhUj hW}r´(hY]hZ]h[]h\]h_]uhaNhbhhc]rµ(h¤)r¶}r·(h?X8Report that a client transport was launched succesfully.r¸h@j²hPXY/home/f/Computers/tor/pyptlib/pyptlib/client.py:docstring of pyptlib.client.reportSuccessr¹hUh¨hW}rº(hY]hZ]h[]h\]h_]uhaKhbhhc]r»hlX8Report that a client transport was launched succesfully.r¼…r½}r¾(h?j¸h@j¶ubaubh¤)r¿}rÀ(h?X7*Always call after successfully launching a transport.*rÁh@j²hPj¹hUh¨hW}rÂ(hY]hZ]h[]h\]h_]uhaKhbhhc]rÃj)rÄ}rÅ(h?jÁhW}rÆ(hY]hZ]h[]h\]h_]uh@j¿hc]rÇhlX5Always call after successfully launching a transport.rÈ…rÉ}rÊ(h?Uh@jÄubahUj#ubaubj$)rË}rÌ(h?Uh@j²hPNhUj'hW}rÍ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÎj*)rÏ}rÐ(h?UhW}rÑ(hY]hZ]h[]h\]h_]uh@jËhc]rÒ(j/)rÓ}rÔ(h?UhW}rÕ(hY]hZ]h[]h\]h_]uh@jÏhc]rÖhlX Parametersr×…rØ}rÙ(h?Uh@jÓubahUj7ubj8)rÚ}rÛ(h?UhW}rÜ(hY]hZ]h[]h\]h_]uh@jÏhc]rÝj)rÞ}rß(h?UhW}rà(hY]hZ]h[]h\]h_]uh@jÚhc]rá(j )râ}rã(h?UhW}rä(hY]hZ]h[]h\]h_]uh@jÞhc]råh¤)ræ}rç(h?UhW}rè(hY]hZ]h[]h\]h_]uh@jâhc]ré(jA)rê}rë(h?XnamehW}rì(hY]hZ]h[]h\]h_]uh@jæhc]ríhlXnamerî…rï}rð(h?Uh@jêubahUjIubhlX (rñ…rò}ró(h?Uh@jæubh})rô}rõ(h?UhW}rö(UreftypejPU reftargetXstrr÷U refdomainj`h\]h[]U refexplicit‰hY]hZ]h_]uh@jæhc]røj)rù}rú(h?j÷hW}rû(hY]hZ]h[]h\]h_]uh@jôhc]rühlXstrrý…rþ}rÿ(h?Uh@jùubahUj#ubahUhubhlX)…r}r(h?Uh@jæubhlX -- r…r}r(h?Uh@jæubhlXName of transport.r…r}r(h?XName of transport.h@jæubehUh¨ubahUj0ubj )r}r (h?UhW}r (hY]hZ]h[]h\]h_]uh@jÞhc]r h¤)r }r (h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]r(jA)r}r(h?X socksVersionhW}r(hY]hZ]h[]h\]h_]uh@j hc]rhlX socksVersionr…r}r(h?Uh@jubahUjIubhlX (r…r}r(h?Uh@j ubh})r}r(h?UhW}r(UreftypejPU reftargetXintrU refdomainj`h\]h[]U refexplicit‰hY]hZ]h_]uh@j hc]rj)r}r (h?jhW}r!(hY]hZ]h[]h\]h_]uh@jhc]r"hlXintr#…r$}r%(h?Uh@jubahUj#ubahUhubhlX)…r&}r'(h?Uh@j ubhlX -- r(…r)}r*(h?Uh@j ubhlXThe SOCKS protocol version.r+…r,}r-(h?XThe SOCKS protocol version.h@j ubehUh¨ubahUj0ubj )r.}r/(h?UhW}r0(hY]hZ]h[]h\]h_]uh@jÞhc]r1h¤)r2}r3(h?UhW}r4(hY]hZ]h[]h\]h_]uh@j.hc]r5(jA)r6}r7(h?XaddrporthW}r8(hY]hZ]h[]h\]h_]uh@j2hc]r9hlXaddrportr:…r;}r<(h?Uh@j6ubahUjIubhlX (r=…r>}r?(h?Uh@j2ubh})r@}rA(h?UhW}rB(UreftypejPU reftargetXtuplerCU refdomainj`h\]h[]U refexplicit‰hY]hZ]h_]uh@j2hc]rDj)rE}rF(h?jChW}rG(hY]hZ]h[]h\]h_]uh@j@hc]rHhlXtuplerI…rJ}rK(h?Uh@jEubahUj#ubahUhubhlX)…rL}rM(h?Uh@j2ubhlX -- rN…rO}rP(h?Uh@j2ubhlX>(addr,port) where this transport is listening for connections.rQ…rR}rS(h?X>(addr,port) where this transport is listening for connections.h@j2ubehUh¨ubahUj0ubj )rT}rU(h?UhW}rV(hY]hZ]h[]h\]h_]uh@jÞhc]rWh¤)rX}rY(h?UhW}rZ(hY]hZ]h[]h\]h_]uh@jThc]r[(jA)r\}r](h?XargshW}r^(hY]hZ]h[]h\]h_]uh@jXhc]r_hlXargsr`…ra}rb(h?Uh@j\ubahUjIubhlX (rc…rd}re(h?Uh@jXubh})rf}rg(h?UhW}rh(UreftypejPU reftargetXstrriU refdomainj`h\]h[]U refexplicit‰hY]hZ]h_]uh@jXhc]rjj)rk}rl(h?jihW}rm(hY]hZ]h[]h\]h_]uh@jfhc]rnhlXstrro…rp}rq(h?Uh@jkubahUj#ubahUhubhlX)…rr}rs(h?Uh@jXubhlX -- rt…ru}rv(h?Uh@jXubhlXARGS field for this transport.rw…rx}ry(h?XARGS field for this transport.h@jXubehUh¨ubahUj0ubj )rz}r{(h?UhW}r|(hY]hZ]h[]h\]h_]uh@jÞhc]r}h¤)r~}r(h?UhW}r€(hY]hZ]h[]h\]h_]uh@jzhc]r(jA)r‚}rƒ(h?XargshW}r„(hY]hZ]h[]h\]h_]uh@j~hc]r…hlXargsr†…r‡}rˆ(h?Uh@j‚ubahUjIubhlX -- r‰…rŠ}r‹(h?Uh@j~ubhlX"OPT-ARGS field for this transport.rŒ…r}rŽ(h?X"OPT-ARGS field for this transport.h@j~ubehUh¨ubahUj0ubehUjWubahUjbubehUjcubaubeubeubeubhK)r}r(h?Uh@hNhPhShUhVhW}r‘(hY]hZ]h[]h\]r’(Xmodule-pyptlib.client_configr“Uclient-config-moduler”eh_]r•hauhaK hbhhc]r–(he)r—}r˜(h?X:mod:`client_config` Moduler™h@jhPhShUhihW}rš(hY]hZ]h[]h\]h_]uhaK hbhhc]r›(h})rœ}r(h?X:mod:`client_config`ržh@j—hPhShUhhW}rŸ(UreftypeXmodhƒ‰h„X client_configU refdomainXpyr h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆNh‰j7uhaK hc]r¡h‹)r¢}r£(h?jžhW}r¤(hY]hZ]r¥(hj Xpy-modr¦eh[]h\]h_]uh@jœhc]r§hlX client_configr¨…r©}rª(h?Uh@j¢ubahUh–ubaubhlX Moduler«…r¬}r­(h?X Moduler®h@j—ubeubh›)r¯}r°(h?Uh@jhPhžhUhŸhW}r±(h\]h[]hY]hZ]h_]Uentries]r²(h¢Xpyptlib.client_config (module)Xmodule-pyptlib.client_configUtr³auhaKhbhhc]ubh¤)r´}rµ(h?X;Low-level parts of pyptlib that are only useful to clients.r¶h@jhPXY/home/f/Computers/tor/pyptlib/pyptlib/client_config.py:docstring of pyptlib.client_confighUh¨hW}r·(hY]hZ]h[]h\]h_]uhaKhbhhc]r¸hlX;Low-level parts of pyptlib that are only useful to clients.r¹…rº}r»(h?j¶h@j´ubaubh›)r¼}r½(h?Uh@jhPNhUhŸhW}r¾(h\]h[]hY]hZ]h_]Uentries]r¿(h¢X-ClientConfig (class in pyptlib.client_config)hUtrÀauhaNhbhhc]ubhD)rÁ}rÂ(h?Uh@jhPNhUhµhW}rÃ(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXclassrÄh¼jÄuhaNhbhhc]rÅ(h¾)rÆ}rÇ(h?XClientConfig()h@jÁhPhÁhUhÂhW}rÈ(h\]rÉhahÅhQXpyptlib.client_configrÊ…rË}rÌbh[]hY]hZ]h_]rÍhahÊX ClientConfigrÎhÌUh͉uhaNhbhhc]rÏ(csphinx.addnodes desc_annotation rÐ)rÑ}rÒ(h?Xclass h@jÆhPhÁhUUdesc_annotationrÓhW}rÔ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÕhlXclass rÖ…r×}rØ(h?Uh@jÑubaubhÏ)rÙ}rÚ(h?Xpyptlib.client_config.h@jÆhPhÁhUhÒhW}rÛ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÜhlXpyptlib.client_config.rÝ…rÞ}rß(h?Uh@jÙubaubhØ)rà}rá(h?jÎh@jÆhPhÁhUhÛhW}râ(hY]hZ]h[]h\]h_]uhaNhbhhc]rãhlX ClientConfigrä…rå}ræ(h?Uh@jàubaubhð)rç}rè(h?Uh@jÆhPNhUhóhW}ré(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rêh})rë}rì(h?UhW}rí(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/client_configUrefidjÎuh@jçhc]rîhý)rï}rð(h?UhW}rñ(hY]hZ]ròjah[]h\]h_]uh@jëhc]róhlX[source]rô…rõ}rö(h?Uh@jïubahUjubahUhubaubeubhA)r÷}rø(h?Uh@jÁhPhÁhUj hW}rù(hY]hZ]h[]h\]h_]uhaNhbhhc]rú(h¤)rû}rü(h?X%Bases: :class:`pyptlib.config.Config`h@j÷hPU rýhUh¨hW}rþ(hY]hZ]h[]h\]h_]uhaKhbhhc]rÿ(hlXBases: r…r}r(h?XBases: h@jûubh})r}r(h?X:class:`pyptlib.config.Config`rh@jûhPhShUhhW}r(UreftypeXclasshƒ‰h„Xpyptlib.config.ConfigU refdomainXpyrh\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjÎh‰Xpyptlib.client_configruhaK hc]r h‹)r }r (h?jhW}r (hY]hZ]r (hjXpy-classreh[]h\]h_]uh@jhc]rhlXpyptlib.config.Configr…r}r(h?Uh@j ubahUh–ubaubeubh¤)r}r(h?X$A client-side pyptlib configuration.rh@j÷hPXf/home/f/Computers/tor/pyptlib/pyptlib/client_config.py:docstring of pyptlib.client_config.ClientConfigrhUh¨hW}r(hY]hZ]h[]h\]h_]uhaKhbhhc]rhlX$A client-side pyptlib configuration.r…r}r(h?jh@jubaubj$)r}r(h?Uh@j÷hPNhUj'hW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rj*)r }r!(h?Uh@jhPjhUjchW}r"(hY]hZ]h[]h\]h_]uhaKhbhhc]r#(j/)r$}r%(h?XraiseshW}r&(hY]hZ]h[]h\]h_]uh@j hc]r'hlXRaises r(…r)}r*(h?Uh@j$ubahUj7ubj8)r+}r,(h?XN:class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. hW}r-(hY]hZ]h[]h\]h_]uh@j hc]r.h¤)r/}r0(h?XL:class:`pyptlib.config.EnvError` if environment was incomplete or corrupted.h@j+hPjhUh¨hW}r1(hY]hZ]h[]h\]h_]uhaKhc]r2(h})r3}r4(h?X :class:`pyptlib.config.EnvError`r5h@j/hPhShUhhW}r6(UreftypeXclasshƒ‰h„Xpyptlib.config.EnvErrorU refdomainXpyr7h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjÎh‰juhaKhc]r8h‹)r9}r:(h?j5hW}r;(hY]hZ]r<(hj7Xpy-classr=eh[]h\]h_]uh@j3hc]r>hlXpyptlib.config.EnvErrorr?…r@}rA(h?Uh@j9ubahUh–ubaubhlX, if environment was incomplete or corrupted.rB…rC}rD(h?X, if environment was incomplete or corrupted.h@j/ubeubahUjbubeubaubh›)rE}rF(h?Uh@j÷hPNhUhŸhW}rG(h\]h[]hY]hZ]h_]Uentries]rH(h¢XAgetClientTransports() (pyptlib.client_config.ClientConfig method)h0UtrIauhaNhbhhc]ubhD)rJ}rK(h?Uh@j÷hPNhUhµhW}rL(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodrMh¼jMuhaNhbhhc]rN(h¾)rO}rP(h?X"ClientConfig.getClientTransports()h@jJhPhÁhUhÂhW}rQ(h\]rRh0ahÅhQXpyptlib.client_configrS…rT}rUbh[]hY]hZ]h_]rVh0ahÊX ClientConfig.getClientTransportsrWhÌjÎh͉uhaNhbhhc]rX(hØ)rY}rZ(h?XgetClientTransportsh@jOhPhÁhUhÛhW}r[(hY]hZ]h[]h\]h_]uhaNhbhhc]r\hlXgetClientTransportsr]…r^}r_(h?Uh@jYubaubhá)r`}ra(h?Uh@jOhPhÁhUhähW}rb(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rc}rd(h?Uh@jOhPNhUhóhW}re(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rfh})rg}rh(h?UhW}ri(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/client_configUrefidjWuh@jchc]rjhý)rk}rl(h?UhW}rm(hY]hZ]rnjah[]h\]h_]uh@jghc]rohlX[source]rp…rq}rr(h?Uh@jkubahUjubahUhubaubeubhA)rs}rt(h?Uh@jJhPhÁhUj hW}ru(hY]hZ]h[]h\]h_]uhaNhbhhc]rv(h¤)rw}rx(h?XLReturn a list of strings representing the client transports reported by Tor.ryh@jshPXz/home/f/Computers/tor/pyptlib/pyptlib/client_config.py:docstring of pyptlib.client_config.ClientConfig.getClientTransportsrzhUh¨hW}r{(hY]hZ]h[]h\]h_]uhaKhbhhc]r|hlXLReturn a list of strings representing the client transports reported by Tor.r}…r~}r(h?jyh@jwubaubh¤)r€}r(h?XqIf present, the wildcard transport, '*', is stripped from this list and used to set allTransportsEnabled to True.h@jshPjzhUh¨hW}r‚(hY]hZ]h[]h\]h_]uhaKhbhhc]rƒhlXqIf present, the wildcard transport, '*', is stripped from this list and used to set allTransportsEnabled to True.r„…r…}r†(h?XqIf present, the wildcard transport, '*', is stripped from this list and used to set allTransportsEnabled to True.h@j€ubaubj$)r‡}rˆ(h?Uh@jshPNhUj'hW}r‰(hY]hZ]h[]h\]h_]uhaNhbhhc]rŠj*)r‹}rŒ(h?UhW}r(hY]hZ]h[]h\]h_]uh@j‡hc]rŽ(j/)r}r(h?UhW}r‘(hY]hZ]h[]h\]h_]uh@j‹hc]r’hlXReturnsr“…r”}r•(h?Uh@jubahUj7ubj8)r–}r—(h?UhW}r˜(hY]hZ]h[]h\]h_]uh@j‹hc]r™h¤)rš}r›(h?UhW}rœ(hY]hZ]h[]h\]h_]uh@j–hc]rhlXlist of transportsrž…rŸ}r (h?Xlist of transportsh@jšubahUh¨ubahUjbubehUjcubaubeubeubh›)r¡}r¢(h?Uh@j÷hPNhUhŸhW}r£(h\]h[]hY]hZ]h_]Uentries]r¤(h¢X9writeMethod() (pyptlib.client_config.ClientConfig method)h"Utr¥auhaNhbhhc]ubhD)r¦}r§(h?Uh@j÷hPNhUhµhW}r¨(h·‰h¸Xpyr©h\]h[]hY]hZ]h_]hºXmethodrªh¼jªuhaNhbhhc]r«(h¾)r¬}r­(h?XOClientConfig.writeMethod(name, socksVersion, addrport, args=None, optArgs=None)h@j¦hPhÁhUhÂhW}r®(h\]r¯h"ahÅhQXpyptlib.client_configr°…r±}r²bh[]hY]hZ]h_]r³h"ahÊXClientConfig.writeMethodr´hÌjÎh͉uhaNhbhhc]rµ(hØ)r¶}r·(h?X writeMethodh@j¬hPhÁhUhÛhW}r¸(hY]hZ]h[]h\]h_]uhaNhbhhc]r¹hlX writeMethodrº…r»}r¼(h?Uh@j¶ubaubhá)r½}r¾(h?Uh@j¬hPhÁhUhähW}r¿(hY]hZ]h[]h\]h_]uhaNhbhhc]rÀ(hç)rÁ}rÂ(h?XnamehW}rÃ(hY]hZ]h[]h\]h_]uh@j½hc]rÄhlXnamerÅ…rÆ}rÇ(h?Uh@jÁubahUhïubhç)rÈ}rÉ(h?X socksVersionhW}rÊ(hY]hZ]h[]h\]h_]uh@j½hc]rËhlX socksVersionrÌ…rÍ}rÎ(h?Uh@jÈubahUhïubhç)rÏ}rÐ(h?XaddrporthW}rÑ(hY]hZ]h[]h\]h_]uh@j½hc]rÒhlXaddrportrÓ…rÔ}rÕ(h?Uh@jÏubahUhïubhç)rÖ}r×(h?X args=NonehW}rØ(hY]hZ]h[]h\]h_]uh@j½hc]rÙhlX args=NonerÚ…rÛ}rÜ(h?Uh@jÖubahUhïubhç)rÝ}rÞ(h?X optArgs=NonehW}rß(hY]hZ]h[]h\]h_]uh@j½hc]ràhlX optArgs=Nonerá…râ}rã(h?Uh@jÝubahUhïubeubhð)rä}rå(h?Uh@j¬hPNhUhóhW}ræ(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rçh})rè}ré(h?UhW}rê(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/client_configUrefidj´uh@jähc]rëhý)rì}rí(h?UhW}rî(hY]hZ]rïjah[]h\]h_]uh@jèhc]rðhlX[source]rñ…rò}ró(h?Uh@jìubahUjubahUhubaubeubhA)rô}rõ(h?Uh@j¦hPhÁhUj hW}rö(hY]hZ]h[]h\]h_]uhaNhbhhc]r÷(h¤)rø}rù(h?XPWrite a message to stdout announcing that a transport was successfully launched.rúh@jôhPXr/home/f/Computers/tor/pyptlib/pyptlib/client_config.py:docstring of pyptlib.client_config.ClientConfig.writeMethodhUh¨hW}rû(hY]hZ]h[]h\]h_]uhaKhbhhc]rühlXPWrite a message to stdout announcing that a transport was successfully launched.rý…rþ}rÿ(h?júh@jøubaubj$)r}r(h?Uh@jôhPNhUj'hW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rj*)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]r(j/)r}r (h?UhW}r (hY]hZ]h[]h\]h_]uh@jhc]r hlX Parametersr …r }r(h?Uh@jubahUj7ubj8)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]rj)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]r(j )r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]rh¤)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]r(jA)r}r (h?XnamehW}r!(hY]hZ]h[]h\]h_]uh@jhc]r"hlXnamer#…r$}r%(h?Uh@jubahUjIubhlX (r&…r'}r((h?Uh@jubh})r)}r*(h?UhW}r+(UreftypejPU reftargetXstrr,U refdomainj©h\]h[]U refexplicit‰hY]hZ]h_]uh@jhc]r-j)r.}r/(h?j,hW}r0(hY]hZ]h[]h\]h_]uh@j)hc]r1hlXstrr2…r3}r4(h?Uh@j.ubahUj#ubahUhubhlX)…r5}r6(h?Uh@jubhlX -- r7…r8}r9(h?Uh@jubhlXName of transport.r:…r;}r<(h?XName of transport.h@jubehUh¨ubahUj0ubj )r=}r>(h?UhW}r?(hY]hZ]h[]h\]h_]uh@jhc]r@h¤)rA}rB(h?UhW}rC(hY]hZ]h[]h\]h_]uh@j=hc]rD(jA)rE}rF(h?X socksVersionhW}rG(hY]hZ]h[]h\]h_]uh@jAhc]rHhlX socksVersionrI…rJ}rK(h?Uh@jEubahUjIubhlX (rL…rM}rN(h?Uh@jAubh})rO}rP(h?UhW}rQ(UreftypejPU reftargetXintrRU refdomainj©h\]h[]U refexplicit‰hY]hZ]h_]uh@jAhc]rSj)rT}rU(h?jRhW}rV(hY]hZ]h[]h\]h_]uh@jOhc]rWhlXintrX…rY}rZ(h?Uh@jTubahUj#ubahUhubhlX)…r[}r\(h?Uh@jAubhlX -- r]…r^}r_(h?Uh@jAubhlXThe SOCKS protocol version.r`…ra}rb(h?XThe SOCKS protocol version.h@jAubehUh¨ubahUj0ubj )rc}rd(h?UhW}re(hY]hZ]h[]h\]h_]uh@jhc]rfh¤)rg}rh(h?UhW}ri(hY]hZ]h[]h\]h_]uh@jchc]rj(jA)rk}rl(h?XaddrporthW}rm(hY]hZ]h[]h\]h_]uh@jghc]rnhlXaddrportro…rp}rq(h?Uh@jkubahUjIubhlX (rr…rs}rt(h?Uh@jgubh})ru}rv(h?UhW}rw(UreftypejPU reftargetXtuplerxU refdomainj©h\]h[]U refexplicit‰hY]hZ]h_]uh@jghc]ryj)rz}r{(h?jxhW}r|(hY]hZ]h[]h\]h_]uh@juhc]r}hlXtupler~…r}r€(h?Uh@jzubahUj#ubahUhubhlX)…r}r‚(h?Uh@jgubhlX -- rƒ…r„}r…(h?Uh@jgubhlX>(addr,port) where this transport is listening for connections.r†…r‡}rˆ(h?X>(addr,port) where this transport is listening for connections.h@jgubehUh¨ubahUj0ubj )r‰}rŠ(h?UhW}r‹(hY]hZ]h[]h\]h_]uh@jhc]rŒh¤)r}rŽ(h?UhW}r(hY]hZ]h[]h\]h_]uh@j‰hc]r(jA)r‘}r’(h?XargshW}r“(hY]hZ]h[]h\]h_]uh@jhc]r”hlXargsr•…r–}r—(h?Uh@j‘ubahUjIubhlX (r˜…r™}rš(h?Uh@jubh})r›}rœ(h?UhW}r(UreftypejPU reftargetXstrržU refdomainj©h\]h[]U refexplicit‰hY]hZ]h_]uh@jhc]rŸj)r }r¡(h?jžhW}r¢(hY]hZ]h[]h\]h_]uh@j›hc]r£hlXstrr¤…r¥}r¦(h?Uh@j ubahUj#ubahUhubhlX)…r§}r¨(h?Uh@jubhlX -- r©…rª}r«(h?Uh@jubhlXARGS field for this transport.r¬…r­}r®(h?XARGS field for this transport.h@jubehUh¨ubahUj0ubj )r¯}r°(h?UhW}r±(hY]hZ]h[]h\]h_]uh@jhc]r²h¤)r³}r´(h?UhW}rµ(hY]hZ]h[]h\]h_]uh@j¯hc]r¶(jA)r·}r¸(h?XoptArgshW}r¹(hY]hZ]h[]h\]h_]uh@j³hc]rºhlXoptArgsr»…r¼}r½(h?Uh@j·ubahUjIubhlX (r¾…r¿}rÀ(h?Uh@j³ubh})rÁ}rÂ(h?UhW}rÃ(UreftypejPU reftargetXstrrÄU refdomainj©h\]h[]U refexplicit‰hY]hZ]h_]uh@j³hc]rÅj)rÆ}rÇ(h?jÄhW}rÈ(hY]hZ]h[]h\]h_]uh@jÁhc]rÉhlXstrrÊ…rË}rÌ(h?Uh@jÆubahUj#ubahUhubhlX)…rÍ}rÎ(h?Uh@j³ubhlX -- rÏ…rÐ}rÑ(h?Uh@j³ubhlX"OPT-ARGS field for this transport.rÒ…rÓ}rÔ(h?X"OPT-ARGS field for this transport.h@j³ubehUh¨ubahUj0ubehUjWubahUjbubehUjcubaubeubeubh›)rÕ}rÖ(h?Uh@j÷hPXu/home/f/Computers/tor/pyptlib/pyptlib/client_config.py:docstring of pyptlib.client_config.ClientConfig.writeMethodEndr×hUhŸhW}rØ(h\]h[]hY]hZ]h_]Uentries]rÙ(h¢X<writeMethodEnd() (pyptlib.client_config.ClientConfig method)h-UtrÚauhaNhbhhc]ubhD)rÛ}rÜ(h?Uh@j÷hPj×hUhµhW}rÝ(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodrÞh¼jÞuhaNhbhhc]rß(h¾)rà}rá(h?XClientConfig.writeMethodEnd()h@jÛhPhÁhUhÂhW}râ(h\]rãh-ahÅhQXpyptlib.client_configrä…rå}ræbh[]hY]hZ]h_]rçh-ahÊXClientConfig.writeMethodEndrèhÌjÎh͉uhaNhbhhc]ré(hØ)rê}rë(h?XwriteMethodEndh@jàhPhÁhUhÛhW}rì(hY]hZ]h[]h\]h_]uhaNhbhhc]ríhlXwriteMethodEndrî…rï}rð(h?Uh@jêubaubhá)rñ}rò(h?Uh@jàhPhÁhUhähW}ró(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rô}rõ(h?Uh@jàhPNhUhóhW}rö(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r÷h})rø}rù(h?UhW}rú(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/client_configUrefidjèuh@jôhc]rûhý)rü}rý(h?UhW}rþ(hY]hZ]rÿjah[]h\]h_]uh@jøhc]rhlX[source]r…r}r(h?Uh@jüubahUjubahUhubaubeubhA)r}r(h?Uh@jÛhPhÁhUj hW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rh¤)r}r (h?XLWrite a message to stdout announcing that we finished launching transports..r h@jhPj×hUh¨hW}r (hY]hZ]h[]h\]h_]uhaKhbhhc]r hlXLWrite a message to stdout announcing that we finished launching transports..r …r}r(h?j h@jubaubaubeubh›)r}r(h?Uh@j÷hPNhUhŸhW}r(h\]h[]hY]hZ]h_]Uentries]r(h¢X>writeMethodError() (pyptlib.client_config.ClientConfig method)hUtrauhaNhbhhc]ubhD)r}r(h?Uh@j÷hPNhUhµhW}r(h·‰h¸Xpyrh\]h[]hY]hZ]h_]hºXmethodrh¼juhaNhbhhc]r(h¾)r}r(h?X,ClientConfig.writeMethodError(name, message)h@jhPhÁhUhÂhW}r(h\]rhahÅhQXpyptlib.client_configr…r }r!bh[]hY]hZ]h_]r"hahÊXClientConfig.writeMethodErrorr#hÌjÎh͉uhaNhbhhc]r$(hØ)r%}r&(h?XwriteMethodErrorh@jhPhÁhUhÛhW}r'(hY]hZ]h[]h\]h_]uhaNhbhhc]r(hlXwriteMethodErrorr)…r*}r+(h?Uh@j%ubaubhá)r,}r-(h?Uh@jhPhÁhUhähW}r.(hY]hZ]h[]h\]h_]uhaNhbhhc]r/(hç)r0}r1(h?XnamehW}r2(hY]hZ]h[]h\]h_]uh@j,hc]r3hlXnamer4…r5}r6(h?Uh@j0ubahUhïubhç)r7}r8(h?XmessagehW}r9(hY]hZ]h[]h\]h_]uh@j,hc]r:hlXmessager;…r<}r=(h?Uh@j7ubahUhïubeubhð)r>}r?(h?Uh@jhPNhUhóhW}r@(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rAh})rB}rC(h?UhW}rD(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/client_configUrefidj#uh@j>hc]rEhý)rF}rG(h?UhW}rH(hY]hZ]rIjah[]h\]h_]uh@jBhc]rJhlX[source]rK…rL}rM(h?Uh@jFubahUjubahUhubaubeubhA)rN}rO(h?Uh@jhPhÁhUj hW}rP(hY]hZ]h[]h\]h_]uhaNhbhhc]rQ(h¤)rR}rS(h?XJWrite a message to stdout announcing that we failed to launch a transport.rTh@jNhPXw/home/f/Computers/tor/pyptlib/pyptlib/client_config.py:docstring of pyptlib.client_config.ClientConfig.writeMethodErrorhUh¨hW}rU(hY]hZ]h[]h\]h_]uhaKhbhhc]rVhlXJWrite a message to stdout announcing that we failed to launch a transport.rW…rX}rY(h?jTh@jRubaubj$)rZ}r[(h?Uh@jNhPNhUj'hW}r\(hY]hZ]h[]h\]h_]uhaNhbhhc]r]j*)r^}r_(h?UhW}r`(hY]hZ]h[]h\]h_]uh@jZhc]ra(j/)rb}rc(h?UhW}rd(hY]hZ]h[]h\]h_]uh@j^hc]rehlX Parametersrf…rg}rh(h?Uh@jbubahUj7ubj8)ri}rj(h?UhW}rk(hY]hZ]h[]h\]h_]uh@j^hc]rlj)rm}rn(h?UhW}ro(hY]hZ]h[]h\]h_]uh@jihc]rp(j )rq}rr(h?UhW}rs(hY]hZ]h[]h\]h_]uh@jmhc]rth¤)ru}rv(h?UhW}rw(hY]hZ]h[]h\]h_]uh@jqhc]rx(jA)ry}rz(h?XnamehW}r{(hY]hZ]h[]h\]h_]uh@juhc]r|hlXnamer}…r~}r(h?Uh@jyubahUjIubhlX (r€…r}r‚(h?Uh@juubh})rƒ}r„(h?UhW}r…(UreftypejPU reftargetXstrr†U refdomainjh\]h[]U refexplicit‰hY]hZ]h_]uh@juhc]r‡j)rˆ}r‰(h?j†hW}rŠ(hY]hZ]h[]h\]h_]uh@jƒhc]r‹hlXstrrŒ…r}rŽ(h?Uh@jˆubahUj#ubahUhubhlX)…r}r(h?Uh@juubhlX -- r‘…r’}r“(h?Uh@juubhlXName of transport.r”…r•}r–(h?XName of transport.h@juubehUh¨ubahUj0ubj )r—}r˜(h?UhW}r™(hY]hZ]h[]h\]h_]uh@jmhc]ršh¤)r›}rœ(h?UhW}r(hY]hZ]h[]h\]h_]uh@j—hc]rž(jA)rŸ}r (h?XmessagehW}r¡(hY]hZ]h[]h\]h_]uh@j›hc]r¢hlXmessager£…r¤}r¥(h?Uh@jŸubahUjIubhlX (r¦…r§}r¨(h?Uh@j›ubh})r©}rª(h?UhW}r«(UreftypejPU reftargetXstrr¬U refdomainjh\]h[]U refexplicit‰hY]hZ]h_]uh@j›hc]r­j)r®}r¯(h?j¬hW}r°(hY]hZ]h[]h\]h_]uh@j©hc]r±hlXstrr²…r³}r´(h?Uh@j®ubahUj#ubahUhubhlX)…rµ}r¶(h?Uh@j›ubhlX -- r·…r¸}r¹(h?Uh@j›ubhlXError message.rº…r»}r¼(h?XError message.h@j›ubehUh¨ubahUj0ubehUjWubahUjbubehUjcubaubeubeubeubeubeubhLhK)r½}r¾(h?Uh@hNhPhShUhVhW}r¿(hY]hZ]h[]h\]rÀ(Xmodule-pyptlib.serverrÁU server-modulerÂeh_]rÃh/auhaKhbhhc]rÄ(he)rÅ}rÆ(h?X:mod:`server` ModulerÇh@j½hPhShUhihW}rÈ(hY]hZ]h[]h\]h_]uhaKhbhhc]rÉ(h})rÊ}rË(h?X :mod:`server`rÌh@jÅhPhShUhhW}rÍ(UreftypeXmodhƒ‰h„XserverU refdomainXpyrÎh\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆNh‰Xpyptlib.configrÏuhaKhc]rÐh‹)rÑ}rÒ(h?jÌhW}rÓ(hY]hZ]rÔ(hjÎXpy-modrÕeh[]h\]h_]uh@jÊhc]rÖhlXserverr×…rØ}rÙ(h?Uh@jÑubahUh–ubaubhlX ModulerÚ…rÛ}rÜ(h?X ModulerÝh@jÅubeubh›)rÞ}rß(h?Uh@j½hPhžhUhŸhW}rà(h\]h[]hY]hZ]h_]Uentries]rá(h¢Xpyptlib.server (module)Xmodule-pyptlib.serverUtrâauhaKhbhhc]ubh¤)rã}rä(h?XPublic server-side pyptlib API.råh@j½hPXK/home/f/Computers/tor/pyptlib/pyptlib/server.py:docstring of pyptlib.serverræhUh¨hW}rç(hY]hZ]h[]h\]h_]uhaKhbhhc]rèhlXPublic server-side pyptlib API.ré…rê}rë(h?jåh@jãubaubh›)rì}rí(h?Uh@j½hPNhUhŸhW}rî(h\]h[]hY]hZ]h_]Uentries]rï(h¢X!init() (in module pyptlib.server)h'UtrðauhaNhbhhc]ubhD)rñ}rò(h?Uh@j½hPNhUhµhW}ró(h·‰h¸Xpyrôh\]h[]hY]hZ]h_]hºXfunctionrõh¼jõuhaNhbhhc]rö(h¾)r÷}rø(h?Xinit(supported_transports)h@jñhPhÁhUhÂhW}rù(h\]rúh'ahÅhQXpyptlib.serverrû…rü}rýbh[]hY]hZ]h_]rþh'ahÊXinitrÿhÌUh͉uhaNhbhhc]r(hÏ)r}r(h?Xpyptlib.server.h@j÷hPhÁhUhÒhW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rhlXpyptlib.server.r…r}r(h?Uh@jubaubhØ)r}r (h?jÿh@j÷hPhÁhUhÛhW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]r hlXinitr …r }r(h?Uh@jubaubhá)r}r(h?Uh@j÷hPhÁhUhähW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rhç)r}r(h?Xsupported_transportshW}r(hY]hZ]h[]h\]h_]uh@jhc]rhlXsupported_transportsr…r}r(h?Uh@jubahUhïubaubhð)r}r(h?Uh@j÷hPNhUhóhW}r(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rh})r}r(h?UhW}r (UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/serverUrefidjÿuh@jhc]r!hý)r"}r#(h?UhW}r$(hY]hZ]r%jah[]h\]h_]uh@jhc]r&hlX[source]r'…r(}r)(h?Uh@j"ubahUjubahUhubaubeubhA)r*}r+(h?Uh@jñhPhÁhUj hW}r,(hY]hZ]h[]h\]h_]uhaNhbhhc]r-(h¤)r.}r/(h?X)Bootstrap server-side managed-proxy mode.r0h@j*hPXP/home/f/Computers/tor/pyptlib/pyptlib/server.py:docstring of pyptlib.server.initr1hUh¨hW}r2(hY]hZ]h[]h\]h_]uhaKhbhhc]r3hlX)Bootstrap server-side managed-proxy mode.r4…r5}r6(h?j0h@j.ubaubh¤)r7}r8(h?X,*Call in the beginning of your application.*r9h@j*hPj1hUh¨hW}r:(hY]hZ]h[]h\]h_]uhaKhbhhc]r;j)r<}r=(h?j9hW}r>(hY]hZ]h[]h\]h_]uh@j7hc]r?hlX*Call in the beginning of your application.r@…rA}rB(h?Uh@j<ubahUj#ubaubj$)rC}rD(h?Uh@j*hPNhUj'hW}rE(hY]hZ]h[]h\]h_]uhaNhbhhc]rF(j*)rG}rH(h?UhW}rI(hY]hZ]h[]h\]h_]uh@jChc]rJ(j/)rK}rL(h?UhW}rM(hY]hZ]h[]h\]h_]uh@jGhc]rNhlX ParametersrO…rP}rQ(h?Uh@jKubahUj7ubj8)rR}rS(h?UhW}rT(hY]hZ]h[]h\]h_]uh@jGhc]rUh¤)rV}rW(h?UhW}rX(hY]hZ]h[]h\]h_]uh@jRhc]rY(jA)rZ}r[(h?Xsupported_transportshW}r\(hY]hZ]h[]h\]h_]uh@jVhc]r]hlXsupported_transportsr^…r_}r`(h?Uh@jZubahUjIubhlX (ra…rb}rc(h?Uh@jVubh})rd}re(h?UhW}rf(UreftypejPU reftargetXlistrgU refdomainjôh\]h[]U refexplicit‰hY]hZ]h_]uh@jVhc]rhj)ri}rj(h?jghW}rk(hY]hZ]h[]h\]h_]uh@jdhc]rlhlXlistrm…rn}ro(h?Uh@jiubahUj#ubahUhubhlX)…rp}rq(h?Uh@jVubhlX -- rr…rs}rt(h?Uh@jVubhlX6Names of the transports that the application supports.ru…rv}rw(h?X6Names of the transports that the application supports.rxh@jVubehUh¨ubahUjbubehUjcubj*)ry}rz(h?UhW}r{(hY]hZ]h[]h\]h_]uh@jChc]r|(j/)r}}r~(h?UhW}r(hY]hZ]h[]h\]h_]uh@jyhc]r€hlXReturnsr…r‚}rƒ(h?Uh@j}ubahUj7ubj8)r„}r…(h?UhW}r†(hY]hZ]h[]h\]h_]uh@jyhc]r‡h¤)rˆ}r‰(h?UhW}rŠ(hY]hZ]h[]h\]h_]uh@j„hc]r‹hlX9dictionary that contains information for the application:rŒ…r}rŽ(h?X9dictionary that contains information for the application:rh@jˆubahUh¨ubahUjbubehUjcubj*)r}r‘(h?Uh@jChPj1hUjchW}r’(hY]hZ]h[]h\]h_]uhaKhbhhc]r“(j/)r”}r•(h?XraiseshW}r–(hY]hZ]h[]h\]h_]uh@jhc]r—hlXRaises r˜…r™}rš(h?Uh@j”ubahUj7ubj8)r›}rœ(h?XL:class:`pyptlib.config.EnvError` if environment was incomplete or corrupted.rhW}rž(hY]hZ]h[]h\]h_]uh@jhc]rŸh¤)r }r¡(h?jh@j›hPj1hUh¨hW}r¢(hY]hZ]h[]h\]h_]uhaKhc]r£(h})r¤}r¥(h?X :class:`pyptlib.config.EnvError`r¦h@j hPhShUhhW}r§(UreftypeXclasshƒ‰h„Xpyptlib.config.EnvErrorU refdomainXpyr¨h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆNh‰Xpyptlib.serverr©uhaKhc]rªh‹)r«}r¬(h?j¦hW}r­(hY]hZ]r®(hj¨Xpy-classr¯eh[]h\]h_]uh@j¤hc]r°hlXpyptlib.config.EnvErrorr±…r²}r³(h?Uh@j«ubahUh–ubaubhlX, if environment was incomplete or corrupted.r´…rµ}r¶(h?X, if environment was incomplete or corrupted.h@j ubeubahUjbubeubeubeubeubh›)r·}r¸(h?Uh@j½hPXU/home/f/Computers/tor/pyptlib/pyptlib/server.py:docstring of pyptlib.server.reportEndr¹hUhŸhW}rº(h\]h[]hY]hZ]h_]Uentries]r»(h¢X&reportEnd() (in module pyptlib.server)hUtr¼auhaNhbhhc]ubhD)r½}r¾(h?Uh@j½hPj¹hUhµhW}r¿(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXfunctionrÀh¼jÀuhaNhbhhc]rÁ(h¾)rÂ}rÃ(h?X reportEnd()h@j½hPhÁhUhÂhW}rÄ(h\]rÅhahÅhQXpyptlib.serverrÆ…rÇ}rÈbh[]hY]hZ]h_]rÉhahÊX reportEndrÊhÌUh͉uhaNhbhhc]rË(hÏ)rÌ}rÍ(h?Xpyptlib.server.h@jÂhPhÁhUhÒhW}rÎ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÏhlXpyptlib.server.rÐ…rÑ}rÒ(h?Uh@jÌubaubhØ)rÓ}rÔ(h?jÊh@jÂhPhÁhUhÛhW}rÕ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÖhlX reportEndr×…rØ}rÙ(h?Uh@jÓubaubhá)rÚ}rÛ(h?Uh@jÂhPhÁhUhähW}rÜ(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rÝ}rÞ(h?Uh@jÂhPNhUhóhW}rß(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]ràh})rá}râ(h?UhW}rã(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/serverUrefidjÊuh@jÝhc]rähý)rå}ræ(h?UhW}rç(hY]hZ]rèjah[]h\]h_]uh@jáhc]réhlX[source]rê…rë}rì(h?Uh@jåubahUjubahUhubaubeubhA)rí}rî(h?Uh@j½hPhÁhUj hW}rï(hY]hZ]h[]h\]h_]uhaNhbhhc]rð(h¤)rñ}rò(h?X-Report that we are done launching transports.róh@jíhPj¹hUh¨hW}rô(hY]hZ]h[]h\]h_]uhaKhbhhc]rõhlX-Report that we are done launching transports.rö…r÷}rø(h?jóh@jñubaubh¤)rù}rú(h?XC*Call after you have launched all the transports you could launch.*rûh@jíhPj¹hUh¨hW}rü(hY]hZ]h[]h\]h_]uhaKhbhhc]rýj)rþ}rÿ(h?jûhW}r (hY]hZ]h[]h\]h_]uh@jùhc]r hlXACall after you have launched all the transports you could launch.r …r }r (h?Uh@jþubahUj#ubaubeubeubh›)r }r (h?Uh@j½hPNhUhŸhW}r (h\]h[]hY]hZ]h_]Uentries]r (h¢X*reportFailure() (in module pyptlib.server)hUtr auhaNhbhhc]ubhD)r }r (h?Uh@j½hPNhUhµhW}r (h·‰h¸Xpyr h\]h[]hY]hZ]h_]hºXfunctionr h¼j uhaNhbhhc]r (h¾)r }r (h?XreportFailure(name, message)h@j hPhÁhUhÂhW}r (h\]r hahÅhQXpyptlib.serverr …r }r bh[]hY]hZ]h_]r hahÊX reportFailurer hÌUh͉uhaNhbhhc]r (hÏ)r }r (h?Xpyptlib.server.h@j hPhÁhUhÒhW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]r hlXpyptlib.server.r …r }r (h?Uh@j ubaubhØ)r! }r" (h?j h@j hPhÁhUhÛhW}r# (hY]hZ]h[]h\]h_]uhaNhbhhc]r$ hlX reportFailurer% …r& }r' (h?Uh@j! ubaubhá)r( }r) (h?Uh@j hPhÁhUhähW}r* (hY]hZ]h[]h\]h_]uhaNhbhhc]r+ (hç)r, }r- (h?XnamehW}r. (hY]hZ]h[]h\]h_]uh@j( hc]r/ hlXnamer0 …r1 }r2 (h?Uh@j, ubahUhïubhç)r3 }r4 (h?XmessagehW}r5 (hY]hZ]h[]h\]h_]uh@j( hc]r6 hlXmessager7 …r8 }r9 (h?Uh@j3 ubahUhïubeubhð)r: }r; (h?Uh@j hPNhUhóhW}r< (Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r= h})r> }r? (h?UhW}r@ (UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/serverUrefidj uh@j: hc]rA hý)rB }rC (h?UhW}rD (hY]hZ]rE jah[]h\]h_]uh@j> hc]rF hlX[source]rG …rH }rI (h?Uh@jB ubahUjubahUhubaubeubhA)rJ }rK (h?Uh@j hPhÁhUj hW}rL (hY]hZ]h[]h\]h_]uhaNhbhhc]rM (h¤)rN }rO (h?X0Report that a server transport failed to launch.rP h@jJ hPXY/home/f/Computers/tor/pyptlib/pyptlib/server.py:docstring of pyptlib.server.reportFailurerQ hUh¨hW}rR (hY]hZ]h[]h\]h_]uhaKhbhhc]rS hlX0Report that a server transport failed to launch.rT …rU }rV (h?jP h@jN ubaubh¤)rW }rX (h?X2*Always call after failing to launch a transport.*rY h@jJ hPjQ hUh¨hW}rZ (hY]hZ]h[]h\]h_]uhaKhbhhc]r[ j)r\ }r] (h?jY hW}r^ (hY]hZ]h[]h\]h_]uh@jW hc]r_ hlX0Always call after failing to launch a transport.r` …ra }rb (h?Uh@j\ ubahUj#ubaubj$)rc }rd (h?Uh@jJ hPNhUj'hW}re (hY]hZ]h[]h\]h_]uhaNhbhhc]rf j*)rg }rh (h?UhW}ri (hY]hZ]h[]h\]h_]uh@jc hc]rj (j/)rk }rl (h?UhW}rm (hY]hZ]h[]h\]h_]uh@jg hc]rn hlX Parametersro …rp }rq (h?Uh@jk ubahUj7ubj8)rr }rs (h?UhW}rt (hY]hZ]h[]h\]h_]uh@jg hc]ru j)rv }rw (h?UhW}rx (hY]hZ]h[]h\]h_]uh@jr hc]ry (j )rz }r{ (h?UhW}r| (hY]hZ]h[]h\]h_]uh@jv hc]r} h¤)r~ }r (h?UhW}r€ (hY]hZ]h[]h\]h_]uh@jz hc]r (jA)r‚ }rƒ (h?XnamehW}r„ (hY]hZ]h[]h\]h_]uh@j~ hc]r… hlXnamer† …r‡ }rˆ (h?Uh@j‚ ubahUjIubhlX (r‰ …rŠ }r‹ (h?Uh@j~ ubh})rŒ }r (h?UhW}rŽ (UreftypejPU reftargetXstrr U refdomainj h\]h[]U refexplicit‰hY]hZ]h_]uh@j~ hc]r j)r‘ }r’ (h?j hW}r“ (hY]hZ]h[]h\]h_]uh@jŒ hc]r” hlXstrr• …r– }r— (h?Uh@j‘ ubahUj#ubahUhubhlX)…r˜ }r™ (h?Uh@j~ ubhlX -- rš …r› }rœ (h?Uh@j~ ubhlXName of transport.r …rž }rŸ (h?XName of transport.h@j~ ubehUh¨ubahUj0ubj )r  }r¡ (h?UhW}r¢ (hY]hZ]h[]h\]h_]uh@jv hc]r£ h¤)r¤ }r¥ (h?UhW}r¦ (hY]hZ]h[]h\]h_]uh@j  hc]r§ (jA)r¨ }r© (h?XmessagehW}rª (hY]hZ]h[]h\]h_]uh@j¤ hc]r« hlXmessager¬ …r­ }r® (h?Uh@j¨ ubahUjIubhlX (r¯ …r° }r± (h?Uh@j¤ ubh})r² }r³ (h?UhW}r´ (UreftypejPU reftargetXstrrµ U refdomainj h\]h[]U refexplicit‰hY]hZ]h_]uh@j¤ hc]r¶ j)r· }r¸ (h?jµ hW}r¹ (hY]hZ]h[]h\]h_]uh@j² hc]rº hlXstrr» …r¼ }r½ (h?Uh@j· ubahUj#ubahUhubhlX)…r¾ }r¿ (h?Uh@j¤ ubhlX -- rÀ …rÁ }r (h?Uh@j¤ ubhlXError message.rà …rÄ }rÅ (h?XError message.h@j¤ ubehUh¨ubahUj0ubehUjWubahUjbubehUjcubaubeubeubh›)rÆ }rÇ (h?Uh@j½hPNhUhŸhW}rÈ (h\]h[]hY]hZ]h_]Uentries]rÉ (h¢X*reportSuccess() (in module pyptlib.server)hUtrÊ auhaNhbhhc]ubhD)rË }rÌ (h?Uh@j½hPNhUhµhW}rÍ (h·‰h¸XpyrÎ h\]h[]hY]hZ]h_]hºXfunctionrÏ h¼jÏ uhaNhbhhc]rÐ (h¾)rÑ }rÒ (h?X&reportSuccess(name, addrport, options)h@jË hPhÁhUhÂhW}rÓ (h\]rÔ hahÅhQXpyptlib.serverrÕ …rÖ }r× bh[]hY]hZ]h_]rØ hahÊX reportSuccessrÙ hÌUh͉uhaNhbhhc]rÚ (hÏ)rÛ }rÜ (h?Xpyptlib.server.h@jÑ hPhÁhUhÒhW}rÝ (hY]hZ]h[]h\]h_]uhaNhbhhc]rÞ hlXpyptlib.server.rß …rà }rá (h?Uh@jÛ ubaubhØ)râ }rã (h?jÙ h@jÑ hPhÁhUhÛhW}rä (hY]hZ]h[]h\]h_]uhaNhbhhc]rå hlX reportSuccessræ …rç }rè (h?Uh@jâ ubaubhá)ré }rê (h?Uh@jÑ hPhÁhUhähW}rë (hY]hZ]h[]h\]h_]uhaNhbhhc]rì (hç)rí }rî (h?XnamehW}rï (hY]hZ]h[]h\]h_]uh@jé hc]rð hlXnamerñ …rò }ró (h?Uh@jí ubahUhïubhç)rô }rõ (h?XaddrporthW}rö (hY]hZ]h[]h\]h_]uh@jé hc]r÷ hlXaddrportrø …rù }rú (h?Uh@jô ubahUhïubhç)rû }rü (h?XoptionshW}rý (hY]hZ]h[]h\]h_]uh@jé hc]rþ hlXoptionsrÿ …r }r (h?Uh@jû ubahUhïubeubhð)r }r (h?Uh@jÑ hPNhUhóhW}r (Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r h})r }r (h?UhW}r (UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/serverUrefidjÙ uh@j hc]r hý)r }r (h?UhW}r (hY]hZ]r jah[]h\]h_]uh@j hc]r hlX[source]r …r }r (h?Uh@j ubahUjubahUhubaubeubhA)r }r (h?Uh@jË hPhÁhUj hW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]r (h¤)r }r (h?X8Report that a server transport was launched succesfully.r h@j hPXY/home/f/Computers/tor/pyptlib/pyptlib/server.py:docstring of pyptlib.server.reportSuccessr hUh¨hW}r (hY]hZ]h[]h\]h_]uhaKhbhhc]r hlX8Report that a server transport was launched succesfully.r …r }r (h?j h@j ubaubh¤)r }r (h?X7*Always call after successfully launching a transport.*r! h@j hPj hUh¨hW}r" (hY]hZ]h[]h\]h_]uhaKhbhhc]r# j)r$ }r% (h?j! hW}r& (hY]hZ]h[]h\]h_]uh@j hc]r' hlX5Always call after successfully launching a transport.r( …r) }r* (h?Uh@j$ ubahUj#ubaubj$)r+ }r, (h?Uh@j hPNhUj'hW}r- (hY]hZ]h[]h\]h_]uhaNhbhhc]r. j*)r/ }r0 (h?UhW}r1 (hY]hZ]h[]h\]h_]uh@j+ hc]r2 (j/)r3 }r4 (h?UhW}r5 (hY]hZ]h[]h\]h_]uh@j/ hc]r6 hlX Parametersr7 …r8 }r9 (h?Uh@j3 ubahUj7ubj8)r: }r; (h?UhW}r< (hY]hZ]h[]h\]h_]uh@j/ hc]r= j)r> }r? (h?UhW}r@ (hY]hZ]h[]h\]h_]uh@j: hc]rA (j )rB }rC (h?UhW}rD (hY]hZ]h[]h\]h_]uh@j> hc]rE h¤)rF }rG (h?UhW}rH (hY]hZ]h[]h\]h_]uh@jB hc]rI (jA)rJ }rK (h?XnamehW}rL (hY]hZ]h[]h\]h_]uh@jF hc]rM hlXnamerN …rO }rP (h?Uh@jJ ubahUjIubhlX (rQ …rR }rS (h?Uh@jF ubh})rT }rU (h?UhW}rV (UreftypejPU reftargetXstrrW U refdomainjÎ h\]h[]U refexplicit‰hY]hZ]h_]uh@jF hc]rX j)rY }rZ (h?jW hW}r[ (hY]hZ]h[]h\]h_]uh@jT hc]r\ hlXstrr] …r^ }r_ (h?Uh@jY ubahUj#ubahUhubhlX)…r` }ra (h?Uh@jF ubhlX -- rb …rc }rd (h?Uh@jF ubhlXName of transport.re …rf }rg (h?XName of transport.h@jF ubehUh¨ubahUj0ubj )rh }ri (h?UhW}rj (hY]hZ]h[]h\]h_]uh@j> hc]rk h¤)rl }rm (h?UhW}rn (hY]hZ]h[]h\]h_]uh@jh hc]ro (jA)rp }rq (h?XaddrporthW}rr (hY]hZ]h[]h\]h_]uh@jl hc]rs hlXaddrportrt …ru }rv (h?Uh@jp ubahUjIubhlX (rw …rx }ry (h?Uh@jl ubh})rz }r{ (h?UhW}r| (UreftypejPU reftargetXtupler} U refdomainjÎ h\]h[]U refexplicit‰hY]hZ]h_]uh@jl hc]r~ j)r }r€ (h?j} hW}r (hY]hZ]h[]h\]h_]uh@jz hc]r‚ hlXtuplerƒ …r„ }r… (h?Uh@j ubahUj#ubahUhubhlX)…r† }r‡ (h?Uh@jl ubhlX -- rˆ …r‰ }rŠ (h?Uh@jl ubhlX>(addr,port) where this transport is listening for connections.r‹ …rŒ }r (h?X>(addr,port) where this transport is listening for connections.h@jl ubehUh¨ubahUj0ubj )rŽ }r (h?UhW}r (hY]hZ]h[]h\]h_]uh@j> hc]r‘ h¤)r’ }r“ (h?UhW}r” (hY]hZ]h[]h\]h_]uh@jŽ hc]r• (jA)r– }r— (h?XoptionshW}r˜ (hY]hZ]h[]h\]h_]uh@j’ hc]r™ hlXoptionsrš …r› }rœ (h?Uh@j– ubahUjIubhlX (r …rž }rŸ (h?Uh@j’ ubh})r  }r¡ (h?UhW}r¢ (UreftypejPU reftargetXstrr£ U refdomainjÎ h\]h[]U refexplicit‰hY]hZ]h_]uh@j’ hc]r¤ j)r¥ }r¦ (h?j£ hW}r§ (hY]hZ]h[]h\]h_]uh@j  hc]r¨ hlXstrr© …rª }r« (h?Uh@j¥ ubahUj#ubahUhubhlX)…r¬ }r­ (h?Uh@j’ ubhlX -- r® …r¯ }r° (h?Uh@j’ ubhlXTransport options.r± …r² }r³ (h?XTransport options.h@j’ ubehUh¨ubahUj0ubehUjWubahUjbubehUjcubaubeubeubeubhK)r´ }rµ (h?Uh@hNhPhShUhVhW}r¶ (hY]hZ]h[]h\]r· (Xmodule-pyptlib.server_configr¸ Userver-config-moduler¹ eh_]rº h auhaK%hbhhc]r» (he)r¼ }r½ (h?X:mod:`server_config` Moduler¾ h@j´ hPhShUhihW}r¿ (hY]hZ]h[]h\]h_]uhaK%hbhhc]rÀ (h})rÁ }r (h?X:mod:`server_config`rà h@j¼ hPhShUhhW}rÄ (UreftypeXmodhƒ‰h„X server_configU refdomainXpyrÅ h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆNh‰j©uhaK$hc]rÆ h‹)rÇ }rÈ (h?jà hW}rÉ (hY]hZ]rÊ (hjÅ Xpy-modrË eh[]h\]h_]uh@jÁ hc]rÌ hlX server_configrÍ …rÎ }rÏ (h?Uh@jÇ ubahUh–ubaubhlX ModulerÐ …rÑ }rÒ (h?X ModulerÓ h@j¼ ubeubh›)rÔ }rÕ (h?Uh@j´ hPhžhUhŸhW}rÖ (h\]h[]hY]hZ]h_]Uentries]r× (h¢Xpyptlib.server_config (module)Xmodule-pyptlib.server_configUtrØ auhaKhbhhc]ubh¤)rÙ }rÚ (h?X;Low-level parts of pyptlib that are only useful to servers.rÛ h@j´ hPXY/home/f/Computers/tor/pyptlib/pyptlib/server_config.py:docstring of pyptlib.server_configrÜ hUh¨hW}rÝ (hY]hZ]h[]h\]h_]uhaKhbhhc]rÞ hlX;Low-level parts of pyptlib that are only useful to servers.rß …rà }rá (h?jÛ h@jÙ ubaubh›)râ }rã (h?Uh@j´ hPNhUhŸhW}rä (h\]h[]hY]hZ]h_]Uentries]rå (h¢X-ServerConfig (class in pyptlib.server_config)h6Utræ auhaNhbhhc]ubhD)rç }rè (h?Uh@j´ hPNhUhµhW}ré (h·‰h¸Xpyrê h\]h[]hY]hZ]h_]hºXclassrë h¼jë uhaNhbhhc]rì (h¾)rí }rî (h?XServerConfig()rï h@jç hPhÁhUhÂhW}rð (h\]rñ h6ahÅhQXpyptlib.server_configrò …ró }rô bh[]hY]hZ]h_]rõ h6ahÊX ServerConfigrö hÌUh͉uhaNhbhhc]r÷ (jÐ)rø }rù (h?Xclass h@jí hPhÁhUjÓhW}rú (hY]hZ]h[]h\]h_]uhaNhbhhc]rû hlXclass rü …rý }rþ (h?Uh@jø ubaubhÏ)rÿ }r (h?Xpyptlib.server_config.h@jí hPhÁhUhÒhW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]r hlXpyptlib.server_config.r …r }r (h?Uh@jÿ ubaubhØ)r }r (h?jö h@jí hPhÁhUhÛhW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]r hlX ServerConfigr …r }r (h?Uh@j ubaubhð)r }r (h?Uh@jí hPNhUhóhW}r (Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r h})r }r (h?UhW}r (UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidjö uh@j hc]r hý)r }r (h?UhW}r (hY]hZ]r jah[]h\]h_]uh@j hc]r hlX[source]r …r }r (h?Uh@j ubahUjubahUhubaubeubhA)r }r (h?Uh@jç hPhÁhUj hW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]r (h¤)r! }r" (h?X%Bases: :class:`pyptlib.config.Config`r# h@j hPjýhUh¨hW}r$ (hY]hZ]h[]h\]h_]uhaKhbhhc]r% (hlXBases: r& …r' }r( (h?XBases: h@j! ubh})r) }r* (h?X:class:`pyptlib.config.Config`r+ h@j! hPhShUhhW}r, (UreftypeXclasshƒ‰h„Xpyptlib.config.ConfigU refdomainXpyr- h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjö h‰Xpyptlib.server_configr. uhaK hc]r/ h‹)r0 }r1 (h?j+ hW}r2 (hY]hZ]r3 (hj- Xpy-classr4 eh[]h\]h_]uh@j) hc]r5 hlXpyptlib.config.Configr6 …r7 }r8 (h?Uh@j0 ubahUh–ubaubeubh¤)r9 }r: (h?X$A client-side pyptlib configuration.r; h@j hPXf/home/f/Computers/tor/pyptlib/pyptlib/server_config.py:docstring of pyptlib.server_config.ServerConfigr< hUh¨hW}r= (hY]hZ]h[]h\]h_]uhaKhbhhc]r> hlX$A client-side pyptlib configuration.r? …r@ }rA (h?j; h@j9 ubaubj$)rB }rC (h?Uh@j hPNhUj'hW}rD (hY]hZ]h[]h\]h_]uhaNhbhhc]rE (j*)rF }rG (h?UhW}rH (hY]hZ]h[]h\]h_]uh@jB hc]rI (j/)rJ }rK (h?UhW}rL (hY]hZ]h[]h\]h_]uh@jF hc]rM hlX VariablesrN …rO }rP (h?Uh@jJ ubahUj7ubj8)rQ }rR (h?UhW}rS (hY]hZ]h[]h\]h_]uh@jF hc]rT j)rU }rV (h?UhW}rW (hY]hZ]h[]h\]h_]uh@jQ hc]rX (j )rY }rZ (h?UhW}r[ (hY]hZ]h[]h\]h_]uh@jU hc]r\ h¤)r] }r^ (h?UhW}r_ (hY]hZ]h[]h\]h_]uh@jY hc]r` (h})ra }rb (h?UhW}rc (UreftypejPU reftargetXORPortrd U refdomainjê h\]h[]U refexplicit‰hY]hZ]h_]uh@j] hc]re jA)rf }rg (h?jd hW}rh (hY]hZ]h[]h\]h_]uh@ja hc]ri hlXORPortrj …rk }rl (h?Uh@jf ubahUjIubahUhubhlX (rm …rn }ro (h?Uh@j] ubh})rp }rq (h?UhW}rr (UreftypejPU reftargetXtuplers U refdomainjê h\]h[]U refexplicit‰hY]hZ]h_]uh@j] hc]rt j)ru }rv (h?js hW}rw (hY]hZ]h[]h\]h_]uh@jp hc]rx hlXtuplery …rz }r{ (h?Uh@ju ubahUj#ubahUhubhlX)…r| }r} (h?Uh@j] ubhlX -- r~ …r }r€ (h?Uh@j] ubhlX#(ip,port) pointing to Tor's ORPort.r …r‚ }rƒ (h?X#(ip,port) pointing to Tor's ORPort.r„ h@j] ubehUh¨ubahUj0ubj )r… }r† (h?UhW}r‡ (hY]hZ]h[]h\]h_]uh@jU hc]rˆ h¤)r‰ }rŠ (h?UhW}r‹ (hY]hZ]h[]h\]h_]uh@j… hc]rŒ (h})r }rŽ (h?UhW}r (UreftypejPU reftargetXextendedORPortr U refdomainjê h\]h[]U refexplicit‰hY]hZ]h_]uh@j‰ hc]r‘ jA)r’ }r“ (h?j hW}r” (hY]hZ]h[]h\]h_]uh@j hc]r• hlXextendedORPortr– …r— }r˜ (h?Uh@j’ ubahUjIubahUhubhlX (r™ …rš }r› (h?Uh@j‰ ubh})rœ }r (h?UhW}rž (UreftypejPU reftargetXtuplerŸ U refdomainjê h\]h[]U refexplicit‰hY]hZ]h_]uh@j‰ hc]r  j)r¡ }r¢ (h?jŸ hW}r£ (hY]hZ]h[]h\]h_]uh@jœ hc]r¤ hlXtupler¥ …r¦ }r§ (h?Uh@j¡ ubahUj#ubahUhubhlX)…r¨ }r© (h?Uh@j‰ ubhlX -- rª …r« }r¬ (h?Uh@j‰ ubhlXV(ip,port) pointing to Tor's Extended ORPort. None if Extended ORPort is not supported.r­ …r® }r¯ (h?XV(ip,port) pointing to Tor's Extended ORPort. None if Extended ORPort is not supported.r° h@j‰ ubehUh¨ubahUj0ubj )r± }r² (h?UhW}r³ (hY]hZ]h[]h\]h_]uh@jU hc]r´ h¤)rµ }r¶ (h?UhW}r· (hY]hZ]h[]h\]h_]uh@j± hc]r¸ (h})r¹ }rº (h?UhW}r» (UreftypejPU reftargetXserverBindAddrr¼ U refdomainjê h\]h[]U refexplicit‰hY]hZ]h_]uh@jµ hc]r½ jA)r¾ }r¿ (h?j¼ hW}rÀ (hY]hZ]h[]h\]h_]uh@j¹ hc]rÁ hlXserverBindAddrr …rà }rÄ (h?Uh@j¾ ubahUjIubahUhubhlX (rÅ …rÆ }rÇ (h?Uh@jµ ubh})rÈ }rÉ (h?UhW}rÊ (UreftypejPU reftargetXdictrË U refdomainjê h\]h[]U refexplicit‰hY]hZ]h_]uh@jµ hc]rÌ j)rÍ }rÎ (h?jË hW}rÏ (hY]hZ]h[]h\]h_]uh@jÈ hc]rÐ hlXdictrÑ …rÒ }rÓ (h?Uh@jÍ ubahUj#ubahUhubhlX)…rÔ }rÕ (h?Uh@jµ ubhlX -- rÖ …r× }rØ (h?Uh@jµ ubhlXéA dictionary { : [, ]}, where is the name of the transport that must be spawned, and [, ] is a list containing the location where that transport should bind. The dictionary can be empty.rÙ …rÚ }rÛ (h?XéA dictionary { : [, ]}, where is the name of the transport that must be spawned, and [, ] is a list containing the location where that transport should bind. The dictionary can be empty.rÜ h@jµ ubehUh¨ubahUj0ubj )rÝ }rÞ (h?UhW}rß (hY]hZ]h[]h\]h_]uh@jU hc]rà h¤)rá }râ (h?UhW}rã (hY]hZ]h[]h\]h_]uh@jÝ hc]rä (h})rå }ræ (h?UhW}rç (UreftypejPU reftargetXauthCookieFilerè U refdomainjê h\]h[]U refexplicit‰hY]hZ]h_]uh@já hc]ré jA)rê }rë (h?jè hW}rì (hY]hZ]h[]h\]h_]uh@jå hc]rí hlXauthCookieFilerî …rï }rð (h?Uh@jê ubahUjIubahUhubhlX (rñ …rò }ró (h?Uh@já ubh})rô }rõ (h?UhW}rö (UreftypejPU reftargetXstringr÷ U refdomainjê h\]h[]U refexplicit‰hY]hZ]h_]uh@já hc]rø j)rù }rú (h?j÷ hW}rû (hY]hZ]h[]h\]h_]uh@jô hc]rü hlXstringrý …rþ }rÿ (h?Uh@jù ubahUj#ubahUhubhlX)…r }r (h?Uh@já ubhlX -- r …r }r (h?Uh@já ubhlX›String representing the filesystem path where the Extended ORPort Authentication cookie is stored. None if Extended ORPort authentication is not supported.r …r }r (h?X›String representing the filesystem path where the Extended ORPort Authentication cookie is stored. None if Extended ORPort authentication is not supported.r h@já ubehUh¨ubahUj0ubehUjWubahUjbubehUjcubj*)r }r (h?Uh@jB hPj< hUjchW}r (hY]hZ]h[]h\]h_]uhaKhbhhc]r (j/)r }r (h?XraiseshW}r (hY]hZ]h[]h\]h_]uh@j hc]r hlXRaises r …r }r (h?Uh@j ubahUj7ubj8)r }r (h?XN:class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. hW}r (hY]hZ]h[]h\]h_]uh@j hc]r h¤)r }r (h?XL:class:`pyptlib.config.EnvError` if environment was incomplete or corrupted.h@j hPj< hUh¨hW}r (hY]hZ]h[]h\]h_]uhaKhc]r (h})r }r (h?X :class:`pyptlib.config.EnvError`r h@j hPhShUhhW}r (UreftypeXclasshƒ‰h„Xpyptlib.config.EnvErrorU refdomainXpyr h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjö h‰j. uhaKhc]r! h‹)r" }r# (h?j hW}r$ (hY]hZ]r% (hj Xpy-classr& eh[]h\]h_]uh@j hc]r' hlXpyptlib.config.EnvErrorr( …r) }r* (h?Uh@j" ubahUh–ubaubhlX, if environment was incomplete or corrupted.r+ …r, }r- (h?X, if environment was incomplete or corrupted.h@j ubeubahUjbubeubeubh›)r. }r/ (h?Uh@j hPNhUhŸhW}r0 (h\]h[]hY]hZ]h_]Uentries]r1 (h¢X?getAuthCookieFile() (pyptlib.server_config.ServerConfig method)h2Utr2 auhaNhbhhc]ubhD)r3 }r4 (h?Uh@j hPNhUhµhW}r5 (h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodr6 h¼j6 uhaNhbhhc]r7 (h¾)r8 }r9 (h?X ServerConfig.getAuthCookieFile()h@j3 hPhÁhUhÂhW}r: (h\]r; h2ahÅhQXpyptlib.server_configr< …r= }r> bh[]hY]hZ]h_]r? h2ahÊXServerConfig.getAuthCookieFiler@ hÌjö h͉uhaNhbhhc]rA (hØ)rB }rC (h?XgetAuthCookieFileh@j8 hPhÁhUhÛhW}rD (hY]hZ]h[]h\]h_]uhaNhbhhc]rE hlXgetAuthCookieFilerF …rG }rH (h?Uh@jB ubaubhá)rI }rJ (h?Uh@j8 hPhÁhUhähW}rK (hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rL }rM (h?Uh@j8 hPNhUhóhW}rN (Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rO h})rP }rQ (h?UhW}rR (UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidj@ uh@jL hc]rS hý)rT }rU (h?UhW}rV (hY]hZ]rW jah[]h\]h_]uh@jP hc]rX hlX[source]rY …rZ }r[ (h?Uh@jT ubahUjubahUhubaubeubhA)r\ }r] (h?Uh@j3 hPhÁhUj hW}r^ (hY]hZ]h[]h\]h_]uhaNhbhhc]r_ j$)r` }ra (h?Uh@j\ hPNhUj'hW}rb (hY]hZ]h[]h\]h_]uhaNhbhhc]rc j*)rd }re (h?UhW}rf (hY]hZ]h[]h\]h_]uh@j` hc]rg (j/)rh }ri (h?UhW}rj (hY]hZ]h[]h\]h_]uh@jd hc]rk hlXReturnsrl …rm }rn (h?Uh@jh ubahUj7ubj8)ro }rp (h?UhW}rq (hY]hZ]h[]h\]h_]uh@jd hc]rr h¤)rs }rt (h?UhW}ru (hY]hZ]h[]h\]h_]uh@jo hc]rv h})rw }rx (h?X9:attr:`pyptlib.server_config.ServerConfig.authCookieFile`ry h@js hPhShUhhW}rz (UreftypeXattrhƒ‰h„X1pyptlib.server_config.ServerConfig.authCookieFileU refdomainXpyr{ h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjö h‰j. uhaKhc]r| h‹)r} }r~ (h?jy hW}r (hY]hZ]r€ (hj{ Xpy-attrr eh[]h\]h_]uh@jw hc]r‚ hlX1pyptlib.server_config.ServerConfig.authCookieFilerƒ …r„ }r… (h?Uh@j} ubahUh–ubaubahUh¨ubahUjbubehUjcubaubaubeubh›)r† }r‡ (h?Uh@j hPNhUhŸhW}rˆ (h\]h[]hY]hZ]h_]Uentries]r‰ (h¢X?getExtendedORPort() (pyptlib.server_config.ServerConfig method)h&UtrŠ auhaNhbhhc]ubhD)r‹ }rŒ (h?Uh@j hPNhUhµhW}r (h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodrŽ h¼jŽ uhaNhbhhc]r (h¾)r }r‘ (h?X ServerConfig.getExtendedORPort()h@j‹ hPhÁhUhÂhW}r’ (h\]r“ h&ahÅhQXpyptlib.server_configr” …r• }r– bh[]hY]hZ]h_]r— h&ahÊXServerConfig.getExtendedORPortr˜ hÌjö h͉uhaNhbhhc]r™ (hØ)rš }r› (h?XgetExtendedORPorth@j hPhÁhUhÛhW}rœ (hY]hZ]h[]h\]h_]uhaNhbhhc]r hlXgetExtendedORPortrž …rŸ }r  (h?Uh@jš ubaubhá)r¡ }r¢ (h?Uh@j hPhÁhUhähW}r£ (hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)r¤ }r¥ (h?Uh@j hPNhUhóhW}r¦ (Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r§ h})r¨ }r© (h?UhW}rª (UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidj˜ uh@j¤ hc]r« hý)r¬ }r­ (h?UhW}r® (hY]hZ]r¯ jah[]h\]h_]uh@j¨ hc]r° hlX[source]r± …r² }r³ (h?Uh@j¬ ubahUjubahUhubaubeubhA)r´ }rµ (h?Uh@j‹ hPhÁhUj hW}r¶ (hY]hZ]h[]h\]h_]uhaNhbhhc]r· j$)r¸ }r¹ (h?Uh@j´ hPNhUj'hW}rº (hY]hZ]h[]h\]h_]uhaNhbhhc]r» j*)r¼ }r½ (h?UhW}r¾ (hY]hZ]h[]h\]h_]uh@j¸ hc]r¿ (j/)rÀ }rÁ (h?UhW}r (hY]hZ]h[]h\]h_]uh@j¼ hc]rà hlXReturnsrÄ …rÅ }rÆ (h?Uh@jÀ ubahUj7ubj8)rÇ }rÈ (h?UhW}rÉ (hY]hZ]h[]h\]h_]uh@j¼ hc]rÊ h¤)rË }rÌ (h?UhW}rÍ (hY]hZ]h[]h\]h_]uh@jÇ hc]rÎ h})rÏ }rÐ (h?X9:attr:`pyptlib.server_config.ServerConfig.extendedORPort`rÑ h@jË hPhShUhhW}rÒ (UreftypeXattrhƒ‰h„X1pyptlib.server_config.ServerConfig.extendedORPortU refdomainXpyrÓ h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjö h‰j. uhaK hc]rÔ h‹)rÕ }rÖ (h?jÑ hW}r× (hY]hZ]rØ (hjÓ Xpy-attrrÙ eh[]h\]h_]uh@jÏ hc]rÚ hlX1pyptlib.server_config.ServerConfig.extendedORPortrÛ …rÜ }rÝ (h?Uh@jÕ ubahUh–ubaubahUh¨ubahUjbubehUjcubaubaubeubh›)rÞ }rß (h?Uh@j hPNhUhŸhW}rà (h\]h[]hY]hZ]h_]Uentries]rá (h¢X7getORPort() (pyptlib.server_config.ServerConfig method)h%Utrâ auhaNhbhhc]ubhD)rã }rä (h?Uh@j hPNhUhµhW}rå (h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodræ h¼jæ uhaNhbhhc]rç (h¾)rè }ré (h?XServerConfig.getORPort()h@jã hPhÁhUhÂhW}rê (h\]rë h%ahÅhQXpyptlib.server_configrì …rí }rî bh[]hY]hZ]h_]rï h%ahÊXServerConfig.getORPortrð hÌjö h͉uhaNhbhhc]rñ (hØ)rò }ró (h?X getORPorth@jè hPhÁhUhÛhW}rô (hY]hZ]h[]h\]h_]uhaNhbhhc]rõ hlX getORPortrö …r÷ }rø (h?Uh@jò ubaubhá)rù }rú (h?Uh@jè hPhÁhUhähW}rû (hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rü }rý (h?Uh@jè hPNhUhóhW}rþ (Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rÿ h})r }r (h?UhW}r (UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidjð uh@jü hc]r hý)r }r (h?UhW}r (hY]hZ]r jah[]h\]h_]uh@j hc]r hlX[source]r …r }r (h?Uh@j ubahUjubahUhubaubeubhA)r }r (h?Uh@jã hPhÁhUj hW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]r j$)r }r (h?Uh@j hPNhUj'hW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]r j*)r }r (h?UhW}r (hY]hZ]h[]h\]h_]uh@j hc]r (j/)r }r (h?UhW}r (hY]hZ]h[]h\]h_]uh@j hc]r hlXReturnsr …r }r (h?Uh@j ubahUj7ubj8)r }r (h?UhW}r! (hY]hZ]h[]h\]h_]uh@j hc]r" h¤)r# }r$ (h?UhW}r% (hY]hZ]h[]h\]h_]uh@j hc]r& h})r' }r( (h?X1:attr:`pyptlib.server_config.ServerConfig.ORPort`r) h@j# hPhShUhhW}r* (UreftypeXattrhƒ‰h„X)pyptlib.server_config.ServerConfig.ORPortU refdomainXpyr+ h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjö h‰j. uhaK'hc]r, h‹)r- }r. (h?j) hW}r/ (hY]hZ]r0 (hj+ Xpy-attrr1 eh[]h\]h_]uh@j' hc]r2 hlX)pyptlib.server_config.ServerConfig.ORPortr3 …r4 }r5 (h?Uh@j- ubahUh–ubaubahUh¨ubahUjbubehUjcubaubaubeubh›)r6 }r7 (h?Uh@j hPNhUhŸhW}r8 (h\]h[]hY]hZ]h_]Uentries]r9 (h¢XDgetServerBindAddresses() (pyptlib.server_config.ServerConfig method)hUtr: auhaNhbhhc]ubhD)r; }r< (h?Uh@j hPNhUhµhW}r= (h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodr> h¼j> uhaNhbhhc]r? (h¾)r@ }rA (h?X%ServerConfig.getServerBindAddresses()h@j; hPhÁhUhÂhW}rB (h\]rC hahÅhQXpyptlib.server_configrD …rE }rF bh[]hY]hZ]h_]rG hahÊX#ServerConfig.getServerBindAddressesrH hÌjö h͉uhaNhbhhc]rI (hØ)rJ }rK (h?XgetServerBindAddressesh@j@ hPhÁhUhÛhW}rL (hY]hZ]h[]h\]h_]uhaNhbhhc]rM hlXgetServerBindAddressesrN …rO }rP (h?Uh@jJ ubaubhá)rQ }rR (h?Uh@j@ hPhÁhUhähW}rS (hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rT }rU (h?Uh@j@ hPNhUhóhW}rV (Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rW h})rX }rY (h?UhW}rZ (UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidjH uh@jT hc]r[ hý)r\ }r] (h?UhW}r^ (hY]hZ]r_ jah[]h\]h_]uh@jX hc]r` hlX[source]ra …rb }rc (h?Uh@j\ ubahUjubahUhubaubeubhA)rd }re (h?Uh@j; hPhÁhUj hW}rf (hY]hZ]h[]h\]h_]uhaNhbhhc]rg j$)rh }ri (h?Uh@jd hPNhUj'hW}rj (hY]hZ]h[]h\]h_]uhaNhbhhc]rk j*)rl }rm (h?UhW}rn (hY]hZ]h[]h\]h_]uh@jh hc]ro (j/)rp }rq (h?UhW}rr (hY]hZ]h[]h\]h_]uh@jl hc]rs hlXReturnsrt …ru }rv (h?Uh@jp ubahUj7ubj8)rw }rx (h?UhW}ry (hY]hZ]h[]h\]h_]uh@jl hc]rz h¤)r{ }r| (h?UhW}r} (hY]hZ]h[]h\]h_]uh@jw hc]r~ h})r }r€ (h?X9:attr:`pyptlib.server_config.ServerConfig.serverBindAddr`r h@j{ hPhShUhhW}r‚ (UreftypeXattrhƒ‰h„X1pyptlib.server_config.ServerConfig.serverBindAddrU refdomainXpyrƒ h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjö h‰j. uhaK.hc]r„ h‹)r… }r† (h?j hW}r‡ (hY]hZ]rˆ (hjƒ Xpy-attrr‰ eh[]h\]h_]uh@j hc]rŠ hlX1pyptlib.server_config.ServerConfig.serverBindAddrr‹ …rŒ }r (h?Uh@j… ubahUh–ubaubahUh¨ubahUjbubehUjcubaubaubeubh›)rŽ }r (h?Uh@j hPNhUhŸhW}r (h\]h[]hY]hZ]h_]Uentries]r‘ (h¢XAgetServerTransports() (pyptlib.server_config.ServerConfig method)h#Utr’ auhaNhbhhc]ubhD)r“ }r” (h?Uh@j hPNhUhµhW}r• (h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodr– h¼j– uhaNhbhhc]r— (h¾)r˜ }r™ (h?X"ServerConfig.getServerTransports()h@j“ hPhÁhUhÂhW}rš (h\]r› h#ahÅhQXpyptlib.server_configrœ …r }rž bh[]hY]hZ]h_]rŸ h#ahÊX ServerConfig.getServerTransportsr  hÌjö h͉uhaNhbhhc]r¡ (hØ)r¢ }r£ (h?XgetServerTransportsh@j˜ hPhÁhUhÛhW}r¤ (hY]hZ]h[]h\]h_]uhaNhbhhc]r¥ hlXgetServerTransportsr¦ …r§ }r¨ (h?Uh@j¢ ubaubhá)r© }rª (h?Uh@j˜ hPhÁhUhähW}r« (hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)r¬ }r­ (h?Uh@j˜ hPNhUhóhW}r® (Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r¯ h})r° }r± (h?UhW}r² (UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidj  uh@j¬ hc]r³ hý)r´ }rµ (h?UhW}r¶ (hY]hZ]r· jah[]h\]h_]uh@j° hc]r¸ hlX[source]r¹ …rº }r» (h?Uh@j´ ubahUjubahUhubaubeubhA)r¼ }r½ (h?Uh@j“ hPhÁhUj hW}r¾ (hY]hZ]h[]h\]h_]uhaNhbhhc]r¿ j$)rÀ }rÁ (h?Uh@j¼ hPNhUj'hW}r (hY]hZ]h[]h\]h_]uhaNhbhhc]rà j*)rÄ }rÅ (h?UhW}rÆ (hY]hZ]h[]h\]h_]uh@jÀ hc]rÇ (j/)rÈ }rÉ (h?UhW}rÊ (hY]hZ]h[]h\]h_]uh@jÄ hc]rË hlXReturnsrÌ …rÍ }rÎ (h?Uh@jÈ ubahUj7ubj8)rÏ }rÐ (h?UhW}rÑ (hY]hZ]h[]h\]h_]uh@jÄ hc]rÒ h¤)rÓ }rÔ (h?UhW}rÕ (hY]hZ]h[]h\]h_]uh@jÏ hc]rÖ h})r× }rØ (h?X(:attr:`pyptlib.config.Config.transports`rÙ h@jÓ hPNhUhhW}rÚ (UreftypeXattrhƒ‰h„X pyptlib.config.Config.transportsU refdomainXpyrÛ h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjö h‰j. uhaNhc]rÜ h‹)rÝ }rÞ (h?jÙ hW}rß (hY]hZ]rà (hjÛ Xpy-attrrá eh[]h\]h_]uh@j× hc]râ hlX pyptlib.config.Config.transportsrã …rä }rå (h?Uh@jÝ ubahUh–ubaubahUh¨ubahUjbubehUjcubaubaubeubh›)ræ }rç (h?Uh@j hPNhUhŸhW}rè (h\]h[]hY]hZ]h_]Uentries]ré (h¢X:get_addrport() (pyptlib.server_config.ServerConfig method)hUtrê auhaNhbhhc]ubhD)rë }rì (h?Uh@j hPNhUhµhW}rí (h·‰h¸Xpyrî h\]h[]hY]hZ]h_]hºXmethodrï h¼jï uhaNhbhhc]rð (h¾)rñ }rò (h?XServerConfig.get_addrport(key)h@jë hPhÁhUhÂhW}ró (h\]rô hahÅhQXpyptlib.server_configrõ …rö }r÷ bh[]hY]hZ]h_]rø hahÊXServerConfig.get_addrportrù hÌjö h͉uhaNhbhhc]rú (hØ)rû }rü (h?X get_addrporth@jñ hPhÁhUhÛhW}rý (hY]hZ]h[]h\]h_]uhaNhbhhc]rþ hlX get_addrportrÿ …r}r(h?Uh@jû ubaubhá)r}r(h?Uh@jñ hPhÁhUhähW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rhç)r}r(h?XkeyhW}r(hY]hZ]h[]h\]h_]uh@jhc]r hlXkeyr …r }r (h?Uh@jubahUhïubaubhð)r }r(h?Uh@jñ hPNhUhóhW}r(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rh})r}r(h?UhW}r(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidjù uh@j hc]rhý)r}r(h?UhW}r(hY]hZ]rjah[]h\]h_]uh@jhc]rhlX[source]r…r}r(h?Uh@jubahUjubahUhubaubeubhA)r}r(h?Uh@jë hPhÁhUj hW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]r (h¤)r!}r"(h?X<Parse an environment variable holding an address:port value.r#h@jhPXs/home/f/Computers/tor/pyptlib/pyptlib/server_config.py:docstring of pyptlib.server_config.ServerConfig.get_addrportr$hUh¨hW}r%(hY]hZ]h[]h\]h_]uhaKhbhhc]r&hlX<Parse an environment variable holding an address:port value.r'…r(}r)(h?j#h@j!ubaubj$)r*}r+(h?Uh@jhPNhUj'hW}r,(hY]hZ]h[]h\]h_]uhaNhbhhc]r-(j*)r.}r/(h?UhW}r0(hY]hZ]h[]h\]h_]uh@j*hc]r1(j/)r2}r3(h?UhW}r4(hY]hZ]h[]h\]h_]uh@j.hc]r5hlX Parametersr6…r7}r8(h?Uh@j2ubahUj7ubj8)r9}r:(h?UhW}r;(hY]hZ]h[]h\]h_]uh@j.hc]r<h¤)r=}r>(h?UhW}r?(hY]hZ]h[]h\]h_]uh@j9hc]r@(jA)rA}rB(h?XkeyhW}rC(hY]hZ]h[]h\]h_]uh@j=hc]rDhlXkeyrE…rF}rG(h?Uh@jAubahUjIubhlX (rH…rI}rJ(h?Uh@j=ubh})rK}rL(h?UhW}rM(UreftypejPU reftargetXstrrNU refdomainjî h\]h[]U refexplicit‰hY]hZ]h_]uh@j=hc]rOj)rP}rQ(h?jNhW}rR(hY]hZ]h[]h\]h_]uh@jKhc]rShlXstrrT…rU}rV(h?Uh@jPubahUj#ubahUhubhlX)…rW}rX(h?Uh@j=ubhlX -- rY…rZ}r[(h?Uh@j=ubhlXEnvironment variable key.r\…r]}r^(h?XEnvironment variable key.h@j=ubehUh¨ubahUjbubehUjcubj*)r_}r`(h?UhW}ra(hY]hZ]h[]h\]h_]uh@j*hc]rb(j/)rc}rd(h?UhW}re(hY]hZ]h[]h\]h_]uh@j_hc]rfhlXReturnsrg…rh}ri(h?Uh@jcubahUj7ubj8)rj}rk(h?UhW}rl(hY]hZ]h[]h\]h_]uh@j_hc]rmh¤)rn}ro(h?UhW}rp(hY]hZ]h[]h\]h_]uh@jjhc]rqhlXtuple -- (address,port)rr…rs}rt(h?Xtuple -- (address,port)h@jnubahUh¨ubahUjbubehUjcubj*)ru}rv(h?Uh@j*hPj$hUjchW}rw(hY]hZ]h[]h\]h_]uhaKhbhhc]rx(j/)ry}rz(h?XraiseshW}r{(hY]hZ]h[]h\]h_]uh@juhc]r|hlXRaises r}…r~}r(h?Uh@jyubahUj7ubj8)r€}r(h?XJ:class:`pyptlib.config.EnvError` if string was not in address:port format.r‚hW}rƒ(hY]hZ]h[]h\]h_]uh@juhc]r„h¤)r…}r†(h?j‚h@j€hPj$hUh¨hW}r‡(hY]hZ]h[]h\]h_]uhaKhc]rˆ(h})r‰}rŠ(h?X :class:`pyptlib.config.EnvError`r‹h@j…hPNhUhhW}rŒ(UreftypeXclasshƒ‰h„Xpyptlib.config.EnvErrorU refdomainXpyrh\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjö h‰j. uhaNhc]rŽh‹)r}r(h?j‹hW}r‘(hY]hZ]r’(hjXpy-classr“eh[]h\]h_]uh@j‰hc]r”hlXpyptlib.config.EnvErrorr•…r–}r—(h?Uh@jubahUh–ubaubhlX* if string was not in address:port format.r˜…r™}rš(h?X* if string was not in address:port format.h@j…ubeubahUjbubeubeubeubeubh›)r›}rœ(h?Uh@j hPNhUhŸhW}r(h\]h[]hY]hZ]h_]Uentries]rž(h¢XFget_addrport_from_string() (pyptlib.server_config.ServerConfig method)h1UtrŸauhaNhbhhc]ubhD)r }r¡(h?Uh@j hPNhUhµhW}r¢(h·‰h¸Xpyr£h\]h[]hY]hZ]h_]hºXmethodr¤h¼j¤uhaNhbhhc]r¥(h¾)r¦}r§(h?X-ServerConfig.get_addrport_from_string(string)h@j hPhÁhUhÂhW}r¨(h\]r©h1ahÅhQXpyptlib.server_configrª…r«}r¬bh[]hY]hZ]h_]r­h1ahÊX%ServerConfig.get_addrport_from_stringr®hÌjö h͉uhaNhbhhc]r¯(hØ)r°}r±(h?Xget_addrport_from_stringh@j¦hPhÁhUhÛhW}r²(hY]hZ]h[]h\]h_]uhaNhbhhc]r³hlXget_addrport_from_stringr´…rµ}r¶(h?Uh@j°ubaubhá)r·}r¸(h?Uh@j¦hPhÁhUhähW}r¹(hY]hZ]h[]h\]h_]uhaNhbhhc]rºhç)r»}r¼(h?XstringhW}r½(hY]hZ]h[]h\]h_]uh@j·hc]r¾hlXstringr¿…rÀ}rÁ(h?Uh@j»ubahUhïubaubhð)rÂ}rÃ(h?Uh@j¦hPNhUhóhW}rÄ(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rÅh})rÆ}rÇ(h?UhW}rÈ(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidj®uh@jÂhc]rÉhý)rÊ}rË(h?UhW}rÌ(hY]hZ]rÍjah[]h\]h_]uh@jÆhc]rÎhlX[source]rÏ…rÐ}rÑ(h?Uh@jÊubahUjubahUhubaubeubhA)rÒ}rÓ(h?Uh@j hPhÁhUj hW}rÔ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÕ(h¤)rÖ}r×(h?X-Parse a string holding an address:port value.rØh@jÒhPX/home/f/Computers/tor/pyptlib/pyptlib/server_config.py:docstring of pyptlib.server_config.ServerConfig.get_addrport_from_stringrÙhUh¨hW}rÚ(hY]hZ]h[]h\]h_]uhaKhbhhc]rÛhlX-Parse a string holding an address:port value.rÜ…rÝ}rÞ(h?jØh@jÖubaubj$)rß}rà(h?Uh@jÒhPNhUj'hW}rá(hY]hZ]h[]h\]h_]uhaNhbhhc]râ(j*)rã}rä(h?UhW}rå(hY]hZ]h[]h\]h_]uh@jßhc]ræ(j/)rç}rè(h?UhW}ré(hY]hZ]h[]h\]h_]uh@jãhc]rêhlX Parametersrë…rì}rí(h?Uh@jçubahUj7ubj8)rî}rï(h?UhW}rð(hY]hZ]h[]h\]h_]uh@jãhc]rñh¤)rò}ró(h?UhW}rô(hY]hZ]h[]h\]h_]uh@jîhc]rõ(jA)rö}r÷(h?XstringhW}rø(hY]hZ]h[]h\]h_]uh@jòhc]rùhlXstringrú…rû}rü(h?Uh@jöubahUjIubhlX (rý…rþ}rÿ(h?Uh@jòubh})r}r(h?UhW}r(UreftypejPU reftargetXstrrU refdomainj£h\]h[]U refexplicit‰hY]hZ]h_]uh@jòhc]rj)r}r(h?jhW}r(hY]hZ]h[]h\]h_]uh@jhc]rhlXstrr …r }r (h?Uh@jubahUj#ubahUhubhlX)…r }r (h?Uh@jòubhlX -- r…r}r(h?Uh@jòubhlX A string.r…r}r(h?X A string.h@jòubehUh¨ubahUjbubehUjcubj*)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jßhc]r(j/)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]rhlXReturnsr…r}r(h?Uh@jubahUj7ubj8)r}r (h?UhW}r!(hY]hZ]h[]h\]h_]uh@jhc]r"h¤)r#}r$(h?UhW}r%(hY]hZ]h[]h\]h_]uh@jhc]r&hlXtuple -- (address,port)r'…r(}r)(h?Xtuple -- (address,port)h@j#ubahUh¨ubahUjbubehUjcubj*)r*}r+(h?Uh@jßhPjÙhUjchW}r,(hY]hZ]h[]h\]h_]uhaKhbhhc]r-(j/)r.}r/(h?XraiseshW}r0(hY]hZ]h[]h\]h_]uh@j*hc]r1hlXRaises r2…r3}r4(h?Uh@j.ubahUj7ubj8)r5}r6(h?XJ:class:`pyptlib.config.EnvError` if string was not in address:port format.r7hW}r8(hY]hZ]h[]h\]h_]uh@j*hc]r9h¤)r:}r;(h?j7h@j5hPjÙhUh¨hW}r<(hY]hZ]h[]h\]h_]uhaKhc]r=(h})r>}r?(h?X :class:`pyptlib.config.EnvError`r@h@j:hPNhUhhW}rA(UreftypeXclasshƒ‰h„Xpyptlib.config.EnvErrorU refdomainXpyrBh\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjö h‰j. uhaNhc]rCh‹)rD}rE(h?j@hW}rF(hY]hZ]rG(hjBXpy-classrHeh[]h\]h_]uh@j>hc]rIhlXpyptlib.config.EnvErrorrJ…rK}rL(h?Uh@jDubahUh–ubaubhlX* if string was not in address:port format.rM…rN}rO(h?X* if string was not in address:port format.h@j:ubeubahUjbubeubeubeubeubh›)rP}rQ(h?Uh@j hPNhUhŸhW}rR(h\]h[]hY]hZ]h_]Uentries]rS(h¢X9writeMethod() (pyptlib.server_config.ServerConfig method)hUtrTauhaNhbhhc]ubhD)rU}rV(h?Uh@j hPNhUhµhW}rW(h·‰h¸XpyrXh\]h[]hY]hZ]h_]hºXmethodrYh¼jYuhaNhbhhc]rZ(h¾)r[}r\(h?X1ServerConfig.writeMethod(name, addrport, options)h@jUhPhÁhUhÂhW}r](h\]r^hahÅhQXpyptlib.server_configr_…r`}rabh[]hY]hZ]h_]rbhahÊXServerConfig.writeMethodrchÌjö h͉uhaNhbhhc]rd(hØ)re}rf(h?X writeMethodh@j[hPhÁhUhÛhW}rg(hY]hZ]h[]h\]h_]uhaNhbhhc]rhhlX writeMethodri…rj}rk(h?Uh@jeubaubhá)rl}rm(h?Uh@j[hPhÁhUhähW}rn(hY]hZ]h[]h\]h_]uhaNhbhhc]ro(hç)rp}rq(h?XnamehW}rr(hY]hZ]h[]h\]h_]uh@jlhc]rshlXnamert…ru}rv(h?Uh@jpubahUhïubhç)rw}rx(h?XaddrporthW}ry(hY]hZ]h[]h\]h_]uh@jlhc]rzhlXaddrportr{…r|}r}(h?Uh@jwubahUhïubhç)r~}r(h?XoptionshW}r€(hY]hZ]h[]h\]h_]uh@jlhc]rhlXoptionsr‚…rƒ}r„(h?Uh@j~ubahUhïubeubhð)r…}r†(h?Uh@j[hPNhUhóhW}r‡(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rˆh})r‰}rŠ(h?UhW}r‹(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidjcuh@j…hc]rŒhý)r}rŽ(h?UhW}r(hY]hZ]rjah[]h\]h_]uh@j‰hc]r‘hlX[source]r’…r“}r”(h?Uh@jubahUjubahUhubaubeubhA)r•}r–(h?Uh@jUhPhÁhUj hW}r—(hY]hZ]h[]h\]h_]uhaNhbhhc]r˜(h¤)r™}rš(h?XWWrite a message to stdout announcing that a server transport was successfully launched.r›h@j•hPXr/home/f/Computers/tor/pyptlib/pyptlib/server_config.py:docstring of pyptlib.server_config.ServerConfig.writeMethodrœhUh¨hW}r(hY]hZ]h[]h\]h_]uhaKhbhhc]ržhlXWWrite a message to stdout announcing that a server transport was successfully launched.rŸ…r }r¡(h?j›h@j™ubaubj$)r¢}r£(h?Uh@j•hPNhUj'hW}r¤(hY]hZ]h[]h\]h_]uhaNhbhhc]r¥j*)r¦}r§(h?UhW}r¨(hY]hZ]h[]h\]h_]uh@j¢hc]r©(j/)rª}r«(h?UhW}r¬(hY]hZ]h[]h\]h_]uh@j¦hc]r­hlX Parametersr®…r¯}r°(h?Uh@jªubahUj7ubj8)r±}r²(h?UhW}r³(hY]hZ]h[]h\]h_]uh@j¦hc]r´j)rµ}r¶(h?UhW}r·(hY]hZ]h[]h\]h_]uh@j±hc]r¸(j )r¹}rº(h?UhW}r»(hY]hZ]h[]h\]h_]uh@jµhc]r¼h¤)r½}r¾(h?UhW}r¿(hY]hZ]h[]h\]h_]uh@j¹hc]rÀ(jA)rÁ}rÂ(h?XnamehW}rÃ(hY]hZ]h[]h\]h_]uh@j½hc]rÄhlXnamerÅ…rÆ}rÇ(h?Uh@jÁubahUjIubhlX (rÈ…rÉ}rÊ(h?Uh@j½ubh})rË}rÌ(h?UhW}rÍ(UreftypejPU reftargetXstrrÎU refdomainjXh\]h[]U refexplicit‰hY]hZ]h_]uh@j½hc]rÏj)rÐ}rÑ(h?jÎhW}rÒ(hY]hZ]h[]h\]h_]uh@jËhc]rÓhlXstrrÔ…rÕ}rÖ(h?Uh@jÐubahUj#ubahUhubhlX)…r×}rØ(h?Uh@j½ubhlX -- rÙ…rÚ}rÛ(h?Uh@j½ubhlXName of transport.rÜ…rÝ}rÞ(h?XName of transport.h@j½ubehUh¨ubahUj0ubj )rß}rà(h?UhW}rá(hY]hZ]h[]h\]h_]uh@jµhc]râh¤)rã}rä(h?UhW}rå(hY]hZ]h[]h\]h_]uh@jßhc]ræ(jA)rç}rè(h?XaddrporthW}ré(hY]hZ]h[]h\]h_]uh@jãhc]rêhlXaddrportrë…rì}rí(h?Uh@jçubahUjIubhlX (rî…rï}rð(h?Uh@jãubh})rñ}rò(h?UhW}ró(UreftypejPU reftargetXtuplerôU refdomainjXh\]h[]U refexplicit‰hY]hZ]h_]uh@jãhc]rõj)rö}r÷(h?jôhW}rø(hY]hZ]h[]h\]h_]uh@jñhc]rùhlXtuplerú…rû}rü(h?Uh@jöubahUj#ubahUhubhlX)…rý}rþ(h?Uh@jãubhlX -- rÿ…r}r(h?Uh@jãubhlX>(addr,port) where this transport is listening for connections.r…r}r(h?X>(addr,port) where this transport is listening for connections.h@jãubehUh¨ubahUj0ubj )r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jµhc]rh¤)r }r (h?UhW}r (hY]hZ]h[]h\]h_]uh@jhc]r (jA)r }r(h?XoptionshW}r(hY]hZ]h[]h\]h_]uh@j hc]rhlXoptionsr…r}r(h?Uh@j ubahUjIubhlX (r…r}r(h?Uh@j ubh})r}r(h?UhW}r(UreftypejPU reftargetXstrrU refdomainjXh\]h[]U refexplicit‰hY]hZ]h_]uh@j hc]rj)r}r(h?jhW}r(hY]hZ]h[]h\]h_]uh@jhc]rhlXstrr …r!}r"(h?Uh@jubahUj#ubahUhubhlX)…r#}r$(h?Uh@j ubhlX -- r%…r&}r'(h?Uh@j ubhlXTransport options.r(…r)}r*(h?XTransport options.h@j ubehUh¨ubahUj0ubehUjWubahUjbubehUjcubaubeubeubh›)r+}r,(h?Uh@j hPXu/home/f/Computers/tor/pyptlib/pyptlib/server_config.py:docstring of pyptlib.server_config.ServerConfig.writeMethodEndr-hUhŸhW}r.(h\]h[]hY]hZ]h_]Uentries]r/(h¢X<writeMethodEnd() (pyptlib.server_config.ServerConfig method)hUtr0auhaNhbhhc]ubhD)r1}r2(h?Uh@j hPj-hUhµhW}r3(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodr4h¼j4uhaNhbhhc]r5(h¾)r6}r7(h?XServerConfig.writeMethodEnd()h@j1hPhÁhUhÂhW}r8(h\]r9hahÅhQXpyptlib.server_configr:…r;}r<bh[]hY]hZ]h_]r=hahÊXServerConfig.writeMethodEndr>hÌjö h͉uhaNhbhhc]r?(hØ)r@}rA(h?XwriteMethodEndh@j6hPhÁhUhÛhW}rB(hY]hZ]h[]h\]h_]uhaNhbhhc]rChlXwriteMethodEndrD…rE}rF(h?Uh@j@ubaubhá)rG}rH(h?Uh@j6hPhÁhUhähW}rI(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rJ}rK(h?Uh@j6hPNhUhóhW}rL(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rMh})rN}rO(h?UhW}rP(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidj>uh@jJhc]rQhý)rR}rS(h?UhW}rT(hY]hZ]rUjah[]h\]h_]uh@jNhc]rVhlX[source]rW…rX}rY(h?Uh@jRubahUjubahUhubaubeubhA)rZ}r[(h?Uh@j1hPhÁhUj hW}r\(hY]hZ]h[]h\]h_]uhaNhbhhc]r]h¤)r^}r_(h?XLWrite a message to stdout announcing that we finished launching transports..r`h@jZhPj-hUh¨hW}ra(hY]hZ]h[]h\]h_]uhaKhbhhc]rbhlXLWrite a message to stdout announcing that we finished launching transports..rc…rd}re(h?j`h@j^ubaubaubeubh›)rf}rg(h?Uh@j hPNhUhŸhW}rh(h\]h[]hY]hZ]h_]Uentries]ri(h¢X>writeMethodError() (pyptlib.server_config.ServerConfig method)h!UtrjauhaNhbhhc]ubhD)rk}rl(h?Uh@j hPNhUhµhW}rm(h·‰h¸Xpyrnh\]h[]hY]hZ]h_]hºXmethodroh¼jouhaNhbhhc]rp(h¾)rq}rr(h?X,ServerConfig.writeMethodError(name, message)h@jkhPhÁhUhÂhW}rs(h\]rth!ahÅhQXpyptlib.server_configru…rv}rwbh[]hY]hZ]h_]rxh!ahÊXServerConfig.writeMethodErrorryhÌjö h͉uhaNhbhhc]rz(hØ)r{}r|(h?XwriteMethodErrorh@jqhPhÁhUhÛhW}r}(hY]hZ]h[]h\]h_]uhaNhbhhc]r~hlXwriteMethodErrorr…r€}r(h?Uh@j{ubaubhá)r‚}rƒ(h?Uh@jqhPhÁhUhähW}r„(hY]hZ]h[]h\]h_]uhaNhbhhc]r…(hç)r†}r‡(h?XnamehW}rˆ(hY]hZ]h[]h\]h_]uh@j‚hc]r‰hlXnamerŠ…r‹}rŒ(h?Uh@j†ubahUhïubhç)r}rŽ(h?XmessagehW}r(hY]hZ]h[]h\]h_]uh@j‚hc]rhlXmessager‘…r’}r“(h?Uh@jubahUhïubeubhð)r”}r•(h?Uh@jqhPNhUhóhW}r–(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r—h})r˜}r™(h?UhW}rš(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/server_configUrefidjyuh@j”hc]r›hý)rœ}r(h?UhW}rž(hY]hZ]rŸjah[]h\]h_]uh@j˜hc]r hlX[source]r¡…r¢}r£(h?Uh@jœubahUjubahUhubaubeubhA)r¤}r¥(h?Uh@jkhPhÁhUj hW}r¦(hY]hZ]h[]h\]h_]uhaNhbhhc]r§(h¤)r¨}r©(h?XJWrite a message to stdout announcing that we failed to launch a transport.rªh@j¤hPXw/home/f/Computers/tor/pyptlib/pyptlib/server_config.py:docstring of pyptlib.server_config.ServerConfig.writeMethodErrorr«hUh¨hW}r¬(hY]hZ]h[]h\]h_]uhaKhbhhc]r­hlXJWrite a message to stdout announcing that we failed to launch a transport.r®…r¯}r°(h?jªh@j¨ubaubj$)r±}r²(h?Uh@j¤hPNhUj'hW}r³(hY]hZ]h[]h\]h_]uhaNhbhhc]r´j*)rµ}r¶(h?UhW}r·(hY]hZ]h[]h\]h_]uh@j±hc]r¸(j/)r¹}rº(h?UhW}r»(hY]hZ]h[]h\]h_]uh@jµhc]r¼hlX Parametersr½…r¾}r¿(h?Uh@j¹ubahUj7ubj8)rÀ}rÁ(h?UhW}rÂ(hY]hZ]h[]h\]h_]uh@jµhc]rÃj)rÄ}rÅ(h?UhW}rÆ(hY]hZ]h[]h\]h_]uh@jÀhc]rÇ(j )rÈ}rÉ(h?UhW}rÊ(hY]hZ]h[]h\]h_]uh@jÄhc]rËh¤)rÌ}rÍ(h?UhW}rÎ(hY]hZ]h[]h\]h_]uh@jÈhc]rÏ(jA)rÐ}rÑ(h?XnamehW}rÒ(hY]hZ]h[]h\]h_]uh@jÌhc]rÓhlXnamerÔ…rÕ}rÖ(h?Uh@jÐubahUjIubhlX (r×…rØ}rÙ(h?Uh@jÌubh})rÚ}rÛ(h?UhW}rÜ(UreftypejPU reftargetXstrrÝU refdomainjnh\]h[]U refexplicit‰hY]hZ]h_]uh@jÌhc]rÞj)rß}rà(h?jÝhW}rá(hY]hZ]h[]h\]h_]uh@jÚhc]râhlXstrrã…rä}rå(h?Uh@jßubahUj#ubahUhubhlX)…ræ}rç(h?Uh@jÌubhlX -- rè…ré}rê(h?Uh@jÌubhlXName of transport.rë…rì}rí(h?XName of transport.rîh@jÌubehUh¨ubahUj0ubj )rï}rð(h?UhW}rñ(hY]hZ]h[]h\]h_]uh@jÄhc]ròh¤)ró}rô(h?UhW}rõ(hY]hZ]h[]h\]h_]uh@jïhc]rö(jA)r÷}rø(h?XmessagehW}rù(hY]hZ]h[]h\]h_]uh@jóhc]rúhlXmessagerû…rü}rý(h?Uh@j÷ubahUjIubhlX (rþ…rÿ}r(h?Uh@jóubh})r}r(h?UhW}r(UreftypejPU reftargetXstrrU refdomainjnh\]h[]U refexplicit‰hY]hZ]h_]uh@jóhc]rj)r}r(h?jhW}r(hY]hZ]h[]h\]h_]uh@jhc]r hlXstrr …r }r (h?Uh@jubahUj#ubahUhubhlX)…r }r(h?Uh@jóubhlX -- r…r}r(h?Uh@jóubhlXError message.r…r}r(h?XError message.rh@jóubehUh¨ubahUj0ubehUjWubahUjbubehUjcubaubeubeubeubeubeubhK)r}r(h?Uh@hNhPhShUhVhW}r(hY]hZ]h[]h\]r(Xmodule-pyptlib.utilrU util-modulereh_]rh auhaK-hbhhc]r(he)r}r(h?X:mod:`util` Moduler h@jhPhShUhihW}r!(hY]hZ]h[]h\]h_]uhaK-hbhhc]r"(h})r#}r$(h?X :mod:`util`r%h@jhPhShUhhW}r&(UreftypeXmodhƒ‰h„XutilU refdomainXpyr'h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆNh‰j. uhaK,hc]r(h‹)r)}r*(h?j%hW}r+(hY]hZ]r,(hj'Xpy-modr-eh[]h\]h_]uh@j#hc]r.hlXutilr/…r0}r1(h?Uh@j)ubahUh–ubaubhlX Moduler2…r3}r4(h?X Moduler5h@jubeubh›)r6}r7(h?Uh@jhPhžhUhŸhW}r8(h\]h[]hY]hZ]h_]Uentries]r9(h¢Xpyptlib.util (module)Xmodule-pyptlib.utilUtr:auhaKhbhhc]ubh¤)r;}r<(h?XUtility functions.r=h@jhPXG/home/f/Computers/tor/pyptlib/pyptlib/util.py:docstring of pyptlib.utilr>hUh¨hW}r?(hY]hZ]h[]h\]h_]uhaKhbhhc]r@hlXUtility functions.rA…rB}rC(h?j=h@j;ubaubh›)rD}rE(h?Uh@jhPNhUhŸhW}rF(h\]h[]hY]hZ]h_]Uentries]rG(h¢X*checkClientMode() (in module pyptlib.util)hUtrHauhaNhbhhc]ubhD)rI}rJ(h?Uh@jhPNhUhµhW}rK(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXfunctionrLh¼jLuhaNhbhhc]rM(h¾)rN}rO(h?XcheckClientMode()rPh@jIhPhÁhUhÂhW}rQ(h\]rRhahÅhQX pyptlib.utilrS…rT}rUbh[]hY]hZ]h_]rVhahÊXcheckClientModerWhÌUh͉uhaNhbhhc]rX(hÏ)rY}rZ(h?X pyptlib.util.h@jNhPhÁhUhÒhW}r[(hY]hZ]h[]h\]h_]uhaNhbhhc]r\hlX pyptlib.util.r]…r^}r_(h?Uh@jYubaubhØ)r`}ra(h?jWh@jNhPhÁhUhÛhW}rb(hY]hZ]h[]h\]h_]uhaNhbhhc]rchlXcheckClientModerd…re}rf(h?Uh@j`ubaubhá)rg}rh(h?Uh@jNhPhÁhUhähW}ri(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rj}rk(h?Uh@jNhPNhUhóhW}rl(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rmh})rn}ro(h?UhW}rp(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/utilUrefidjWuh@jjhc]rqhý)rr}rs(h?UhW}rt(hY]hZ]rujah[]h\]h_]uh@jnhc]rvhlX[source]rw…rx}ry(h?Uh@jrubahUjubahUhubaubeubhA)rz}r{(h?Uh@jIhPhÁhUj hW}r|(hY]hZ]h[]h\]h_]uhaNhbhhc]r}(h¤)r~}r(h?X=Check whether Tor wants us to run as a client or as a server.r€h@jzhPXW/home/f/Computers/tor/pyptlib/pyptlib/util.py:docstring of pyptlib.util.checkClientModerhUh¨hW}r‚(hY]hZ]h[]h\]h_]uhaKhbhhc]rƒhlX=Check whether Tor wants us to run as a client or as a server.r„…r…}r†(h?j€h@j~ubaubj$)r‡}rˆ(h?Uh@jzhPNhUj'hW}r‰(hY]hZ]h[]h\]h_]uhaNhbhhc]rŠj*)r‹}rŒ(h?UhW}r(hY]hZ]h[]h\]h_]uh@j‡hc]rŽ(j/)r}r(h?UhW}r‘(hY]hZ]h[]h\]h_]uh@j‹hc]r’hlXReturnsr“…r”}r•(h?Uh@jubahUj7ubj8)r–}r—(h?UhW}r˜(hY]hZ]h[]h\]h_]uh@j‹hc]r™h¤)rš}r›(h?UhW}rœ(hY]hZ]h[]h\]h_]uh@j–hc]rhlX0bool -- True if Tor wants us to run as a client.rž…rŸ}r (h?X0bool -- True if Tor wants us to run as a client.r¡h@jšubahUh¨ubahUjbubehUjcubaubeubeubeubeubhPhShUhVhW}r¢(hY]hZ]h[]h\]r£(Xmodule-pyptlib.configr¤U config-moduler¥eh_]r¦h4auhaKhbhhc]r§(he)r¨}r©(h?X:mod:`config` Modulerªh@hLhPhShUhihW}r«(hY]hZ]h[]h\]h_]uhaKhbhhc]r¬(h})r­}r®(h?X :mod:`config`r¯h@j¨hPhShUhhW}r°(UreftypeXmodhƒ‰h„XconfigU refdomainXpyr±h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆNh‰juhaKhc]r²h‹)r³}r´(h?j¯hW}rµ(hY]hZ]r¶(hj±Xpy-modr·eh[]h\]h_]uh@j­hc]r¸hlXconfigr¹…rº}r»(h?Uh@j³ubahUh–ubaubhlX Moduler¼…r½}r¾(h?X Moduler¿h@j¨ubeubh›)rÀ}rÁ(h?Uh@hLhPhžhUhŸhW}rÂ(h\]h[]hY]hZ]h_]Uentries]rÃ(h¢Xpyptlib.config (module)Xmodule-pyptlib.configUtrÄauhaKhbhhc]ubh¤)rÅ}rÆ(h?X=Parts of pyptlib that are useful both to clients and servers.rÇh@hLhPXK/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.configrÈhUh¨hW}rÉ(hY]hZ]h[]h\]h_]uhaKhbhhc]rÊhlX=Parts of pyptlib that are useful both to clients and servers.rË…rÌ}rÍ(h?jÇh@jÅubaubh›)rÎ}rÏ(h?Uh@hLhPNhUhŸhW}rÐ(h\]h[]hY]hZ]h_]Uentries]rÑ(h¢X Config (class in pyptlib.config)hUtrÒauhaNhbhhc]ubhIh›)rÓ}rÔ(h?Uh@hLhPXT/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.EnvErrorrÕhUhŸhW}rÖ(h\]h[]hY]hZ]h_]Uentries]r×(h¢XEnvErrorrØh UtrÙauhaNhbhhc]ubhD)rÚ}rÛ(h?Uh@hLhPjÕhUhµhW}rÜ(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºX exceptionrÝh¼jÝuhaNhbhhc]rÞ(h¾)rß}rà(h?jØh@jÚhPhÁhUhÂhW}rá(h\]râh ahÅhQXpyptlib.configrã…rä}råbh[]hY]hZ]h_]ræh ahÊjØhÌUh͉uhaNhbhhc]rç(jÐ)rè}ré(h?X exception h@jßhPhÁhUjÓhW}rê(hY]hZ]h[]h\]h_]uhaNhbhhc]rëhlX exception rì…rí}rî(h?Uh@jèubaubhÏ)rï}rð(h?Xpyptlib.config.h@jßhPhÁhUhÒhW}rñ(hY]hZ]h[]h\]h_]uhaNhbhhc]ròhlXpyptlib.config.ró…rô}rõ(h?Uh@jïubaubhØ)rö}r÷(h?jØh@jßhPhÁhUhÛhW}rø(hY]hZ]h[]h\]h_]uhaNhbhhc]rùhlXEnvErrorrú…rû}rü(h?Uh@jöubaubhð)rý}rþ(h?Uh@jßhPNhUhóhW}rÿ(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rh})r}r(h?UhW}r(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidjØuh@jýhc]rhý)r}r(h?UhW}r(hY]hZ]rjah[]h\]h_]uh@jhc]r hlX[source]r …r }r (h?Uh@jubahUjubahUhubaubeubhA)r }r(h?Uh@jÚhPhÁhUj hW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]r(h¤)r}r(h?X$Bases: :class:`exceptions.Exception`h@j hPjýhUh¨hW}r(hY]hZ]h[]h\]h_]uhaKhbhhc]r(hlXBases: r…r}r(h?XBases: h@jubh})r}r(h?X:class:`exceptions.Exception`rh@jhPNhUhhW}r(UreftypeXclasshƒ‰h„Xexceptions.ExceptionU refdomainXpyrh\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆjØh‰jÏuhaNhc]rh‹)r}r(h?jhW}r (hY]hZ]r!(hjXpy-classr"eh[]h\]h_]uh@jhc]r#hlXexceptions.Exceptionr$…r%}r&(h?Uh@jubahUh–ubaubeubh¤)r'}r((h?X7Thrown when the environment is incomplete or corrupted.r)h@j hPjÕhUh¨hW}r*(hY]hZ]h[]h\]h_]uhaKhbhhc]r+hlX7Thrown when the environment is incomplete or corrupted.r,…r-}r.(h?j)h@j'ubaubeubeubeubhPNhUhµhW}r/(h·‰h¸Xpyr0h\]h[]hY]hZ]h_]hºXclassr1h¼j1uhaNhbhhc]r2(h¾)r3}r4(h?XConfig()h@hIhPhÁhUhÂhW}r5(h\]r6hahÅhQXpyptlib.configr7…r8}r9bh[]hY]hZ]h_]r:hahÊXConfigr;hÌUh͉uhaNhbhhc]r<(jÐ)r=}r>(h?Xclass h@j3hPhÁhUjÓhW}r?(hY]hZ]h[]h\]h_]uhaNhbhhc]r@hlXclass rA…rB}rC(h?Uh@j=ubaubhÏ)rD}rE(h?Xpyptlib.config.h@j3hPhÁhUhÒhW}rF(hY]hZ]h[]h\]h_]uhaNhbhhc]rGhlXpyptlib.config.rH…rI}rJ(h?Uh@jDubaubhØ)rK}rL(h?j;h@j3hPhÁhUhÛhW}rM(hY]hZ]h[]h\]h_]uhaNhbhhc]rNhlXConfigrO…rP}rQ(h?Uh@jKubaubhð)rR}rS(h?Uh@j3hPNhUhóhW}rT(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rUh})rV}rW(h?UhW}rX(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidj;uh@jRhc]rYhý)rZ}r[(h?UhW}r\(hY]hZ]r]jah[]h\]h_]uh@jVhc]r^hlX[source]r_…r`}ra(h?Uh@jZubahUjubahUhubaubeubhGeubhPhÁhUj hW}rb(hY]hZ]h[]h\]h_]uhaNhbhhc]rc(h¤)rd}re(h?XBases: :class:`object`h@hGhPjýhUh¨hW}rf(hY]hZ]h[]h\]h_]uhaKhbhhc]rg(hlXBases: rh…ri}rj(h?XBases: h@jdubh})rk}rl(h?X:class:`object`rmh@jdhPhShUhhW}rn(UreftypeXclasshƒ‰h„XobjectU refdomainXpyroh\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆj;h‰jÏuhaK hc]rph‹)rq}rr(h?jmhW}rs(hY]hZ]rt(hjoXpy-classrueh[]h\]h_]uh@jkhc]rvhlXobjectrw…rx}ry(h?Uh@jqubahUh–ubaubeubh¤)rz}r{(h?Xpyptlib's configuration.r|h@hGhPXR/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Configr}hUh¨hW}r~(hY]hZ]h[]h\]h_]uhaKhbhhc]rhlXpyptlib's configuration.r€…r}r‚(h?j|h@jzubaubj$)rƒ}r„(h?Uh@hGhPNhUj'hW}r…(hY]hZ]h[]h\]h_]uhaNhbhhc]r†(j*)r‡}rˆ(h?UhW}r‰(hY]hZ]h[]h\]h_]uh@jƒhc]rŠ(j/)r‹}rŒ(h?UhW}r(hY]hZ]h[]h\]h_]uh@j‡hc]rŽhlX Variablesr…r}r‘(h?Uh@j‹ubahUj7ubj8)r’}r“(h?UhW}r”(hY]hZ]h[]h\]h_]uh@j‡hc]r•j)r–}r—(h?UhW}r˜(hY]hZ]h[]h\]h_]uh@j’hc]r™(j )rš}r›(h?UhW}rœ(hY]hZ]h[]h\]h_]uh@j–hc]rh¤)rž}rŸ(h?UhW}r (hY]hZ]h[]h\]h_]uh@jšhc]r¡(h})r¢}r£(h?UhW}r¤(UreftypejPU reftargetX stateLocationr¥U refdomainj0h\]h[]U refexplicit‰hY]hZ]h_]uh@jžhc]r¦jA)r§}r¨(h?j¥hW}r©(hY]hZ]h[]h\]h_]uh@j¢hc]rªhlX stateLocationr«…r¬}r­(h?Uh@j§ubahUjIubahUhubhlX (r®…r¯}r°(h?Uh@jžubh})r±}r²(h?UhW}r³(UreftypejPU reftargetXstringr´U refdomainj0h\]h[]U refexplicit‰hY]hZ]h_]uh@jžhc]rµj)r¶}r·(h?j´hW}r¸(hY]hZ]h[]h\]h_]uh@j±hc]r¹hlXstringrº…r»}r¼(h?Uh@j¶ubahUj#ubahUhubhlX)…r½}r¾(h?Uh@jžubhlX -- r¿…rÀ}rÁ(h?Uh@jžubhlX.Location where application should store state.rÂ…rÃ}rÄ(h?X.Location where application should store state.rÅh@jžubehUh¨ubahUj0ubj )rÆ}rÇ(h?UhW}rÈ(hY]hZ]h[]h\]h_]uh@j–hc]rÉh¤)rÊ}rË(h?UhW}rÌ(hY]hZ]h[]h\]h_]uh@jÆhc]rÍ(h})rÎ}rÏ(h?UhW}rÐ(UreftypejPU reftargetXmanagedTransportVerrÑU refdomainj0h\]h[]U refexplicit‰hY]hZ]h_]uh@jÊhc]rÒjA)rÓ}rÔ(h?jÑhW}rÕ(hY]hZ]h[]h\]h_]uh@jÎhc]rÖhlXmanagedTransportVerr×…rØ}rÙ(h?Uh@jÓubahUjIubahUhubhlX (rÚ…rÛ}rÜ(h?Uh@jÊubh})rÝ}rÞ(h?UhW}rß(UreftypejPU reftargetXlistràU refdomainj0h\]h[]U refexplicit‰hY]hZ]h_]uh@jÊhc]ráj)râ}rã(h?jàhW}rä(hY]hZ]h[]h\]h_]uh@jÝhc]råhlXlistræ…rç}rè(h?Uh@jâubahUj#ubahUhubhlX)…ré}rê(h?Uh@jÊubhlX -- rë…rì}rí(h?Uh@jÊubhlX:List of managed-proxy protocol versions that Tor supports.rî…rï}rð(h?X:List of managed-proxy protocol versions that Tor supports.rñh@jÊubehUh¨ubahUj0ubj )rò}ró(h?UhW}rô(hY]hZ]h[]h\]h_]uh@j–hc]rõh¤)rö}r÷(h?UhW}rø(hY]hZ]h[]h\]h_]uh@jòhc]rù(h})rú}rû(h?UhW}rü(UreftypejPU reftargetX transportsrýU refdomainj0h\]h[]U refexplicit‰hY]hZ]h_]uh@jöhc]rþjA)rÿ}r(h?jýhW}r(hY]hZ]h[]h\]h_]uh@júhc]rhlX transportsr…r}r(h?Uh@jÿubahUjIubahUhubhlX (r…r}r(h?Uh@jöubh})r }r (h?UhW}r (UreftypejPU reftargetXlistr U refdomainj0h\]h[]U refexplicit‰hY]hZ]h_]uh@jöhc]r j)r}r(h?j hW}r(hY]hZ]h[]h\]h_]uh@j hc]rhlXlistr…r}r(h?Uh@jubahUj#ubahUhubhlX)…r}r(h?Uh@jöubhlX -- r…r}r(h?Uh@jöubhlXAStrings of pluggable transport names that Tor wants us to handle.r…r}r(h?XAStrings of pluggable transport names that Tor wants us to handle.rh@jöubehUh¨ubahUj0ubj )r}r(h?UhW}r (hY]hZ]h[]h\]h_]uh@j–hc]r!h¤)r"}r#(h?UhW}r$(hY]hZ]h[]h\]h_]uh@jhc]r%(h})r&}r'(h?UhW}r((UreftypejPU reftargetXallTransportsEnabledr)U refdomainj0h\]h[]U refexplicit‰hY]hZ]h_]uh@j"hc]r*jA)r+}r,(h?j)hW}r-(hY]hZ]h[]h\]h_]uh@j&hc]r.hlXallTransportsEnabledr/…r0}r1(h?Uh@j+ubahUjIubahUhubhlX (r2…r3}r4(h?Uh@j"ubh})r5}r6(h?UhW}r7(UreftypejPU reftargetXboolr8U refdomainj0h\]h[]U refexplicit‰hY]hZ]h_]uh@j"hc]r9j)r:}r;(h?j8hW}r<(hY]hZ]h[]h\]h_]uh@j5hc]r=hlXboolr>…r?}r@(h?Uh@j:ubahUj#ubahUhubhlX)…rA}rB(h?Uh@j"ubhlX -- rC…rD}rE(h?Uh@j"ubhlX1True if Tor wants us to spawn all the transports.rF…rG}rH(h?X1True if Tor wants us to spawn all the transports.rIh@j"ubehUh¨ubahUj0ubehUjWubahUjbubehUjcubj*)rJ}rK(h?Uh@jƒhPj}hUjchW}rL(hY]hZ]h[]h\]h_]uhaKhbhhc]rM(j/)rN}rO(h?XraiseshW}rP(hY]hZ]h[]h\]h_]uh@jJhc]rQhlXRaises rR…rS}rT(h?Uh@jNubahUj7ubj8)rU}rV(h?XN:class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. hW}rW(hY]hZ]h[]h\]h_]uh@jJhc]rXh¤)rY}rZ(h?XL:class:`pyptlib.config.EnvError` if environment was incomplete or corrupted.h@jUhPj}hUh¨hW}r[(hY]hZ]h[]h\]h_]uhaKhc]r\(h})r]}r^(h?X :class:`pyptlib.config.EnvError`r_h@jYhPhShUhhW}r`(UreftypeXclasshƒ‰h„Xpyptlib.config.EnvErrorU refdomainXpyrah\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆj;h‰jÏuhaKhc]rbh‹)rc}rd(h?j_hW}re(hY]hZ]rf(hjaXpy-classrgeh[]h\]h_]uh@j]hc]rhhlXpyptlib.config.EnvErrorri…rj}rk(h?Uh@jcubahUh–ubaubhlX, if environment was incomplete or corrupted.rl…rm}rn(h?X, if environment was incomplete or corrupted.h@jYubeubahUjbubeubeubh›)ro}rp(h?Uh@hGhPNhUhŸhW}rq(h\]h[]hY]hZ]h_]Uentries]rr(h¢X6allTransportsEnabled (pyptlib.config.Config attribute)h.UtrsauhaNhbhhc]ubhD)rt}ru(h?Uh@hGhPNhUhµhW}rv(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºX attributerwh¼jwuhaNhbhhc]rx(h¾)ry}rz(h?XConfig.allTransportsEnabledh@jthPU r{hUhÂhW}r|(h\]r}h.ahÅhQXpyptlib.configr~…r}r€bh[]hY]hZ]h_]rh.ahÊXConfig.allTransportsEnabledhÌj;h͉uhaNhbhhc]r‚(hØ)rƒ}r„(h?XallTransportsEnabledh@jyhPj{hUhÛhW}r…(hY]hZ]h[]h\]h_]uhaNhbhhc]r†hlXallTransportsEnabledr‡…rˆ}r‰(h?Uh@jƒubaubjÐ)rŠ}r‹(h?X = Falseh@jyhPj{hUjÓhW}rŒ(hY]hZ]h[]h\]h_]uhaNhbhhc]rhlX = FalserŽ…r}r(h?Uh@jŠubaubeubhA)r‘}r’(h?Uh@jthPj{hUj hW}r“(hY]hZ]h[]h\]h_]uhaNhbhhc]ubeubh›)r”}r•(h?Uh@hGhPNhUhŸhW}r–(h\]h[]hY]hZ]h_]Uentries]r—(h¢X&check() (pyptlib.config.Config method)h7Utr˜auhaNhbhhc]ubhD)r™}rš(h?Uh@hGhPNhUhµhW}r›(h·‰h¸Xpyrœh\]h[]hY]hZ]h_]hºXmethodrh¼juhaNhbhhc]rž(h¾)rŸ}r (h?XConfig.check(key)h@j™hPhÁhUhÂhW}r¡(h\]r¢h7ahÅhQXpyptlib.configr£…r¤}r¥bh[]hY]hZ]h_]r¦h7ahÊX Config.checkr§hÌj;h͉uhaNhbhhc]r¨(hØ)r©}rª(h?Xcheckh@jŸhPhÁhUhÛhW}r«(hY]hZ]h[]h\]h_]uhaNhbhhc]r¬hlXcheckr­…r®}r¯(h?Uh@j©ubaubhá)r°}r±(h?Uh@jŸhPhÁhUhähW}r²(hY]hZ]h[]h\]h_]uhaNhbhhc]r³hç)r´}rµ(h?XkeyhW}r¶(hY]hZ]h[]h\]h_]uh@j°hc]r·hlXkeyr¸…r¹}rº(h?Uh@j´ubahUhïubaubhð)r»}r¼(h?Uh@jŸhPNhUhóhW}r½(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r¾h})r¿}rÀ(h?UhW}rÁ(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidj§uh@j»hc]rÂhý)rÃ}rÄ(h?UhW}rÅ(hY]hZ]rÆjah[]h\]h_]uh@j¿hc]rÇhlX[source]rÈ…rÉ}rÊ(h?Uh@jÃubahUjubahUhubaubeubhA)rË}rÌ(h?Uh@j™hPhÁhUj hW}rÍ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÎ(h¤)rÏ}rÐ(h?X:Check the environment for a specific environment variable.rÑh@jËhPXX/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.checkrÒhUh¨hW}rÓ(hY]hZ]h[]h\]h_]uhaKhbhhc]rÔhlX:Check the environment for a specific environment variable.rÕ…rÖ}r×(h?jÑh@jÏubaubj$)rØ}rÙ(h?Uh@jËhPNhUj'hW}rÚ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÛ(j*)rÜ}rÝ(h?UhW}rÞ(hY]hZ]h[]h\]h_]uh@jØhc]rß(j/)rà}rá(h?UhW}râ(hY]hZ]h[]h\]h_]uh@jÜhc]rãhlX Parametersrä…rå}ræ(h?Uh@jàubahUj7ubj8)rç}rè(h?UhW}ré(hY]hZ]h[]h\]h_]uh@jÜhc]rêh¤)rë}rì(h?UhW}rí(hY]hZ]h[]h\]h_]uh@jçhc]rî(jA)rï}rð(h?XkeyhW}rñ(hY]hZ]h[]h\]h_]uh@jëhc]ròhlXkeyró…rô}rõ(h?Uh@jïubahUjIubhlX (rö…r÷}rø(h?Uh@jëubh})rù}rú(h?UhW}rû(UreftypejPU reftargetXstrrüU refdomainjœh\]h[]U refexplicit‰hY]hZ]h_]uh@jëhc]rýj)rþ}rÿ(h?jühW}r(hY]hZ]h[]h\]h_]uh@jùhc]rhlXstrr…r}r(h?Uh@jþubahUj#ubahUhubhlX)…r}r(h?Uh@jëubhlX -- r…r}r (h?Uh@jëubhlXEnvironment variable key.r …r }r (h?XEnvironment variable key.h@jëubehUh¨ubahUjbubehUjcubj*)r }r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jØhc]r(j/)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@j hc]rhlXReturnsr…r}r(h?Uh@jubahUj7ubj8)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@j hc]rh¤)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]rhlX0bool -- True if the environment variable is set.r …r!}r"(h?X0bool -- True if the environment variable is set.h@jubahUh¨ubahUjbubehUjcubeubeubeubh›)r#}r$(h?Uh@hGhPNhUhŸhW}r%(h\]h[]hY]hZ]h_]Uentries]r&(h¢X0checkClientMode() (pyptlib.config.Config method)h)Utr'auhaNhbhhc]ubhD)r(}r)(h?Uh@hGhPNhUhµhW}r*(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodr+h¼j+uhaNhbhhc]r,(h¾)r-}r.(h?XConfig.checkClientMode()h@j(hPhÁhUhÂhW}r/(h\]r0h)ahÅhQXpyptlib.configr1…r2}r3bh[]hY]hZ]h_]r4h)ahÊXConfig.checkClientModer5hÌj;h͉uhaNhbhhc]r6(hØ)r7}r8(h?XcheckClientModeh@j-hPhÁhUhÛhW}r9(hY]hZ]h[]h\]h_]uhaNhbhhc]r:hlXcheckClientModer;…r<}r=(h?Uh@j7ubaubhá)r>}r?(h?Uh@j-hPhÁhUhähW}r@(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rA}rB(h?Uh@j-hPNhUhóhW}rC(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rDh})rE}rF(h?UhW}rG(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidj5uh@jAhc]rHhý)rI}rJ(h?UhW}rK(hY]hZ]rLjah[]h\]h_]uh@jEhc]rMhlX[source]rN…rO}rP(h?Uh@jIubahUjubahUhubaubeubhA)rQ}rR(h?Uh@j(hPhÁhUj hW}rS(hY]hZ]h[]h\]h_]uhaNhbhhc]rT(h¤)rU}rV(h?X=Check whether Tor wants us to run as a client or as a server.rWh@jQhPXb/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.checkClientModerXhUh¨hW}rY(hY]hZ]h[]h\]h_]uhaKhbhhc]rZhlX=Check whether Tor wants us to run as a client or as a server.r[…r\}r](h?jWh@jUubaubj$)r^}r_(h?Uh@jQhPNhUj'hW}r`(hY]hZ]h[]h\]h_]uhaNhbhhc]raj*)rb}rc(h?UhW}rd(hY]hZ]h[]h\]h_]uh@j^hc]re(j/)rf}rg(h?UhW}rh(hY]hZ]h[]h\]h_]uh@jbhc]rihlXReturnsrj…rk}rl(h?Uh@jfubahUj7ubj8)rm}rn(h?UhW}ro(hY]hZ]h[]h\]h_]uh@jbhc]rph¤)rq}rr(h?UhW}rs(hY]hZ]h[]h\]h_]uh@jmhc]rthlX0bool -- True if Tor wants us to run as a client.ru…rv}rw(h?X0bool -- True if Tor wants us to run as a client.h@jqubahUh¨ubahUjbubehUjcubaubeubeubh›)rx}ry(h?Uh@hGhPNhUhŸhW}rz(h\]h[]hY]hZ]h_]Uentries]r{(h¢X=checkManagedTransportVersion() (pyptlib.config.Config method)hUtr|auhaNhbhhc]ubhD)r}}r~(h?Uh@hGhPNhUhµhW}r(h·‰h¸Xpyr€h\]h[]hY]hZ]h_]hºXmethodrh¼juhaNhbhhc]r‚(h¾)rƒ}r„(h?X,Config.checkManagedTransportVersion(version)h@j}hPhÁhUhÂhW}r…(h\]r†hahÅhQXpyptlib.configr‡…rˆ}r‰bh[]hY]hZ]h_]rŠhahÊX#Config.checkManagedTransportVersionr‹hÌj;h͉uhaNhbhhc]rŒ(hØ)r}rŽ(h?XcheckManagedTransportVersionh@jƒhPhÁhUhÛhW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rhlXcheckManagedTransportVersionr‘…r’}r“(h?Uh@jubaubhá)r”}r•(h?Uh@jƒhPhÁhUhähW}r–(hY]hZ]h[]h\]h_]uhaNhbhhc]r—hç)r˜}r™(h?XversionhW}rš(hY]hZ]h[]h\]h_]uh@j”hc]r›hlXversionrœ…r}rž(h?Uh@j˜ubahUhïubaubhð)rŸ}r (h?Uh@jƒhPNhUhóhW}r¡(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r¢h})r£}r¤(h?UhW}r¥(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidj‹uh@jŸhc]r¦hý)r§}r¨(h?UhW}r©(hY]hZ]rªjah[]h\]h_]uh@j£hc]r«hlX[source]r¬…r­}r®(h?Uh@j§ubahUjubahUhubaubeubhA)r¯}r°(h?Uh@j}hPhÁhUj hW}r±(hY]hZ]h[]h\]h_]uhaNhbhhc]r²(h¤)r³}r´(h?X@Check if Tor supports a specific managed-proxy protocol version.rµh@j¯hPXo/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.checkManagedTransportVersionr¶hUh¨hW}r·(hY]hZ]h[]h\]h_]uhaKhbhhc]r¸hlX@Check if Tor supports a specific managed-proxy protocol version.r¹…rº}r»(h?jµh@j³ubaubj$)r¼}r½(h?Uh@j¯hPNhUj'hW}r¾(hY]hZ]h[]h\]h_]uhaNhbhhc]r¿(j*)rÀ}rÁ(h?UhW}rÂ(hY]hZ]h[]h\]h_]uh@j¼hc]rÃ(j/)rÄ}rÅ(h?UhW}rÆ(hY]hZ]h[]h\]h_]uh@jÀhc]rÇhlX ParametersrÈ…rÉ}rÊ(h?Uh@jÄubahUj7ubj8)rË}rÌ(h?UhW}rÍ(hY]hZ]h[]h\]h_]uh@jÀhc]rÎh¤)rÏ}rÐ(h?UhW}rÑ(hY]hZ]h[]h\]h_]uh@jËhc]rÒ(jA)rÓ}rÔ(h?XversionhW}rÕ(hY]hZ]h[]h\]h_]uh@jÏhc]rÖhlXversionr×…rØ}rÙ(h?Uh@jÓubahUjIubhlX (rÚ…rÛ}rÜ(h?Uh@jÏubh})rÝ}rÞ(h?UhW}rß(UreftypejPU reftargetXstringràU refdomainj€h\]h[]U refexplicit‰hY]hZ]h_]uh@jÏhc]ráj)râ}rã(h?jàhW}rä(hY]hZ]h[]h\]h_]uh@jÝhc]råhlXstringræ…rç}rè(h?Uh@jâubahUj#ubahUhubhlX)…ré}rê(h?Uh@jÏubhlX -- rë…rì}rí(h?Uh@jÏubhlX!A managed-proxy protocol version.rî…rï}rð(h?X!A managed-proxy protocol version.h@jÏubehUh¨ubahUjbubehUjcubj*)rñ}rò(h?UhW}ró(hY]hZ]h[]h\]h_]uh@j¼hc]rô(j/)rõ}rö(h?UhW}r÷(hY]hZ]h[]h\]h_]uh@jñhc]røhlXReturnsrù…rú}rû(h?Uh@jõubahUj7ubj8)rü}rý(h?UhW}rþ(hY]hZ]h[]h\]h_]uh@jñhc]rÿh¤)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jühc]rhlX%bool -- True if version is supported.r…r}r(h?X%bool -- True if version is supported.h@jubahUh¨ubahUjbubehUjcubeubeubeubh›)r}r(h?Uh@hGhPNhUhŸhW}r (h\]h[]hY]hZ]h_]Uentries]r (h¢X6checkTransportEnabled() (pyptlib.config.Config method)hUtr auhaNhbhhc]ubhD)r }r (h?Uh@hGhPNhUhµhW}r(h·‰h¸Xpyrh\]h[]hY]hZ]h_]hºXmethodrh¼juhaNhbhhc]r(h¾)r}r(h?X'Config.checkTransportEnabled(transport)h@j hPhÁhUhÂhW}r(h\]rhahÅhQXpyptlib.configr…r}rbh[]hY]hZ]h_]rhahÊXConfig.checkTransportEnabledrhÌj;h͉uhaNhbhhc]r(hØ)r}r(h?XcheckTransportEnabledh@jhPhÁhUhÛhW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rhlXcheckTransportEnabledr …r!}r"(h?Uh@jubaubhá)r#}r$(h?Uh@jhPhÁhUhähW}r%(hY]hZ]h[]h\]h_]uhaNhbhhc]r&hç)r'}r((h?X transporthW}r)(hY]hZ]h[]h\]h_]uh@j#hc]r*hlX transportr+…r,}r-(h?Uh@j'ubahUhïubaubhð)r.}r/(h?Uh@jhPNhUhóhW}r0(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r1h})r2}r3(h?UhW}r4(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidjuh@j.hc]r5hý)r6}r7(h?UhW}r8(hY]hZ]r9jah[]h\]h_]uh@j2hc]r:hlX[source]r;…r<}r=(h?Uh@j6ubahUjubahUhubaubeubhA)r>}r?(h?Uh@j hPhÁhUj hW}r@(hY]hZ]h[]h\]h_]uhaNhbhhc]rA(h¤)rB}rC(h?XACheck if Tor wants the application to spawn a specific transport.rDh@j>hPXh/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.checkTransportEnabledrEhUh¨hW}rF(hY]hZ]h[]h\]h_]uhaKhbhhc]rGhlXACheck if Tor wants the application to spawn a specific transport.rH…rI}rJ(h?jDh@jBubaubj$)rK}rL(h?Uh@j>hPNhUj'hW}rM(hY]hZ]h[]h\]h_]uhaNhbhhc]rN(j*)rO}rP(h?UhW}rQ(hY]hZ]h[]h\]h_]uh@jKhc]rR(j/)rS}rT(h?UhW}rU(hY]hZ]h[]h\]h_]uh@jOhc]rVhlX ParametersrW…rX}rY(h?Uh@jSubahUj7ubj8)rZ}r[(h?UhW}r\(hY]hZ]h[]h\]h_]uh@jOhc]r]h¤)r^}r_(h?UhW}r`(hY]hZ]h[]h\]h_]uh@jZhc]ra(jA)rb}rc(h?X transporthW}rd(hY]hZ]h[]h\]h_]uh@j^hc]rehlX transportrf…rg}rh(h?Uh@jbubahUjIubhlX (ri…rj}rk(h?Uh@j^ubh})rl}rm(h?UhW}rn(UreftypejPU reftargetXstringroU refdomainjh\]h[]U refexplicit‰hY]hZ]h_]uh@j^hc]rpj)rq}rr(h?johW}rs(hY]hZ]h[]h\]h_]uh@jlhc]rthlXstringru…rv}rw(h?Uh@jqubahUj#ubahUhubhlX)…rx}ry(h?Uh@j^ubhlX -- rz…r{}r|(h?Uh@j^ubhlX"The name of a pluggable transport.r}…r~}r(h?X"The name of a pluggable transport.h@j^ubehUh¨ubahUjbubehUjcubj*)r€}r(h?UhW}r‚(hY]hZ]h[]h\]h_]uh@jKhc]rƒ(j/)r„}r…(h?UhW}r†(hY]hZ]h[]h\]h_]uh@j€hc]r‡hlXReturnsrˆ…r‰}rŠ(h?Uh@j„ubahUj7ubj8)r‹}rŒ(h?UhW}r(hY]hZ]h[]h\]h_]uh@j€hc]rŽh¤)r}r(h?UhW}r‘(hY]hZ]h[]h\]h_]uh@j‹hc]r’hlXBbool -- True if Tor wants the application to spawn that transport.r“…r”}r•(h?XBbool -- True if Tor wants the application to spawn that transport.h@jubahUh¨ubahUjbubehUjcubeubeubeubh›)r–}r—(h?Uh@hGhPNhUhŸhW}r˜(h\]h[]hY]hZ]h_]Uentries]r™(h¢X%emit() (pyptlib.config.Config method)h UtršauhaNhbhhc]ubhD)r›}rœ(h?Uh@hGhPNhUhµhW}r(h·‰h¸Xpyržh\]h[]hY]hZ]h_]hºXmethodrŸh¼jŸuhaNhbhhc]r (h¾)r¡}r¢(h?XConfig.emit(msg)h@j›hPhÁhUhÂhW}r£(h\]r¤h ahÅhQXpyptlib.configr¥…r¦}r§bh[]hY]hZ]h_]r¨h ahÊX Config.emitr©hÌj;h͉uhaNhbhhc]rª(hØ)r«}r¬(h?Xemith@j¡hPhÁhUhÛhW}r­(hY]hZ]h[]h\]h_]uhaNhbhhc]r®hlXemitr¯…r°}r±(h?Uh@j«ubaubhá)r²}r³(h?Uh@j¡hPhÁhUhähW}r´(hY]hZ]h[]h\]h_]uhaNhbhhc]rµhç)r¶}r·(h?XmsghW}r¸(hY]hZ]h[]h\]h_]uh@j²hc]r¹hlXmsgrº…r»}r¼(h?Uh@j¶ubahUhïubaubhð)r½}r¾(h?Uh@j¡hPNhUhóhW}r¿(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rÀh})rÁ}rÂ(h?UhW}rÃ(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidj©uh@j½hc]rÄhý)rÅ}rÆ(h?UhW}rÇ(hY]hZ]rÈjah[]h\]h_]uh@jÁhc]rÉhlX[source]rÊ…rË}rÌ(h?Uh@jÅubahUjubahUhubaubeubhA)rÍ}rÎ(h?Uh@j›hPhÁhUj hW}rÏ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÐ(h¤)rÑ}rÒ(h?XAnnounce a message.rÓh@jÍhPXW/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.emitrÔhUh¨hW}rÕ(hY]hZ]h[]h\]h_]uhaKhbhhc]rÖhlXAnnounce a message.r×…rØ}rÙ(h?jÓh@jÑubaubj$)rÚ}rÛ(h?Uh@jÍhPNhUj'hW}rÜ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÝj*)rÞ}rß(h?UhW}rà(hY]hZ]h[]h\]h_]uh@jÚhc]rá(j/)râ}rã(h?UhW}rä(hY]hZ]h[]h\]h_]uh@jÞhc]råhlX Parametersræ…rç}rè(h?Uh@jâubahUj7ubj8)ré}rê(h?UhW}rë(hY]hZ]h[]h\]h_]uh@jÞhc]rìh¤)rí}rî(h?UhW}rï(hY]hZ]h[]h\]h_]uh@jéhc]rð(jA)rñ}rò(h?XmsghW}ró(hY]hZ]h[]h\]h_]uh@jíhc]rôhlXmsgrõ…rö}r÷(h?Uh@jñubahUjIubhlX (rø…rù}rú(h?Uh@jíubh})rû}rü(h?UhW}rý(UreftypejPU reftargetXstrrþU refdomainjžh\]h[]U refexplicit‰hY]hZ]h_]uh@jíhc]rÿj)r}r(h?jþhW}r(hY]hZ]h[]h\]h_]uh@jûhc]rhlXstrr…r}r(h?Uh@jubahUj#ubahUhubhlX)…r}r(h?Uh@jíubhlX -- r …r }r (h?Uh@jíubhlX A message.r …r }r(h?X A message.rh@jíubehUh¨ubahUjbubehUjcubaubeubeubh›)r}r(h?Uh@hGhPXV/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.getrhUhŸhW}r(h\]h[]hY]hZ]h_]Uentries]r(h¢X$get() (pyptlib.config.Config method)hUtrauhaNhbhhc]ubhEh›)r}r(h?Uh@hGhPNhUhŸhW}r(h\]h[]hY]hZ]h_]Uentries]r(h¢X8getAllTransportsEnabled() (pyptlib.config.Config method)hUtrauhaNhbhhc]ubhD)r}r(h?Uh@hGhPNhUhµhW}r(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodrh¼juhaNhbhhc]r(h¾)r }r!(h?X Config.getAllTransportsEnabled()h@jhPhÁhUhÂhW}r"(h\]r#hahÅhQXpyptlib.configr$…r%}r&bh[]hY]hZ]h_]r'hahÊXConfig.getAllTransportsEnabledr(hÌj;h͉uhaNhbhhc]r)(hØ)r*}r+(h?XgetAllTransportsEnabledh@j hPhÁhUhÛhW}r,(hY]hZ]h[]h\]h_]uhaNhbhhc]r-hlXgetAllTransportsEnabledr.…r/}r0(h?Uh@j*ubaubhá)r1}r2(h?Uh@j hPhÁhUhähW}r3(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)r4}r5(h?Uh@j hPNhUhóhW}r6(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r7h})r8}r9(h?UhW}r:(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidj(uh@j4hc]r;hý)r<}r=(h?UhW}r>(hY]hZ]r?jah[]h\]h_]uh@j8hc]r@hlX[source]rA…rB}rC(h?Uh@j<ubahUjubahUhubaubeubhA)rD}rE(h?Uh@jhPhÁhUj hW}rF(hY]hZ]h[]h\]h_]uhaNhbhhc]rG(h¤)rH}rI(h?X?Check if Tor wants the application to spawn all its transpotrs.rJh@jDhPXj/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.getAllTransportsEnabledrKhUh¨hW}rL(hY]hZ]h[]h\]h_]uhaKhbhhc]rMhlX?Check if Tor wants the application to spawn all its transpotrs.rN…rO}rP(h?jJh@jHubaubj$)rQ}rR(h?Uh@jDhPNhUj'hW}rS(hY]hZ]h[]h\]h_]uhaNhbhhc]rTj*)rU}rV(h?UhW}rW(hY]hZ]h[]h\]h_]uh@jQhc]rX(j/)rY}rZ(h?UhW}r[(hY]hZ]h[]h\]h_]uh@jUhc]r\hlXReturnsr]…r^}r_(h?Uh@jYubahUj7ubj8)r`}ra(h?UhW}rb(hY]hZ]h[]h\]h_]uh@jUhc]rch¤)rd}re(h?UhW}rf(hY]hZ]h[]h\]h_]uh@j`hc]rghlXFbool -- True if Tor wants the application to spawn all its transports.rh…ri}rj(h?XFbool -- True if Tor wants the application to spawn all its transports.h@jdubahUh¨ubahUjbubehUjcubaubeubeubh›)rk}rl(h?Uh@hGhPNhUhŸhW}rm(h\]h[]hY]hZ]h_]Uentries]rn(h¢X<getManagedTransportVersions() (pyptlib.config.Config method)h5UtroauhaNhbhhc]ubhD)rp}rq(h?Uh@hGhPNhUhµhW}rr(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodrsh¼jsuhaNhbhhc]rt(h¾)ru}rv(h?X$Config.getManagedTransportVersions()h@jphPhÁhUhÂhW}rw(h\]rxh5ahÅhQXpyptlib.configry…rz}r{bh[]hY]hZ]h_]r|h5ahÊX"Config.getManagedTransportVersionsr}hÌj;h͉uhaNhbhhc]r~(hØ)r}r€(h?XgetManagedTransportVersionsh@juhPhÁhUhÛhW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]r‚hlXgetManagedTransportVersionsrƒ…r„}r…(h?Uh@jubaubhá)r†}r‡(h?Uh@juhPhÁhUhähW}rˆ(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)r‰}rŠ(h?Uh@juhPNhUhóhW}r‹(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rŒh})r}rŽ(h?UhW}r(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidj}uh@j‰hc]rhý)r‘}r’(h?UhW}r“(hY]hZ]r”jah[]h\]h_]uh@jhc]r•hlX[source]r–…r—}r˜(h?Uh@j‘ubahUjubahUhubaubeubhA)r™}rš(h?Uh@jphPhÁhUj hW}r›(hY]hZ]h[]h\]h_]uhaNhbhhc]rœj$)r}rž(h?Uh@j™hPNhUj'hW}rŸ(hY]hZ]h[]h\]h_]uhaNhbhhc]r j*)r¡}r¢(h?UhW}r£(hY]hZ]h[]h\]h_]uh@jhc]r¤(j/)r¥}r¦(h?UhW}r§(hY]hZ]h[]h\]h_]uh@j¡hc]r¨hlXReturnsr©…rª}r«(h?Uh@j¥ubahUj7ubj8)r¬}r­(h?UhW}r®(hY]hZ]h[]h\]h_]uh@j¡hc]r¯h¤)r°}r±(h?UhW}r²(hY]hZ]h[]h\]h_]uh@j¬hc]r³hlX>list -- The managed-proxy protocol versions that Tor supports.r´…rµ}r¶(h?X>list -- The managed-proxy protocol versions that Tor supports.h@j°ubahUh¨ubahUjbubehUjcubaubaubeubh›)r·}r¸(h?Uh@hGhPNhUhŸhW}r¹(h\]h[]hY]hZ]h_]Uentries]rº(h¢X1getStateLocation() (pyptlib.config.Config method)h*Utr»auhaNhbhhc]ubhD)r¼}r½(h?Uh@hGhPNhUhµhW}r¾(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodr¿h¼j¿uhaNhbhhc]rÀ(h¾)rÁ}rÂ(h?XConfig.getStateLocation()h@j¼hPhÁhUhÂhW}rÃ(h\]rÄh*ahÅhQXpyptlib.configrÅ…rÆ}rÇbh[]hY]hZ]h_]rÈh*ahÊXConfig.getStateLocationrÉhÌj;h͉uhaNhbhhc]rÊ(hØ)rË}rÌ(h?XgetStateLocationh@jÁhPhÁhUhÛhW}rÍ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÎhlXgetStateLocationrÏ…rÐ}rÑ(h?Uh@jËubaubhá)rÒ}rÓ(h?Uh@jÁhPhÁhUhähW}rÔ(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)rÕ}rÖ(h?Uh@jÁhPNhUhóhW}r×(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rØh})rÙ}rÚ(h?UhW}rÛ(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidjÉuh@jÕhc]rÜhý)rÝ}rÞ(h?UhW}rß(hY]hZ]ràjah[]h\]h_]uh@jÙhc]ráhlX[source]râ…rã}rä(h?Uh@jÝubahUjubahUhubaubeubhA)rå}ræ(h?Uh@j¼hPhÁhUj hW}rç(hY]hZ]h[]h\]h_]uhaNhbhhc]rèj$)ré}rê(h?Uh@jåhPNhUj'hW}rë(hY]hZ]h[]h\]h_]uhaNhbhhc]rìj*)rí}rî(h?UhW}rï(hY]hZ]h[]h\]h_]uh@jéhc]rð(j/)rñ}rò(h?UhW}ró(hY]hZ]h[]h\]h_]uh@jíhc]rôhlXReturnsrõ…rö}r÷(h?Uh@jñubahUj7ubj8)rø}rù(h?UhW}rú(hY]hZ]h[]h\]h_]uh@jíhc]rûh¤)rü}rý(h?UhW}rþ(hY]hZ]h[]h\]h_]uh@jøhc]rÿhlXstring -- The state location.r…r}r(h?Xstring -- The state location.h@jüubahUh¨ubahUjbubehUjcubaubaubeubh›)r}r(h?Uh@hGhPNhUhŸhW}r(h\]h[]hY]hZ]h_]Uentries]r(h¢X5managedTransportVer (pyptlib.config.Config attribute)hUtrauhaNhbhhc]ubhD)r}r (h?Uh@hGhPNhUhµhW}r (h·‰h¸Xpyh\]h[]hY]hZ]h_]hºX attributer h¼j uhaNhbhhc]r (h¾)r }r(h?XConfig.managedTransportVerh@jhPj{hUhÂhW}r(h\]rhahÅhQXpyptlib.configr…r}rbh[]hY]hZ]h_]rhahÊXConfig.managedTransportVerhÌj;h͉uhaNhbhhc]r(hØ)r}r(h?XmanagedTransportVerh@j hPj{hUhÛhW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rhlXmanagedTransportVerr…r}r(h?Uh@jubaubjÐ)r}r(h?X = []h@j hPj{hUjÓhW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]r hlX = []r!…r"}r#(h?Uh@jubaubeubhA)r$}r%(h?Uh@jhPj{hUj hW}r&(hY]hZ]h[]h\]h_]uhaNhbhhc]ubeubh›)r'}r((h?Uh@hGhPNhUhŸhW}r)(h\]h[]hY]hZ]h_]Uentries]r*(h¢X/stateLocation (pyptlib.config.Config attribute)hUtr+auhaNhbhhc]ubhD)r,}r-(h?Uh@hGhPNhUhµhW}r.(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºX attributer/h¼j/uhaNhbhhc]r0(h¾)r1}r2(h?XConfig.stateLocationh@j,hPj{hUhÂhW}r3(h\]r4hahÅhQXpyptlib.configr5…r6}r7bh[]hY]hZ]h_]r8hahÊXConfig.stateLocationhÌj;h͉uhaNhbhhc]r9(hØ)r:}r;(h?X stateLocationh@j1hPj{hUhÛhW}r<(hY]hZ]h[]h\]h_]uhaNhbhhc]r=hlX stateLocationr>…r?}r@(h?Uh@j:ubaubjÐ)rA}rB(h?X = Noneh@j1hPj{hUjÓhW}rC(hY]hZ]h[]h\]h_]uhaNhbhhc]rDhlX = NonerE…rF}rG(h?Uh@jAubaubeubhA)rH}rI(h?Uh@j,hPj{hUj hW}rJ(hY]hZ]h[]h\]h_]uhaNhbhhc]ubeubh›)rK}rL(h?Uh@hGhPNhUhŸhW}rM(h\]h[]hY]hZ]h_]Uentries]rN(h¢X,transports (pyptlib.config.Config attribute)h UtrOauhaNhbhhc]ubhD)rP}rQ(h?Uh@hGhPNhUhµhW}rR(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºX attributerSh¼jSuhaNhbhhc]rT(h¾)rU}rV(h?XConfig.transportsh@jPhPj{hUhÂhW}rW(h\]rXh ahÅhQXpyptlib.configrY…rZ}r[bh[]hY]hZ]h_]r\h ahÊXConfig.transportshÌj;h͉uhaNhbhhc]r](hØ)r^}r_(h?X transportsh@jUhPj{hUhÛhW}r`(hY]hZ]h[]h\]h_]uhaNhbhhc]rahlX transportsrb…rc}rd(h?Uh@j^ubaubjÐ)re}rf(h?X = []h@jUhPj{hUjÓhW}rg(hY]hZ]h[]h\]h_]uhaNhbhhc]rhhlX = []ri…rj}rk(h?Uh@jeubaubeubhA)rl}rm(h?Uh@jPhPj{hUj hW}rn(hY]hZ]h[]h\]h_]uhaNhbhhc]ubeubh›)ro}rp(h?Uh@hGhPNhUhŸhW}rq(h\]h[]hY]hZ]h_]Uentries]rr(h¢X.writeEnvError() (pyptlib.config.Config method)h,UtrsauhaNhbhhc]ubhD)rt}ru(h?Uh@hGhPNhUhµhW}rv(h·‰h¸Xpyrwh\]h[]hY]hZ]h_]hºXmethodrxh¼jxuhaNhbhhc]ry(h¾)rz}r{(h?XConfig.writeEnvError(message)h@jthPhÁhUhÂhW}r|(h\]r}h,ahÅhQXpyptlib.configr~…r}r€bh[]hY]hZ]h_]rh,ahÊXConfig.writeEnvErrorr‚hÌj;h͉uhaNhbhhc]rƒ(hØ)r„}r…(h?X writeEnvErrorh@jzhPhÁhUhÛhW}r†(hY]hZ]h[]h\]h_]uhaNhbhhc]r‡hlX writeEnvErrorrˆ…r‰}rŠ(h?Uh@j„ubaubhá)r‹}rŒ(h?Uh@jzhPhÁhUhähW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rŽhç)r}r(h?XmessagehW}r‘(hY]hZ]h[]h\]h_]uh@j‹hc]r’hlXmessager“…r”}r•(h?Uh@jubahUhïubaubhð)r–}r—(h?Uh@jzhPNhUhóhW}r˜(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r™h})rš}r›(h?UhW}rœ(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidj‚uh@j–hc]rhý)rž}rŸ(h?UhW}r (hY]hZ]r¡jah[]h\]h_]uh@jšhc]r¢hlX[source]r£…r¤}r¥(h?Uh@jžubahUjubahUhubaubeubhA)r¦}r§(h?Uh@jthPhÁhUj hW}r¨(hY]hZ]h[]h\]h_]uhaNhbhhc]r©(h¤)rª}r«(h?X=Announce that an error occured while parsing the environment.r¬h@j¦hPX`/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.writeEnvErrorr­hUh¨hW}r®(hY]hZ]h[]h\]h_]uhaKhbhhc]r¯hlX=Announce that an error occured while parsing the environment.r°…r±}r²(h?j¬h@jªubaubj$)r³}r´(h?Uh@j¦hPNhUj'hW}rµ(hY]hZ]h[]h\]h_]uhaNhbhhc]r¶j*)r·}r¸(h?UhW}r¹(hY]hZ]h[]h\]h_]uh@j³hc]rº(j/)r»}r¼(h?UhW}r½(hY]hZ]h[]h\]h_]uh@j·hc]r¾hlX Parametersr¿…rÀ}rÁ(h?Uh@j»ubahUj7ubj8)rÂ}rÃ(h?UhW}rÄ(hY]hZ]h[]h\]h_]uh@j·hc]rÅh¤)rÆ}rÇ(h?UhW}rÈ(hY]hZ]h[]h\]h_]uh@jÂhc]rÉ(jA)rÊ}rË(h?XmessagehW}rÌ(hY]hZ]h[]h\]h_]uh@jÆhc]rÍhlXmessagerÎ…rÏ}rÐ(h?Uh@jÊubahUjIubhlX (rÑ…rÒ}rÓ(h?Uh@jÆubh})rÔ}rÕ(h?UhW}rÖ(UreftypejPU reftargetXstrr×U refdomainjwh\]h[]U refexplicit‰hY]hZ]h_]uh@jÆhc]rØj)rÙ}rÚ(h?j×hW}rÛ(hY]hZ]h[]h\]h_]uh@jÔhc]rÜhlXstrrÝ…rÞ}rß(h?Uh@jÙubahUj#ubahUhubhlX)…rà}rá(h?Uh@jÆubhlX -- râ…rã}rä(h?Uh@jÆubhlXError message.rå…ræ}rç(h?XError message.h@jÆubehUh¨ubahUjbubehUjcubaubeubeubh›)rè}ré(h?Uh@hGhPNhUhŸhW}rê(h\]h[]hY]hZ]h_]Uentries]rë(h¢X-writeVersion() (pyptlib.config.Config method)hUtrìauhaNhbhhc]ubhD)rí}rî(h?Uh@hGhPNhUhµhW}rï(h·‰h¸Xpyrðh\]h[]hY]hZ]h_]hºXmethodrñh¼jñuhaNhbhhc]rò(h¾)ró}rô(h?XConfig.writeVersion(version)h@jíhPhÁhUhÂhW}rõ(h\]röhahÅhQXpyptlib.configr÷…rø}rùbh[]hY]hZ]h_]rúhahÊXConfig.writeVersionrûhÌj;h͉uhaNhbhhc]rü(hØ)rý}rþ(h?X writeVersionh@jóhPhÁhUhÛhW}rÿ(hY]hZ]h[]h\]h_]uhaNhbhhc]rhlX writeVersionr…r}r(h?Uh@jýubaubhá)r}r(h?Uh@jóhPhÁhUhähW}r(hY]hZ]h[]h\]h_]uhaNhbhhc]rhç)r}r (h?XversionhW}r (hY]hZ]h[]h\]h_]uh@jhc]r hlXversionr …r }r(h?Uh@jubahUhïubaubhð)r}r(h?Uh@jóhPNhUhóhW}r(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rh})r}r(h?UhW}r(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidjûuh@jhc]rhý)r}r(h?UhW}r(hY]hZ]rjah[]h\]h_]uh@jhc]rhlX[source]r…r}r(h?Uh@jubahUjubahUhubaubeubhA)r}r (h?Uh@jíhPhÁhUj hW}r!(hY]hZ]h[]h\]h_]uhaNhbhhc]r"(h¤)r#}r$(h?XEAnnounce that a specific managed-proxy protocol version is supported.r%h@jhPX_/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.writeVersionr&hUh¨hW}r'(hY]hZ]h[]h\]h_]uhaKhbhhc]r(hlXEAnnounce that a specific managed-proxy protocol version is supported.r)…r*}r+(h?j%h@j#ubaubj$)r,}r-(h?Uh@jhPNhUj'hW}r.(hY]hZ]h[]h\]h_]uhaNhbhhc]r/j*)r0}r1(h?UhW}r2(hY]hZ]h[]h\]h_]uh@j,hc]r3(j/)r4}r5(h?UhW}r6(hY]hZ]h[]h\]h_]uh@j0hc]r7hlX Parametersr8…r9}r:(h?Uh@j4ubahUj7ubj8)r;}r<(h?UhW}r=(hY]hZ]h[]h\]h_]uh@j0hc]r>h¤)r?}r@(h?UhW}rA(hY]hZ]h[]h\]h_]uh@j;hc]rB(jA)rC}rD(h?XversionhW}rE(hY]hZ]h[]h\]h_]uh@j?hc]rFhlXversionrG…rH}rI(h?Uh@jCubahUjIubhlX (rJ…rK}rL(h?Uh@j?ubh})rM}rN(h?UhW}rO(UreftypejPU reftargetXstrrPU refdomainjðh\]h[]U refexplicit‰hY]hZ]h_]uh@j?hc]rQj)rR}rS(h?jPhW}rT(hY]hZ]h[]h\]h_]uh@jMhc]rUhlXstrrV…rW}rX(h?Uh@jRubahUj#ubahUhubhlX)…rY}rZ(h?Uh@j?ubhlX -- r[…r\}r](h?Uh@j?ubhlX!A managed-proxy protocol version.r^…r_}r`(h?X!A managed-proxy protocol version.rah@j?ubehUh¨ubahUjbubehUjcubaubeubeubh›)rb}rc(h?Uh@hGhPXd/home/f/Computers/tor/pyptlib/pyptlib/config.py:docstring of pyptlib.config.Config.writeVersionErrorrdhUhŸhW}re(h\]h[]hY]hZ]h_]Uentries]rf(h¢X2writeVersionError() (pyptlib.config.Config method)h UtrgauhaNhbhhc]ubhD)rh}ri(h?Uh@hGhPjdhUhµhW}rj(h·‰h¸Xpyh\]h[]hY]hZ]h_]hºXmethodrkh¼jkuhaNhbhhc]rl(h¾)rm}rn(h?XConfig.writeVersionError()h@jhhPhÁhUhÂhW}ro(h\]rph ahÅhQXpyptlib.configrq…rr}rsbh[]hY]hZ]h_]rth ahÊXConfig.writeVersionErrorruhÌj;h͉uhaNhbhhc]rv(hØ)rw}rx(h?XwriteVersionErrorh@jmhPhÁhUhÛhW}ry(hY]hZ]h[]h\]h_]uhaNhbhhc]rzhlXwriteVersionErrorr{…r|}r}(h?Uh@jwubaubhá)r~}r(h?Uh@jmhPhÁhUhähW}r€(hY]hZ]h[]h\]h_]uhaNhbhhc]ubhð)r}r‚(h?Uh@jmhPNhUhóhW}rƒ(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]r„h})r…}r†(h?UhW}r‡(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidjuuh@jhc]rˆhý)r‰}rŠ(h?UhW}r‹(hY]hZ]rŒjah[]h\]h_]uh@j…hc]rhlX[source]rŽ…r}r(h?Uh@j‰ubahUjubahUhubaubeubhA)r‘}r’(h?Uh@jhhPhÁhUj hW}r“(hY]hZ]h[]h\]h_]uhaNhbhhc]r”h¤)r•}r–(h?XKAnnounce that we could not find a supported managed-proxy protocol version.r—h@j‘hPjdhUh¨hW}r˜(hY]hZ]h[]h\]h_]uhaKhbhhc]r™hlXKAnnounce that we could not find a supported managed-proxy protocol version.rš…r›}rœ(h?j—h@j•ubaubaubeubeubhPjhUhµhW}r(h·‰h¸Xpyržh\]h[]hY]hZ]h_]hºXmethodrŸh¼jŸuhaNhbhhc]r (h¾)r¡}r¢(h?XConfig.get(key)h@hEhPhÁhUhÂhW}r£(h\]r¤hahÅhQXpyptlib.configr¥…r¦}r§bh[]hY]hZ]h_]r¨hahÊX Config.getr©hÌj;h͉uhaNhbhhc]rª(hØ)r«}r¬(h?Xgeth@j¡hPhÁhUhÛhW}r­(hY]hZ]h[]h\]h_]uhaNhbhhc]r®hlXgetr¯…r°}r±(h?Uh@j«ubaubhá)r²}r³(h?Uh@j¡hPhÁhUhähW}r´(hY]hZ]h[]h\]h_]uhaNhbhhc]rµhç)r¶}r·(h?XkeyhW}r¸(hY]hZ]h[]h\]h_]uh@j²hc]r¹hlXkeyrº…r»}r¼(h?Uh@j¶ubahUhïubaubhð)r½}r¾(h?Uh@j¡hPNhUhóhW}r¿(Uexprhõh\]h[]hY]hZ]h_]uhaNhbhhc]rÀh})rÁ}rÂ(h?UhW}rÃ(UreftypehúUrefdoch‡U refdomainhûh\]h[]U refexplicit‰hY]hZ]h_]U reftargetX_modules/pyptlib/configUrefidj©uh@j½hc]rÄhý)rÅ}rÆ(h?UhW}rÇ(hY]hZ]rÈjah[]h\]h_]uh@jÁhc]rÉhlX[source]rÊ…rË}rÌ(h?Uh@jÅubahUjubahUhubaubeubhBeubhPhÁhUj hW}rÍ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÎ(h¤)rÏ}rÐ(h?X)Get the value of an environment variable.rÑh@hBhPjhUh¨hW}rÒ(hY]hZ]h[]h\]h_]uhaKhbhhc]rÓhlX)Get the value of an environment variable.rÔ…rÕ}rÖ(h?jÑh@jÏubaubj$)r×}rØ(h?Uh@hBhPjhUj'hW}rÙ(hY]hZ]h[]h\]h_]uhaNhbhhc]rÚ(j*)rÛ}rÜ(h?UhW}rÝ(hY]hZ]h[]h\]h_]uh@j×hc]rÞ(j/)rß}rà(h?UhW}rá(hY]hZ]h[]h\]h_]uh@jÛhc]râhlX Parametersrã…rä}rå(h?Uh@jßubahUj7ubj8)ræ}rç(h?UhW}rè(hY]hZ]h[]h\]h_]uh@jÛhc]réh¤)rê}rë(h?UhW}rì(hY]hZ]h[]h\]h_]uh@jæhc]rí(jA)rî}rï(h?XkeyhW}rð(hY]hZ]h[]h\]h_]uh@jêhc]rñhlXkeyrò…ró}rô(h?Uh@jîubahUjIubhlX (rõ…rö}r÷(h?Uh@jêubh})rø}rù(h?UhW}rú(UreftypejPU reftargetXstrrûU refdomainjžh\]h[]U refexplicit‰hY]hZ]h_]uh@jêhc]rüj)rý}rþ(h?jûhW}rÿ(hY]hZ]h[]h\]h_]uh@jøhc]rhlXstrr…r}r(h?Uh@jýubahUj#ubahUhubhlX)…r}r(h?Uh@jêubhlX -- r…r}r(h?Uh@jêubhlXEnvironment variable key.r …r }r (h?XEnvironment variable key.h@jêubehUh¨ubahUjbubehUjcubj*)r }r (h?UhW}r(hY]hZ]h[]h\]h_]uh@j×hc]r(j/)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@j hc]rhlXReturnsr…r}r(h?Uh@jubahUj7ubj8)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@j hc]rh¤)r}r(h?UhW}r(hY]hZ]h[]h\]h_]uh@jhc]rhlX-str -- The value of the envrionment variable.r…r }r!(h?X-str -- The value of the envrionment variable.h@jubahUh¨ubahUjbubehUjcubj*)r"}r#(h?Uh@j×hPjhUjchW}r$(hY]hZ]h[]h\]h_]uhaKhbhhc]r%(j/)r&}r'(h?XraiseshW}r((hY]hZ]h[]h\]h_]uh@j"hc]r)hlXRaises r*…r+}r,(h?Uh@j&ubahUj7ubj8)r-}r.(h?X/:class:`pyptlib.config.EnvError` if environmentr/hW}r0(hY]hZ]h[]h\]h_]uh@j"hc]r1h¤)r2}r3(h?j/h@j-hPjhUh¨hW}r4(hY]hZ]h[]h\]h_]uhaKhc]r5(h})r6}r7(h?X :class:`pyptlib.config.EnvError`r8h@j2hPNhUhhW}r9(UreftypeXclasshƒ‰h„Xpyptlib.config.EnvErrorU refdomainXpyr:h\]h[]U refexplicit‰hY]hZ]h_]h†h‡hˆj;h‰jÏuhaNhc]r;h‹)r<}r=(h?j8hW}r>(hY]hZ]r?(hj:Xpy-classr@eh[]h\]h_]uh@j6hc]rAhlXpyptlib.config.EnvErrorrB…rC}rD(h?Uh@j<ubahUh–ubaubhlX if environmentrE…rF}rG(h?X if environmenth@j2ubeubahUjbubeubeubh¤)rH}rI(h?Xvariable could not be found.rJh@hBhPjhUh¨hW}rK(hY]hZ]h[]h\]h_]uhaKhbhhc]rLhlXvariable could not be found.rM…rN}rO(h?jJh@jHubaubeubhPjhUUsystem_messagerPhW}rQ(hY]UlevelKh\]h[]UsourcejhZ]h_]UlineKUtypeUWARNINGrRuhaKhbhhc]rSh¤)rT}rU(h?UhW}rV(hY]hZ]h[]h\]h_]uh@h=hc]rWhlX:Field list ends without a blank line; unexpected unindent.rX…rY}rZ(h?Uh@jTubahUh¨ubaubh<)r[}r\(h?UhW}r](hY]UlevelKh\]h[]Usourcej1hZ]h_]UlineK UtypeUERRORr^uh@j8)r_}r`(h?X]dictionary that contains information for the application: =============== ========== ========== Key Type Value ================ ========== ========== state_loc string Directory where the managed proxy should dump its state files (if needed). orport tuple (ip,port) tuple pointing to Tor's ORPort. ext_orport tuple (ip,port) tuple pointing to Tor's Extended ORPort. None if Extended ORPort is not supported. transports dict A dictionary 'transport => (ip,port)' where 'transport' is the name of the transport that should be spawned, and '(ip,port)' is the location where the transport should bind. The dictionary can be empty. auth_cookie_file string Directory where the managed proxy should find the Extended ORPort authentication cookie. ================ ========== ========== hW}ra(hY]hZ]h[]h\]h_]uh@j*)rb}rc(h?Uh@j$)rd}re(h?Uh@j*hPj1hUj'hW}rf(hY]hZ]h[]h\]h_]uhaKhbhhc]rg(j*)rh}ri(h?Uh@jdhPj1hUjchW}rj(hY]hZ]h[]h\]h_]uhaKhbhhc]rk(j/)rl}rm(h?Xparam list supported_transportsrnhW}ro(hY]hZ]h[]h\]h_]uh@jhhc]rphlXparam list supported_transportsrq…rr}rs(h?jnh@jlubahUj7ubj8)rt}ru(h?X7Names of the transports that the application supports. hW}rv(hY]hZ]h[]h\]h_]uh@jhhc]rwh¤)rx}ry(h?jxh@jthPj1hUh¨hW}rz(hY]hZ]h[]h\]h_]uhaKhc]r{jvaubahUjbubeubjbjeubhPj1hUjchW}r|(hY]hZ]h[]h\]h_]uhaKhbhhc]r}(j/)r~}r(h?Xreturnsr€hW}r(hY]hZ]h[]h\]h_]uh@jbhc]r‚hlXreturnsrƒ…r„}r…(h?j€h@j~ubahUj7ubj_eubhc]r†(h¤)r‡}rˆ(h?jh@j_hPj1hUh¨hW}r‰(hY]hZ]h[]h\]h_]uhaKhc]rŠjaubj[ehUjbubhc]r‹(h¤)rŒ}r(h?UhW}rŽ(hY]hZ]h[]h\]h_]uh@j[hc]rhlX@Malformed table. Column span alignment problem at line offset 2.r…r‘}r’(h?Uh@jŒubahUh¨ubcdocutils.nodes literal_block r“)r”}r•(h?X!=============== ========== ========== Key Type Value ================ ========== ========== state_loc string Directory where the managed proxy should dump its state files (if needed). orport tuple (ip,port) tuple pointing to Tor's ORPort. ext_orport tuple (ip,port) tuple pointing to Tor's Extended ORPort. None if Extended ORPort is not supported. transports dict A dictionary 'transport => (ip,port)' where 'transport' is the name of the transport that should be spawned, and '(ip,port)' is the location where the transport should bind. The dictionary can be empty. auth_cookie_file string Directory where the managed proxy should find the Extended ORPort authentication cookie. ================ ========== ==========hW}r–(U xml:spacer—Upreserver˜h\]h[]hY]hZ]h_]uh@j[hc]r™hlX!=============== ========== ========== Key Type Value ================ ========== ========== state_loc string Directory where the managed proxy should dump its state files (if needed). orport tuple (ip,port) tuple pointing to Tor's ORPort. ext_orport tuple (ip,port) tuple pointing to Tor's Extended ORPort. None if Extended ORPort is not supported. transports dict A dictionary 'transport => (ip,port)' where 'transport' is the name of the transport that should be spawned, and '(ip,port)' is the location where the transport should bind. The dictionary can be empty. auth_cookie_file string Directory where the managed proxy should find the Extended ORPort authentication cookie. ================ ========== ==========rš…r›}rœ(h?Uh@j”ubahUU literal_blockrubehUjPubeUcurrent_sourceržNU decorationrŸNUautofootnote_startr KUnameidsr¡}r¢(hhhhhhh h h j¹ h h h h h jhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhj”hhh h h!h!h"h"h#h#h$h^h%h%h&h&h'h'h(huh)h)h*h*h+h+h,h,h-h-h.h.h/jÂh0h0h1h1h2h2h3h3h4j¥h5h5h6h6h7h7uhc]r£hNah?UU transformerr¤NU footnote_refsr¥}r¦Urefnamesr§}r¨Usymbol_footnotesr©]rªUautofootnote_refsr«]r¬Usymbol_footnote_refsr­]r®U citationsr¯]r°hbhU current_liner±NUtransform_messagesr²]r³Ureporterr´NUid_startrµKU autofootnotesr¶]r·U citation_refsr¸}r¹Uindirect_targetsrº]r»Usettingsr¼(cdocutils.frontend Values r½or¾}r¿(Ufootnote_backlinksrÀKUrecord_dependenciesrÁNU rfc_base_urlrÂUhttp://tools.ietf.org/html/rÃU tracebackrÄKUpep_referencesrÅNUstrip_commentsrÆNU toc_backlinksrÇj«U language_coderÈUenrÉU datestamprÊNU report_levelrËKU _destinationrÌNU halt_levelrÍKU strip_classesrÎNhiNUerror_encoding_error_handlerrÏUbackslashreplacerÐUdebugrÑNUembed_stylesheetrÒ‰Uoutput_encoding_error_handlerrÓUstrictrÔU sectnum_xformrÕKUdump_transformsrÖNU docinfo_xformr×KUwarning_streamrØNUpep_file_url_templaterÙUpep-%04drÚUexit_status_levelrÛKUconfigrÜNUstrict_visitorrÝNUcloak_email_addressesrÞˆUtrim_footnote_reference_spacer߉UenvràNUdump_pseudo_xmlráNUexpose_internalsrâNUsectsubtitle_xformrã‰U source_linkräNUrfc_referencesråNUoutput_encodingræUutf-8rçU source_urlrèNUinput_encodingréU utf-8-sigrêU_disable_configrëNU id_prefixrìUU tab_widthríKUerror_encodingrîUUTF-8rïU_sourcerðU0/home/f/Computers/tor/pyptlib/sphinx/pyptlib.rstrñUgettext_compactròˆU generatorróNUdump_internalsrôNU pep_base_urlrõUhttp://www.python.org/dev/peps/röUinput_encoding_error_handlerr÷jÔUauto_id_prefixrøUidrùUdoctitle_xformrú‰Ustrip_elements_with_classesrûNU _config_filesrü]Ufile_insertion_enabledrýKU raw_enabledrþKU dump_settingsrÿNubUsymbol_footnote_startrKUidsr}r(j¹ j´ hjÆhjPh jmh j¡h jUjÁcdocutils.nodes target r)r}r(h?Uh@j½hPhžhUUtargetrhW}r(hY]h\]rjÁah[]UismodˆhZ]h_]uhaKhbhhc]ubhj6hj@ j“j)r }r (h?Uh@jhPhžhUjhW}r (hY]h\]r j“ah[]UismodˆhZ]h_]uhaKhbhhc]ubhjNhj hj j¥hLhj3hjÑ hj1huhphjhj[hj hjhjÂhjƒj”jhjžh jßh!jqh"j¬hj¡h#j˜ hjóh%jè h&j h'j÷htj)r }r(h?Uh@hphPhžhUjhW}r(hY]h\]rhtah[]UismodˆhZ]h_]uhaKhbhhc]ubh^hNjÂj½h)j-jj)r}r(h?Uh@jhPhžhUjhW}r(hY]h\]rjah[]UismodˆhZ]h_]uhaKhbhhc]ubh*jÁh+h¿jjh,jzh-jàh.jyh0jOh1j¦h2j8 h3jcj¤j)r}r(h?Uh@hLhPhžhUjhW}r(hY]h\]rj¤ah[]UismodˆhZ]h_]uhaKhbhhc]ubhjñ h5juh6jí j¸ j)r}r(h?Uh@j´ hPhžhUjhW}r(hY]h\]rj¸ ah[]UismodˆhZ]h_]uhaKhbhhc]ubh7jŸuUsubstitution_namesr}rhUhbhW}r(hY]h\]h[]UsourcehShZ]h_]uU footnotesr ]r!Urefidsr"}r#ub.pyptlib-0.0.5/doc/html/000077500000000000000000000000001222335101500147025ustar00rootroot00000000000000pyptlib-0.0.5/doc/html/.buildinfo000066400000000000000000000003461222335101500166610ustar00rootroot00000000000000# Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. config: 2f54b089542e799113081cc25e68078d tags: fbb0d17656682115ca4d033fb2f83ba1 pyptlib-0.0.5/doc/html/API.html000066400000000000000000000432571222335101500162140ustar00rootroot00000000000000 API overview — pyptlib 0.0.1 documentation

«  pyptlib README   ::   Contents   ::   Pluggable transports glossary  Â»

API overview¶

Be sure to read API.rst and glossary.rst before reading this file.

General Overview¶

Applications begin by initializing pyptlib.

Then pyptlib informs the application about which transports it should spawn, in which ports they should listen for connections, etc.

Then the application launches the appropriate transports as instructed, and for each transport it reports to pyptlib whether it was launched successfully or not. Finally, the application announces to pyptlib that it finished launching transports.

From that point and on the application should forget about pyptlib and start accepting connections.

Detailed API Overview¶

0) Find if it’s a client or a server¶

An application using pyptlib should start by calling pyptlib.util.checkClientMode() to learn whether Tor wants it to run as a client or as a server.

1) Get transport information from Tor¶

If Tor wants the application to run as a client, the next step is to run pyptlib.client.init(). Otherwise, the application should run pyptlib.server.init().

init() expects to be passed a list with the names of the transports your application supports.

The application should be prepared for pyptlib.config.EnvError, which signifies that the environment was not prepared by Tor.

The application should store the return value of the init() function.

Consider an example of the fictional application rot0r which implements the pluggable transports rot13 and rot26. If rot0r, in step 1, learned that Tor expects it to act as a client, it should now do:

import pyptlib.client
import pyptlib.config

try:
    managed_info = pyptlib.client.init(["rot13", "rot26"])
except pyptlib.config.EnvError, err:
    print "pyptlib could not bootstrap ('%s')." % str(err)

2) Launch transports¶

Client case (skip if you are a server)¶

If your application is a client, the return value of pyptlib.client.init() is a dictionary of the format:

Key Type Value
state_loc string Directory where the managed proxy should dump its state files (if needed).
transports list Strings of the names of the transports that should be launched. The list can be empty.

Your application should then use the transports key to learn which transports it should launch.

Proceeding with the previous example:

if 'rot13' in managed_info['transports']:
    launch_rot13_client()
if 'rot26' in managed_info['transports']:
    launch_rot26_client()

Note

Since the application runs as a client, it should launch a SOCKS server in the upstream side of the proxy.

Server case (skip if you are a client):¶

If your application is a server, the return value of pyptlib.server.init() is a dictionary of the format:

Key Type Value
state_loc string Directory where the managed proxy should dump its state files (if needed).
orport tuple (ip,port) tuple pointing to Tor’s ORPort.
ext_orport tuple (ip,port) tuple pointing to Tor’s Extended ORPort. None if Extended ORPort is not supported.
transports dict A dictionary ‘transport => (ip,port)’ where ‘transport’ is the name of the transport that should be spawned, and ‘(ip,port)’ is the location where the transport should bind. The dictionary can be empty.

Your application should then use the transports key and attempt to launch the appropriate transports. Furthermore, since the application runs as a server, it should push data to Tor’s ORPort. The TCP/IP location of the ORPort is provided in the orport key.

Proceeding with the previous example:

if 'rot13' in managed_info['transports']:
    launch_rot13_server(managed_info['transports']['rot13'], managed_info['orport'])
if 'rot26' in managed_info['transports']:
    launch_rot26_server(managed_info['transports']['rot26'], managed_info['orport'])

3) Report results back to Tor.¶

For every transport that the application launches, it reports to pyptlib whether it was launched successfully or not. This way, Tor is informed on whether a transport is expected to work or not.

Client case (skip if you are a server):¶

Everytime a transport is successfully launched, the application calls pyptlib.client.reportSuccess() with the name of the transport that was launched, the address where it is listening for connections, and the SOCKS version that the upstream SOCKS server supports.

For example, if rot13 was launched successfully, waits for connections in ‘127.0.0.1:42042’ and supports SOCKSv4, the appropriate call would be:

pyptlib.client.reportSuccess('rot13', 5, ('127.0.0.1', 42042))

Everytime a transport failed to launch, the application calls pyptlib.client.reportFailure() with the name of the transport and a message.

For example, if rot26 failed to launch, the appropriate call would be:

pyptlib.client.reportFailure('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)')

Server case (skip if you are a client):¶

Everytime a transport is successfully launched, the application calls pyptlib.server.reportSuccess() with the name of the transport that was launched, and the address where it is listening for connections.

For example, if rot13 was launched successfully and waits for connections in ‘127.0.0.1:42042’, the appropriate call would be:

pyptlib.server.reportSuccess('rot13', ('127.0.0.1', 42042))

Everytime a transport failed to launch, the application calls pyptlib.server.reportFailure() with the name of the transport and a message.

For example, if rot26 failed to launch, the appropriate call would be:

pyptlib.server.reportFailure('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)')

4) Stop using pyptlib and start accepting connections¶

When the application finishes launching connections, it should call pyptlib.client.reportEnd() (or pyptlib.server.reportEnd()), to announce to pyptlib that all transports were launched. This way, Tor knows that it can start pushing traffic to the application.

After this point, pyptlib has no other use.

«  pyptlib README   ::   Contents   ::   Pluggable transports glossary  Â»

pyptlib-0.0.5/doc/html/README.html000066400000000000000000000101701222335101500165240ustar00rootroot00000000000000 pyptlib README — pyptlib 0.0.1 documentation

pyptlib documentation

pyptlib README

«  Welcome to pyptlib!   ::   Contents   ::   API overview  Â»

pyptlib README¶

  • What is pyptlib?

pyptlib is a little Python library which understands the pluggable transport managed-proxy protocol.

  • Who is interested in pyptlib?

You might be interested in pyptlib if you have an application that obfuscates TCP traffic and you want to integrate it easily with Tor.

  • What does pyptlib do?

pyptlib speaks with Tor and informs your application about which pluggable transports Tor needs, in which ports they should listen for connections, in which filesystem directory they should keep state, etc.

  • What does pyptlib not do?

pyptlib doesn’t help your application do networking or obfuscation.

  • What does pyptlib expect from an application?

pyptlib assumes that your application is executed by Tor as a managed-proxy.

pyptlib assumes that your application acts as a proxy: it listens for traffic on a TCP port and pushes the traffic somewhere else.

pyptlib assumes that your application has a SOCKS server when it acts as a client. This is needed because Tor needs to dynamically select where its data will be pushed to.

  • How do I use pyptlib?

Read the documentation, the examples and the source.

  • What are these buzzwords?

glossary.rst

«  Welcome to pyptlib!   ::   Contents   ::   API overview  Â»

pyptlib-0.0.5/doc/html/_modules/000077500000000000000000000000001222335101500165115ustar00rootroot00000000000000pyptlib-0.0.5/doc/html/_modules/index.html000066400000000000000000000044611222335101500205130ustar00rootroot00000000000000 Overview: module code — pyptlib 0.0.1 documentation

pyptlib documentation

Overview: module code

pyptlib-0.0.5/doc/html/_modules/pyptlib/000077500000000000000000000000001222335101500201745ustar00rootroot00000000000000pyptlib-0.0.5/doc/html/_modules/pyptlib/client.html000066400000000000000000000267151222335101500223530ustar00rootroot00000000000000 pyptlib.client — pyptlib 0.0.1 documentation

pyptlib documentation

pyptlib.client

Source code for pyptlib.client

#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
Public client-side pyptlib API.
"""

from pyptlib.config import EnvError
from pyptlib.client_config import ClientConfig

[docs]def init(supported_transports): """ Bootstrap client-side managed-proxy mode. *Call in the beginning of your application.* :param list supported_transports: Names of the transports that the application supports. :returns: dictionary that contains information for the application. ========== ========== ========== Key Type Value ========== ========== ========== state_loc string Directory where the managed proxy should dump its state files (if needed). transports list Strings of the names of the transports that should be launched. The list can be empty. ========== ========== ========== :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ supportedTransportVersion = '1' config = ClientConfig() if config.checkManagedTransportVersion(supportedTransportVersion): config.writeVersion(supportedTransportVersion) else: config.writeVersionError() raise EnvError("Unsupported managed proxy protocol version (%s)" % str(config.getManagedTransportVersions())) retval = {} retval['state_loc'] = config.getStateLocation() retval['transports'] = _getTransportsList(supported_transports, config) return retval
[docs]def reportSuccess(name, socksVersion, addrport, args=None, optArgs=None): """ Report that a client transport was launched succesfully. *Always call after successfully launching a transport.* :param str name: Name of transport. :param int socksVersion: The SOCKS protocol version. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str args: ARGS field for this transport. :param str args: OPT-ARGS field for this transport. """ config = ClientConfig() config.writeMethod(name, socksVersion, addrport, args, optArgs)
[docs]def reportFailure(name, message): """ Report that a client transport failed to launch. *Always call after failing to launch a transport.* :param str name: Name of transport. :param str message: Error message. """ config = ClientConfig() config.writeMethodError(name, message)
[docs]def reportEnd(): """ Report that we are done launching transports. *Call after you have launched all the transports you could launch.* """ config = ClientConfig() config.writeMethodEnd()
def _getTransportsList(supported_transports, config): """ Figure out which transports the application should launch, based on the transports it supports and on the transports that Tor wants it to spawn. :param list supported_transports: Transports that the application supports. :param :class:`pyptlib.client_config.ClientConfig` config: Configuration of Tor. :returns: A list of transports that the application should launch. """ transports = [] if config.getAllTransportsEnabled(): return supported_transports for transport in config.getClientTransports(): if transport in supported_transports: transports.append(transport) else: config.writeMethodError(transport, "not supported") return transports
pyptlib-0.0.5/doc/html/_modules/pyptlib/client_config.html000066400000000000000000000250671222335101500236770ustar00rootroot00000000000000 pyptlib.client_config — pyptlib 0.0.1 documentation

pyptlib documentation

pyptlib.client_config

Source code for pyptlib.client_config

#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
Low-level parts of pyptlib that are only useful to clients.
"""

from pyptlib.config import Config

[docs]class ClientConfig(Config): """ A client-side pyptlib configuration. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ def __init__(self): Config.__init__(self) self.transports = self.get('TOR_PT_CLIENT_TRANSPORTS').split(',') if '*' in self.transports: self.allTransportsEnabled = True self.transports.remove('*')
[docs] def getClientTransports(self): # XXX why is this client-specific ??? """ Return a list of strings representing the client transports reported by Tor. If present, the wildcard transport, '*', is stripped from this list and used to set allTransportsEnabled to True. :returns: list of transports """ return self.transports
[docs] def writeMethod(self, name, socksVersion, addrport, args=None, optArgs=None): """ Write a message to stdout announcing that a transport was successfully launched. :param str name: Name of transport. :param int socksVersion: The SOCKS protocol version. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str args: ARGS field for this transport. :param str optArgs: OPT-ARGS field for this transport. """ methodLine = 'CMETHOD %s socks%s %s:%s' % (name, socksVersion, addrport[0], addrport[1]) if args and len(args) > 0: methodLine = methodLine + ' ARGS=' + args.join(',') if optArgs and len(optArgs) > 0: methodLine = methodLine + ' OPT-ARGS=' + args.join(',') self.emit(methodLine)
[docs] def writeMethodError(self, name, message): """ Write a message to stdout announcing that we failed to launch a transport. :param str name: Name of transport. :param str message: Error message. """ self.emit('CMETHOD-ERROR %s %s' % (name, message))
[docs] def writeMethodEnd(self): """ Write a message to stdout announcing that we finished launching transports.. """ self.emit('CMETHODS DONE')
pyptlib-0.0.5/doc/html/_modules/pyptlib/config.html000066400000000000000000000402141222335101500223300ustar00rootroot00000000000000 pyptlib.config — pyptlib 0.0.1 documentation

pyptlib documentation

pyptlib.config

Source code for pyptlib.config

#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
Parts of pyptlib that are useful both to clients and servers.
"""

import os, sys

[docs]class Config(object): """ pyptlib's configuration. :var string stateLocation: Location where application should store state. :var list managedTransportVer: List of managed-proxy protocol versions that Tor supports. :var list transports: Strings of pluggable transport names that Tor wants us to handle. :var bool allTransportsEnabled: True if Tor wants us to spawn all the transports. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ stateLocation = None # TOR_PT_STATE_LOCATION managedTransportVer = [] # TOR_PT_MANAGED_TRANSPORT_VER transports = [] # TOR_PT_SERVER_TRANSPORTS or TOR_PT_CLIENT_TRANSPORTS allTransportsEnabled = False def __init__(self): self.stateLocation = self.get('TOR_PT_STATE_LOCATION') self.managedTransportVer = self.get('TOR_PT_MANAGED_TRANSPORT_VER').split(',')
[docs] def checkClientMode(self): """ Check whether Tor wants us to run as a client or as a server. :returns: bool -- True if Tor wants us to run as a client. """ return self.check('TOR_PT_CLIENT_TRANSPORTS')
[docs] def getStateLocation(self): """ :returns: string -- The state location. """ return self.stateLocation
[docs] def getManagedTransportVersions(self): """ :returns: list -- The managed-proxy protocol versions that Tor supports. """ return self.managedTransportVer
[docs] def checkManagedTransportVersion(self, version): """ Check if Tor supports a specific managed-proxy protocol version. :param string version: A managed-proxy protocol version. :returns: bool -- True if version is supported. """ return version in self.managedTransportVer
[docs] def getAllTransportsEnabled(self): """ Check if Tor wants the application to spawn all its transpotrs. :returns: bool -- True if Tor wants the application to spawn all its transports. """ return self.allTransportsEnabled
[docs] def checkTransportEnabled(self, transport): """ Check if Tor wants the application to spawn a specific transport. :param string transport: The name of a pluggable transport. :returns: bool -- True if Tor wants the application to spawn that transport. """ return self.allTransportsEnabled or transport in self.transports
[docs] def writeEnvError(self, message): # ENV-ERROR """ Announce that an error occured while parsing the environment. :param str message: Error message. """ self.emit('ENV-ERROR %s' % message)
[docs] def writeVersion(self, version): # VERSION """ Announce that a specific managed-proxy protocol version is supported. :param str version: A managed-proxy protocol version. """ self.emit('VERSION %s' % version)
[docs] def writeVersionError(self): # VERSION-ERROR """ Announce that we could not find a supported managed-proxy protocol version. """ self.emit('VERSION-ERROR no-version')
[docs] def check(self, key): """ Check the environment for a specific environment variable. :param str key: Environment variable key. :returns: bool -- True if the environment variable is set. """ return key in os.environ
[docs] def get(self, key): """ Get the value of an environment variable. :param str key: Environment variable key. :returns: str -- The value of the envrionment variable. :raises: :class:`pyptlib.config.EnvError` if environment variable could not be found. """ if key in os.environ: return os.environ[key] else: message = 'Missing environment variable %s' % key self.writeEnvError(message) raise EnvError(message)
[docs] def emit(self, msg): """ Announce a message. :param str msg: A message. """ print msg sys.stdout.flush()
[docs]class EnvError(Exception): """ Thrown when the environment is incomplete or corrupted. """ pass
pyptlib-0.0.5/doc/html/_modules/pyptlib/server.html000066400000000000000000000317741222335101500224040ustar00rootroot00000000000000 pyptlib.server — pyptlib 0.0.1 documentation

pyptlib documentation

pyptlib.server

Source code for pyptlib.server

#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
Public server-side pyptlib API.
"""

from pyptlib.config import EnvError
from pyptlib.server_config import ServerConfig


[docs]def init(supported_transports): """ Bootstrap server-side managed-proxy mode. *Call in the beginning of your application.* :param list supported_transports: Names of the transports that the application supports. :returns: dictionary that contains information for the application: =============== ========== ========== Key Type Value ================ ========== ========== state_loc string Directory where the managed proxy should dump its state files (if needed). orport tuple (ip,port) tuple pointing to Tor's ORPort. ext_orport tuple (ip,port) tuple pointing to Tor's Extended ORPort. None if Extended ORPort is not supported. transports dict A dictionary 'transport => (ip,port)' where 'transport' is the name of the transport that should be spawned, and '(ip,port)' is the location where the transport should bind. The dictionary can be empty. auth_cookie_file string Directory where the managed proxy should find the Extended ORPort authentication cookie. ================ ========== ========== :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ supportedTransportVersion = '1' config = ServerConfig() if config.checkManagedTransportVersion(supportedTransportVersion): config.writeVersion(supportedTransportVersion) else: config.writeVersionError() raise EnvError("Unsupported managed proxy protocol version (%s)" % str(config.getManagedTransportVersions())) retval = {} retval['state_loc'] = config.getStateLocation() retval['orport'] = config.getORPort() retval['ext_orport'] = config.getExtendedORPort() retval['transports'] = _getTransportsDict(supported_transports, config) retval['auth_cookie_file'] = config.getAuthCookieFile() return retval
[docs]def reportSuccess(name, addrport, options): """ Report that a server transport was launched succesfully. *Always call after successfully launching a transport.* :param str name: Name of transport. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str options: Transport options. """ config = ServerConfig() config.writeMethod(name, addrport, options)
[docs]def reportFailure(name, message): """ Report that a server transport failed to launch. *Always call after failing to launch a transport.* :param str name: Name of transport. :param str message: Error message. """ config = ServerConfig() config.writeMethodError(name, message)
[docs]def reportEnd(): """ Report that we are done launching transports. *Call after you have launched all the transports you could launch.* """ config = ServerConfig() config.writeMethodEnd()
def _getTransportsDict(supported_transports, config): """ Figure out which transports the application should launch, based on the transports it supports and on the transports that Tor wants it to spawn. :param list supported_transports: Transports that the application supports. :param :class:`pyptlib.client_config.ClientConfig` config: Configuration of Tor. :returns: A dictionary of 'transport => bind address' of transports that the application should launch. """ transports = {} if config.getAllTransportsEnabled(): return config.getServerBindAddresses() for transport in config.getServerTransports(): if transport in supported_transports: assert(transport in config.getServerBindAddresses()) transports[transport] = config.getServerBindAddresses()[transport] else: # Issue SMETHOD-ERROR when Tor asks us to spawn a # transport that we do not support. config.writeMethodError(transport, "not supported") return transports
pyptlib-0.0.5/doc/html/_modules/pyptlib/server_config.html000066400000000000000000000575501222335101500237310ustar00rootroot00000000000000 pyptlib.server_config — pyptlib 0.0.1 documentation

pyptlib documentation

pyptlib.server_config

Source code for pyptlib.server_config

#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
Low-level parts of pyptlib that are only useful to servers.
"""

import pyptlib.config as config

[docs]class ServerConfig(config.Config): """ A client-side pyptlib configuration. :var tuple ORPort: (ip,port) pointing to Tor's ORPort. :var tuple extendedORPort: (ip,port) pointing to Tor's Extended ORPort. None if Extended ORPort is not supported. :var dict serverBindAddr: A dictionary {<transport> : [<addr>, <port>]}, where <transport> is the name of the transport that must be spawned, and [<addr>, <port>] is a list containing the location where that transport should bind. The dictionary can be empty. :var string authCookieFile: String representing the filesystem path where the Extended ORPort Authentication cookie is stored. None if Extended ORPort authentication is not supported. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ def __init__(self): config.Config.__init__(self) """ TOR_PT_EXTENDED_SERVER_PORT is optional; tor uses the empty string as its value if it does not support the Extended ORPort. """ ext_orport_tmp = self.get('TOR_PT_EXTENDED_SERVER_PORT') if ext_orport_tmp == '': self.extendedORPort = None else: self.extendedORPort = self.get_addrport('TOR_PT_EXTENDED_SERVER_PORT') if self.check('TOR_PT_AUTH_COOKIE_FILE'): self.authCookieFile = self.get('TOR_PT_AUTH_COOKIE_FILE') else: self.authCookieFile = None # Check that either both Extended ORPort and the Extended # ORPort Authentication Cookie are present, or none. if self.extendedORPort and not self.authCookieFile: raise config.EnvError("Extended ORPort address provided, but no cookie file.") elif self.authCookieFile and not self.extendedORPort: raise config.EnvError("Extended ORPort Authentication cookie file provided, but no Extended ORPort address.") # Get ORPort. self.ORPort = self.get_addrport('TOR_PT_ORPORT') # Get bind addresses. self.serverBindAddr = {} bindaddrs = self.get('TOR_PT_SERVER_BINDADDR').split(',') for bindaddr in bindaddrs: (transport_name, addrport) = bindaddr.split('-') (addr, port) = self.get_addrport_from_string(addrport) self.serverBindAddr[transport_name] = (addr, port) # Get transports. self.transports = self.get('TOR_PT_SERVER_TRANSPORTS').split(',') if '*' in self.transports: self.allTransportsEnabled = True self.transports.remove('*') if sorted(self.transports) != sorted(self.serverBindAddr.keys()): raise config.EnvError("Can't match transports with bind addresses (%s, %s)" % (self.transports, self.serverBindAddr.keys()))
[docs] def getExtendedORPort(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.extendedORPort` """ return self.extendedORPort
[docs] def getORPort(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.ORPort` """ return self.ORPort
[docs] def getServerBindAddresses(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.serverBindAddr` """ return self.serverBindAddr
[docs] def getServerTransports(self): """ :returns: :attr:`pyptlib.config.Config.transports` """ return self.transports
[docs] def getAuthCookieFile(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.authCookieFile` """ return self.authCookieFile
[docs] def writeMethod(self, name, addrport, options): """ Write a message to stdout announcing that a server transport was successfully launched. :param str name: Name of transport. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str options: Transport options. """ if options: self.emit('SMETHOD %s %s:%s %s' % (name, addrport[0], addrport[1], options)) else: self.emit('SMETHOD %s %s:%s' % (name, addrport[0], addrport[1]))
[docs] def writeMethodError(self, name, message): # SMETHOD-ERROR """ Write a message to stdout announcing that we failed to launch a transport. :param str name: Name of transport. :param str message: Error message. """ self.emit('SMETHOD-ERROR %s %s' % (name, message))
[docs] def writeMethodEnd(self): # SMETHODS DONE """ Write a message to stdout announcing that we finished launching transports.. """ self.emit('SMETHODS DONE')
[docs] def get_addrport(self, key): """ Parse an environment variable holding an address:port value. :param str key: Environment variable key. :returns: tuple -- (address,port) :raises: :class:`pyptlib.config.EnvError` if string was not in address:port format. """ string = self.get(key) return self.get_addrport_from_string(string)
[docs] def get_addrport_from_string(self, string): """ Parse a string holding an address:port value. :param str string: A string. :returns: tuple -- (address,port) :raises: :class:`pyptlib.config.EnvError` if string was not in address:port format. """ addrport = string.split(':') if (len(addrport) != 2) or (not addrport[1].isdigit()): message = 'Parsing error (%s).' % (string) self.writeEnvError(message) raise config.EnvError(message) # XXX maybe return ValueError if (not 0 <= int(addrport[1]) < 65536): message = 'Port out of range (%s).' % (string) self.writeEnvError(message) raise config.EnvError(message) return addrport
pyptlib-0.0.5/doc/html/_modules/pyptlib/util.html000066400000000000000000000067261222335101500220520ustar00rootroot00000000000000 pyptlib.util — pyptlib 0.0.1 documentation

Source code for pyptlib.util

#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
Utility functions.
"""

from pyptlib.config import Config, EnvError

[docs]def checkClientMode(): # XXX WTF!???! This also exists in config.py. """ Check whether Tor wants us to run as a client or as a server. :returns: bool -- True if Tor wants us to run as a client. """ try: c = Config() return c.checkClientMode() except EnvError: return False
pyptlib-0.0.5/doc/html/_sources/000077500000000000000000000000001222335101500165245ustar00rootroot00000000000000pyptlib-0.0.5/doc/html/_sources/API.txt000066400000000000000000000154461222335101500177100ustar00rootroot00000000000000API overview ============ Be sure to read :file:`API.rst` and :file:`glossary.rst` before reading this file. General Overview ################ Applications begin by initializing pyptlib. Then pyptlib informs the application about which transports it should spawn, in which ports they should listen for connections, etc. Then the application launches the appropriate transports as instructed, and for each transport it reports to pyptlib whether it was launched successfully or not. Finally, the application announces to pyptlib that it finished launching transports. From that point and on the application should forget about pyptlib and start accepting connections. Detailed API Overview ##################### 0) Find if it's a client or a server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ An application using pyptlib should start by calling :func:`pyptlib.util.checkClientMode` to learn whether Tor wants it to run as a client or as a server. 1) Get transport information from Tor ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If Tor wants the application to run as a client, the next step is to run :func:`pyptlib.client.init`. Otherwise, the application should run :func:`pyptlib.server.init`. :func:`init` expects to be passed a list with the names of the transports your application supports. The application should be prepared for :exc:`pyptlib.config.EnvError`, which signifies that the environment was not prepared by Tor. The application should store the return value of the :func:`init` function. Consider an example of the fictional application *rot0r* which implements the pluggable transports *rot13* and *rot26*. If *rot0r*, in step 1, learned that Tor expects it to act as a client, it should now do: .. code-block:: python import pyptlib.client import pyptlib.config try: managed_info = pyptlib.client.init(["rot13", "rot26"]) except pyptlib.config.EnvError, err: print "pyptlib could not bootstrap ('%s')." % str(err) 2) Launch transports ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Client case (skip if you are a server) """"""""""""""""""""""""""""""""""""""""""" If your application is a client, the return value of :func:`pyptlib.client.init` is a dictionary of the format: ========== ========== ========== Key Type Value ========== ========== ========== state_loc string Directory where the managed proxy should dump its state files (if needed). transports list Strings of the names of the transports that should be launched. The list can be empty. ========== ========== ========== Your application should then use the *transports* key to learn which transports it should launch. Proceeding with the previous example: .. code-block:: python if 'rot13' in managed_info['transports']: launch_rot13_client() if 'rot26' in managed_info['transports']: launch_rot26_client() .. note:: Since the application runs as a client, it should launch a SOCKS server in the upstream side of the proxy. Server case (skip if you are a client): """""""""""""""""""""""""""""""""""""""""""" If your application is a server, the return value of :func:`pyptlib.server.init` is a dictionary of the format: ========== ========== ========== Key Type Value ========== ========== ========== state_loc string Directory where the managed proxy should dump its state files (if needed). orport tuple (ip,port) tuple pointing to Tor's ORPort. ext_orport tuple (ip,port) tuple pointing to Tor's Extended ORPort. None if Extended ORPort is not supported. transports dict A dictionary 'transport => (ip,port)' where 'transport' is the name of the transport that should be spawned, and '(ip,port)' is the location where the transport should bind. The dictionary can be empty. ========== ========== ========== Your application should then use the *transports* key and attempt to launch the appropriate transports. Furthermore, since the application runs as a server, it should push data to Tor's ORPort. The TCP/IP location of the ORPort is provided in the *orport* key. Proceeding with the previous example: .. code-block:: python if 'rot13' in managed_info['transports']: launch_rot13_server(managed_info['transports']['rot13'], managed_info['orport']) if 'rot26' in managed_info['transports']: launch_rot26_server(managed_info['transports']['rot26'], managed_info['orport']) 3) Report results back to Tor. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For every transport that the application launches, it reports to pyptlib whether it was launched successfully or not. This way, Tor is informed on whether a transport is expected to work or not. Client case (skip if you are a server): """""""""""""""""""""""""""""""""""""""""""" Everytime a transport is successfully launched, the application calls :func:`pyptlib.client.reportSuccess` with the name of the transport that was launched, the address where it is listening for connections, and the SOCKS version that the upstream SOCKS server supports. For example, if *rot13* was launched successfully, waits for connections in '127.0.0.1:42042' and supports SOCKSv4, the appropriate call would be: .. code-block:: python pyptlib.client.reportSuccess('rot13', 5, ('127.0.0.1', 42042)) Everytime a transport failed to launch, the application calls :func:`pyptlib.client.reportFailure` with the name of the transport and a message. For example, if *rot26* failed to launch, the appropriate call would be: .. code-block:: python pyptlib.client.reportFailure('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)') Server case (skip if you are a client): """""""""""""""""""""""""""""""""""""""""""" Everytime a transport is successfully launched, the application calls :func:`pyptlib.server.reportSuccess` with the name of the transport that was launched, and the address where it is listening for connections. For example, if *rot13* was launched successfully and waits for connections in '127.0.0.1:42042', the appropriate call would be: .. code-block:: python pyptlib.server.reportSuccess('rot13', ('127.0.0.1', 42042)) Everytime a transport failed to launch, the application calls :func:`pyptlib.server.reportFailure` with the name of the transport and a message. For example, if *rot26* failed to launch, the appropriate call would be: .. code-block:: python pyptlib.server.reportFailure('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)') 4) Stop using pyptlib and start accepting connections ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When the application finishes launching connections, it should call :func:`pyptlib.client.reportEnd` (or :func:`pyptlib.server.reportEnd`), to announce to pyptlib that all transports were launched. This way, Tor knows that it can start pushing traffic to the application. After this point, pyptlib has no other use. pyptlib-0.0.5/doc/html/_sources/README.txt000066400000000000000000000024471222335101500202310ustar00rootroot00000000000000pyptlib README =============== - What is pyptlib? pyptlib is a little Python library which understands the `pluggable transport managed-proxy protocol `_. - Who is interested in pyptlib? You might be interested in pyptlib if you have an application that obfuscates TCP traffic and you want to integrate it easily with Tor. - What does pyptlib do? pyptlib speaks with Tor and informs your application about which pluggable transports Tor needs, in which ports they should listen for connections, in which filesystem directory they should keep state, etc. - What does pyptlib not do? pyptlib doesn't help your application do networking or obfuscation. - What does pyptlib expect from an application? pyptlib assumes that your application is executed by Tor as a managed-proxy. pyptlib assumes that your application acts as a proxy: it listens for traffic on a TCP port and pushes the traffic somewhere else. pyptlib assumes that your application has a SOCKS server when it acts as a client. This is needed because Tor needs to dynamically select where its data will be pushed to. - How do I use pyptlib? Read the documentation, the examples and the source. - What are these buzzwords? :file:`glossary.rst` pyptlib-0.0.5/doc/html/_sources/glossary.txt000066400000000000000000000044711222335101500211360ustar00rootroot00000000000000Pluggable transports glossary """"""""""""""""""""""""""""" pluggable transport (sometimes also called 'transport') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pluggable transports obfuscate network traffic. Specifically, pluggable transports transform the Tor traffic flow between the client and the bridge. This way, censors who monitor traffic between the client and the bridge see innocent-looking transformed traffic instead of the actual Tor traffic. pluggable transport proxy ^^^^^^^^^^^^^^^^^^^^^^^^^ Pluggable transport proxies are programs that implement pluggable transports. They also implement the networking system that a pluggable transport needs (so that it can proxy data). obfsproxy ^^^^^^^^^ `obfsproxy `_ is a pluggable transport proxy written in C. It implements the `obfs2 `_ pluggable transport. upstream/downstream ^^^^^^^^^^^^^^^^^^^ The upstream side of a pluggable transport proxy is the side that communicates with Tor. Upstream data is non-obfuscated. The downstream side of a pluggable transport proxy is the side that communicates with the other pluggable transport proxy. Downstream data is obfuscated. client-mode / server-mode ^^^^^^^^^^^^^^^^^^^^^^^^^^ A pluggable transport is a client if it has a Tor client in its upstream side. A pluggable transport is a server if it has a Tor bridge in its upstream side. external-mode proxy ^^^^^^^^^^^^^^^^^^^ A pluggable transport proxy is in external-mode if the user explicitly configures it using its command-line interface. managed-mode proxy ^^^^^^^^^^^^^^^^^^ A pluggable transport proxy is in managed-mode if it's launched and managed by Tor using the managed-proxy configuration protocol. The managed-proxy configuration protocol is defined in the `pluggable transport specification `_. pyptlib ^^^^^^^ pyptlib is a library that implements the managed-proxy configuration protocol and makes it easier for application to be used as managed proxies. extended orport ^^^^^^^^^^^^^^^ Extended ORPort is an non-implemented feature of Tor that allows a pluggable transport proxy to communicate with Tor in real-time. pyptlib-0.0.5/doc/html/_sources/index.txt000066400000000000000000000013351222335101500203760ustar00rootroot00000000000000.. pyptlib documentation master file, created by sphinx-quickstart on Fri Oct 5 11:46:40 2012. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to pyptlib! =================================== pyptlib is a little Python library that makes the job of writing pluggable transports easier. .. toctree:: :maxdepth: 2 README API glossary :mod:`pyptlib.client` ---------------------- Client-side pyptlib API. :mod:`pyptlib.server` ---------------------- Server-side pyptlib API. :mod:`pyptlib.util` ---------------------- pyptlib utilities. Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` pyptlib-0.0.5/doc/html/_sources/modules.txt000066400000000000000000000000721222335101500207340ustar00rootroot00000000000000pyptlib ======= .. toctree:: :maxdepth: 4 pyptlib pyptlib-0.0.5/doc/html/_sources/pyptlib.txt000066400000000000000000000015351222335101500207540ustar00rootroot00000000000000pyptlib Package =============== :mod:`client` Module -------------------- .. automodule:: pyptlib.client :members: :undoc-members: :show-inheritance: :mod:`client_config` Module --------------------------- .. automodule:: pyptlib.client_config :members: :undoc-members: :show-inheritance: :mod:`config` Module -------------------- .. automodule:: pyptlib.config :members: :undoc-members: :show-inheritance: :mod:`server` Module -------------------- .. automodule:: pyptlib.server :members: :undoc-members: :show-inheritance: :mod:`server_config` Module --------------------------- .. automodule:: pyptlib.server_config :members: :undoc-members: :show-inheritance: :mod:`util` Module ------------------ .. automodule:: pyptlib.util :members: :undoc-members: :show-inheritance: pyptlib-0.0.5/doc/html/_static/000077500000000000000000000000001222335101500163305ustar00rootroot00000000000000pyptlib-0.0.5/doc/html/_static/ajax-loader.gif000066400000000000000000000012411222335101500212040ustar00rootroot00000000000000GIF89aòÿÿÿU|ÆÖßN€U|l–®Š«¾™¶Æ!þCreated with ajaxload.info!ù !ÿ NETSCAPE2.0,3ºÜþ0ÊIkc:œN˜f E±1º™Á¶.`ÄÂqÐ-[9ݦ9 JkçH!ù ,4ºÜþNŒ! „ »°æŠDqBQT`1 `LE[¨|µußía€ ×â†C²%$*!ù ,6º2#+ÊAÈÌ”V/…côNñIBa˜«pð ̳½ƨ+YíüƒÃ2©dŸ¿!ù ,3ºb%+Ê2†‘ìœV_…‹¦ …! 1D‡aªF‚°ÑbR]ó=08,Ȥr9L!ù ,2ºr'+JçdðóL &vÃ`\bT”…„¹hYB)ÏÊ@é<Ã&,ȤR’!ù ,3º Â9ãtç¼Úž0Çà!.B¶ÊW¬¢1  sa»°5÷•0° ‰»Ÿm)J!ù ,2ºÜþð ÙœU]šîÚqp•`ˆÝaœÝ4–…AFÅ0`›¶ Â@›1€ÂÖΑ!ù ,2ºÜþ0ÊI«eBÔœ)×à ŽÇq10©Ê°®PÂaVÚ¥ ub‚ž[;pyptlib-0.0.5/doc/html/_static/alert_info_32.png000066400000000000000000000022201222335101500214600ustar00rootroot00000000000000‰PNG  IHDR szzôWIDATXý—ohUuÇ?ô"JzÑ›§W¿zqzq‹ —]d܆¬±¼É.»d“54Ü„;5TÒ´ù?ÿ¤iâ–Ž„ ¬°4©©„üG¢d âÔM¦ÎæŸm^ÝÝ·çL¯Kbн=ððãr<Ÿó|žßïœ ÿc€àp'Ì£@&¼VÔx8At®,ñ“¬ò˜(ß'"I'Â{Šc€“ÄÛåšúåÍ’kê—¥ÎËâ¿ o‡`Ò0DQ:‘!:OnzVÕk¥%{¤êu’›ž•Õœ%ß [#¨R¨£àqÔª~‘7;(>¤`õfK–êe?Û ˜!àH1²6áO¹Á“ßëÀ É&ž¥ß ['¬U@¶8‡d =r3¥ÈÉÍ”¬¡G–8&ü/Ë…-*À¢Ûd•Çe© ²úî`­<<½Û,X(lNÑ´`u"úµˆíc±ýÁo·Eð°¥ÂjŠ2„Ì Þ¶I¸­ÁÊjÁ‚°xƒp•“ p:Ö°R©¶.ù‰æp«e–·m·aiQrPøŸ P!T¶xH5[rJmëSyf¯¼òéÂ|aá5 ›(=*"»Â®Àkº"×’“?ó®âK³ª\}Sñ=*iº¤HºC®ê„Ìo,¬*8À[x²IÈM»+ט•«PlV¿Ën*–9.‹¬‘¥‚5xœÜ;Y¹†¬,Ý/KÞ’¿.x?DZƒ³€Š 75+×p[V×/›pS$zC€…‚E‚‚‹0%+«¿-«í“Ußå,¬l("@ãmÙ¤ÙÄ[²ªëbܵ`ØÿjÁÆ¢<íOí·Ê^¿–çYèsÁžöEïÊM¥údÕ¡ÿ±=!À°ÿu‚­x ˜o~\ó(¹9´¿¶OVú/¿ú_,øP°^ÐV0€S±)ëU×Þ«ôŽœjÛeéûÛ/~MÄ®†þ‡ OÛ‡Ò@rD¾¼ $€×ÃL/Oþcèb‹sJ~šÓ›Ÿç”j¼·ýîù]Éó¿F°IØNáZ‘A`?0xã!0#sðìƒSŸÉÉ5ªô½;ªÙx7ô¶l(»ú_.X+ìáŸÑáŸÞNaS\@¨~à-håËåê/È5Žð?.ô_z9Ïÿ.áNŠÈáŸÑóAz‡‡•Œà•‘ßSÀº­|£lbWà¿2Ïéå`úm°CÂý.¼SÂ?+¢ç†p»G ð2ðøÃ†ñ `.æPÖ.*ºî·¿¤[^⤢ésòë:äמ—ŸêT$Ù)ܰx«€ #\?Ÿ—Ï0ÊÿO«°˜ð¿eEI·ð/É«êVYó •ÏéWYK¯\ì€à»üâ“¿P“lÇÆ o—ð/ŠH—ˆtÊKtË•ì æ¡HÅóãE`7–Þ"rQD:_…gCq‹çGø ›&¼ƒáÑüÿÏY%Óÿµøßö”!”$IEND®B`‚pyptlib-0.0.5/doc/html/_static/alert_warning_32.png000066400000000000000000000020441222335101500221760ustar00rootroot00000000000000‰PNG  IHDR szzôëIDATX…µ–ML\UÇï o(Ã(e &`uU›vlìÂÆÔUcãÆM7mhbâÎD—nÜ(u¡˜4ŠFÓ4©ñ£Áta¢1ØP†B(-TZ‡¦àÌt¾Þ»÷¸˜y3¯¶yÃL;'¹‹É}sÿ¿sîÿÞs¡zXÀ)`ˆßo‡sÿ¯;\áÛÃÃÈêê²ìîÄdfú7¹x᜜z]€ àÛFÝ–ÕÕUqDtND§DÔ–ˆsOÄ^”ÝÍ+239*¿zKΜ:êՆϜHú24=g )€ä@‡N‚$Ñ™m²³W»PmÍG¢ÉwV¶ eƒ¶ ð,XÝ`…€H–Ü­9²S_ÍZt÷ ´' Ù(ÒP°¡¹—ggP±KÀŠ4@—†*Bh´ * ;×P±Ë@©æ5¾þ®) «¢°¶A@9 eu£nýjnœböÊ.ùÁ.þö†ÑÜ€RöÊ ÊÀ-¤Q[ ŠÙ‹ãÈ—tù30 µ'óÒþ»fíQ§Qp<î/”†»ê¡Oc‡Ž^¾"îšÓ«nàq¾òšÐ.ú£$n ó€›½íÙ{„2@Y·qNårÝ/vÂc@ðž:À÷>ºÊÅÚÎO€8¥£ P1¡aÀvÊ® à3÷éÄäšýÙ7 /ÿ½žazÚM,ý„ìv Äë­¼ñe”õCÀõ§púÈ`ïÈØè ^=ÒÍÔ_¼}îmûBôt4 B*cl¾ø)ÃÄ `˜­À÷A²¹ð]Ýí¨ìTr‡Ýhœ?~_äüÏKìeéæ:‡Âpüˆæ#ýd«ÚšµÈÂi…´FPÁVt&…³“ »cnæ*•âpû¦ ûŸ tr¾fÿ÷€r ÆHÅi´ÄìêÆÜ×Â`[˜B<ŠºßL(¦ÿJuhO÷SyŒÍyš4˜í t€t\Å0ÛêS¯  <ÇsüÌÝ[˜@zmž€ùÿM8l‡³b˜|u€róQ•ÛO*Ó姘奔Æã¢xx ¸ Ìù]DËgÏ/q÷Ÿl¥x^BnÀâ×¹]7ýDüîÑñ©ÄÊÈ÷ký-–töuéh5JÌÝc:™X´9þþÝ8ð9PØ#DøÑ@sÀèøtred,ÞßÒìtöE‚t„‹åÎíh®.)N|¸áЧ÷(ž.9?€GAf2+#c‰þ–fÝÙ 2yý¯}œ©U\? ¨¯‰ZÀIà] Í#þ'°¼ôùüÿ—RBOÐñ¤‹üáy)eÛ±`QIEND®B`‚pyptlib-0.0.5/doc/html/_static/basic.css000066400000000000000000000204171222335101500201270ustar00rootroot00000000000000/* * basic.css * ~~~~~~~~~ * * Sphinx stylesheet -- basic theme. * * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /* -- main layout ----------------------------------------------------------- */ div.clearer { clear: both; } /* -- relbar ---------------------------------------------------------------- */ div.related { width: 100%; font-size: 90%; } div.related h3 { display: none; } div.related ul { margin: 0; padding: 0 0 0 10px; list-style: none; } div.related li { display: inline; } div.related li.right { float: right; margin-right: 5px; } /* -- sidebar --------------------------------------------------------------- */ div.sphinxsidebarwrapper { padding: 10px 5px 0 10px; } div.sphinxsidebar { float: left; width: 230px; margin-left: -100%; font-size: 90%; } div.sphinxsidebar ul { list-style: none; } div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points { margin-left: 20px; list-style: square; } div.sphinxsidebar ul ul { margin-top: 0; margin-bottom: 0; } div.sphinxsidebar form { margin-top: 10px; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } div.sphinxsidebar #searchbox input[type="text"] { width: 170px; } div.sphinxsidebar #searchbox input[type="submit"] { width: 30px; } img { border: 0; } /* -- search page ----------------------------------------------------------- */ ul.search { margin: 10px 0 0 20px; padding: 0; } ul.search li { padding: 5px 0 5px 20px; background-image: url(file.png); background-repeat: no-repeat; background-position: 0 7px; } ul.search li a { font-weight: bold; } ul.search li div.context { color: #888; margin: 2px 0 0 30px; text-align: left; } ul.keywordmatches li.goodmatch a { font-weight: bold; } /* -- index page ------------------------------------------------------------ */ table.contentstable { width: 90%; } table.contentstable p.biglink { line-height: 150%; } a.biglink { font-size: 1.3em; } span.linkdescr { font-style: italic; padding-top: 5px; font-size: 90%; } /* -- general index --------------------------------------------------------- */ table.indextable { width: 100%; } table.indextable td { text-align: left; vertical-align: top; } table.indextable dl, table.indextable dd { margin-top: 0; margin-bottom: 0; } table.indextable tr.pcap { height: 10px; } table.indextable tr.cap { margin-top: 10px; background-color: #f2f2f2; } img.toggler { margin-right: 3px; margin-top: 3px; cursor: pointer; } div.modindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } div.genindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } /* -- general body styles --------------------------------------------------- */ a.headerlink { visibility: hidden; } h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } div.body p.caption { text-align: inherit; } div.body td { text-align: left; } .field-list ul { padding-left: 1em; } .first { margin-top: 0 !important; } p.rubric { margin-top: 30px; font-weight: bold; } img.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } img.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } img.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } .align-left { text-align: left; } .align-center { text-align: center; } .align-right { text-align: right; } /* -- sidebars -------------------------------------------------------------- */ div.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px 7px 0 7px; background-color: #ffe; width: 40%; float: right; } p.sidebar-title { font-weight: bold; } /* -- topics ---------------------------------------------------------------- */ div.topic { border: 1px solid #ccc; padding: 7px 7px 0 7px; margin: 10px 0 10px 0; } p.topic-title { font-size: 1.1em; font-weight: bold; margin-top: 10px; } /* -- admonitions ----------------------------------------------------------- */ div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 7px; } div.admonition dt { font-weight: bold; } div.admonition dl { margin-bottom: 0; } p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; } div.body p.centered { text-align: center; margin-top: 25px; } /* -- tables ---------------------------------------------------------------- */ table.docutils { border: 0; border-collapse: collapse; } table.docutils td, table.docutils th { padding: 1px 8px 1px 5px; border-top: 0; border-left: 0; border-right: 0; border-bottom: 1px solid #aaa; } table.field-list td, table.field-list th { border: 0 !important; } table.footnote td, table.footnote th { border: 0 !important; } th { text-align: left; padding-right: 5px; } table.citation { border-left: solid 1px gray; margin-left: 1px; } table.citation td { border-bottom: none; } /* -- other body styles ----------------------------------------------------- */ ol.arabic { list-style: decimal; } ol.loweralpha { list-style: lower-alpha; } ol.upperalpha { list-style: upper-alpha; } ol.lowerroman { list-style: lower-roman; } ol.upperroman { list-style: upper-roman; } dl { margin-bottom: 15px; } dd p { margin-top: 0px; } dd ul, dd table { margin-bottom: 10px; } dd { margin-top: 3px; margin-bottom: 10px; margin-left: 30px; } dt:target, .highlighted { background-color: #fbe54e; } dl.glossary dt { font-weight: bold; font-size: 1.1em; } .field-list ul { margin: 0; padding-left: 1em; } .field-list p { margin: 0; } .refcount { color: #060; } .optional { font-size: 1.3em; } .versionmodified { font-style: italic; } .system-message { background-color: #fda; padding: 5px; border: 3px solid red; } .footnote:target { background-color: #ffa; } .line-block { display: block; margin-top: 1em; margin-bottom: 1em; } .line-block .line-block { margin-top: 0; margin-bottom: 0; margin-left: 1.5em; } .guilabel, .menuselection { font-family: sans-serif; } .accelerator { text-decoration: underline; } .classifier { font-style: oblique; } abbr, acronym { border-bottom: dotted 1px; cursor: help; } /* -- code displays --------------------------------------------------------- */ pre { overflow: auto; overflow-y: hidden; /* fixes display issues on Chrome browsers */ } td.linenos pre { padding: 5px 0px; border: 0; background-color: transparent; color: #aaa; } table.highlighttable { margin-left: 0.5em; } table.highlighttable td { padding: 0 0.5em 0 0.5em; } tt.descname { background-color: transparent; font-weight: bold; font-size: 1.2em; } tt.descclassname { background-color: transparent; } tt.xref, a tt { background-color: transparent; font-weight: bold; } h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { background-color: transparent; } .viewcode-link { float: right; } .viewcode-back { float: right; font-family: sans-serif; } div.viewcode-block:target { margin: -1px -10px; padding: 0 10px; } /* -- math display ---------------------------------------------------------- */ img.math { vertical-align: middle; } div.body div.math p { text-align: center; } span.eqno { float: right; } /* -- printout stylesheet --------------------------------------------------- */ @media print { div.document, div.documentwrapper, div.bodywrapper { margin: 0 !important; width: 100%; } div.sphinxsidebar, div.related, div.footer, #top-link { display: none; } }pyptlib-0.0.5/doc/html/_static/bg-page.png000066400000000000000000000002441222335101500203400ustar00rootroot00000000000000‰PNG  IHDR hJr†ügAMA± üa pHYs  šœtIMEÙ +ù3IDATHÇíб ±€ØÕW6`¨#_íêV’zµë#‚ ‚ ‚& ÓÝ>A“Ñklr¤×IEND®B`‚pyptlib-0.0.5/doc/html/_static/bullet_orange.png000066400000000000000000000005551222335101500216650ustar00rootroot00000000000000‰PNG  IHDR×z`PLTEà~*ÿÌ“ÿ»mà©÷ìåÿœ7ÿÞµÿÁ‚÷¹ÿØ«ïˆ*ÿÅ‹ÿ¼zÿ´nÿË…þñåê…*ÿ¡<ÿņÿá¼ÿ¿tÿôèãªÿÿÿ”⟄bKGD ½ pHYsHHFÉk> vpAg•Ñù’/IDAT×Á Àu†„ÿ?Õ .«’€Ùr/P›Ç5¤zü¨»=¤,„ø%š&;Î%tEXtdate:create2010-01-07T12:49:06+01:00:‘yÈ%tEXtdate:modify2010-01-07T12:49:06+01:00KÌÁtIEND®B`‚pyptlib-0.0.5/doc/html/_static/comment-bright.png000066400000000000000000000066541222335101500217700ustar00rootroot00000000000000‰PNG  IHDRóÿa OiCCPPhotoshop ICC profilexÚSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEÈ ˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kÖ¼÷æÍþµ×>ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛbKGDÿÿÿ ½§“ pHYs  šœtIMEÚ 6 B©\<ÞIDAT8Ë…’Kh]e…¿½ÿs1mAÛÄÚ`j‚Ïh[-ˆE(FEŠÁaAœ! bI« àÈ*–BX‘"Ø4)NŠõUR‚Zˆ¹­!’×Mhj“›ssÎùÿíà–¨àãmØ‹Å^‹-\ggßÏ ÷ßì]o|ÑÑÒ¬[3±¶4§Á§6»”û©òèø¯×>zd‘¿ ]½#Œ»î8ÙþüáÇOݺ±t{5·uIÍXN!I=@Vf¾®Ÿ=v×ÀÞþ1ûº}e>;ØÉö×fvìénøvËÍÅxaÉHrÏʪJ’¦Fȹ`œÈðDò¹WZ®]ÀžSíýŸø%S)ÌWAÌœb¹ |0K=âSo7D†~\~qâÍ-ïÀËŸ\ùaóMÅ“Z,S'*æô™‘È} óF`—†ÎNnzæ674¸öËUÈç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛbKGDÿÿÿ ½§“ pHYs  šœtIMEÚ!â›ÈÝ,IDAT8Ëe’_HuÇ?Ïï}ßsŽž3ÍyòË•¶¦‹U2MvQÉÖŠFÔE¬.ŠÑÍÃÅ‚­ÄŠbÑE$DD­‹ËZF5b@QÌ"š:2§›š¦¾ïû{Ÿn.êsõåçû<_ø yî?ô½m÷²ýè·wV™ê@t£R`}Z íÄÐ_£# _=œá_@ÝËý ßw^óRë®·•%6gC-έ(K>ä| $„Éï{¯}ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛbKGDÿÿÿ ½§“ pHYs  šœtIMEÚ 1;ïV·¿§IDAT8Ëu‘ËkÜUÇ?ßsgœ4ÔØøhª‚`µ©ÖG1 RQ‚”îܸp%èBªø”n"‚bРXJ ‹.4V iZð##T;m£µ!4™üæžãbâP­~7÷rîù>ιbwïý†cû†; m;‡oª”ÓAÜàΆ ζZ^«/®þôä£Ãç¸|îs¯ÝÉø{Óý;†¯y¿»Rº¥ð¸Â=È9(rÉt¦Vo¼¾û¡­ûG÷Í1±wíÞÿ#_àÓ©¹›{»¿ìî*•›E&ç å!€€ˆÀƒ(—Lç–VŸßuïÀ«oœéêûÁᲵ‘DŽÀ€ P„‡²G”“4ÿçÊ Ü:&€¯ç~™êî*ݳÖreˆuá: ‚ááS­-,ßUšœ©^Ÿ’ú›E&·™JY[ÃPà!RˆìB ŖޞʖR@_ÎôÈ€dBfó”€NvHfÂ"è2ØTÊî]­ˆR‘’ ³ö j§'BàÖ1‰ddAak…/DIJD… ’D2‘ÌH&L`&L† $Ex,6‹|Ö~_\©¿Pœ‘ $™ýMH`I˜©=Ÿ @¨±Z|õÈÎÁ|ttv´gcåЕ—WTZ'¤õ3rŽÈîje"ܵx¾9ÿö›¯°W> ¹mb©Ñ|by¥ˆ•fFRx{wí%Dúõå¹Z½±€áCíÿÞüô$õwdüÀôðÖ«ÞH¦mW÷nètaµ(ŠM<~;9¿ôáž]C/ñ_¸ãåŸ;÷ÉãÕ«§æã‹Õ#Ÿ}ûÀáÉïoÿ`zS§áÚ·ù_>:;x컓§?Ÿ©yóÝ©ÿ|}æ’~ûwam-/ž®7ž=¾0úìS÷5è»ØíR翚¾P"*Ö¯ IEND®B`‚pyptlib-0.0.5/doc/html/_static/doctools.js000066400000000000000000000152701222335101500205210ustar00rootroot00000000000000/* * doctools.js * ~~~~~~~~~~~ * * Sphinx JavaScript utilities for all documentation. * * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /** * select a different prefix for underscore */ $u = _.noConflict(); /** * make the code below compatible with browsers without * an installed firebug like debugger if (!window.console || !console.firebug) { var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; window.console = {}; for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {}; } */ /** * small helper function to urldecode strings */ jQuery.urldecode = function(x) { return decodeURIComponent(x).replace(/\+/g, ' '); } /** * small helper function to urlencode strings */ jQuery.urlencode = encodeURIComponent; /** * This function returns the parsed url parameters of the * current request. Multiple values per key are supported, * it will always return arrays of strings for the value parts. */ jQuery.getQueryParameters = function(s) { if (typeof s == 'undefined') s = document.location.search; var parts = s.substr(s.indexOf('?') + 1).split('&'); var result = {}; for (var i = 0; i < parts.length; i++) { var tmp = parts[i].split('=', 2); var key = jQuery.urldecode(tmp[0]); var value = jQuery.urldecode(tmp[1]); if (key in result) result[key].push(value); else result[key] = [value]; } return result; }; /** * small function to check if an array contains * a given item. */ jQuery.contains = function(arr, item) { for (var i = 0; i < arr.length; i++) { if (arr[i] == item) return true; } return false; }; /** * highlight a given string on a jquery object by wrapping it in * span elements with the given class name. */ jQuery.fn.highlightText = function(text, className) { function highlight(node) { if (node.nodeType == 3) { var val = node.nodeValue; var pos = val.toLowerCase().indexOf(text); if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { var span = document.createElement("span"); span.className = className; span.appendChild(document.createTextNode(val.substr(pos, text.length))); node.parentNode.insertBefore(span, node.parentNode.insertBefore( document.createTextNode(val.substr(pos + text.length)), node.nextSibling)); node.nodeValue = val.substr(0, pos); } } else if (!jQuery(node).is("button, select, textarea")) { jQuery.each(node.childNodes, function() { highlight(this); }); } } return this.each(function() { highlight(this); }); }; /** * Small JavaScript module for the documentation. */ var Documentation = { init : function() { this.fixFirefoxAnchorBug(); this.highlightSearchWords(); this.initIndexTable(); }, /** * i18n support */ TRANSLATIONS : {}, PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, LOCALE : 'unknown', // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) gettext : function(string) { var translated = Documentation.TRANSLATIONS[string]; if (typeof translated == 'undefined') return string; return (typeof translated == 'string') ? translated : translated[0]; }, ngettext : function(singular, plural, n) { var translated = Documentation.TRANSLATIONS[singular]; if (typeof translated == 'undefined') return (n == 1) ? singular : plural; return translated[Documentation.PLURALEXPR(n)]; }, addTranslations : function(catalog) { for (var key in catalog.messages) this.TRANSLATIONS[key] = catalog.messages[key]; this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); this.LOCALE = catalog.locale; }, /** * add context elements like header anchor links */ addContextElements : function() { $('div[id] > :header:first').each(function() { $('\u00B6'). attr('href', '#' + this.id). attr('title', _('Permalink to this headline')). appendTo(this); }); $('dt[id]').each(function() { $('\u00B6'). attr('href', '#' + this.id). attr('title', _('Permalink to this definition')). appendTo(this); }); }, /** * workaround a firefox stupidity */ fixFirefoxAnchorBug : function() { if (document.location.hash && $.browser.mozilla) window.setTimeout(function() { document.location.href += ''; }, 10); }, /** * highlight the search words provided in the url in the text */ highlightSearchWords : function() { var params = $.getQueryParameters(); var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; if (terms.length) { var body = $('div.body'); window.setTimeout(function() { $.each(terms, function() { body.highlightText(this.toLowerCase(), 'highlighted'); }); }, 10); $('') .appendTo($('#searchbox')); } }, /** * init the domain index toggle buttons */ initIndexTable : function() { var togglers = $('img.toggler').click(function() { var src = $(this).attr('src'); var idnum = $(this).attr('id').substr(7); $('tr.cg-' + idnum).toggle(); if (src.substr(-9) == 'minus.png') $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); else $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); }).css('display', ''); if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { togglers.click(); } }, /** * helper function to hide the search marks again */ hideSearchWords : function() { $('#searchbox .highlight-link').fadeOut(300); $('span.highlighted').removeClass('highlighted'); }, /** * make the url absolute */ makeURL : function(relativeURL) { return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; }, /** * get the current relative url */ getCurrentURL : function() { var path = document.location.pathname; var parts = path.split(/\//); $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { if (this == '..') parts.pop(); }); var url = parts.join('/'); return path.substring(url.lastIndexOf('/') + 1, path.length - 1); } }; // quick alias for translations _ = Documentation.gettext; $(document).ready(function() { Documentation.init(); }); pyptlib-0.0.5/doc/html/_static/down-pressed.png000066400000000000000000000005601222335101500214510ustar00rootroot00000000000000‰PNG  IHDRóÿasRGB®ÎébKGDùC» pHYs × ×B(›xtIMEÚ -vF#ðIDAT8ËÍÒ!OAàïÚJ, ++@ I v¢bÿ@Wñ7F’ HNâ±ú# ‚4¡8Ì6¹4×6Tñ’MvvÞ¼7³»êœûöDs¿‡aóxâ1†U îq‚;<¦ˆÏ E¸Â-f)âºj%ßpˆo4xFà78G…>æ)â-ƒ ž ¡ÂEYm4%7YTk-¾–Q¶a–"NWAo-y†eqÒá¾,)â ÓÒYÓÑú´ptŽÐå½\hóq´Îím˜sÔz¦ìG]ÄNñ‡Òa…‡röçß¶¨s^lã vh\î2Ù%ðâßãŽ0EeRvØIEND®B`‚pyptlib-0.0.5/doc/html/_static/down.png000066400000000000000000000005531222335101500200100ustar00rootroot00000000000000‰PNG  IHDRóÿasRGB®ÎébKGDùC» pHYs × ×B(›xtIMEÚ"ÅíU{ëIDAT8ËÍÒ¡NCAÐóÚJ, ++@ ™4>‡¨â/ÐUü’¤^,†~T&Ô3M^^^ÛPÅM6ÙÙ¹sïÌî*¥ôí‰RJ¿‡a)e¼GñÃ*ƒœàñ¹¡èW¸Å<"®«Fò ‡øFgÜã78G…>q ƒ†ÁOI¨p‘«‰:s“õAÕjñ5GÙ†yDœ®ƒ^+y†U:ép_%G§@D|ašÕ­O“£s„Æ(ïy¡M,"â¨Íím˜sÔx:÷£.b§@D|`–V˜åÙŸÛ²”²ÜÆìиÜe²KàÅ¿Ç/êG!‚ ™IEND®B`‚pyptlib-0.0.5/doc/html/_static/file.png000066400000000000000000000006101222335101500177520ustar00rootroot00000000000000‰PNG  IHDRóÿabKGDÿÿÿ ½§“ pHYs  šœtIMEÕ  )¶TIDAT8Ë­‘±JÄ@†¿Ir('[ "&xØÙYZ ‚Xø0‚!i|†_@±Ô÷•t§ÓDÄæÏ] ¹#¹Äxÿjv˜ùç› Y–ÐN‡ažE‘i«(ŠÌÄÉ™yž£µ@D¦£&±ˆ`Û6®ë–P¦Zk’$)5%"ôz½Ê.NñA#Aœba‘`Vsø¾_3ñc°,«™àä2m¼Ýñþjó [kŸìlv¹y|!IÕ´ðþyô;ÀðvÈé "Œß®°—a©?ŸAúðÄ7Œ`ô˜ñÇc^énôk?¸²Bg}»TЙ¹D#ÁÑÞ "R¹D1÷£çyüEŽRê*ŽãÝ6MJ©3þK_U«t8F~ÇIEND®B`‚pyptlib-0.0.5/doc/html/_static/haiku.css000066400000000000000000000150341222335101500201460ustar00rootroot00000000000000/* * haiku.css_t * ~~~~~~~~~~~ * * Sphinx stylesheet -- haiku theme. * * Adapted from http://haiku-os.org/docs/Haiku-doc.css. * Original copyright message: * * Copyright 2008-2009, Haiku. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * Francois Revol * Stephan Assmus * Braden Ewing * Humdinger * * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @import url("basic.css"); html { margin: 0px; padding: 0px; background: #FFF url(bg-page.png) top left repeat-x; } body { line-height: 1.5; margin: auto; padding: 0px; font-family: "DejaVu Sans", Arial, Helvetica, sans-serif; min-width: 59em; max-width: 70em; color: #333333; } div.footer { padding: 8px; font-size: 11px; text-align: center; letter-spacing: 0.5px; } /* link colors and text decoration */ a:link { font-weight: bold; text-decoration: none; color: #dc3c01; } a:visited { font-weight: bold; text-decoration: none; color: #892601; } a:hover, a:active { text-decoration: underline; color: #ff4500; } /* Some headers act as anchors, don't give them a hover effect */ h1 a:hover, a:active { text-decoration: none; color: #0c3762; } h2 a:hover, a:active { text-decoration: none; color: #0c3762; } h3 a:hover, a:active { text-decoration: none; color: #0c3762; } h4 a:hover, a:active { text-decoration: none; color: #0c3762; } a.headerlink { color: #a7ce38; padding-left: 5px; } a.headerlink:hover { color: #a7ce38; } /* basic text elements */ div.content { margin-top: 20px; margin-left: 40px; margin-right: 40px; margin-bottom: 50px; font-size: 0.9em; } /* heading and navigation */ div.header { position: relative; left: 0px; top: 0px; height: 85px; /* background: #eeeeee; */ padding: 0 40px; } div.header h1 { font-size: 1.6em; font-weight: normal; letter-spacing: 1px; color: #0c3762; border: 0; margin: 0; padding-top: 15px; } div.header h1 a { font-weight: normal; color: #0c3762; } div.header h2 { font-size: 1.3em; font-weight: normal; letter-spacing: 1px; text-transform: uppercase; color: #aaa; border: 0; margin-top: -3px; padding: 0; } div.header img.rightlogo { float: right; } div.title { font-size: 1.3em; font-weight: bold; color: #0c3762; border-bottom: dotted thin #e0e0e0; margin-bottom: 25px; } div.topnav { /* background: #e0e0e0; */ } div.topnav p { margin-top: 0; margin-left: 40px; margin-right: 40px; margin-bottom: 0px; text-align: right; font-size: 0.8em; } div.bottomnav { background: #eeeeee; } div.bottomnav p { margin-right: 40px; text-align: right; font-size: 0.8em; } a.uplink { font-weight: normal; } /* contents box */ table.index { margin: 0px 0px 30px 30px; padding: 1px; border-width: 1px; border-style: dotted; border-color: #e0e0e0; } table.index tr.heading { background-color: #e0e0e0; text-align: center; font-weight: bold; font-size: 1.1em; } table.index tr.index { background-color: #eeeeee; } table.index td { padding: 5px 20px; } table.index a:link, table.index a:visited { font-weight: normal; text-decoration: none; color: #dc3c01; } table.index a:hover, table.index a:active { text-decoration: underline; color: #ff4500; } /* Haiku User Guide styles and layout */ /* Rounded corner boxes */ /* Common declarations */ div.admonition { -webkit-border-radius: 10px; -khtml-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; border-style: dotted; border-width: thin; border-color: #dcdcdc; padding: 10px 15px 10px 15px; margin-bottom: 15px; margin-top: 15px; } div.note { padding: 10px 15px 10px 80px; background: #e4ffde url(alert_info_32.png) 15px 15px no-repeat; min-height: 42px; } div.warning { padding: 10px 15px 10px 80px; background: #fffbc6 url(alert_warning_32.png) 15px 15px no-repeat; min-height: 42px; } div.seealso { background: #e4ffde; } /* More layout and styles */ h1 { font-size: 1.3em; font-weight: bold; color: #0c3762; border-bottom: dotted thin #e0e0e0; margin-top: 30px; } h2 { font-size: 1.2em; font-weight: normal; color: #0c3762; border-bottom: dotted thin #e0e0e0; margin-top: 30px; } h3 { font-size: 1.1em; font-weight: normal; color: #0c3762; margin-top: 30px; } h4 { font-size: 1.0em; font-weight: normal; color: #0c3762; margin-top: 30px; } p { text-align: justify; } p.last { margin-bottom: 0; } ol { padding-left: 20px; } ul { padding-left: 5px; margin-top: 3px; } li { line-height: 1.3; } div.content ul > li { -moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding; background: transparent url(bullet_orange.png) no-repeat scroll left 0.45em; list-style-image: none; list-style-type: none; padding: 0 0 0 1.666em; margin-bottom: 3px; } td { vertical-align: top; } tt { background-color: #e2e2e2; font-size: 1.0em; font-family: monospace; } pre { border-color: #0c3762; border-style: dotted; border-width: thin; margin: 0 0 12px 0; padding: 0.8em; background-color: #f0f0f0; } hr { border-top: 1px solid #ccc; border-bottom: 0; border-right: 0; border-left: 0; margin-bottom: 10px; margin-top: 20px; } /* printer only pretty stuff */ @media print { .noprint { display: none; } /* for acronyms we want their definitions inlined at print time */ acronym[title]:after { font-size: small; content: " (" attr(title) ")"; font-style: italic; } /* and not have mozilla dotted underline */ acronym { border: none; } div.topnav, div.bottomnav, div.header, table.index { display: none; } div.content { margin: 0px; padding: 0px; } html { background: #FFF; } } .viewcode-back { font-family: "DejaVu Sans", Arial, Helvetica, sans-serif; } div.viewcode-block:target { background-color: #f4debf; border-top: 1px solid #ac9; border-bottom: 1px solid #ac9; margin: -1px -12px; padding: 0 12px; }pyptlib-0.0.5/doc/html/_static/jquery.js000066400000000000000000007557171222335101500202330ustar00rootroot00000000000000/*! * jQuery JavaScript Library v1.7.2 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Sat Aug 4 06:33:40 UTC 2012 */ (function( window, undefined ) { // Use the correct document accordingly with window argument (sandbox) var document = window.document, navigator = window.navigator, location = window.location; var jQuery = (function() { // Define a local copy of jQuery var jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); }, // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$, // A central reference to the root jQuery(document) rootjQuery, // A simple way to check for HTML strings or ID strings // Prioritize #id over to avoid XSS via location.hash (#9521) quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, // Check if a string has a non-whitespace character in it rnotwhite = /\S/, // Used for trimming whitespace trimLeft = /^\s+/, trimRight = /\s+$/, // Match a standalone tag rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, // JSON RegExp rvalidchars = /^[\],:{}\s]*$/, rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, // Useragent RegExp rwebkit = /(webkit)[ \/]([\w.]+)/, ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, rmsie = /(msie) ([\w.]+)/, rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, // Matches dashed string for camelizing rdashAlpha = /-([a-z]|[0-9])/ig, rmsPrefix = /^-ms-/, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return ( letter + "" ).toUpperCase(); }, // Keep a UserAgent string for use with jQuery.browser userAgent = navigator.userAgent, // For matching the engine and version of the browser browserMatch, // The deferred used on DOM ready readyList, // The ready event handler DOMContentLoaded, // Save a reference to some core methods toString = Object.prototype.toString, hasOwn = Object.prototype.hasOwnProperty, push = Array.prototype.push, slice = Array.prototype.slice, trim = String.prototype.trim, indexOf = Array.prototype.indexOf, // [[Class]] -> type pairs class2type = {}; jQuery.fn = jQuery.prototype = { constructor: jQuery, init: function( selector, context, rootjQuery ) { var match, elem, ret, doc; // Handle $(""), $(null), or $(undefined) if ( !selector ) { return this; } // Handle $(DOMElement) if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; } // The body element only exists once, optimize finding it if ( selector === "body" && !context && document.body ) { this.context = document; this[0] = document.body; this.selector = selector; this.length = 1; return this; } // Handle HTML strings if ( typeof selector === "string" ) { // Are we dealing with HTML string or an ID? if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = quickExpr.exec( selector ); } // Verify a match, and that no context was specified for #id if ( match && (match[1] || !context) ) { // HANDLE: $(html) -> $(array) if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; doc = ( context ? context.ownerDocument || context : document ); // If a single string is passed in and it's a single tag // just do a createElement and skip the rest ret = rsingleTag.exec( selector ); if ( ret ) { if ( jQuery.isPlainObject( context ) ) { selector = [ document.createElement( ret[1] ) ]; jQuery.fn.attr.call( selector, context, true ); } else { selector = [ doc.createElement( ret[1] ) ]; } } else { ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; } return jQuery.merge( this, selector ); // HANDLE: $("#id") } else { elem = document.getElementById( match[2] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id !== match[2] ) { return rootjQuery.find( selector ); } // Otherwise, we inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || rootjQuery ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return rootjQuery.ready( selector ); } if ( selector.selector !== undefined ) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }, // Start with an empty selector selector: "", // The current version of jQuery being used jquery: "1.7.2", // The default length of a jQuery object is 0 length: 0, // The number of elements contained in the matched element set size: function() { return this.length; }, toArray: function() { return slice.call( this, 0 ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num == null ? // Return a 'clean' array this.toArray() : // Return just the object ( num < 0 ? this[ this.length + num ] : this[ num ] ); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems, name, selector ) { // Build a new jQuery matched element set var ret = this.constructor(); if ( jQuery.isArray( elems ) ) { push.apply( ret, elems ); } else { jQuery.merge( ret, elems ); } // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; if ( name === "find" ) { ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; } else if ( name ) { ret.selector = this.selector + "." + name + "(" + selector + ")"; } // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. // (You can seed the arguments with an array of args, but this is // only used internally.) each: function( callback, args ) { return jQuery.each( this, callback, args ); }, ready: function( fn ) { // Attach the listeners jQuery.bindReady(); // Add the callback readyList.add( fn ); return this; }, eq: function( i ) { i = +i; return i === -1 ? this.slice( i ) : this.slice( i, i + 1 ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ), "slice", slice.call(arguments).join(",") ); }, map: function( callback ) { return this.pushStack( jQuery.map(this, function( elem, i ) { return callback.call( elem, i, elem ); })); }, end: function() { return this.prevObject || this.constructor(null); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: [].sort, splice: [].splice }; // Give the init function the jQuery prototype for later instantiation jQuery.fn.init.prototype = jQuery.fn; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction(target) ) { target = {}; } // extend jQuery itself if only one argument is passed if ( length === i ) { target = this; --i; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && jQuery.isArray(src) ? src : []; } else { clone = src && jQuery.isPlainObject(src) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend({ noConflict: function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }, // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Either a released hold or an DOMready/load event and not yet ready if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( !document.body ) { return setTimeout( jQuery.ready, 1 ); } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.fireWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.trigger ) { jQuery( document ).trigger( "ready" ).off( "ready" ); } } }, bindReady: function() { if ( readyList ) { return; } readyList = jQuery.Callbacks( "once memory" ); // Catch cases where $(document).ready() is called after the // browser event has already occurred. if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready return setTimeout( jQuery.ready, 1 ); } // Mozilla, Opera and webkit nightlies currently support this event if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", jQuery.ready, false ); // If IE event model is used } else if ( document.attachEvent ) { // ensure firing before onload, // maybe late but safe also for iframes document.attachEvent( "onreadystatechange", DOMContentLoaded ); // A fallback to window.onload, that will always work window.attachEvent( "onload", jQuery.ready ); // If IE and not a frame // continually check to see if the document is ready var toplevel = false; try { toplevel = window.frameElement == null; } catch(e) {} if ( document.documentElement.doScroll && toplevel ) { doScrollCheck(); } } }, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { return jQuery.type(obj) === "function"; }, isArray: Array.isArray || function( obj ) { return jQuery.type(obj) === "array"; }, isWindow: function( obj ) { return obj != null && obj == obj.window; }, isNumeric: function( obj ) { return !isNaN( parseFloat(obj) ) && isFinite( obj ); }, type: function( obj ) { return obj == null ? String( obj ) : class2type[ toString.call(obj) ] || "object"; }, isPlainObject: function( obj ) { // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { return false; } try { // Not own constructor property must be Object if ( obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { return false; } } catch ( e ) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. var key; for ( key in obj ) {} return key === undefined || hasOwn.call( obj, key ); }, isEmptyObject: function( obj ) { for ( var name in obj ) { return false; } return true; }, error: function( msg ) { throw new Error( msg ); }, parseJSON: function( data ) { if ( typeof data !== "string" || !data ) { return null; } // Make sure leading/trailing whitespace is removed (IE can't handle it) data = jQuery.trim( data ); // Attempt to parse using the native JSON parser first if ( window.JSON && window.JSON.parse ) { return window.JSON.parse( data ); } // Make sure the incoming data is actual JSON // Logic borrowed from http://json.org/json2.js if ( rvalidchars.test( data.replace( rvalidescape, "@" ) .replace( rvalidtokens, "]" ) .replace( rvalidbraces, "")) ) { return ( new Function( "return " + data ) )(); } jQuery.error( "Invalid JSON: " + data ); }, // Cross-browser xml parsing parseXML: function( data ) { if ( typeof data !== "string" || !data ) { return null; } var xml, tmp; try { if ( window.DOMParser ) { // Standard tmp = new DOMParser(); xml = tmp.parseFromString( data , "text/xml" ); } else { // IE xml = new ActiveXObject( "Microsoft.XMLDOM" ); xml.async = "false"; xml.loadXML( data ); } } catch( e ) { xml = undefined; } if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }, noop: function() {}, // Evaluates a script in a global context // Workarounds based on findings by Jim Driscoll // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function( data ) { if ( data && rnotwhite.test( data ) ) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); } )( data ); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); }, // args is for internal usage only each: function( object, callback, args ) { var name, i = 0, length = object.length, isObj = length === undefined || jQuery.isFunction( object ); if ( args ) { if ( isObj ) { for ( name in object ) { if ( callback.apply( object[ name ], args ) === false ) { break; } } } else { for ( ; i < length; ) { if ( callback.apply( object[ i++ ], args ) === false ) { break; } } } // A special, fast, case for the most common use of each } else { if ( isObj ) { for ( name in object ) { if ( callback.call( object[ name ], name, object[ name ] ) === false ) { break; } } } else { for ( ; i < length; ) { if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { break; } } } } return object; }, // Use native String.trim function wherever possible trim: trim ? function( text ) { return text == null ? "" : trim.call( text ); } : // Otherwise use our own trimming functionality function( text ) { return text == null ? "" : text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); }, // results is for internal usage only makeArray: function( array, results ) { var ret = results || []; if ( array != null ) { // The window, strings (and functions) also have 'length' // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 var type = jQuery.type( array ); if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { push.call( ret, array ); } else { jQuery.merge( ret, array ); } } return ret; }, inArray: function( elem, array, i ) { var len; if ( array ) { if ( indexOf ) { return indexOf.call( array, elem, i ); } len = array.length; i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; for ( ; i < len; i++ ) { // Skip accessing in sparse arrays if ( i in array && array[ i ] === elem ) { return i; } } } return -1; }, merge: function( first, second ) { var i = first.length, j = 0; if ( typeof second.length === "number" ) { for ( var l = second.length; j < l; j++ ) { first[ i++ ] = second[ j ]; } } else { while ( second[j] !== undefined ) { first[ i++ ] = second[ j++ ]; } } first.length = i; return first; }, grep: function( elems, callback, inv ) { var ret = [], retVal; inv = !!inv; // Go through the array, only saving the items // that pass the validator function for ( var i = 0, length = elems.length; i < length; i++ ) { retVal = !!callback( elems[ i ], i ); if ( inv !== retVal ) { ret.push( elems[ i ] ); } } return ret; }, // arg is for internal usage only map: function( elems, callback, arg ) { var value, key, ret = [], i = 0, length = elems.length, // jquery objects are treated as arrays isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; // Go through the array, translating each of the items to their if ( isArray ) { for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret[ ret.length ] = value; } } // Go through every key on the object, } else { for ( key in elems ) { value = callback( elems[ key ], key, arg ); if ( value != null ) { ret[ ret.length ] = value; } } } // Flatten any nested arrays return ret.concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { if ( typeof context === "string" ) { var tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind var args = slice.call( arguments, 2 ), proxy = function() { return fn.apply( context, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; return proxy; }, // Mutifunctional method to get and set values to a collection // The value/s can optionally be executed if it's a function access: function( elems, fn, key, value, chainable, emptyGet, pass ) { var exec, bulk = key == null, i = 0, length = elems.length; // Sets many values if ( key && typeof key === "object" ) { for ( i in key ) { jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); } chainable = 1; // Sets one value } else if ( value !== undefined ) { // Optionally, function values get executed if exec is true exec = pass === undefined && jQuery.isFunction( value ); if ( bulk ) { // Bulk operations only iterate when executing function values if ( exec ) { exec = fn; fn = function( elem, key, value ) { return exec.call( jQuery( elem ), value ); }; // Otherwise they run against the entire set } else { fn.call( elems, value ); fn = null; } } if ( fn ) { for (; i < length; i++ ) { fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); } } chainable = 1; } return chainable ? elems : // Gets bulk ? fn.call( elems ) : length ? fn( elems[0], key ) : emptyGet; }, now: function() { return ( new Date() ).getTime(); }, // Use of jQuery.browser is frowned upon. // More details: http://docs.jquery.com/Utilities/jQuery.browser uaMatch: function( ua ) { ua = ua.toLowerCase(); var match = rwebkit.exec( ua ) || ropera.exec( ua ) || rmsie.exec( ua ) || ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || []; return { browser: match[1] || "", version: match[2] || "0" }; }, sub: function() { function jQuerySub( selector, context ) { return new jQuerySub.fn.init( selector, context ); } jQuery.extend( true, jQuerySub, this ); jQuerySub.superclass = this; jQuerySub.fn = jQuerySub.prototype = this(); jQuerySub.fn.constructor = jQuerySub; jQuerySub.sub = this.sub; jQuerySub.fn.init = function init( selector, context ) { if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { context = jQuerySub( context ); } return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); }; jQuerySub.fn.init.prototype = jQuerySub.fn; var rootjQuerySub = jQuerySub(document); return jQuerySub; }, browser: {} }); // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); }); browserMatch = jQuery.uaMatch( userAgent ); if ( browserMatch.browser ) { jQuery.browser[ browserMatch.browser ] = true; jQuery.browser.version = browserMatch.version; } // Deprecated, use jQuery.browser.webkit instead if ( jQuery.browser.webkit ) { jQuery.browser.safari = true; } // IE doesn't match non-breaking spaces with \s if ( rnotwhite.test( "\xA0" ) ) { trimLeft = /^[\s\xA0]+/; trimRight = /[\s\xA0]+$/; } // All jQuery objects should point back to these rootjQuery = jQuery(document); // Cleanup functions for the document ready method if ( document.addEventListener ) { DOMContentLoaded = function() { document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); jQuery.ready(); }; } else if ( document.attachEvent ) { DOMContentLoaded = function() { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( document.readyState === "complete" ) { document.detachEvent( "onreadystatechange", DOMContentLoaded ); jQuery.ready(); } }; } // The DOM ready check for Internet Explorer function doScrollCheck() { if ( jQuery.isReady ) { return; } try { // If IE is used, use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ document.documentElement.doScroll("left"); } catch(e) { setTimeout( doScrollCheck, 1 ); return; } // and execute any waiting functions jQuery.ready(); } return jQuery; })(); // String to Object flags format cache var flagsCache = {}; // Convert String-formatted flags into Object-formatted ones and store in cache function createFlags( flags ) { var object = flagsCache[ flags ] = {}, i, length; flags = flags.split( /\s+/ ); for ( i = 0, length = flags.length; i < length; i++ ) { object[ flags[i] ] = true; } return object; } /* * Create a callback list using the following parameters: * * flags: an optional list of space-separated flags that will change how * the callback list behaves * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible flags: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( flags ) { // Convert flags from String-formatted to Object-formatted // (we check in cache first) flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; var // Actual callback list list = [], // Stack of fire calls for repeatable lists stack = [], // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, // Flag to know if list is currently firing firing, // First callback to fire (used internally by add and fireWith) firingStart, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, // Add one or several callbacks to the list add = function( args ) { var i, length, elem, type, actual; for ( i = 0, length = args.length; i < length; i++ ) { elem = args[ i ]; type = jQuery.type( elem ); if ( type === "array" ) { // Inspect recursively add( elem ); } else if ( type === "function" ) { // Add if not in unique mode and callback is not in if ( !flags.unique || !self.has( elem ) ) { list.push( elem ); } } } }, // Fire callbacks fire = function( context, args ) { args = args || []; memory = !flags.memory || [ context, args ]; fired = true; firing = true; firingIndex = firingStart || 0; firingStart = 0; firingLength = list.length; for ( ; list && firingIndex < firingLength; firingIndex++ ) { if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { memory = true; // Mark as halted break; } } firing = false; if ( list ) { if ( !flags.once ) { if ( stack && stack.length ) { memory = stack.shift(); self.fireWith( memory[ 0 ], memory[ 1 ] ); } } else if ( memory === true ) { self.disable(); } else { list = []; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { var length = list.length; add( arguments ); // Do we need to add the callbacks to the // current firing batch? if ( firing ) { firingLength = list.length; // With memory, if we're not firing then // we should call right away, unless previous // firing was halted (stopOnFalse) } else if ( memory && memory !== true ) { firingStart = length; fire( memory[ 0 ], memory[ 1 ] ); } } return this; }, // Remove a callback from the list remove: function() { if ( list ) { var args = arguments, argIndex = 0, argLength = args.length; for ( ; argIndex < argLength ; argIndex++ ) { for ( var i = 0; i < list.length; i++ ) { if ( args[ argIndex ] === list[ i ] ) { // Handle firingIndex and firingLength if ( firing ) { if ( i <= firingLength ) { firingLength--; if ( i <= firingIndex ) { firingIndex--; } } } // Remove the element list.splice( i--, 1 ); // If we have some unicity property then // we only need to do this once if ( flags.unique ) { break; } } } } } return this; }, // Control if a given callback is in the list has: function( fn ) { if ( list ) { var i = 0, length = list.length; for ( ; i < length; i++ ) { if ( fn === list[ i ] ) { return true; } } } return false; }, // Remove all callbacks from the list empty: function() { list = []; return this; }, // Have the list do nothing anymore disable: function() { list = stack = memory = undefined; return this; }, // Is it disabled? disabled: function() { return !list; }, // Lock the list in its current state lock: function() { stack = undefined; if ( !memory || memory === true ) { self.disable(); } return this; }, // Is it locked? locked: function() { return !stack; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( stack ) { if ( firing ) { if ( !flags.once ) { stack.push( [ context, args ] ); } } else if ( !( flags.once && memory ) ) { fire( context, args ); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; var // Static reference to slice sliceDeferred = [].slice; jQuery.extend({ Deferred: function( func ) { var doneList = jQuery.Callbacks( "once memory" ), failList = jQuery.Callbacks( "once memory" ), progressList = jQuery.Callbacks( "memory" ), state = "pending", lists = { resolve: doneList, reject: failList, notify: progressList }, promise = { done: doneList.add, fail: failList.add, progress: progressList.add, state: function() { return state; }, // Deprecated isResolved: doneList.fired, isRejected: failList.fired, then: function( doneCallbacks, failCallbacks, progressCallbacks ) { deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); return this; }, always: function() { deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); return this; }, pipe: function( fnDone, fnFail, fnProgress ) { return jQuery.Deferred(function( newDefer ) { jQuery.each( { done: [ fnDone, "resolve" ], fail: [ fnFail, "reject" ], progress: [ fnProgress, "notify" ] }, function( handler, data ) { var fn = data[ 0 ], action = data[ 1 ], returned; if ( jQuery.isFunction( fn ) ) { deferred[ handler ](function() { returned = fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); } else { newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); } }); } else { deferred[ handler ]( newDefer[ action ] ); } }); }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { if ( obj == null ) { obj = promise; } else { for ( var key in promise ) { obj[ key ] = promise[ key ]; } } return obj; } }, deferred = promise.promise({}), key; for ( key in lists ) { deferred[ key ] = lists[ key ].fire; deferred[ key + "With" ] = lists[ key ].fireWith; } // Handle state deferred.done( function() { state = "resolved"; }, failList.disable, progressList.lock ).fail( function() { state = "rejected"; }, doneList.disable, progressList.lock ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( firstParam ) { var args = sliceDeferred.call( arguments, 0 ), i = 0, length = args.length, pValues = new Array( length ), count = length, pCount = length, deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? firstParam : jQuery.Deferred(), promise = deferred.promise(); function resolveFunc( i ) { return function( value ) { args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; if ( !( --count ) ) { deferred.resolveWith( deferred, args ); } }; } function progressFunc( i ) { return function( value ) { pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; deferred.notifyWith( promise, pValues ); }; } if ( length > 1 ) { for ( ; i < length; i++ ) { if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); } else { --count; } } if ( !count ) { deferred.resolveWith( deferred, args ); } } else if ( deferred !== firstParam ) { deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); } return promise; } }); jQuery.support = (function() { var support, all, a, select, opt, input, fragment, tds, events, eventName, i, isSupported, div = document.createElement( "div" ), documentElement = document.documentElement; // Preliminary tests div.setAttribute("className", "t"); div.innerHTML = "
a"; all = div.getElementsByTagName( "*" ); a = div.getElementsByTagName( "a" )[ 0 ]; // Can't get basic test support if ( !all || !all.length || !a ) { return {}; } // First batch of supports tests select = document.createElement( "select" ); opt = select.appendChild( document.createElement("option") ); input = div.getElementsByTagName( "input" )[ 0 ]; support = { // IE strips leading whitespace when .innerHTML is used leadingWhitespace: ( div.firstChild.nodeType === 3 ), // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables tbody: !div.getElementsByTagName("tbody").length, // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE htmlSerialize: !!div.getElementsByTagName("link").length, // Get the style information from getAttribute // (IE uses .cssText instead) style: /top/.test( a.getAttribute("style") ), // Make sure that URLs aren't manipulated // (IE normalizes it by default) hrefNormalized: ( a.getAttribute("href") === "/a" ), // Make sure that element opacity exists // (IE uses filter instead) // Use a regex to work around a WebKit issue. See #5145 opacity: /^0.55/.test( a.style.opacity ), // Verify style float existence // (IE uses styleFloat instead of cssFloat) cssFloat: !!a.style.cssFloat, // Make sure that if no value is specified for a checkbox // that it defaults to "on". // (WebKit defaults to "" instead) checkOn: ( input.value === "on" ), // Make sure that a selected-by-default option has a working selected property. // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) optSelected: opt.selected, // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) getSetAttribute: div.className !== "t", // Tests for enctype support on a form(#6743) enctype: !!document.createElement("form").enctype, // Makes sure cloning an html5 element does not cause problems // Where outerHTML is undefined, this still works html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", // Will be defined later submitBubbles: true, changeBubbles: true, focusinBubbles: false, deleteExpando: true, noCloneEvent: true, inlineBlockNeedsLayout: false, shrinkWrapBlocks: false, reliableMarginRight: true, pixelMargin: true }; // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat"); // Make sure checked status is properly cloned input.checked = true; support.noCloneChecked = input.cloneNode( true ).checked; // Make sure that the options inside disabled selects aren't marked as disabled // (WebKit marks them as disabled) select.disabled = true; support.optDisabled = !opt.disabled; // Test to see if it's possible to delete an expando from an element // Fails in Internet Explorer try { delete div.test; } catch( e ) { support.deleteExpando = false; } if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { div.attachEvent( "onclick", function() { // Cloning a node shouldn't copy over any // bound event handlers (IE does this) support.noCloneEvent = false; }); div.cloneNode( true ).fireEvent( "onclick" ); } // Check if a radio maintains its value // after being appended to the DOM input = document.createElement("input"); input.value = "t"; input.setAttribute("type", "radio"); support.radioValue = input.value === "t"; input.setAttribute("checked", "checked"); // #11217 - WebKit loses check when the name is after the checked attribute input.setAttribute( "name", "t" ); div.appendChild( input ); fragment = document.createDocumentFragment(); fragment.appendChild( div.lastChild ); // WebKit doesn't clone checked state correctly in fragments support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) support.appendChecked = input.checked; fragment.removeChild( input ); fragment.appendChild( div ); // Technique from Juriy Zaytsev // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ // We only care about the case where non-standard event systems // are used, namely in IE. Short-circuiting here helps us to // avoid an eval call (in setAttribute) which can cause CSP // to go haywire. See: https://developer.mozilla.org/en/Security/CSP if ( div.attachEvent ) { for ( i in { submit: 1, change: 1, focusin: 1 }) { eventName = "on" + i; isSupported = ( eventName in div ); if ( !isSupported ) { div.setAttribute( eventName, "return;" ); isSupported = ( typeof div[ eventName ] === "function" ); } support[ i + "Bubbles" ] = isSupported; } } fragment.removeChild( div ); // Null elements to avoid leaks in IE fragment = select = opt = div = input = null; // Run tests that need a body at doc ready jQuery(function() { var container, outer, inner, table, td, offsetSupport, marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight, paddingMarginBorderVisibility, paddingMarginBorder, body = document.getElementsByTagName("body")[0]; if ( !body ) { // Return for frameset docs that don't have a body return; } conMarginTop = 1; paddingMarginBorder = "padding:0;margin:0;border:"; positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;"; paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;"; style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;"; html = "
" + "" + "
"; container = document.createElement("div"); container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; body.insertBefore( container, body.firstChild ); // Construct the test element div = document.createElement("div"); container.appendChild( div ); // Check if table cells still have offsetWidth/Height when they are set // to display:none and there are still other visible table cells in a // table row; if so, offsetWidth/Height are not reliable for use when // determining if an element has been hidden directly using // display:none (it is still safe to use offsets if a parent element is // hidden; don safety goggles and see bug #4512 for more information). // (only IE 8 fails this test) div.innerHTML = "
t
"; tds = div.getElementsByTagName( "td" ); isSupported = ( tds[ 0 ].offsetHeight === 0 ); tds[ 0 ].style.display = ""; tds[ 1 ].style.display = "none"; // Check if empty table cells still have offsetWidth/Height // (IE <= 8 fail this test) support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); // Check if div with explicit width and no margin-right incorrectly // gets computed margin-right based on width of container. For more // info see bug #3333 // Fails in WebKit before Feb 2011 nightlies // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right if ( window.getComputedStyle ) { div.innerHTML = ""; marginDiv = document.createElement( "div" ); marginDiv.style.width = "0"; marginDiv.style.marginRight = "0"; div.style.width = "2px"; div.appendChild( marginDiv ); support.reliableMarginRight = ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; } if ( typeof div.style.zoom !== "undefined" ) { // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving // them layout // (IE < 8 does this) div.innerHTML = ""; div.style.width = div.style.padding = "1px"; div.style.border = 0; div.style.overflow = "hidden"; div.style.display = "inline"; div.style.zoom = 1; support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); // Check if elements with layout shrink-wrap their children // (IE 6 does this) div.style.display = "block"; div.style.overflow = "visible"; div.innerHTML = "
"; support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); } div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility; div.innerHTML = html; outer = div.firstChild; inner = outer.firstChild; td = outer.nextSibling.firstChild.firstChild; offsetSupport = { doesNotAddBorder: ( inner.offsetTop !== 5 ), doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) }; inner.style.position = "fixed"; inner.style.top = "20px"; // safari subtracts parent border width here which is 5px offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); inner.style.position = inner.style.top = ""; outer.style.overflow = "hidden"; outer.style.position = "relative"; offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); if ( window.getComputedStyle ) { div.style.marginTop = "1%"; support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%"; } if ( typeof container.style.zoom !== "undefined" ) { container.style.zoom = 1; } body.removeChild( container ); marginDiv = div = container = null; jQuery.extend( support, offsetSupport ); }); return support; })(); var rbrace = /^(?:\{.*\}|\[.*\])$/, rmultiDash = /([A-Z])/g; jQuery.extend({ cache: {}, // Please use with caution uuid: 0, // Unique for each copy of jQuery on the page // Non-digits removed to match rinlinejQuery expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), // The following elements throw uncatchable exceptions if you // attempt to add expando properties to them. noData: { "embed": true, // Ban all objects except for Flash (which handle expandos) "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", "applet": true }, hasData: function( elem ) { elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; return !!elem && !isEmptyDataObject( elem ); }, data: function( elem, name, data, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var privateCache, thisCache, ret, internalKey = jQuery.expando, getByName = typeof name === "string", // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, isEvents = name === "events"; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { return; } if ( !id ) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if ( isNode ) { elem[ internalKey ] = id = ++jQuery.uuid; } else { id = internalKey; } } if ( !cache[ id ] ) { cache[ id ] = {}; // Avoids exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify if ( !isNode ) { cache[ id ].toJSON = jQuery.noop; } } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if ( typeof name === "object" || typeof name === "function" ) { if ( pvt ) { cache[ id ] = jQuery.extend( cache[ id ], name ); } else { cache[ id ].data = jQuery.extend( cache[ id ].data, name ); } } privateCache = thisCache = cache[ id ]; // jQuery data() is stored in a separate object inside the object's internal data // cache in order to avoid key collisions between internal data and user-defined // data. if ( !pvt ) { if ( !thisCache.data ) { thisCache.data = {}; } thisCache = thisCache.data; } if ( data !== undefined ) { thisCache[ jQuery.camelCase( name ) ] = data; } // Users should not attempt to inspect the internal events object using jQuery.data, // it is undocumented and subject to change. But does anyone listen? No. if ( isEvents && !thisCache[ name ] ) { return privateCache.events; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if ( getByName ) { // First Try to find as-is property data ret = thisCache[ name ]; // Test for null|undefined property data if ( ret == null ) { // Try to find the camelCased property ret = thisCache[ jQuery.camelCase( name ) ]; } } else { ret = thisCache; } return ret; }, removeData: function( elem, name, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, i, l, // Reference to internal data cache key internalKey = jQuery.expando, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, // See jQuery.data for more information id = isNode ? elem[ internalKey ] : internalKey; // If there is already no cache entry for this object, there is no // purpose in continuing if ( !cache[ id ] ) { return; } if ( name ) { thisCache = pvt ? cache[ id ] : cache[ id ].data; if ( thisCache ) { // Support array or space separated string names for data keys if ( !jQuery.isArray( name ) ) { // try the string as a key before any manipulation if ( name in thisCache ) { name = [ name ]; } else { // split the camel cased version by spaces unless a key with the spaces exists name = jQuery.camelCase( name ); if ( name in thisCache ) { name = [ name ]; } else { name = name.split( " " ); } } } for ( i = 0, l = name.length; i < l; i++ ) { delete thisCache[ name[i] ]; } // If there is no data left in the cache, we want to continue // and let the cache object itself get destroyed if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { return; } } } // See jQuery.data for more information if ( !pvt ) { delete cache[ id ].data; // Don't destroy the parent cache unless the internal data object // had been the only thing left in it if ( !isEmptyDataObject(cache[ id ]) ) { return; } } // Browsers that fail expando deletion also refuse to delete expandos on // the window, but it will allow it on all other JS objects; other browsers // don't care // Ensure that `cache` is not a window object #10080 if ( jQuery.support.deleteExpando || !cache.setInterval ) { delete cache[ id ]; } else { cache[ id ] = null; } // We destroyed the cache and need to eliminate the expando on the node to avoid // false lookups in the cache for entries that no longer exist if ( isNode ) { // IE does not allow us to delete expando properties from nodes, // nor does it have a removeAttribute function on Document nodes; // we must handle all of these cases if ( jQuery.support.deleteExpando ) { delete elem[ internalKey ]; } else if ( elem.removeAttribute ) { elem.removeAttribute( internalKey ); } else { elem[ internalKey ] = null; } } }, // For internal use only. _data: function( elem, name, data ) { return jQuery.data( elem, name, data, true ); }, // A method for determining if a DOM node can handle the data expando acceptData: function( elem ) { if ( elem.nodeName ) { var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; if ( match ) { return !(match === true || elem.getAttribute("classid") !== match); } } return true; } }); jQuery.fn.extend({ data: function( key, value ) { var parts, part, attr, name, l, elem = this[0], i = 0, data = null; // Gets all values if ( key === undefined ) { if ( this.length ) { data = jQuery.data( elem ); if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { attr = elem.attributes; for ( l = attr.length; i < l; i++ ) { name = attr[i].name; if ( name.indexOf( "data-" ) === 0 ) { name = jQuery.camelCase( name.substring(5) ); dataAttr( elem, name, data[ name ] ); } } jQuery._data( elem, "parsedAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each(function() { jQuery.data( this, key ); }); } parts = key.split( ".", 2 ); parts[1] = parts[1] ? "." + parts[1] : ""; part = parts[1] + "!"; return jQuery.access( this, function( value ) { if ( value === undefined ) { data = this.triggerHandler( "getData" + part, [ parts[0] ] ); // Try to fetch any internally stored data first if ( data === undefined && elem ) { data = jQuery.data( elem, key ); data = dataAttr( elem, key, data ); } return data === undefined && parts[1] ? this.data( parts[0] ) : data; } parts[1] = value; this.each(function() { var self = jQuery( this ); self.triggerHandler( "setData" + part, parts ); jQuery.data( this, key, value ); self.triggerHandler( "changeData" + part, parts ); }); }, null, value, arguments.length > 1, null, false ); }, removeData: function( key ) { return this.each(function() { jQuery.removeData( this, key ); }); } }); function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : jQuery.isNumeric( data ) ? +data : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} // Make sure we set the data so it isn't changed later jQuery.data( elem, key, data ); } else { data = undefined; } } return data; } // checks a cache object for emptiness function isEmptyDataObject( obj ) { for ( var name in obj ) { // if the public data object is empty, the private is still empty if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { continue; } if ( name !== "toJSON" ) { return false; } } return true; } function handleQueueMarkDefer( elem, type, src ) { var deferDataKey = type + "defer", queueDataKey = type + "queue", markDataKey = type + "mark", defer = jQuery._data( elem, deferDataKey ); if ( defer && ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { // Give room for hard-coded callbacks to fire first // and eventually mark/queue something else on the element setTimeout( function() { if ( !jQuery._data( elem, queueDataKey ) && !jQuery._data( elem, markDataKey ) ) { jQuery.removeData( elem, deferDataKey, true ); defer.fire(); } }, 0 ); } } jQuery.extend({ _mark: function( elem, type ) { if ( elem ) { type = ( type || "fx" ) + "mark"; jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); } }, _unmark: function( force, elem, type ) { if ( force !== true ) { type = elem; elem = force; force = false; } if ( elem ) { type = type || "fx"; var key = type + "mark", count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); if ( count ) { jQuery._data( elem, key, count ); } else { jQuery.removeData( elem, key, true ); handleQueueMarkDefer( elem, type, "mark" ); } } }, queue: function( elem, type, data ) { var q; if ( elem ) { type = ( type || "fx" ) + "queue"; q = jQuery._data( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !q || jQuery.isArray(data) ) { q = jQuery._data( elem, type, jQuery.makeArray(data) ); } else { q.push( data ); } } return q || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), fn = queue.shift(), hooks = {}; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } jQuery._data( elem, type + ".run", hooks ); fn.call( elem, function() { jQuery.dequeue( elem, type ); }, hooks ); } if ( !queue.length ) { jQuery.removeData( elem, type + "queue " + type + ".run", true ); handleQueueMarkDefer( elem, type, "queue" ); } } }); jQuery.fn.extend({ queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[0], type ); } return data === undefined ? this : this.each(function() { var queue = jQuery.queue( this, type, data ); if ( type === "fx" && queue[0] !== "inprogress" ) { jQuery.dequeue( this, type ); } }); }, dequeue: function( type ) { return this.each(function() { jQuery.dequeue( this, type ); }); }, // Based off of the plugin by Clint Helfers, with permission. // http://blindsignals.com/index.php/2009/07/jquery-delay/ delay: function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = setTimeout( next, time ); hooks.stop = function() { clearTimeout( timeout ); }; }); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, object ) { if ( typeof type !== "string" ) { object = type; type = undefined; } type = type || "fx"; var defer = jQuery.Deferred(), elements = this, i = elements.length, count = 1, deferDataKey = type + "defer", queueDataKey = type + "queue", markDataKey = type + "mark", tmp; function resolve() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } } while( i-- ) { if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { count++; tmp.add( resolve ); } } resolve(); return defer.promise( object ); } }); var rclass = /[\n\t\r]/g, rspace = /\s+/, rreturn = /\r/g, rtype = /^(?:button|input)$/i, rfocusable = /^(?:button|input|object|select|textarea)$/i, rclickable = /^a(?:rea)?$/i, rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, getSetAttribute = jQuery.support.getSetAttribute, nodeHook, boolHook, fixSpecified; jQuery.fn.extend({ attr: function( name, value ) { return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each(function() { jQuery.removeAttr( this, name ); }); }, prop: function( name, value ) { return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { name = jQuery.propFix[ name ] || name; return this.each(function() { // try/catch handles cases where IE balks (such as removing a property on window) try { this[ name ] = undefined; delete this[ name ]; } catch( e ) {} }); }, addClass: function( value ) { var classNames, i, l, elem, setClass, c, cl; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).addClass( value.call(this, j, this.className) ); }); } if ( value && typeof value === "string" ) { classNames = value.split( rspace ); for ( i = 0, l = this.length; i < l; i++ ) { elem = this[ i ]; if ( elem.nodeType === 1 ) { if ( !elem.className && classNames.length === 1 ) { elem.className = value; } else { setClass = " " + elem.className + " "; for ( c = 0, cl = classNames.length; c < cl; c++ ) { if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { setClass += classNames[ c ] + " "; } } elem.className = jQuery.trim( setClass ); } } } } return this; }, removeClass: function( value ) { var classNames, i, l, elem, className, c, cl; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).removeClass( value.call(this, j, this.className) ); }); } if ( (value && typeof value === "string") || value === undefined ) { classNames = ( value || "" ).split( rspace ); for ( i = 0, l = this.length; i < l; i++ ) { elem = this[ i ]; if ( elem.nodeType === 1 && elem.className ) { if ( value ) { className = (" " + elem.className + " ").replace( rclass, " " ); for ( c = 0, cl = classNames.length; c < cl; c++ ) { className = className.replace(" " + classNames[ c ] + " ", " "); } elem.className = jQuery.trim( className ); } else { elem.className = ""; } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value, isBool = typeof stateVal === "boolean"; if ( jQuery.isFunction( value ) ) { return this.each(function( i ) { jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); }); } return this.each(function() { if ( type === "string" ) { // toggle individual class names var className, i = 0, self = jQuery( this ), state = stateVal, classNames = value.split( rspace ); while ( (className = classNames[ i++ ]) ) { // check each className given, space seperated list state = isBool ? state : !self.hasClass( className ); self[ state ? "addClass" : "removeClass" ]( className ); } } else if ( type === "undefined" || type === "boolean" ) { if ( this.className ) { // store className if set jQuery._data( this, "__className__", this.className ); } // toggle whole className this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; } }); }, hasClass: function( selector ) { var className = " " + selector + " ", i = 0, l = this.length; for ( ; i < l; i++ ) { if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { return true; } } return false; }, val: function( value ) { var hooks, ret, isFunction, elem = this[0]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { return ret; } ret = elem.value; return typeof ret === "string" ? // handle most common string cases ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } return; } isFunction = jQuery.isFunction( value ); return this.each(function( i ) { var self = jQuery(this), val; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, self.val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( jQuery.isArray( val ) ) { val = jQuery.map(val, function ( value ) { return value == null ? "" : value + ""; }); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } }); } }); jQuery.extend({ valHooks: { option: { get: function( elem ) { // attributes.value is undefined in Blackberry 4.7 but // uses .value. See #6932 var val = elem.attributes.value; return !val || val.specified ? elem.value : elem.text; } }, select: { get: function( elem ) { var value, i, max, option, index = elem.selectedIndex, values = [], options = elem.options, one = elem.type === "select-one"; // Nothing was selected if ( index < 0 ) { return null; } // Loop through all the selected options i = one ? index : 0; max = one ? index + 1 : options.length; for ( ; i < max; i++ ) { option = options[ i ]; // Don't return options that are disabled or in a disabled optgroup if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } // Fixes Bug #2551 -- select.val() broken in IE after form.reset() if ( one && !values.length && options.length ) { return jQuery( options[ index ] ).val(); } return values; }, set: function( elem, value ) { var values = jQuery.makeArray( value ); jQuery(elem).find("option").each(function() { this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; }); if ( !values.length ) { elem.selectedIndex = -1; } return values; } } }, attrFn: { val: true, css: true, html: true, text: true, data: true, width: true, height: true, offset: true }, attr: function( elem, name, value, pass ) { var ret, hooks, notxml, nType = elem.nodeType; // don't get/set attributes on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } if ( pass && name in jQuery.attrFn ) { return jQuery( elem )[ name ]( value ); } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); // All attributes are lowercase // Grab necessary hook if one is defined if ( notxml ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return; } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { elem.setAttribute( name, "" + value ); return value; } } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { ret = elem.getAttribute( name ); // Non-existent attributes return null, we normalize to undefined return ret === null ? undefined : ret; } }, removeAttr: function( elem, value ) { var propName, attrNames, name, l, isBool, i = 0; if ( value && elem.nodeType === 1 ) { attrNames = value.toLowerCase().split( rspace ); l = attrNames.length; for ( ; i < l; i++ ) { name = attrNames[ i ]; if ( name ) { propName = jQuery.propFix[ name ] || name; isBool = rboolean.test( name ); // See #9699 for explanation of this approach (setting first, then removal) // Do not do this for boolean attributes (see #10870) if ( !isBool ) { jQuery.attr( elem, name, "" ); } elem.removeAttribute( getSetAttribute ? name : propName ); // Set corresponding property to false for boolean attributes if ( isBool && propName in elem ) { elem[ propName ] = false; } } } } }, attrHooks: { type: { set: function( elem, value ) { // We can't allow the type property to be changed (since it causes problems in IE) if ( rtype.test( elem.nodeName ) && elem.parentNode ) { jQuery.error( "type property can't be changed" ); } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { // Setting the type on a radio button after the value resets the value in IE6-9 // Reset value to it's default in case type is set after value // This is for element creation var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } }, // Use the value property for back compat // Use the nodeHook for button elements in IE6/7 (#1954) value: { get: function( elem, name ) { if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { return nodeHook.get( elem, name ); } return name in elem ? elem.value : null; }, set: function( elem, value, name ) { if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { return nodeHook.set( elem, value, name ); } // Does not return so that setAttribute is also used elem.value = value; } } }, propFix: { tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable" }, prop: function( elem, name, value ) { var ret, hooks, notxml, nType = elem.nodeType; // don't get/set properties on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); if ( notxml ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { return ( elem[ name ] = value ); } } else { if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { return elem[ name ]; } } }, propHooks: { tabIndex: { get: function( elem ) { // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ var attributeNode = elem.getAttributeNode("tabindex"); return attributeNode && attributeNode.specified ? parseInt( attributeNode.value, 10 ) : rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 0 : undefined; } } } }); // Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; // Hook for boolean attributes boolHook = { get: function( elem, name ) { // Align boolean attributes with corresponding properties // Fall back to attribute presence where some booleans are not supported var attrNode, property = jQuery.prop( elem, name ); return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? name.toLowerCase() : undefined; }, set: function( elem, value, name ) { var propName; if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { // value is true since we know at this point it's type boolean and not false // Set boolean attributes to the same name and set the DOM property propName = jQuery.propFix[ name ] || name; if ( propName in elem ) { // Only set the IDL specifically if it already exists on the element elem[ propName ] = true; } elem.setAttribute( name, name.toLowerCase() ); } return name; } }; // IE6/7 do not support getting/setting some attributes with get/setAttribute if ( !getSetAttribute ) { fixSpecified = { name: true, id: true, coords: true }; // Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret; ret = elem.getAttributeNode( name ); return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? ret.nodeValue : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { ret = document.createAttribute( name ); elem.setAttributeNode( ret ); } return ( ret.nodeValue = value + "" ); } }; // Apply the nodeHook to tabindex jQuery.attrHooks.tabindex.set = nodeHook.set; // Set width and height to auto instead of 0 on empty string( Bug #8150 ) // This is for removals jQuery.each([ "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { set: function( elem, value ) { if ( value === "" ) { elem.setAttribute( name, "auto" ); return value; } } }); }); // Set contenteditable to false on removals(#10429) // Setting to empty string throws an error as an invalid value jQuery.attrHooks.contenteditable = { get: nodeHook.get, set: function( elem, value, name ) { if ( value === "" ) { value = "false"; } nodeHook.set( elem, value, name ); } }; } // Some attributes require a special call on IE if ( !jQuery.support.hrefNormalized ) { jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { get: function( elem ) { var ret = elem.getAttribute( name, 2 ); return ret === null ? undefined : ret; } }); }); } if ( !jQuery.support.style ) { jQuery.attrHooks.style = { get: function( elem ) { // Return undefined in the case of empty string // Normalize to lowercase since IE uppercases css property names return elem.style.cssText.toLowerCase() || undefined; }, set: function( elem, value ) { return ( elem.style.cssText = "" + value ); } }; } // Safari mis-reports the default selected property of an option // Accessing the parent's selectedIndex property fixes it if ( !jQuery.support.optSelected ) { jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { get: function( elem ) { var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; // Make sure that it also works with optgroups, see #5701 if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } return null; } }); } // IE6/7 call enctype encoding if ( !jQuery.support.enctype ) { jQuery.propFix.enctype = "encoding"; } // Radios and checkboxes getter/setter if ( !jQuery.support.checkOn ) { jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { get: function( elem ) { // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified return elem.getAttribute("value") === null ? "on" : elem.value; } }; }); } jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { set: function( elem, value ) { if ( jQuery.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); } } }); }); var rformElems = /^(?:textarea|input|select)$/i, rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, rhoverHack = /(?:^|\s)hover(\.\S+)?\b/, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, quickParse = function( selector ) { var quick = rquickIs.exec( selector ); if ( quick ) { // 0 1 2 3 // [ _, tag, id, class ] quick[1] = ( quick[1] || "" ).toLowerCase(); quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); } return quick; }, quickIs = function( elem, m ) { var attrs = elem.attributes || {}; return ( (!m[1] || elem.nodeName.toLowerCase() === m[1]) && (!m[2] || (attrs.id || {}).value === m[2]) && (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) ); }, hoverHack = function( events ) { return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); }; /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { add: function( elem, types, handler, data, selector ) { var elemData, eventHandle, events, t, tns, type, namespaces, handleObj, handleObjIn, quick, handlers, special; // Don't attach events to noData or text/comment nodes (allow plain objects tho) if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first events = elemData.events; if ( !events ) { elemData.events = events = {}; } eventHandle = elemData.handle; if ( !eventHandle ) { elemData.handle = eventHandle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : undefined; }; // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events eventHandle.elem = elem; } // Handle multiple events separated by a space // jQuery(...).bind("mouseover mouseout", fn); types = jQuery.trim( hoverHack(types) ).split( " " ); for ( t = 0; t < types.length; t++ ) { tns = rtypenamespace.exec( types[t] ) || []; type = tns[1]; namespaces = ( tns[2] || "" ).split( "." ).sort(); // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend({ type: type, origType: tns[1], data: data, handler: handler, guid: handler.guid, selector: selector, quick: selector && quickParse( selector ), namespace: namespaces.join(".") }, handleObjIn ); // Init the event handler queue if we're the first handlers = events[ type ]; if ( !handlers ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener/attachEvent if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { // Bind the global event handler to the element if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } // Nullify elem to prevent memory leaks in IE elem = null; }, global: {}, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), t, tns, type, origType, namespaces, origCount, j, events, special, handle, eventType, handleObj; if ( !elemData || !(events = elemData.events) ) { return; } // Once for each type.namespace in types; type may be omitted types = jQuery.trim( hoverHack( types || "" ) ).split(" "); for ( t = 0; t < types.length; t++ ) { tns = rtypenamespace.exec( types[t] ) || []; type = origType = tns[1]; namespaces = tns[2]; // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector? special.delegateType : special.bindType ) || type; eventType = events[ type ] || []; origCount = eventType.length; namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; // Remove matching events for ( j = 0; j < eventType.length; j++ ) { handleObj = eventType[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !namespaces || namespaces.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { eventType.splice( j--, 1 ); if ( handleObj.selector ) { eventType.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( eventType.length === 0 && origCount !== eventType.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { handle = elemData.handle; if ( handle ) { handle.elem = null; } // removeData also checks for emptiness and clears the expando if empty // so use it instead of delete jQuery.removeData( elem, [ "events", "handle" ], true ); } }, // Events that are safe to short-circuit if no handlers are attached. // Native DOM events should not be added, they may have inline handlers. customEvent: { "getData": true, "setData": true, "changeData": true }, trigger: function( event, data, elem, onlyHandlers ) { // Don't do events on text and comment nodes if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { return; } // Event object or event type var type = event.type || event, namespaces = [], cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf( "!" ) >= 0 ) { // Exclusive events trigger only for the exact event (no namespaces) type = type.slice(0, -1); exclusive = true; } if ( type.indexOf( "." ) >= 0 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { // No jQuery handlers for this event type, and it can't have inline handlers return; } // Caller can pass in an Event, Object, or just an event type string event = typeof event === "object" ? // jQuery.Event object event[ jQuery.expando ] ? event : // Object literal new jQuery.Event( type, event ) : // Just the event type (string) new jQuery.Event( type ); event.type = type; event.isTrigger = true; event.exclusive = exclusive; event.namespace = namespaces.join( "." ); event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; // Handle a global trigger if ( !elem ) { // TODO: Stop taunting the data cache; remove global events and always attach to document cache = jQuery.cache; for ( i in cache ) { if ( cache[ i ].events && cache[ i ].events[ type ] ) { jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); } } return; } // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data != null ? jQuery.makeArray( data ) : []; data.unshift( event ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) eventPath = [[ elem, special.bindType || type ]]; if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; old = null; for ( ; cur; cur = cur.parentNode ) { eventPath.push([ cur, bubbleType ]); old = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( old && old === elem.ownerDocument ) { eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); } } // Fire handlers on the event path for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { cur = eventPath[i][0]; event.type = eventPath[i][1]; handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Note that this is a bare JS function and not a jQuery handler handle = ontype && cur[ ontype ]; if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { event.preventDefault(); } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. // Can't use an .isFunction() check here because IE6/7 fails that test. // Don't do default actions on window, that's where global variables be (#6170) // IE<9 dies on focus/blur to hidden element (#1486) if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method old = elem[ ontype ]; if ( old ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; elem[ type ](); jQuery.event.triggered = undefined; if ( old ) { elem[ ontype ] = old; } } } } return event.result; }, dispatch: function( event ) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event || window.event ); var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), delegateCount = handlers.delegateCount, args = [].slice.call( arguments, 0 ), run_all = !event.exclusive && !event.namespace, special = jQuery.event.special[ event.type ] || {}, handlerQueue = [], i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[0] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers that should run if there are delegated events // Avoid non-left-click bubbling in Firefox (#3861) if ( delegateCount && !(event.button && event.type === "click") ) { // Pregenerate a single jQuery object for reuse with .is() jqcur = jQuery(this); jqcur.context = this.ownerDocument || this; for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { // Don't process events on disabled elements (#6911, #8165) if ( cur.disabled !== true ) { selMatch = {}; matches = []; jqcur[0] = cur; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; sel = handleObj.selector; if ( selMatch[ sel ] === undefined ) { selMatch[ sel ] = ( handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) ); } if ( selMatch[ sel ] ) { matches.push( handleObj ); } } if ( matches.length ) { handlerQueue.push({ elem: cur, matches: matches }); } } } } // Add the remaining (directly-bound) handlers if ( handlers.length > delegateCount ) { handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); } // Run delegates first; they may want to stop propagation beneath us for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { matched = handlerQueue[ i ]; event.currentTarget = matched.elem; for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { handleObj = matched.matches[ j ]; // Triggered event must either 1) be non-exclusive and have no namespace, or // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { event.data = handleObj.data; event.handleObj = handleObj; ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) .apply( matched.elem, args ); if ( ret !== undefined ) { event.result = ret; if ( ret === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, // Includes some event props shared by KeyEvent and MouseEvent // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function( event, original ) { // Add which for key events if ( event.which == null ) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { var eventDoc, doc, body, button = original.button, fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } // Add relatedTarget, if necessary if ( !event.relatedTarget && fromElement ) { event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); } return event; } }, fix: function( event ) { if ( event[ jQuery.expando ] ) { return event; } // Create a writable copy of the event object and normalize some properties var i, prop, originalEvent = event, fixHook = jQuery.event.fixHooks[ event.type ] || {}, copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; event = jQuery.Event( originalEvent ); for ( i = copy.length; i; ) { prop = copy[ --i ]; event[ prop ] = originalEvent[ prop ]; } // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) if ( !event.target ) { event.target = originalEvent.srcElement || document; } // Target should not be a text node (#504, Safari) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; } // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) if ( event.metaKey === undefined ) { event.metaKey = event.ctrlKey; } return fixHook.filter? fixHook.filter( event, originalEvent ) : event; }, special: { ready: { // Make sure the ready event is setup setup: jQuery.bindReady }, load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { delegateType: "focusin" }, blur: { delegateType: "focusout" }, beforeunload: { setup: function( data, namespaces, eventHandle ) { // We only want to do this special case on windows if ( jQuery.isWindow( this ) ) { this.onbeforeunload = eventHandle; } }, teardown: function( namespaces, eventHandle ) { if ( this.onbeforeunload === eventHandle ) { this.onbeforeunload = null; } } } }, simulate: function( type, elem, event, bubble ) { // Piggyback on a donor event to simulate a different one. // Fake originalEvent to avoid donor's stopPropagation, but if the // simulated event prevents default then we do the same on the donor. var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true, originalEvent: {} } ); if ( bubble ) { jQuery.event.trigger( e, null, elem ); } else { jQuery.event.dispatch.call( elem, e ); } if ( e.isDefaultPrevented() ) { event.preventDefault(); } } }; // Some plugins are using, but it's undocumented/deprecated and will be removed. // The 1.7 special event interface should provide all the hooks needed now. jQuery.event.handle = jQuery.event.dispatch; jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); } } : function( elem, type, handle ) { if ( elem.detachEvent ) { elem.detachEvent( "on" + type, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !(this instanceof jQuery.Event) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; function returnFalse() { return false; } function returnTrue() { return true; } // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = returnTrue; var e = this.originalEvent; if ( !e ) { return; } // if preventDefault exists run it on the original event if ( e.preventDefault ) { e.preventDefault(); // otherwise set the returnValue property of the original event to false (IE) } else { e.returnValue = false; } }, stopPropagation: function() { this.isPropagationStopped = returnTrue; var e = this.originalEvent; if ( !e ) { return; } // if stopPropagation exists run it on the original event if ( e.stopPropagation ) { e.stopPropagation(); } // otherwise set the cancelBubble property of the original event to true (IE) e.cancelBubble = true; }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = returnTrue; this.stopPropagation(); }, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse }; // Create mouseenter/leave events using mouseover/out and event-time checks jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var target = this, related = event.relatedTarget, handleObj = event.handleObj, selector = handleObj.selector, ret; // For mousenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || (related !== target && !jQuery.contains( target, related )) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; }); // IE submit delegation if ( !jQuery.support.submitBubbles ) { jQuery.event.special.submit = { setup: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Lazy-add a submit handler when a descendant form may potentially be submitted jQuery.event.add( this, "click._submit keypress._submit", function( e ) { // Node name check avoids a VML-related crash in IE (#9807) var elem = e.target, form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; if ( form && !form._submit_attached ) { jQuery.event.add( form, "submit._submit", function( event ) { event._submit_bubble = true; }); form._submit_attached = true; } }); // return undefined since we don't need an event listener }, postDispatch: function( event ) { // If form was submitted by the user, bubble the event up the tree if ( event._submit_bubble ) { delete event._submit_bubble; if ( this.parentNode && !event.isTrigger ) { jQuery.event.simulate( "submit", this.parentNode, event, true ); } } }, teardown: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Remove delegated handlers; cleanData eventually reaps submit handlers attached above jQuery.event.remove( this, "._submit" ); } }; } // IE change delegation and checkbox/radio fix if ( !jQuery.support.changeBubbles ) { jQuery.event.special.change = { setup: function() { if ( rformElems.test( this.nodeName ) ) { // IE doesn't fire change on a check/radio until blur; trigger it on click // after a propertychange. Eat the blur-change in special.change.handle. // This still fires onchange a second time for check/radio after blur. if ( this.type === "checkbox" || this.type === "radio" ) { jQuery.event.add( this, "propertychange._change", function( event ) { if ( event.originalEvent.propertyName === "checked" ) { this._just_changed = true; } }); jQuery.event.add( this, "click._change", function( event ) { if ( this._just_changed && !event.isTrigger ) { this._just_changed = false; jQuery.event.simulate( "change", this, event, true ); } }); } return false; } // Delegated event; lazy-add a change handler on descendant inputs jQuery.event.add( this, "beforeactivate._change", function( e ) { var elem = e.target; if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { jQuery.event.add( elem, "change._change", function( event ) { if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { jQuery.event.simulate( "change", this.parentNode, event, true ); } }); elem._change_attached = true; } }); }, handle: function( event ) { var elem = event.target; // Swallow native change events from checkbox/radio, we already triggered them above if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { return event.handleObj.handler.apply( this, arguments ); } }, teardown: function() { jQuery.event.remove( this, "._change" ); return rformElems.test( this.nodeName ); } }; } // Create "bubbling" focus and blur events if ( !jQuery.support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler while someone wants focusin/focusout var attaches = 0, handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); }; jQuery.event.special[ fix ] = { setup: function() { if ( attaches++ === 0 ) { document.addEventListener( orig, handler, true ); } }, teardown: function() { if ( --attaches === 0 ) { document.removeEventListener( orig, handler, true ); } } }; }); } jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // && selector != null // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { this.on( type, selector, data, types[ type ], one ); } return this; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return this; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return this.each( function() { jQuery.event.add( this, types, fn, data, selector ); }); }, one: function( types, selector, data, fn ) { return this.on( types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event var handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( var type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each(function() { jQuery.event.remove( this, types, fn, selector ); }); }, bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, live: function( types, data, fn ) { jQuery( this.context ).on( types, this.selector, data, fn ); return this; }, die: function( types, fn ) { jQuery( this.context ).off( types, this.selector || "**", fn ); return this; }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); }, trigger: function( type, data ) { return this.each(function() { jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { if ( this[0] ) { return jQuery.event.trigger( type, data, this[0], true ); } }, toggle: function( fn ) { // Save reference to arguments for access in closure var args = arguments, guid = fn.guid || jQuery.guid++, i = 0, toggler = function( event ) { // Figure out which function to execute var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); // Make sure that clicks stop event.preventDefault(); // and execute the function return args[ lastToggle ].apply( this, arguments ) || false; }; // link all the functions, so any of them can unbind this click handler toggler.guid = guid; while ( i < args.length ) { args[ i++ ].guid = guid; } return this.click( toggler ); }, hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } }); jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { if ( fn == null ) { fn = data; data = null; } return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; if ( jQuery.attrFn ) { jQuery.attrFn[ name ] = true; } if ( rkeyEvent.test( name ) ) { jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; } if ( rmouseEvent.test( name ) ) { jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; } }); /*! * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, expando = "sizcache" + (Math.random() + '').replace('.', ''), done = 0, toString = Object.prototype.toString, hasDuplicate = false, baseHasDuplicate = true, rBackslash = /\\/g, rReturn = /\r\n/g, rNonWord = /\W/; // Here we check if the JavaScript engine is using some sort of // optimization where it does not always call our comparision // function. If that is the case, discard the hasDuplicate value. // Thus far that includes Google Chrome. [0, 0].sort(function() { baseHasDuplicate = false; return 0; }); var Sizzle = function( selector, context, results, seed ) { results = results || []; context = context || document; var origContext = context; if ( context.nodeType !== 1 && context.nodeType !== 9 ) { return []; } if ( !selector || typeof selector !== "string" ) { return results; } var m, set, checkSet, extra, ret, cur, pop, i, prune = true, contextXML = Sizzle.isXML( context ), parts = [], soFar = selector; // Reset the position of the chunker regexp (start from head) do { chunker.exec( "" ); m = chunker.exec( soFar ); if ( m ) { soFar = m[3]; parts.push( m[1] ); if ( m[2] ) { extra = m[3]; break; } } } while ( m ); if ( parts.length > 1 && origPOS.exec( selector ) ) { if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { set = posProcess( parts[0] + parts[1], context, seed ); } else { set = Expr.relative[ parts[0] ] ? [ context ] : Sizzle( parts.shift(), context ); while ( parts.length ) { selector = parts.shift(); if ( Expr.relative[ selector ] ) { selector += parts.shift(); } set = posProcess( selector, set, seed ); } } } else { // Take a shortcut and set the context if the root selector is an ID // (but not if it'll be faster if the inner selector is an ID) if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { ret = Sizzle.find( parts.shift(), context, contextXML ); context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0]; } if ( context ) { ret = seed ? { expr: parts.pop(), set: makeArray(seed) } : Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set; if ( parts.length > 0 ) { checkSet = makeArray( set ); } else { prune = false; } while ( parts.length ) { cur = parts.pop(); pop = cur; if ( !Expr.relative[ cur ] ) { cur = ""; } else { pop = parts.pop(); } if ( pop == null ) { pop = context; } Expr.relative[ cur ]( checkSet, pop, contextXML ); } } else { checkSet = parts = []; } } if ( !checkSet ) { checkSet = set; } if ( !checkSet ) { Sizzle.error( cur || selector ); } if ( toString.call(checkSet) === "[object Array]" ) { if ( !prune ) { results.push.apply( results, checkSet ); } else if ( context && context.nodeType === 1 ) { for ( i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { results.push( set[i] ); } } } else { for ( i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && checkSet[i].nodeType === 1 ) { results.push( set[i] ); } } } } else { makeArray( checkSet, results ); } if ( extra ) { Sizzle( extra, origContext, results, seed ); Sizzle.uniqueSort( results ); } return results; }; Sizzle.uniqueSort = function( results ) { if ( sortOrder ) { hasDuplicate = baseHasDuplicate; results.sort( sortOrder ); if ( hasDuplicate ) { for ( var i = 1; i < results.length; i++ ) { if ( results[i] === results[ i - 1 ] ) { results.splice( i--, 1 ); } } } } return results; }; Sizzle.matches = function( expr, set ) { return Sizzle( expr, null, null, set ); }; Sizzle.matchesSelector = function( node, expr ) { return Sizzle( expr, null, null, [node] ).length > 0; }; Sizzle.find = function( expr, context, isXML ) { var set, i, len, match, type, left; if ( !expr ) { return []; } for ( i = 0, len = Expr.order.length; i < len; i++ ) { type = Expr.order[i]; if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { left = match[1]; match.splice( 1, 1 ); if ( left.substr( left.length - 1 ) !== "\\" ) { match[1] = (match[1] || "").replace( rBackslash, "" ); set = Expr.find[ type ]( match, context, isXML ); if ( set != null ) { expr = expr.replace( Expr.match[ type ], "" ); break; } } } } if ( !set ) { set = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( "*" ) : []; } return { set: set, expr: expr }; }; Sizzle.filter = function( expr, set, inplace, not ) { var match, anyFound, type, found, item, filter, left, i, pass, old = expr, result = [], curLoop = set, isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); while ( expr && set.length ) { for ( type in Expr.filter ) { if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { filter = Expr.filter[ type ]; left = match[1]; anyFound = false; match.splice(1,1); if ( left.substr( left.length - 1 ) === "\\" ) { continue; } if ( curLoop === result ) { result = []; } if ( Expr.preFilter[ type ] ) { match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); if ( !match ) { anyFound = found = true; } else if ( match === true ) { continue; } } if ( match ) { for ( i = 0; (item = curLoop[i]) != null; i++ ) { if ( item ) { found = filter( item, match, i, curLoop ); pass = not ^ found; if ( inplace && found != null ) { if ( pass ) { anyFound = true; } else { curLoop[i] = false; } } else if ( pass ) { result.push( item ); anyFound = true; } } } } if ( found !== undefined ) { if ( !inplace ) { curLoop = result; } expr = expr.replace( Expr.match[ type ], "" ); if ( !anyFound ) { return []; } break; } } } // Improper expression if ( expr === old ) { if ( anyFound == null ) { Sizzle.error( expr ); } else { break; } } old = expr; } return curLoop; }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Utility function for retreiving the text value of an array of DOM nodes * @param {Array|Element} elem */ var getText = Sizzle.getText = function( elem ) { var i, node, nodeType = elem.nodeType, ret = ""; if ( nodeType ) { if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent || innerText for elements if ( typeof elem.textContent === 'string' ) { return elem.textContent; } else if ( typeof elem.innerText === 'string' ) { // Replace IE's carriage returns return elem.innerText.replace( rReturn, '' ); } else { // Traverse it's children for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } } else { // If no nodeType, this is expected to be an array for ( i = 0; (node = elem[i]); i++ ) { // Do not traverse comment nodes if ( node.nodeType !== 8 ) { ret += getText( node ); } } } return ret; }; var Expr = Sizzle.selectors = { order: [ "ID", "NAME", "TAG" ], match: { ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ }, leftMatch: {}, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function( elem ) { return elem.getAttribute( "href" ); }, type: function( elem ) { return elem.getAttribute( "type" ); } }, relative: { "+": function(checkSet, part){ var isPartStr = typeof part === "string", isTag = isPartStr && !rNonWord.test( part ), isPartStrNotTag = isPartStr && !isTag; if ( isTag ) { part = part.toLowerCase(); } for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { if ( (elem = checkSet[i]) ) { while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? elem || false : elem === part; } } if ( isPartStrNotTag ) { Sizzle.filter( part, checkSet, true ); } }, ">": function( checkSet, part ) { var elem, isPartStr = typeof part === "string", i = 0, l = checkSet.length; if ( isPartStr && !rNonWord.test( part ) ) { part = part.toLowerCase(); for ( ; i < l; i++ ) { elem = checkSet[i]; if ( elem ) { var parent = elem.parentNode; checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; } } } else { for ( ; i < l; i++ ) { elem = checkSet[i]; if ( elem ) { checkSet[i] = isPartStr ? elem.parentNode : elem.parentNode === part; } } if ( isPartStr ) { Sizzle.filter( part, checkSet, true ); } } }, "": function(checkSet, part, isXML){ var nodeCheck, doneName = done++, checkFn = dirCheck; if ( typeof part === "string" && !rNonWord.test( part ) ) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; } checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); }, "~": function( checkSet, part, isXML ) { var nodeCheck, doneName = done++, checkFn = dirCheck; if ( typeof part === "string" && !rNonWord.test( part ) ) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; } checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); } }, find: { ID: function( match, context, isXML ) { if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 return m && m.parentNode ? [m] : []; } }, NAME: function( match, context ) { if ( typeof context.getElementsByName !== "undefined" ) { var ret = [], results = context.getElementsByName( match[1] ); for ( var i = 0, l = results.length; i < l; i++ ) { if ( results[i].getAttribute("name") === match[1] ) { ret.push( results[i] ); } } return ret.length === 0 ? null : ret; } }, TAG: function( match, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( match[1] ); } } }, preFilter: { CLASS: function( match, curLoop, inplace, result, not, isXML ) { match = " " + match[1].replace( rBackslash, "" ) + " "; if ( isXML ) { return match; } for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { if ( elem ) { if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { if ( !inplace ) { result.push( elem ); } } else if ( inplace ) { curLoop[i] = false; } } } return false; }, ID: function( match ) { return match[1].replace( rBackslash, "" ); }, TAG: function( match, curLoop ) { return match[1].replace( rBackslash, "" ).toLowerCase(); }, CHILD: function( match ) { if ( match[1] === "nth" ) { if ( !match[2] ) { Sizzle.error( match[0] ); } match[2] = match[2].replace(/^\+|\s*/g, ''); // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); // calculate the numbers (first)n+(last) including if they are negative match[2] = (test[1] + (test[2] || 1)) - 0; match[3] = test[3] - 0; } else if ( match[2] ) { Sizzle.error( match[0] ); } // TODO: Move to normal caching system match[0] = done++; return match; }, ATTR: function( match, curLoop, inplace, result, not, isXML ) { var name = match[1] = match[1].replace( rBackslash, "" ); if ( !isXML && Expr.attrMap[name] ) { match[1] = Expr.attrMap[name]; } // Handle if an un-quoted value was used match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); if ( match[2] === "~=" ) { match[4] = " " + match[4] + " "; } return match; }, PSEUDO: function( match, curLoop, inplace, result, not ) { if ( match[1] === "not" ) { // If we're dealing with a complex expression, or a simple one if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { match[3] = Sizzle(match[3], null, null, curLoop); } else { var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); if ( !inplace ) { result.push.apply( result, ret ); } return false; } } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { return true; } return match; }, POS: function( match ) { match.unshift( true ); return match; } }, filters: { enabled: function( elem ) { return elem.disabled === false && elem.type !== "hidden"; }, disabled: function( elem ) { return elem.disabled === true; }, checked: function( elem ) { return elem.checked === true; }, selected: function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, parent: function( elem ) { return !!elem.firstChild; }, empty: function( elem ) { return !elem.firstChild; }, has: function( elem, i, match ) { return !!Sizzle( match[3], elem ).length; }, header: function( elem ) { return (/h\d/i).test( elem.nodeName ); }, text: function( elem ) { var attr = elem.getAttribute( "type" ), type = elem.type; // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); }, radio: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; }, checkbox: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; }, file: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; }, password: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; }, submit: function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "submit" === elem.type; }, image: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; }, reset: function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "reset" === elem.type; }, button: function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && "button" === elem.type || name === "button"; }, input: function( elem ) { return (/input|select|textarea|button/i).test( elem.nodeName ); }, focus: function( elem ) { return elem === elem.ownerDocument.activeElement; } }, setFilters: { first: function( elem, i ) { return i === 0; }, last: function( elem, i, match, array ) { return i === array.length - 1; }, even: function( elem, i ) { return i % 2 === 0; }, odd: function( elem, i ) { return i % 2 === 1; }, lt: function( elem, i, match ) { return i < match[3] - 0; }, gt: function( elem, i, match ) { return i > match[3] - 0; }, nth: function( elem, i, match ) { return match[3] - 0 === i; }, eq: function( elem, i, match ) { return match[3] - 0 === i; } }, filter: { PSEUDO: function( elem, match, i, array ) { var name = match[1], filter = Expr.filters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } else if ( name === "contains" ) { return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; } else if ( name === "not" ) { var not = match[3]; for ( var j = 0, l = not.length; j < l; j++ ) { if ( not[j] === elem ) { return false; } } return true; } else { Sizzle.error( name ); } }, CHILD: function( elem, match ) { var first, last, doneName, parent, cache, count, diff, type = match[1], node = elem; switch ( type ) { case "only": case "first": while ( (node = node.previousSibling) ) { if ( node.nodeType === 1 ) { return false; } } if ( type === "first" ) { return true; } node = elem; /* falls through */ case "last": while ( (node = node.nextSibling) ) { if ( node.nodeType === 1 ) { return false; } } return true; case "nth": first = match[2]; last = match[3]; if ( first === 1 && last === 0 ) { return true; } doneName = match[0]; parent = elem.parentNode; if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { count = 0; for ( node = parent.firstChild; node; node = node.nextSibling ) { if ( node.nodeType === 1 ) { node.nodeIndex = ++count; } } parent[ expando ] = doneName; } diff = elem.nodeIndex - last; if ( first === 0 ) { return diff === 0; } else { return ( diff % first === 0 && diff / first >= 0 ); } } }, ID: function( elem, match ) { return elem.nodeType === 1 && elem.getAttribute("id") === match; }, TAG: function( elem, match ) { return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; }, CLASS: function( elem, match ) { return (" " + (elem.className || elem.getAttribute("class")) + " ") .indexOf( match ) > -1; }, ATTR: function( elem, match ) { var name = match[1], result = Sizzle.attr ? Sizzle.attr( elem, name ) : Expr.attrHandle[ name ] ? Expr.attrHandle[ name ]( elem ) : elem[ name ] != null ? elem[ name ] : elem.getAttribute( name ), value = result + "", type = match[2], check = match[4]; return result == null ? type === "!=" : !type && Sizzle.attr ? result != null : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value !== check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false; }, POS: function( elem, match, i, array ) { var name = match[2], filter = Expr.setFilters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } } } }; var origPOS = Expr.match.POS, fescape = function(all, num){ return "\\" + (num - 0 + 1); }; for ( var type in Expr.match ) { Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); } // Expose origPOS // "global" as in regardless of relation to brackets/parens Expr.match.globalPOS = origPOS; var makeArray = function( array, results ) { array = Array.prototype.slice.call( array, 0 ); if ( results ) { results.push.apply( results, array ); return results; } return array; }; // Perform a simple check to determine if the browser is capable of // converting a NodeList to an array using builtin methods. // Also verifies that the returned array holds DOM nodes // (which is not the case in the Blackberry browser) try { Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; // Provide a fallback method if it does not work } catch( e ) { makeArray = function( array, results ) { var i = 0, ret = results || []; if ( toString.call(array) === "[object Array]" ) { Array.prototype.push.apply( ret, array ); } else { if ( typeof array.length === "number" ) { for ( var l = array.length; i < l; i++ ) { ret.push( array[i] ); } } else { for ( ; array[i]; i++ ) { ret.push( array[i] ); } } } return ret; }; } var sortOrder, siblingCheck; if ( document.documentElement.compareDocumentPosition ) { sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; return 0; } if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { return a.compareDocumentPosition ? -1 : 1; } return a.compareDocumentPosition(b) & 4 ? -1 : 1; }; } else { sortOrder = function( a, b ) { // The nodes are identical, we can exit early if ( a === b ) { hasDuplicate = true; return 0; // Fallback to using sourceIndex (in IE) if it's available on both nodes } else if ( a.sourceIndex && b.sourceIndex ) { return a.sourceIndex - b.sourceIndex; } var al, bl, ap = [], bp = [], aup = a.parentNode, bup = b.parentNode, cur = aup; // If the nodes are siblings (or identical) we can do a quick check if ( aup === bup ) { return siblingCheck( a, b ); // If no parents were found then the nodes are disconnected } else if ( !aup ) { return -1; } else if ( !bup ) { return 1; } // Otherwise they're somewhere else in the tree so we need // to build up a full list of the parentNodes for comparison while ( cur ) { ap.unshift( cur ); cur = cur.parentNode; } cur = bup; while ( cur ) { bp.unshift( cur ); cur = cur.parentNode; } al = ap.length; bl = bp.length; // Start walking down the tree looking for a discrepancy for ( var i = 0; i < al && i < bl; i++ ) { if ( ap[i] !== bp[i] ) { return siblingCheck( ap[i], bp[i] ); } } // We ended someplace up the tree so do a sibling check return i === al ? siblingCheck( a, bp[i], -1 ) : siblingCheck( ap[i], b, 1 ); }; siblingCheck = function( a, b, ret ) { if ( a === b ) { return ret; } var cur = a.nextSibling; while ( cur ) { if ( cur === b ) { return -1; } cur = cur.nextSibling; } return 1; }; } // Check to see if the browser returns elements by name when // querying by getElementById (and provide a workaround) (function(){ // We're going to inject a fake input element with a specified name var form = document.createElement("div"), id = "script" + (new Date()).getTime(), root = document.documentElement; form.innerHTML = ""; // Inject it into the root element, check its status, and remove it quickly root.insertBefore( form, root.firstChild ); // The workaround has to do additional checks after a getElementById // Which slows things down for other browsers (hence the branching) if ( document.getElementById( id ) ) { Expr.find.ID = function( match, context, isXML ) { if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; } }; Expr.filter.ID = function( elem, match ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return elem.nodeType === 1 && node && node.nodeValue === match; }; } root.removeChild( form ); // release memory in IE root = form = null; })(); (function(){ // Check to see if the browser returns only elements // when doing getElementsByTagName("*") // Create a fake element var div = document.createElement("div"); div.appendChild( document.createComment("") ); // Make sure no comments are found if ( div.getElementsByTagName("*").length > 0 ) { Expr.find.TAG = function( match, context ) { var results = context.getElementsByTagName( match[1] ); // Filter out possible comments if ( match[1] === "*" ) { var tmp = []; for ( var i = 0; results[i]; i++ ) { if ( results[i].nodeType === 1 ) { tmp.push( results[i] ); } } results = tmp; } return results; }; } // Check to see if an attribute returns normalized href attributes div.innerHTML = ""; if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#" ) { Expr.attrHandle.href = function( elem ) { return elem.getAttribute( "href", 2 ); }; } // release memory in IE div = null; })(); if ( document.querySelectorAll ) { (function(){ var oldSizzle = Sizzle, div = document.createElement("div"), id = "__sizzle__"; div.innerHTML = "

"; // Safari can't handle uppercase or unicode characters when // in quirks mode. if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { return; } Sizzle = function( query, context, extra, seed ) { context = context || document; // Only use querySelectorAll on non-XML documents // (ID selectors don't work in non-HTML documents) if ( !seed && !Sizzle.isXML(context) ) { // See if we find a selector to speed up var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { // Speed-up: Sizzle("TAG") if ( match[1] ) { return makeArray( context.getElementsByTagName( query ), extra ); // Speed-up: Sizzle(".CLASS") } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { return makeArray( context.getElementsByClassName( match[2] ), extra ); } } if ( context.nodeType === 9 ) { // Speed-up: Sizzle("body") // The body element only exists once, optimize finding it if ( query === "body" && context.body ) { return makeArray( [ context.body ], extra ); // Speed-up: Sizzle("#ID") } else if ( match && match[3] ) { var elem = context.getElementById( match[3] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id === match[3] ) { return makeArray( [ elem ], extra ); } } else { return makeArray( [], extra ); } } try { return makeArray( context.querySelectorAll(query), extra ); } catch(qsaError) {} // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { var oldContext = context, old = context.getAttribute( "id" ), nid = old || id, hasParent = context.parentNode, relativeHierarchySelector = /^\s*[+~]/.test( query ); if ( !old ) { context.setAttribute( "id", nid ); } else { nid = nid.replace( /'/g, "\\$&" ); } if ( relativeHierarchySelector && hasParent ) { context = context.parentNode; } try { if ( !relativeHierarchySelector || hasParent ) { return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); } } catch(pseudoError) { } finally { if ( !old ) { oldContext.removeAttribute( "id" ); } } } } return oldSizzle(query, context, extra, seed); }; for ( var prop in oldSizzle ) { Sizzle[ prop ] = oldSizzle[ prop ]; } // release memory in IE div = null; })(); } (function(){ var html = document.documentElement, matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; if ( matches ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9 fails this) var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), pseudoWorks = false; try { // This should fail with an exception // Gecko does not error, returns false instead matches.call( document.documentElement, "[test!='']:sizzle" ); } catch( pseudoError ) { pseudoWorks = true; } Sizzle.matchesSelector = function( node, expr ) { // Make sure that attribute selectors are quoted expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if ( !Sizzle.isXML( node ) ) { try { if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { var ret = matches.call( node, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || !disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9, so check for that node.document && node.document.nodeType !== 11 ) { return ret; } } } catch(e) {} } return Sizzle(expr, null, null, [node]).length > 0; }; } })(); (function(){ var div = document.createElement("div"); div.innerHTML = "
"; // Opera can't find a second classname (in 9.6) // Also, make sure that getElementsByClassName actually exists if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { return; } // Safari caches class attributes, doesn't catch changes (in 3.2) div.lastChild.className = "e"; if ( div.getElementsByClassName("e").length === 1 ) { return; } Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function( match, context, isXML ) { if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { return context.getElementsByClassName(match[1]); } }; // release memory in IE div = null; })(); function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { var match = false; elem = elem[dir]; while ( elem ) { if ( elem[ expando ] === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 && !isXML ){ elem[ expando ] = doneName; elem.sizset = i; } if ( elem.nodeName.toLowerCase() === cur ) { match = elem; break; } elem = elem[dir]; } checkSet[i] = match; } } } function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { var match = false; elem = elem[dir]; while ( elem ) { if ( elem[ expando ] === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 ) { if ( !isXML ) { elem[ expando ] = doneName; elem.sizset = i; } if ( typeof cur !== "string" ) { if ( elem === cur ) { match = true; break; } } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { match = elem; break; } } elem = elem[dir]; } checkSet[i] = match; } } } if ( document.documentElement.contains ) { Sizzle.contains = function( a, b ) { return a !== b && (a.contains ? a.contains(b) : true); }; } else if ( document.documentElement.compareDocumentPosition ) { Sizzle.contains = function( a, b ) { return !!(a.compareDocumentPosition(b) & 16); }; } else { Sizzle.contains = function() { return false; }; } Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; var posProcess = function( selector, context, seed ) { var match, tmpSet = [], later = "", root = context.nodeType ? [context] : context; // Position selectors must be done after the filter // And so must :not(positional) so we move all PSEUDOs to the end while ( (match = Expr.match.PSEUDO.exec( selector )) ) { later += match[0]; selector = selector.replace( Expr.match.PSEUDO, "" ); } selector = Expr.relative[selector] ? selector + "*" : selector; for ( var i = 0, l = root.length; i < l; i++ ) { Sizzle( selector, root[i], tmpSet, seed ); } return Sizzle.filter( later, tmpSet ); }; // EXPOSE // Override sizzle attribute retrieval Sizzle.attr = jQuery.attr; Sizzle.selectors.attrMap = {}; jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.filters; jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; })(); var runtil = /Until$/, rparentsprev = /^(?:parents|prevUntil|prevAll)/, // Note: This RegExp should be improved, or likely pulled from Sizzle rmultiselector = /,/, isSimple = /^.[^:#\[\.,]*$/, slice = Array.prototype.slice, POS = jQuery.expr.match.globalPOS, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend({ find: function( selector ) { var self = this, i, l; if ( typeof selector !== "string" ) { return jQuery( selector ).filter(function() { for ( i = 0, l = self.length; i < l; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }); } var ret = this.pushStack( "", "find", selector ), length, n, r; for ( i = 0, l = this.length; i < l; i++ ) { length = ret.length; jQuery.find( selector, this[i], ret ); if ( i > 0 ) { // Make sure that the results are unique for ( n = length; n < ret.length; n++ ) { for ( r = 0; r < length; r++ ) { if ( ret[r] === ret[n] ) { ret.splice(n--, 1); break; } } } } } return ret; }, has: function( target ) { var targets = jQuery( target ); return this.filter(function() { for ( var i = 0, l = targets.length; i < l; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, not: function( selector ) { return this.pushStack( winnow(this, selector, false), "not", selector); }, filter: function( selector ) { return this.pushStack( winnow(this, selector, true), "filter", selector ); }, is: function( selector ) { return !!selector && ( typeof selector === "string" ? // If this is a positional selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". POS.test( selector ) ? jQuery( selector, this.context ).index( this[0] ) >= 0 : jQuery.filter( selector, this ).length > 0 : this.filter( selector ).length > 0 ); }, closest: function( selectors, context ) { var ret = [], i, l, cur = this[0]; // Array (deprecated as of jQuery 1.7) if ( jQuery.isArray( selectors ) ) { var level = 1; while ( cur && cur.ownerDocument && cur !== context ) { for ( i = 0; i < selectors.length; i++ ) { if ( jQuery( cur ).is( selectors[ i ] ) ) { ret.push({ selector: selectors[ i ], elem: cur, level: level }); } } cur = cur.parentNode; level++; } return ret; } // String var pos = POS.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( i = 0, l = this.length; i < l; i++ ) { cur = this[i]; while ( cur ) { if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { ret.push( cur ); break; } else { cur = cur.parentNode; if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { break; } } } } ret = ret.length > 1 ? jQuery.unique( ret ) : ret; return this.pushStack( ret, "closest", selectors ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; } // index in selector if ( typeof elem === "string" ) { return jQuery.inArray( this[0], jQuery( elem ) ); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this ); }, add: function( selector, context ) { var set = typeof selector === "string" ? jQuery( selector, context ) : jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), all = jQuery.merge( this.get(), set ); return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? all : jQuery.unique( all ) ); }, andSelf: function() { return this.add( this.prevObject ); } }); // A painfully simple check to see if an element is disconnected // from a document (should be improved, where feasible). function isDisconnected( node ) { return !node || !node.parentNode || node.parentNode.nodeType === 11; } jQuery.each({ parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return jQuery.dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return jQuery.dir( elem, "parentNode", until ); }, next: function( elem ) { return jQuery.nth( elem, 2, "nextSibling" ); }, prev: function( elem ) { return jQuery.nth( elem, 2, "previousSibling" ); }, nextAll: function( elem ) { return jQuery.dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return jQuery.dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return jQuery.dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return jQuery.dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { return jQuery.nodeName( elem, "iframe" ) ? elem.contentDocument || elem.contentWindow.document : jQuery.makeArray( elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var ret = jQuery.map( this, fn, until ); if ( !runtil.test( name ) ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { ret = ret.reverse(); } return this.pushStack( ret, name, slice.call( arguments ).join(",") ); }; }); jQuery.extend({ filter: function( expr, elems, not ) { if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : jQuery.find.matches(expr, elems); }, dir: function( elem, dir, until ) { var matched = [], cur = elem[ dir ]; while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { if ( cur.nodeType === 1 ) { matched.push( cur ); } cur = cur[dir]; } return matched; }, nth: function( cur, result, dir, elem ) { result = result || 1; var num = 0; for ( ; cur; cur = cur[dir] ) { if ( cur.nodeType === 1 && ++num === result ) { break; } } return cur; }, sibling: function( n, elem ) { var r = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { r.push( n ); } } return r; } }); // Implement the identical functionality for filter and not function winnow( elements, qualifier, keep ) { // Can't pass null or undefined to indexOf in Firefox 4 // Set to 0 to skip string check qualifier = qualifier || 0; if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep(elements, function( elem, i ) { var retVal = !!qualifier.call( elem, i, elem ); return retVal === keep; }); } else if ( qualifier.nodeType ) { return jQuery.grep(elements, function( elem, i ) { return ( elem === qualifier ) === keep; }); } else if ( typeof qualifier === "string" ) { var filtered = jQuery.grep(elements, function( elem ) { return elem.nodeType === 1; }); if ( isSimple.test( qualifier ) ) { return jQuery.filter(qualifier, filtered, !keep); } else { qualifier = jQuery.filter( qualifier, filtered ); } } return jQuery.grep(elements, function( elem, i ) { return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; }); } function createSafeFragment( document ) { var list = nodeNames.split( "|" ), safeFrag = document.createDocumentFragment(); if ( safeFrag.createElement ) { while ( list.length ) { safeFrag.createElement( list.pop() ); } } return safeFrag; } var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rleadingWhitespace = /^\s+/, rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, rtagName = /<([\w:]+)/, rtbody = /]", "i"), // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rscriptType = /\/(java|ecma)script/i, rcleanScript = /^\s*", "" ], legend: [ 1, "
", "
" ], thead: [ 1, "", "
" ], tr: [ 2, "", "
" ], td: [ 3, "", "
" ], col: [ 2, "", "
" ], area: [ 1, "", "" ], _default: [ 0, "", "" ] }, safeFragment = createSafeFragment( document ); wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; // IE can't serialize and

Index

A | C | E | G | I | M | P | R | S | T | W

A

allTransportsEnabled (pyptlib.config.Config attribute)

C

check() (pyptlib.config.Config method)
checkClientMode() (in module pyptlib.util)
(pyptlib.config.Config method)
checkManagedTransportVersion() (pyptlib.config.Config method)
checkTransportEnabled() (pyptlib.config.Config method)
ClientConfig (class in pyptlib.client_config)
Config (class in pyptlib.config)

E

emit() (pyptlib.config.Config method)
EnvError

G

get() (pyptlib.config.Config method)
get_addrport() (pyptlib.server_config.ServerConfig method)
get_addrport_from_string() (pyptlib.server_config.ServerConfig method)
getAllTransportsEnabled() (pyptlib.config.Config method)
getAuthCookieFile() (pyptlib.server_config.ServerConfig method)
getClientTransports() (pyptlib.client_config.ClientConfig method)
getExtendedORPort() (pyptlib.server_config.ServerConfig method)
getManagedTransportVersions() (pyptlib.config.Config method)
getORPort() (pyptlib.server_config.ServerConfig method)
getServerBindAddresses() (pyptlib.server_config.ServerConfig method)
getServerTransports() (pyptlib.server_config.ServerConfig method)
getStateLocation() (pyptlib.config.Config method)

I

init() (in module pyptlib.client)
(in module pyptlib.server)

M

managedTransportVer (pyptlib.config.Config attribute)

P

pyptlib.client (module)
pyptlib.client_config (module)
pyptlib.config (module)
pyptlib.server (module)
pyptlib.server_config (module)
pyptlib.util (module)

R

reportEnd() (in module pyptlib.client)
(in module pyptlib.server)
reportFailure() (in module pyptlib.client)
(in module pyptlib.server)
reportSuccess() (in module pyptlib.client)
(in module pyptlib.server)

S

ServerConfig (class in pyptlib.server_config)
stateLocation (pyptlib.config.Config attribute)

T

transports (pyptlib.config.Config attribute)

W

writeEnvError() (pyptlib.config.Config method)
writeMethod() (pyptlib.client_config.ClientConfig method)
(pyptlib.server_config.ServerConfig method)
writeMethodEnd() (pyptlib.client_config.ClientConfig method)
(pyptlib.server_config.ServerConfig method)
writeMethodError() (pyptlib.client_config.ClientConfig method)
(pyptlib.server_config.ServerConfig method)
writeVersion() (pyptlib.config.Config method)
writeVersionError() (pyptlib.config.Config method)
pyptlib-0.0.5/doc/html/glossary.html000066400000000000000000000136511222335101500174410ustar00rootroot00000000000000 Pluggable transports glossary — pyptlib 0.0.1 documentation

pyptlib documentation

Pluggable transports glossary

«  API overview   ::   Contents

Pluggable transports glossary¶

pluggable transport (sometimes also called ‘transport’)¶

Pluggable transports obfuscate network traffic.

Specifically, pluggable transports transform the Tor traffic flow between the client and the bridge. This way, censors who monitor traffic between the client and the bridge see innocent-looking transformed traffic instead of the actual Tor traffic.

pluggable transport proxy¶

Pluggable transport proxies are programs that implement pluggable transports. They also implement the networking system that a pluggable transport needs (so that it can proxy data).

obfsproxy¶

obfsproxy is a pluggable transport proxy written in C. It implements the obfs2 pluggable transport.

upstream/downstream¶

The upstream side of a pluggable transport proxy is the side that communicates with Tor. Upstream data is non-obfuscated.

The downstream side of a pluggable transport proxy is the side that communicates with the other pluggable transport proxy. Downstream data is obfuscated.

client-mode / server-mode¶

A pluggable transport is a client if it has a Tor client in its upstream side.

A pluggable transport is a server if it has a Tor bridge in its upstream side.

external-mode proxy¶

A pluggable transport proxy is in external-mode if the user explicitly configures it using its command-line interface.

managed-mode proxy¶

A pluggable transport proxy is in managed-mode if it’s launched and managed by Tor using the managed-proxy configuration protocol. The managed-proxy configuration protocol is defined in the pluggable transport specification.

pyptlib¶

pyptlib is a library that implements the managed-proxy configuration protocol and makes it easier for application to be used as managed proxies.

extended orport¶

Extended ORPort is an non-implemented feature of Tor that allows a pluggable transport proxy to communicate with Tor in real-time.

«  API overview   ::   Contents

pyptlib-0.0.5/doc/html/index.html000066400000000000000000000130521222335101500167000ustar00rootroot00000000000000 Welcome to pyptlib! — pyptlib 0.0.1 documentation

pyptlib documentation

Welcome to pyptlib!

Contents   ::   pyptlib README  Â»

Contents   ::   pyptlib README  Â»

pyptlib-0.0.5/doc/html/modules.html000066400000000000000000000062611222335101500172450ustar00rootroot00000000000000 pyptlib — pyptlib 0.0.1 documentation pyptlib-0.0.5/doc/html/objects.inv000066400000000000000000000012261222335101500170520ustar00rootroot00000000000000# Sphinx inventory version 2 # Project: pyptlib # Version: 0.0.1 # The remainder of this file is compressed using zlib. xÚ­V]Oà }÷W4Ñ×5úêÛ\jbâ¢qÆ×…Á]K¤ÐÀíœÿ^ZºfÕµÛSåÜs÷R*Æ%ƒ}bÝ ²‘Ìî’ê{Vv?ÒKq,«$OÍÖUòè°Û!ÜQDÓbxÐíuÇVîÀ+Éáªú®PðMZ#6†ûÒ9½M?ZˆÛÝ$³@‰kªä–çaÈHë,b@ï@G@bRúÅÞÝ0J[ºhW‹Þ!ĘÿᩆJiÌ$k@ÛZRäJNâ:îó¥9ÂhcQ™ÖÊÑX(æoJŽ!8O~>PišTMƒ&ˆšojô ØÏÙ àéª]S´lSëhþ?Ï s9 [?Øû:gLƒ1`BÌúeÔ1¥ÐO'-ÛCÀW#ÎO§­GÂE­!N_%‘¶·°÷Cõ>\ø^õ›&q^c±Pê“Ã#à)¿‘NåKŪ¦Ô–+Ž ƒáYQÒÂÂD|ªK „éuý”Óš¢Ñ—Úd’lD™juÛ[ 24(X@_kùa1/ÿêÝt厠3DÕgÝÖLîz ÁžBÄÖx¿ ˜(^:¿\÷}Ì“ÐÚÍKÄôòöjC¹„¥l`ß~,ÜbÊ¥ãá­íʉPûêwƒô–~|äm!Õ)¥z?†ñ‘zôºu¨î§Õ¶&öÓX[oµ*ׯ)óˆ¼Ã_¼£Ø3HåŽtý³)ö£åïUœöûDž@*pyptlib-0.0.5/doc/html/py-modindex.html000066400000000000000000000071411222335101500200300ustar00rootroot00000000000000 Python Module Index — pyptlib 0.0.1 documentation

pyptlib documentation

Python Module Index

Python Module Index

p
 
p
pyptlib
    pyptlib.client
    pyptlib.client_config
    pyptlib.config
    pyptlib.server
    pyptlib.server_config
    pyptlib.util
pyptlib-0.0.5/doc/html/pyptlib.html000066400000000000000000001261041222335101500172570ustar00rootroot00000000000000 pyptlib Package — pyptlib 0.0.1 documentation

pyptlib documentation

pyptlib Package

pyptlib Package¶

client Module¶

Public client-side pyptlib API.

pyptlib.client.init(supported_transports)[source]¶

Bootstrap client-side managed-proxy mode.

Call in the beginning of your application.

Parameters:supported_transports (list) – Names of the transports that the application supports.
Returns:dictionary that contains information for the application.
Key Type Value
state_loc string Directory where the managed proxy should dump its state files (if needed).
transports list Strings of the names of the transports that should be launched. The list can be empty.
Raises :pyptlib.config.EnvError if environment was incomplete or corrupted.
pyptlib.client.reportEnd()[source]¶

Report that we are done launching transports.

Call after you have launched all the transports you could launch.

pyptlib.client.reportFailure(name, message)[source]¶

Report that a client transport failed to launch.

Always call after failing to launch a transport.

Parameters:
  • name (str) – Name of transport.
  • message (str) – Error message.
pyptlib.client.reportSuccess(name, socksVersion, addrport, args=None, optArgs=None)[source]¶

Report that a client transport was launched succesfully.

Always call after successfully launching a transport.

Parameters:
  • name (str) – Name of transport.
  • socksVersion (int) – The SOCKS protocol version.
  • addrport (tuple) – (addr,port) where this transport is listening for connections.
  • args (str) – ARGS field for this transport.
  • args – OPT-ARGS field for this transport.

client_config Module¶

Low-level parts of pyptlib that are only useful to clients.

class pyptlib.client_config.ClientConfig[source]¶

Bases: pyptlib.config.Config

A client-side pyptlib configuration.

Raises :pyptlib.config.EnvError if environment was incomplete or corrupted.
getClientTransports()[source]¶

Return a list of strings representing the client transports reported by Tor.

If present, the wildcard transport, ‘*’, is stripped from this list and used to set allTransportsEnabled to True.

Returns:list of transports
writeMethod(name, socksVersion, addrport, args=None, optArgs=None)[source]¶

Write a message to stdout announcing that a transport was successfully launched.

Parameters:
  • name (str) – Name of transport.
  • socksVersion (int) – The SOCKS protocol version.
  • addrport (tuple) – (addr,port) where this transport is listening for connections.
  • args (str) – ARGS field for this transport.
  • optArgs (str) – OPT-ARGS field for this transport.
writeMethodEnd()[source]¶

Write a message to stdout announcing that we finished launching transports..

writeMethodError(name, message)[source]¶

Write a message to stdout announcing that we failed to launch a transport.

Parameters:
  • name (str) – Name of transport.
  • message (str) – Error message.

config Module¶

Parts of pyptlib that are useful both to clients and servers.

class pyptlib.config.Config[source]¶

Bases: object

pyptlib’s configuration.

Variables:
  • stateLocation (string) – Location where application should store state.
  • managedTransportVer (list) – List of managed-proxy protocol versions that Tor supports.
  • transports (list) – Strings of pluggable transport names that Tor wants us to handle.
  • allTransportsEnabled (bool) – True if Tor wants us to spawn all the transports.
Raises :

pyptlib.config.EnvError if environment was incomplete or corrupted.

allTransportsEnabled = False¶
check(key)[source]¶

Check the environment for a specific environment variable.

Parameters:key (str) – Environment variable key.
Returns:bool – True if the environment variable is set.
checkClientMode()[source]¶

Check whether Tor wants us to run as a client or as a server.

Returns:bool – True if Tor wants us to run as a client.
checkManagedTransportVersion(version)[source]¶

Check if Tor supports a specific managed-proxy protocol version.

Parameters:version (string) – A managed-proxy protocol version.
Returns:bool – True if version is supported.
checkTransportEnabled(transport)[source]¶

Check if Tor wants the application to spawn a specific transport.

Parameters:transport (string) – The name of a pluggable transport.
Returns:bool – True if Tor wants the application to spawn that transport.
emit(msg)[source]¶

Announce a message.

Parameters:msg (str) – A message.
get(key)[source]¶

Get the value of an environment variable.

Parameters:key (str) – Environment variable key.
Returns:str – The value of the envrionment variable.
Raises :pyptlib.config.EnvError if environment

variable could not be found.

getAllTransportsEnabled()[source]¶

Check if Tor wants the application to spawn all its transpotrs.

Returns:bool – True if Tor wants the application to spawn all its transports.
getManagedTransportVersions()[source]¶
Returns:list – The managed-proxy protocol versions that Tor supports.
getStateLocation()[source]¶
Returns:string – The state location.
managedTransportVer = []¶
stateLocation = None¶
transports = []¶
writeEnvError(message)[source]¶

Announce that an error occured while parsing the environment.

Parameters:message (str) – Error message.
writeVersion(version)[source]¶

Announce that a specific managed-proxy protocol version is supported.

Parameters:version (str) – A managed-proxy protocol version.
writeVersionError()[source]¶

Announce that we could not find a supported managed-proxy protocol version.

exception pyptlib.config.EnvError[source]¶

Bases: exceptions.Exception

Thrown when the environment is incomplete or corrupted.

server Module¶

Public server-side pyptlib API.

pyptlib.server.init(supported_transports)[source]¶

Bootstrap server-side managed-proxy mode.

Call in the beginning of your application.

Parameters:supported_transports (list) – Names of the transports that the application supports.
Returns:dictionary that contains information for the application:
Raises :pyptlib.config.EnvError if environment was incomplete or corrupted.
pyptlib.server.reportEnd()[source]¶

Report that we are done launching transports.

Call after you have launched all the transports you could launch.

pyptlib.server.reportFailure(name, message)[source]¶

Report that a server transport failed to launch.

Always call after failing to launch a transport.

Parameters:
  • name (str) – Name of transport.
  • message (str) – Error message.
pyptlib.server.reportSuccess(name, addrport, options)[source]¶

Report that a server transport was launched succesfully.

Always call after successfully launching a transport.

Parameters:
  • name (str) – Name of transport.
  • addrport (tuple) – (addr,port) where this transport is listening for connections.
  • options (str) – Transport options.

server_config Module¶

Low-level parts of pyptlib that are only useful to servers.

class pyptlib.server_config.ServerConfig[source]¶

Bases: pyptlib.config.Config

A client-side pyptlib configuration.

Variables:
  • ORPort (tuple) – (ip,port) pointing to Tor’s ORPort.
  • extendedORPort (tuple) – (ip,port) pointing to Tor’s Extended ORPort. None if Extended ORPort is not supported.
  • serverBindAddr (dict) – A dictionary {<transport> : [<addr>, <port>]}, where <transport> is the name of the transport that must be spawned, and [<addr>, <port>] is a list containing the location where that transport should bind. The dictionary can be empty.
  • authCookieFile (string) – String representing the filesystem path where the Extended ORPort Authentication cookie is stored. None if Extended ORPort authentication is not supported.
Raises :

pyptlib.config.EnvError if environment was incomplete or corrupted.

getAuthCookieFile()[source]¶
Returns:pyptlib.server_config.ServerConfig.authCookieFile
getExtendedORPort()[source]¶
Returns:pyptlib.server_config.ServerConfig.extendedORPort
getORPort()[source]¶
Returns:pyptlib.server_config.ServerConfig.ORPort
getServerBindAddresses()[source]¶
Returns:pyptlib.server_config.ServerConfig.serverBindAddr
getServerTransports()[source]¶
Returns:pyptlib.config.Config.transports
get_addrport(key)[source]¶

Parse an environment variable holding an address:port value.

Parameters:key (str) – Environment variable key.
Returns:tuple – (address,port)
Raises :pyptlib.config.EnvError if string was not in address:port format.
get_addrport_from_string(string)[source]¶

Parse a string holding an address:port value.

Parameters:string (str) – A string.
Returns:tuple – (address,port)
Raises :pyptlib.config.EnvError if string was not in address:port format.
writeMethod(name, addrport, options)[source]¶

Write a message to stdout announcing that a server transport was successfully launched.

Parameters:
  • name (str) – Name of transport.
  • addrport (tuple) – (addr,port) where this transport is listening for connections.
  • options (str) – Transport options.
writeMethodEnd()[source]¶

Write a message to stdout announcing that we finished launching transports..

writeMethodError(name, message)[source]¶

Write a message to stdout announcing that we failed to launch a transport.

Parameters:
  • name (str) – Name of transport.
  • message (str) – Error message.

util Module¶

Utility functions.

pyptlib.util.checkClientMode()[source]¶

Check whether Tor wants us to run as a client or as a server.

Returns:bool – True if Tor wants us to run as a client.
pyptlib-0.0.5/doc/html/search.html000066400000000000000000000053651222335101500170460ustar00rootroot00000000000000 Search — pyptlib 0.0.1 documentation

Search

Please activate JavaScript to enable the search functionality.

From here you can search these documents. Enter your search words into the box below and click "search". Note that the search function will automatically search for all of the words. Pages containing fewer words won't appear in the result list.

pyptlib-0.0.5/doc/html/searchindex.js000066400000000000000000000132661222335101500175450ustar00rootroot00000000000000Search.setIndex({objects:{"pyptlib.util":{checkClientMode:[4,2,1,""]},"pyptlib.server_config":{ServerConfig:[4,1,1,""]},"pyptlib.client_config.ClientConfig":{writeMethodError:[4,3,1,""],writeMethod:[4,3,1,""],getClientTransports:[4,3,1,""],writeMethodEnd:[4,3,1,""]},"pyptlib.config.Config":{checkManagedTransportVersion:[4,3,1,""],getManagedTransportVersions:[4,3,1,""],writeVersionError:[4,3,1,""],checkTransportEnabled:[4,3,1,""],check:[4,3,1,""],allTransportsEnabled:[4,4,1,""],get:[4,3,1,""],getAllTransportsEnabled:[4,3,1,""],writeVersion:[4,3,1,""],writeEnvError:[4,3,1,""],managedTransportVer:[4,4,1,""],checkClientMode:[4,3,1,""],transports:[4,4,1,""],emit:[4,3,1,""],getStateLocation:[4,3,1,""],stateLocation:[4,4,1,""]},"pyptlib.client_config":{ClientConfig:[4,1,1,""]},"pyptlib.config":{Config:[4,1,1,""],EnvError:[4,5,1,""]},"pyptlib.server":{reportSuccess:[4,2,1,""],init:[4,2,1,""],reportEnd:[4,2,1,""],reportFailure:[4,2,1,""]},"pyptlib.client":{init:[4,2,1,""],reportSuccess:[4,2,1,""],reportEnd:[4,2,1,""],reportFailure:[4,2,1,""]},"pyptlib.server_config.ServerConfig":{getServerBindAddresses:[4,3,1,""],writeMethod:[4,3,1,""],getORPort:[4,3,1,""],getServerTransports:[4,3,1,""],writeMethodError:[4,3,1,""],getExtendedORPort:[4,3,1,""],get_addrport:[4,3,1,""],get_addrport_from_string:[4,3,1,""],getAuthCookieFile:[4,3,1,""],writeMethodEnd:[4,3,1,""]},pyptlib:{client:[4,0,1,""],util:[4,0,1,""],server_config:[4,0,1,""],client_config:[4,0,1,""],server:[4,0,1,""],config:[4,0,1,""]}},terms:{next:3,pluggabl:[1,0,3,4,5],protocol:[1,5,4],help:5,execut:5,skip:3,keep:5,filesystem:[5,4],all:[3,4],tcp:[5,3],getauthcookiefil:4,file:[3,4],environ:[3,4],getalltransportsen:4,find:[3,4],dynam:5,forget:3,write:[0,4],onli:4,explicitli:1,locat:[3,4],monitor:1,field:4,launch_rot26_cli:3,launch_rot13_cli:3,configur:[1,4],addrport:4,except:[3,4],littl:[5,0],should:[5,3,4],supported_transport:4,init:[3,4],program:1,dict:[3,4],els:5,might:5,easier:[1,0],real:1,applic:[1,5,3,4],non:1,clientconfig:4,"return":[3,4],string:[3,4],thei:[1,5,3],get:[3,4],read:[5,3],writemethod:4,stop:3,initi:3,becaus:5,util:[0,3,2,4],writeenverror:4,were:3,traffic:[1,5,3],know:3,upstream:[1,0,3],report:[3,4],managedtransportv:4,now:3,look:1,obfs2:1,document:5,somewher:5,name:[3,4],specif:[1,4],level:4,orport:[1,0,3,4],list:[3,4],authent:4,server:[0,1,2,3,4,5],"try":3,easili:5,integr:5,each:3,cooki:4,found:4,where:[5,3,4],manag:[1,0,3,4,5],rot26:3,obfsproxi:[1,0],set:4,repres:4,dump:[3,4],client:[0,1,2,3,4,5],strip:4,socksvers:4,back:3,getclienttransport:4,extendedorport:4,everytim:3,see:1,finish:[3,4],signifi:3,expect:[5,3],pass:3,fail:[3,4],successfulli:[3,4],port:[5,3,4],transport:[1,0,3,4,5],bootstrap:[3,4],variabl:4,index:0,what:5,error:4,network:[1,5],learn:3,checkclientmod:[3,4],bind:[3,4],enverror:[3,4],writemethoderror:4,"case":3,state:[5,3,4],version:[3,4],socksv4:3,between:1,print:3,"import":3,paramet:4,"public":4,getorport:4,who:[1,5],run:[3,4],proxi:[1,0,3,4,5],extend:[1,0,3,4],written:1,gener:[0,3],client_config:[2,4],getstateloc:4,step:3,base:4,getextendedorport:4,dictionari:[3,4],address:[3,4],path:4,sinc:3,valu:[3,4],wait:3,thrown:4,both:4,about:[5,3],actual:1,wai:[1,3],launch:[1,3,4],could:[3,4],job:0,page:0,etc:[5,3],previou:3,getservertransport:4,act:[5,3],fals:4,implement:[1,3],permit:3,oper:3,arg:4,point:[3,4],overview:[0,3],transpotr:4,ext_orport:3,transform:1,instruct:3,api:[0,3,4],done:4,pyptlib:[0,1,2,3,4,5],succesfulli:4,announc:[3,4],assum:5,your:[5,3,4],select:5,speak:5,kei:[3,4],managed_info:3,serverbindaddr:4,from:[5,3,4],proceed:3,would:3,commun:1,tor:[1,5,3,4],support:[3,4],getserverbindaddress:4,system:1,messag:[3,4],fiction:3,start:3,checkmanagedtransportvers:4,call:[1,0,3,4],low:4,interest:5,handl:4,msg:4,interfac:1,type:[3,4],"final":3,store:[3,4],listen:[5,3,4],"function":[3,4],writevers:4,reportfailur:[3,4],checktransporten:4,writeversionerror:4,innoc:1,python:[5,0],censor:1,search:0,alltransportsen:4,state_loc:[3,4],part:4,pars:4,doesn:5,rst:[5,3],line:1,hold:4,"true":4,present:4,must:4,launch_rot13_serv:3,also:[1,0],none:[3,4],sometim:[1,0],err:3,packag:[2,4],provid:3,authcookiefil:4,prepar:3,work:3,empti:[3,4],exampl:[5,3],defin:1,"while":4,bridg:1,can:[1,3,4],str:[3,4],stateloc:4,glossari:[1,0,3,5],otherwis:3,modul:[0,2,4],emit:4,connect:[5,3,4],spawn:[3,4],opt:4,featur:1,want:[5,3,4],envrion:4,stdout:4,"int":4,get_addrport_from_str:4,readm:[5,0],reportsuccess:[3,4],indic:0,mode:[1,0,4],corrupt:4,incomplet:4,sourc:[5,4],have:[5,4],tabl:0,need:[1,5,3,4],everi:3,launch_rot26_serv:3,check:4,option:4,result:3,alwai:4,rot0r:3,welcom:0,obfusc:[1,5],make:[1,0],format:[3,4],when:[5,3,4],detail:[0,3],occur:4,note:3,how:5,rot13:3,other:[1,3],bool:4,librari:[1,0,5],which:[5,3],tupl:[3,4],instead:1,you:[5,3,4],buzzword:5,config:[3,2,4],optarg:4,begin:[3,4],sure:3,allow:1,get_addrport:4,"class":4,after:[3,4],serverconfig:4,befor:3,rais:4,whether:[3,4],user:1,consid:3,thi:[1,5,3,4],extern:[1,0],contain:4,data:[1,5,3],downstream:[1,0],understand:5,addr:4,appropri:3,attempt:3,furthermor:3,sock:[5,3,4],directori:[5,3,4],accept:3,side:[1,0,3,4],flow:1,object:4,doe:5,inform:[5,3,4],server_config:[2,4],command:1,wildcard:4,time:1,push:[5,3],reportend:[3,4],getmanagedtransportvers:4,writemethodend:4},objtypes:{"0":"py:module","1":"py:class","2":"py:function","3":"py:method","4":"py:attribute","5":"py:exception"},titles:["Welcome to pyptlib!","Pluggable transports glossary","pyptlib","API overview","pyptlib Package","pyptlib README"],objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","function","Python function"],"3":["py","method","Python method"],"4":["py","attribute","Python attribute"],"5":["py","exception","Python exception"]},filenames:["index","glossary","modules","API","pyptlib","README"]})pyptlib-0.0.5/examples/000077500000000000000000000000001222335101500150075ustar00rootroot00000000000000pyptlib-0.0.5/examples/client.py000077500000000000000000000020641222335101500166440ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- """This is a client-side example of the pyptlib API.""" import sys from pyptlib.client import ClientTransportPlugin from pyptlib.config import EnvError if __name__ == '__main__': client = ClientTransportPlugin() try: client.init(["blackfish", "bluefish"]) except EnvError, err: print "pyptlib could not bootstrap ('%s')." % str(err) sys.exit(1) for transport in client.getTransports(): # Spawn all the transports in the list, and for each spawned # transport report back the port where it is listening, and # the SOCKS version it supports. try: socks_version, bind_addrport = your_function_that_launches_transports(transport) except YourFailException, err: reportFailure(transport, "Failed to launch ('%s')." % str(err)) continue client.reportMethodSuccess(transport, socks_version, bind_addrport, None, None) # After spawning our transports, report that we are done. client.reportMethodsEnd() pyptlib-0.0.5/examples/server.py000077500000000000000000000023061222335101500166730ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- """This is a server-side example of the pyptlib API.""" import sys from pyptlib.server import ServerTransportPlugin from pyptlib.config import EnvError if __name__ == '__main__': server = ServerTransportPlugin() try: server.init(["blackfish", "bluefish"]) except EnvError, err: print "pyptlib could not bootstrap ('%s')." % str(err) sys.exit(1) for transport, transport_bindaddr in server.getBindAddresses().items(): # Try to spawn transports and make them listen in the ports # that Tor wants. Report failure or success appropriately. # 'transport' is a string with the name of the transport. # 'transport_bindaddr' is the (,) where that # transport should listen for connections. try: bind_addrport = your_function_that_launches_transports(transport, transport_bindaddr) except YourFailException, err: reportFailure(transport, "Failed to launch ('%s')." % str(err)) continue server.reportMethodSuccess(transport, bind_addrport, None) # Report back after we finish spawning transports. server.reportMethodsEnd() pyptlib-0.0.5/pyptlib.egg-info/000077500000000000000000000000001222335101500163465ustar00rootroot00000000000000pyptlib-0.0.5/pyptlib.egg-info/PKG-INFO000066400000000000000000000015301222335101500174420ustar00rootroot00000000000000Metadata-Version: 1.1 Name: pyptlib Version: 0.0.5 Summary: A python implementation of the Pluggable Transports for Circumvention specification for Tor Home-page: UNKNOWN Author: asn, Brandon Wiley Author-email: asn@torproject.org, brandon@blanu.net License: BSD Description: A python implementation of the Pluggable Transports for Circumvention specification for Tor Keywords: cryptography privacy internet Platform: UNKNOWN Classifier: Development Status :: 3 - Alpha Classifier: Environment :: No Input/Output (Daemon) Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Topic :: Internet Classifier: Topic :: Security :: Cryptography Classifier: Topic :: Software Development :: Libraries :: Python Modules pyptlib-0.0.5/pyptlib.egg-info/SOURCES.txt000066400000000000000000000045171222335101500202410ustar00rootroot00000000000000ChangeLog LICENSE MANIFEST.in README.rst TODO setup.py doc/doctrees/API.doctree doc/doctrees/README.doctree doc/doctrees/environment.pickle doc/doctrees/glossary.doctree doc/doctrees/index.doctree doc/doctrees/modules.doctree doc/doctrees/pyptlib.doctree doc/html/.buildinfo doc/html/API.html doc/html/README.html doc/html/genindex.html doc/html/glossary.html doc/html/index.html doc/html/modules.html doc/html/objects.inv doc/html/py-modindex.html doc/html/pyptlib.html doc/html/search.html doc/html/searchindex.js doc/html/_modules/index.html doc/html/_modules/pyptlib/client.html doc/html/_modules/pyptlib/client_config.html doc/html/_modules/pyptlib/config.html doc/html/_modules/pyptlib/server.html doc/html/_modules/pyptlib/server_config.html doc/html/_modules/pyptlib/util.html doc/html/_sources/API.txt doc/html/_sources/README.txt doc/html/_sources/glossary.txt doc/html/_sources/index.txt doc/html/_sources/modules.txt doc/html/_sources/pyptlib.txt doc/html/_static/ajax-loader.gif doc/html/_static/alert_info_32.png doc/html/_static/alert_warning_32.png doc/html/_static/basic.css doc/html/_static/bg-page.png doc/html/_static/bullet_orange.png doc/html/_static/comment-bright.png doc/html/_static/comment-close.png doc/html/_static/comment.png doc/html/_static/doctools.js doc/html/_static/down-pressed.png doc/html/_static/down.png doc/html/_static/file.png doc/html/_static/haiku.css doc/html/_static/jquery.js doc/html/_static/minus.png doc/html/_static/plus.png doc/html/_static/pygments.css doc/html/_static/searchtools.js doc/html/_static/underscore.js doc/html/_static/up-pressed.png doc/html/_static/up.png doc/html/_static/websupport.js examples/client.py examples/server.py pyptlib/__init__.py pyptlib/client.py pyptlib/client_config.py pyptlib/config.py pyptlib/core.py pyptlib/server.py pyptlib/server_config.py pyptlib.egg-info/PKG-INFO pyptlib.egg-info/SOURCES.txt pyptlib.egg-info/dependency_links.txt pyptlib.egg-info/top_level.txt pyptlib/test/__init__.py pyptlib/test/test_client.py pyptlib/test/test_core.py pyptlib/test/test_server.py pyptlib/test/test_util.py pyptlib/test/test_util_subproc.py pyptlib/test/util_subproc_child.py pyptlib/test/util_subproc_main.py pyptlib/util/__init__.py pyptlib/util/subproc.py sphinx/API.rst sphinx/Makefile sphinx/README.rst sphinx/conf.py sphinx/glossary.rst sphinx/index.rst sphinx/modules.rst sphinx/pyptlib.rstpyptlib-0.0.5/pyptlib.egg-info/dependency_links.txt000066400000000000000000000000011222335101500224140ustar00rootroot00000000000000 pyptlib-0.0.5/pyptlib.egg-info/top_level.txt000066400000000000000000000000101222335101500210670ustar00rootroot00000000000000pyptlib pyptlib-0.0.5/pyptlib/000077500000000000000000000000001222335101500146545ustar00rootroot00000000000000pyptlib-0.0.5/pyptlib/__init__.py000066400000000000000000000000011222335101500167540ustar00rootroot00000000000000 pyptlib-0.0.5/pyptlib/client.py000066400000000000000000000042031222335101500165030ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- """ Public client-side pyptlib API. """ from pyptlib.core import TransportPlugin from pyptlib.client_config import ClientConfig class ClientTransportPlugin(TransportPlugin): """ Runtime process for a client TransportPlugin. """ configType = ClientConfig methodName = 'CMETHOD' def reportMethodSuccess(self, name, protocol, addrport, args=None, optArgs=None): """ Write a message to stdout announcing that a transport was successfully launched. :param str name: Name of transport. :param str protocol: Name of protocol to communicate using. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str args: ARGS field for this transport. :param str optArgs: OPT-ARGS field for this transport. """ methodLine = 'CMETHOD %s %s %s:%s' % (name, protocol, addrport[0], addrport[1]) if args and len(args) > 0: methodLine = methodLine + ' ARGS=' + args.join(',') if optArgs and len(optArgs) > 0: methodLine = methodLine + ' OPT-ARGS=' + args.join(',') self.emit(methodLine) def init(supported_transports): """DEPRECATED. Use ClientTransportPlugin().init() instead.""" client = ClientTransportPlugin() client.init(supported_transports) retval = {} retval['state_loc'] = client.config.getStateLocation() retval['transports'] = client.getTransports() return retval def reportSuccess(name, socksVersion, addrport, args=None, optArgs=None): """DEPRECATED. Use ClientTransportPlugin().reportMethodSuccess() instead.""" config = ClientTransportPlugin() config.reportMethodSuccess(name, "socks%s" % socksVersion, addrport, args, optArgs) def reportFailure(name, message): """DEPRECATED. Use ClientTransportPlugin().reportMethodError() instead.""" config = ClientTransportPlugin() config.reportMethodError(name, message) def reportEnd(): """DEPRECATED. Use ClientTransportPlugin().reportMethodsEnd() instead.""" config = ClientTransportPlugin() config.reportMethodsEnd() pyptlib-0.0.5/pyptlib/client_config.py000066400000000000000000000013101222335101500200240ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- """ Low-level parts of pyptlib that are only useful to clients. """ from pyptlib.config import Config, get_env class ClientConfig(Config): """ A client-side pyptlib configuration. """ @classmethod def fromEnv(cls): """ Build a ClientConfig from environment variables. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ return cls( stateLocation = get_env('TOR_PT_STATE_LOCATION'), managedTransportVer = get_env('TOR_PT_MANAGED_TRANSPORT_VER').split(','), transports = get_env('TOR_PT_CLIENT_TRANSPORTS').split(','), ) pyptlib-0.0.5/pyptlib/config.py000066400000000000000000000067111222335101500165000ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- """ Parts of pyptlib that are useful both to clients and servers. """ import os SUPPORTED_TRANSPORT_VERSIONS = ['1'] def env_has_k(k, v): """ Default validator for :func:`get_env`. :returns: str -- The value of the envvar `k` if it is set. :raises: :class:`ValueError` if `k` was not found. """ if v is None: raise ValueError('Missing environment variable %s' % k) return v class Config(object): """ pyptlib's configuration. :var string stateLocation: Location where application should store state. :var list managedTransportVer: List of managed-proxy protocol versions that Tor supports. :var list transports: Strings of pluggable transport names that Tor wants us to handle. :var bool allTransportsEnabled: True if Tor wants us to spawn all the transports. """ def __init__(self, stateLocation, managedTransportVer=None, transports=None): self.stateLocation = stateLocation self.managedTransportVer = managedTransportVer or SUPPORTED_TRANSPORT_VERSIONS transports = transports or [] self.allTransportsEnabled = False if '*' in transports: self.allTransportsEnabled = True transports.remove('*') self.transports = transports def getStateLocation(self): """ :returns: string -- The state location. """ return self.stateLocation def getManagedTransportVersions(self): """ :returns: list -- The managed-proxy protocol versions that Tor supports. """ return self.managedTransportVer def getAllTransportsEnabled(self): """ Check if Tor wants the application to spawn all its transpotrs. :returns: bool -- True if Tor wants the application to spawn all its transports. """ return self.allTransportsEnabled def get_env(key, validate=env_has_k): """ Get the value of an environment variable. :param str key: Environment variable key. :param f validate: Function that takes a `var` and a `value`, and returns a (maybe transformed) value if it is valid, or throws an exception. If the environment does not set `var`, `value` is passed in as `None`. The default validator is :func:`env_has_k` which passes any value which is set (i.e. not `None`). :returns: str -- The value of the envrionment variable. :raises: :class:`pyptlib.config.EnvError` if environment variable could not be found, or if it did not pass validation. """ try: return validate(key, os.getenv(key)) except Exception, e: raise EnvError("error parsing env-var: %s: %s" % (key, e), e) class EnvError(Exception): """ Thrown when the environment is incomplete or corrupted. """ def __init__(self, message=None, cause=None): self.message = message self.cause = cause def __str__(self): return self.message or self.cause.message def checkClientMode(): """ Read the environment and return true if we are supposed to be a client. Return false if we are supposed to be a server. :raises: :class:`pyptlib.config.EnvError` if the environment was not properly set up """ if 'TOR_PT_CLIENT_TRANSPORTS' in os.environ: return True if 'TOR_PT_SERVER_TRANSPORTS' in os.environ: return False raise EnvError('neither TOR_PT_{SERVER,CLIENT}_TRANSPORTS set') pyptlib-0.0.5/pyptlib/core.py000066400000000000000000000111611222335101500161560ustar00rootroot00000000000000import sys from pyptlib.config import EnvError, SUPPORTED_TRANSPORT_VERSIONS class TransportPlugin(object): """ Runtime process for a base TransportPlugin. Note: you cannot initialise this directly; either use ClientTransportPlugin() or ServerTransportPlugin(). :var pyptlib.config.Config config: Configuration passed from Tor. :var file stdout: Output file descriptor to send status messages to. :var str served_version: Version used by the plugin. :var list served_transports: List of transports served by the plugin, populated by init(). """ configType = None methodName = None def __init__(self, config=None, stdout=sys.stdout): self.config = config self.stdout = stdout self.served_version = None # set by _declareSupports self.served_transports = None # set by _declareSupports def init(self, supported_transports): """ Initialise this transport plugin. If no explicit config was given, we read it from the standard TOR_PT_* environment variables. Then, we declare to Tor the transports that this plugin supports. After this is complete, you should initialise each transport method and call (this).reportMethodSuccess() or reportMethodError() as appropriate. When this is complete, you should then call reportMethodsEnd(). :param list transports: List of transport methods this PT supports. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. This also causes an ENV-ERROR line to be output, to inform Tor. """ if not self.config: self.config = self._loadConfigFromEnv() self._declareSupports(supported_transports) def _loadConfigFromEnv(self): """ Load the plugin config from the standard TOR_PT_* envvars. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. This also causes an ENV-ERROR line to be output, to inform Tor. """ try: return self.configType.fromEnv() except EnvError, e: self.emit('ENV-ERROR %s' % str(e)) raise e def _declareSupports(self, transports, versions=None): """ Declare to Tor the versions and transports that this PT supports. :raises: :class:`pyptlib.config.EnvError` if this plugin does not support any protocol version that Tor can communicate with us in. """ cfg = self.config versions = versions or SUPPORTED_TRANSPORT_VERSIONS wanted_versions = [v for v in versions if v in cfg.managedTransportVer] if not wanted_versions: self.emit('VERSION-ERROR no-version') raise EnvError("Unsupported managed proxy protocol version (%s)" % cfg.managedTransportVer) else: self.emit('VERSION %s' % wanted_versions[0]) if cfg.allTransportsEnabled: wanted_transports = transports.keys() else: # return able in priority-order determined by plugin wanted_transports = [t for t in transports if t in cfg.transports] self.served_version = wanted_versions[0] self.served_transports = wanted_transports def getTransports(self): """ :returns: list of names of the transports that this plugin can serve. :raises: :class:`ValueError` if called before :func:`init`. """ if self.served_transports is None: raise ValueError("init not yet called") return self.served_transports def reportMethodError(self, name, message): """ Write a message to stdout announcing that we failed to launch a transport. :param str name: Name of transport. :param str message: Error message. """ self.emit('%s-ERROR %s %s' % (self.methodName, name, message)) def reportMethodsEnd(self): """ Write a message to stdout announcing that we finished launching transports. """ self.emit('%sS DONE' % self.methodName) def getDebugData(self): """ Return a dict containing internal data in arbitrary format, for debugging. The data should only be presented and not processed further. """ d = dict(self.__dict__) d["config"] = dict(self.config.__dict__) d["__class__"] = self.__class__ return d def emit(self, msg): """ Announce a message. :param str msg: A message. """ print >>self.stdout, msg self.stdout.flush() pyptlib-0.0.5/pyptlib/server.py000066400000000000000000000060041222335101500165340ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- """ Public server-side pyptlib API. """ from pyptlib.core import TransportPlugin from pyptlib.server_config import ServerConfig class ServerTransportPlugin(TransportPlugin): """ Runtime process for a server TransportPlugin. """ configType = ServerConfig methodName = 'SMETHOD' def reportMethodSuccess(self, name, addrport, options): """ Write a message to stdout announcing that a server transport was successfully launched. :param str name: Name of transport. :param tuple addrport: (addr,port) where this transport is listening for connections. :param str options: String containting comma-separated transport options in key=value form (as they appear in the ARGS: SMETHOD option) """ extra = "" if options: extra = " ARGS:%s" % options elif self.config.serverTransportOptions: optlist = [] # self.config.serverTransportOptions looks like this: # {'obfs3': {'k':'v'}, 'scramblesuit': {'k2' : 'v2', 'k' : 'v'} } for transport_name, options_dict in self.config.serverTransportOptions.items(): if transport_name != name: continue for k, v in options_dict.items(): optlist.append("%s=%s" % (k,v)) extra = " ARGS:%s" % (",".join(optlist)) self.emit('SMETHOD %s %s:%s%s' % (name, addrport[0], addrport[1], extra)) def getBindAddresses(self): """ :returns: dict of names of the transports that this plugin can serve, each mapped to the (ip,port) where the transport should bind. :raises: :class:`ValueError` if called before :func:`init`. """ return dict((k, v) for k, v in self.config.serverBindAddr.iteritems() if k in self.getTransports()) def init(supported_transports): """DEPRECATED. Use ServerTransportPlugin().init() instead.""" server = ServerTransportPlugin() server.init(supported_transports) config = server.config retval = {} retval['state_loc'] = config.getStateLocation() retval['orport'] = config.getORPort() retval['ext_orport'] = config.getExtendedORPort() retval['transports'] = server.getBindAddresses() retval['auth_cookie_file'] = config.getAuthCookieFile() return retval def reportSuccess(name, addrport, options): """DEPRECATED. Use ClientTransportPlugin().reportMethodSuccess() instead.""" config = ServerTransportPlugin() config.reportMethodSuccess(name, addrport, options) def reportFailure(name, message): """DEPRECATED. Use ClientTransportPlugin().reportMethodError() instead.""" config = ServerTransportPlugin() config.reportMethodError(name, message) def reportEnd(): """DEPRECATED. Use ClientTransportPlugin().reportMethodsEnd() instead.""" config = ServerTransportPlugin() config.reportMethodsEnd() pyptlib-0.0.5/pyptlib/server_config.py000066400000000000000000000142421222335101500200640ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- """ Low-level parts of pyptlib that are only useful to servers. """ import pyptlib.config as config import pyptlib.util as util from pyptlib.config import env_has_k, get_env, SUPPORTED_TRANSPORT_VERSIONS def get_transport_options_impl(string): """ Parse transport options. :param str optstring: Example input: 'scramblesuit:k=v;scramblesuit:k2=v2;obs3fs:k=v' :returns: {'obfs3': {'k':'v'}, 'scramblesuit': {'k2' : 'v2', 'k' : 'v'} } """ transport_args = {} params = string.split(';') for param in params: try: (name, kv_string) = param.split(':') except ValueError: raise ValueError("Invalid options string (%s)" % param) if name not in transport_args: transport_args[name] = {} try: (key, value) = kv_string.split('=') except ValueError: raise ValueError("Not a k=v value (%s)" % kv_string) transport_args[name][key] = value return transport_args class ServerConfig(config.Config): """ A client-side pyptlib configuration. :var tuple ORPort: (ip,port) pointing to Tor's ORPort. :var tuple extendedORPort: (ip,port) pointing to Tor's Extended ORPort. None if Extended ORPort is not supported. :var dict serverBindAddr: A dictionary { : [, ]}, where is the name of the transport that must be spawned, and [, ] is a list containing the location where that transport should bind. The dictionary can be empty. :var string authCookieFile: String representing the filesystem path where the Extended ORPort Authentication cookie is stored. None if Extended ORPort authentication is not supported. :var dict serverTransportOptions: Dictionary containing user-provided parameters that must be passed to the pluggable transports. Example: {'obfs3': {'k':'v'}, 'scramblesuit': {'k2' : 'v2', 'k' : 'v'} } """ @classmethod def fromEnv(cls): """ Build a ServerConfig from environment variables. :raises: :class:`pyptlib.config.EnvError` if environment was incomplete or corrupted. """ # TOR_PT_EXTENDED_SERVER_PORT is set and empty if Tor does not support # the Extended ORPort. def empty_or_valid_addr(k, v): v = env_has_k(k, v) if v == '': return None return util.parse_addr_spec(v) extendedORPort = get_env('TOR_PT_EXTENDED_SERVER_PORT', empty_or_valid_addr) # Check that either both Extended ORPort and the Extended # ORPort Authentication Cookie are present, or neither. if extendedORPort: def get_authcookie(_, v): if v is None: raise ValueError("Extended ORPort address provided, but no cookie file.") return v else: def get_authcookie(_, v): if v is not None: raise ValueError("Extended ORPort Authentication cookie file provided, but no Extended ORPort address.") return v authCookieFile = get_env('TOR_PT_AUTH_COOKIE_FILE', get_authcookie) # Get ORPort. ORPort = get_env('TOR_PT_ORPORT', empty_or_valid_addr) # Get bind addresses. def get_server_bindaddr(k, bindaddrs): serverBindAddr = {} bindaddrs = env_has_k(k, bindaddrs).split(',') for bindaddr in bindaddrs: (transport_name, addrport) = bindaddr.split('-') (addr, port) = util.parse_addr_spec(addrport) serverBindAddr[transport_name] = (addr, port) return serverBindAddr serverBindAddr = get_env('TOR_PT_SERVER_BINDADDR', get_server_bindaddr) # Get transports. def get_transports(k, transports): transports = env_has_k(k, transports).split(',') t = sorted(transports) b = sorted(serverBindAddr.keys()) if t != b: raise ValueError("Can't match transports with bind addresses (%s, %s)" % (t, b)) return transports transports = get_env('TOR_PT_SERVER_TRANSPORTS', get_transports) def get_transport_options(k, v): if v is None: return None serverTransportOptions = env_has_k(k, v) return get_transport_options_impl(serverTransportOptions) transport_options = get_env('TOR_PT_SERVER_TRANSPORT_OPTIONS', get_transport_options) return cls( stateLocation = get_env('TOR_PT_STATE_LOCATION'), managedTransportVer = get_env('TOR_PT_MANAGED_TRANSPORT_VER').split(','), transports = transports, serverBindAddr = serverBindAddr, ORPort = ORPort, extendedORPort = extendedORPort, authCookieFile = authCookieFile, serverTransportOptions = transport_options ) def __init__(self, stateLocation, managedTransportVer=None, transports=None, serverBindAddr=None, ORPort=None, extendedORPort=None, authCookieFile=None, serverTransportOptions=None): config.Config.__init__(self, stateLocation, managedTransportVer or SUPPORTED_TRANSPORT_VERSIONS, transports or []) self.serverBindAddr = serverBindAddr or {} self.ORPort = ORPort self.extendedORPort = extendedORPort self.authCookieFile = authCookieFile self.serverTransportOptions = serverTransportOptions def getExtendedORPort(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.extendedORPort` """ return self.extendedORPort def getORPort(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.ORPort` """ return self.ORPort def getAuthCookieFile(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.authCookieFile` """ return self.authCookieFile def getServerTransportOptions(self): """ :returns: :attr:`pyptlib.server_config.ServerConfig.serverTransportOptions` """ return self.serverTransportOptions pyptlib-0.0.5/pyptlib/test/000077500000000000000000000000001222335101500156335ustar00rootroot00000000000000pyptlib-0.0.5/pyptlib/test/__init__.py000066400000000000000000000000001222335101500177320ustar00rootroot00000000000000pyptlib-0.0.5/pyptlib/test/test_client.py000066400000000000000000000026251222335101500205270ustar00rootroot00000000000000import os import unittest from pyptlib.client import ClientTransportPlugin from pyptlib.config import EnvError, Config from pyptlib.test.test_core import PluginCoreTestMixin class testClient(PluginCoreTestMixin, unittest.TestCase): pluginType = ClientTransportPlugin def test_fromEnv_legit(self): """Legit environment""" TEST_ENVIRON = { "TOR_PT_STATE_LOCATION" : "/pt_stat", "TOR_PT_MANAGED_TRANSPORT_VER" : "1", "TOR_PT_CLIENT_TRANSPORTS" : "dummy" } os.environ = TEST_ENVIRON self.plugin._loadConfigFromEnv() self.assertOutputLinesEmpty() def test_fromEnv_bad(self): """Missing TOR_PT_MANAGED_TRANSPORT_VER.""" TEST_ENVIRON = { "TOR_PT_STATE_LOCATION" : "/pt_stat", "TOR_PT_CLIENT_TRANSPORTS" : "dummy" } os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_bad2(self): """Missing TOR_PT_CLIENT_TRANSPORTS.""" TEST_ENVIRON = { "TOR_PT_STATE_LOCATION" : "/pt_stat", "TOR_PT_MANAGED_TRANSPORT_VER" : "1" } os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") if __name__ == '__main__': unittest.main() pyptlib-0.0.5/pyptlib/test/test_core.py000066400000000000000000000066321222335101500202030ustar00rootroot00000000000000import os import unittest from cStringIO import StringIO from pyptlib.config import EnvError, Config class PluginCoreTestMixin(object): """ This class is not a TestCase but is meant to be mixed-into tests for subclasses of TransportPlugin. """ pluginType = None origEnv = os.environ def setUp(self): if not self.pluginType: raise ValueError("pluginType not defined") self.plugin = self.pluginType(stdout=StringIO()) os.environ = self.origEnv def getOutputLines(self): fp = self.plugin.stdout fp.seek(0) return fp.readlines() def installTestConfig(self, stateLocation="/pt_stat", **kwargs): """ Install a base test config into the plugin. If this is not called, will try to get config from environment. """ self.plugin.config = self.pluginType.configType( stateLocation, **kwargs) def assertEmpty(self, c, msg=None): """Assert that a container has length 0.""" self.assertEqual(len(c), 0, "not empty: %s" % (msg or c)) def assertOutputLinesEmpty(self): """Assert that the output is empty.""" self.assertEmpty(self.getOutputLines()) def assertOutputLinesStartWith(self, *prefixes): """Assert that the output lines each start with the respective prefix.""" lines = self.getOutputLines() for p in prefixes: self.assertTrue(lines.pop(0).startswith(p)) self.assertEmpty(lines) def test_declareSupports_bad_protocol_version(self): """Unsupported managed-proxy configuration protocol version.""" self.installTestConfig(managedTransportVer=["666"]) self.assertRaises(EnvError, self.plugin._declareSupports, []) self.assertOutputLinesStartWith("VERSION-ERROR ") def test_declareSupports_unknown_transports(self): """Unknown transports""" self.installTestConfig(transports="are,you,a,badfish,too?".split(",")) self.plugin._declareSupports(["not_any_of_above"]) self.assertEmpty(self.plugin.getTransports()) self.assertOutputLinesStartWith("VERSION ") def test_declareSupports_partial(self): """Partial transports""" self.installTestConfig(transports="are,you,a,badfish,too?".split(",")) self.plugin._declareSupports(["badfish", "not_any_of_above"]) self.assertEquals(self.plugin.getTransports(), ["badfish"]) self.assertOutputLinesStartWith("VERSION ") def test_getTransports_noinit(self): """getTransports raises correctly.""" self.assertRaises(ValueError, self.plugin.getTransports) def test_init_passthru_loadConfigFromEnv_error(self): """init passes-through errors from loadConfigFromEnv.""" self.plugin.configType = DummyConfig self.assertRaises(EnvError, self.plugin.init, []) self.assertOutputLinesStartWith("ENV-ERROR ") def test_init_correct_servedTransports(self): """init results in correct getTransports.""" self.installTestConfig(transports=["yeayeayea"]) self.plugin.init(["yeayeayea"]) self.assertEquals(["yeayeayea"], self.plugin.getTransports()) self.assertOutputLinesStartWith("VERSION ") class DummyConfig(Config): @classmethod def fromEnv(cls, *args, **kwargs): """Dummy parser that always fails.""" raise EnvError("test") if __name__ == '__main__': unittest.main() pyptlib-0.0.5/pyptlib/test/test_server.py000066400000000000000000000217411222335101500205570ustar00rootroot00000000000000import os import unittest from pyptlib.config import EnvError, Config from pyptlib.server_config import get_transport_options_impl from pyptlib.server import ServerTransportPlugin from pyptlib.test.test_core import PluginCoreTestMixin from pyptlib.core import SUPPORTED_TRANSPORT_VERSIONS # a good valid environment to base modifications from # so it's clearer to see exactly why an environment fails BASE_ENVIRON = { "TOR_PT_STATE_LOCATION" : "/pt_stat", "TOR_PT_MANAGED_TRANSPORT_VER" : "1", "TOR_PT_EXTENDED_SERVER_PORT" : "", "TOR_PT_ORPORT" : "127.0.0.1:43210", "TOR_PT_SERVER_BINDADDR" : "dummy-127.0.0.1:5556,boom-127.0.0.1:6666", "TOR_PT_SERVER_TRANSPORTS" : "dummy,boom" } class testServer(PluginCoreTestMixin, unittest.TestCase): pluginType = ServerTransportPlugin def test_fromEnv_legit(self): """Legit environment.""" os.environ = BASE_ENVIRON self.plugin._loadConfigFromEnv() self.assertOutputLinesEmpty() def test_fromEnv_bad(self): """Missing TOR_PT_MANAGED_TRANSPORT_VER.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON.pop("TOR_PT_MANAGED_TRANSPORT_VER") os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_bad2(self): """Missing TOR_PT_ORPORT.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON.pop("TOR_PT_ORPORT") os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_bad3(self): """Missing TOR_PT_EXTENDED_SERVER_PORT.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON.pop("TOR_PT_EXTENDED_SERVER_PORT") os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_bad4(self): """TOR_PT_EXTENDED_SERVER_PORT not an addport.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON["TOR_PT_EXTENDED_SERVER_PORT"] = "cakez" os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_bad5(self): """TOR_PT_ORPORT not an addport.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON["TOR_PT_ORPORT"] = "lulz" os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_bad6(self): """TOR_PT_SERVER_BINDADDR not an addport.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON["TOR_PT_SERVER_BINDADDR"] = "dummy-lyrical_content,boom-127.0.0.1:6666" os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_bad7(self): """Assymetric TOR_PT_SERVER_TRANSPORTS and TOR_PT_SERVER_BINDADDR.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON["TOR_PT_SERVER_BINDADDR"] = "dummy-127.0.0.1:5556,laughs-127.0.0.1:6666" TEST_ENVIRON["TOR_PT_SERVER_TRANSPORTS"] = "dummy,boom" os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_bad8(self): """Assymetric TOR_PT_SERVER_TRANSPORTS and TOR_PT_SERVER_BINDADDR.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON["TOR_PT_SERVER_BINDADDR"] = "dummy-127.0.0.1:5556,laughs-127.0.0.1:6666" TEST_ENVIRON["TOR_PT_SERVER_TRANSPORTS"] = "dummy" os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_bad9(self): """Assymetric TOR_PT_SERVER_TRANSPORTS and TOR_PT_SERVER_BINDADDR.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON["TOR_PT_SERVER_BINDADDR"] = "dummy-127.0.0.1:5556" TEST_ENVIRON["TOR_PT_SERVER_TRANSPORTS"] = "dummy,laughs" os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) self.assertOutputLinesStartWith("ENV-ERROR ") def test_fromEnv_disabled_extorport(self): """Disabled TOR_PT_EXTENDED_SERVER_PORT.""" os.environ = BASE_ENVIRON config = self.plugin._loadConfigFromEnv() self.assertIsNone(config.getExtendedORPort()) def test_fromEnv_ext_or_but_no_auth_cookie(self): """TOR_PT_EXTENDED_SERVER_PORT without TOR_PT_AUTH_COOKIE_FILE.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON["TOR_PT_EXTENDED_SERVER_PORT"] = "127.0.0.1:5555" os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin._loadConfigFromEnv) def test_fromEnv_auth_cookie_but_no_ext_or(self): """TOR_PT_AUTH_COOKIE_FILE without TOR_PT_EXTENDED_SERVER_PORT.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON.pop("TOR_PT_EXTENDED_SERVER_PORT") TEST_ENVIRON["TOR_PT_AUTH_COOKIE_FILE"] = "/lulzie" os.environ = TEST_ENVIRON self.assertRaises(EnvError, self.plugin.init, ["what"]) def test_init_correct_ext_orport(self): """Correct Extended ORPort configuration.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON["TOR_PT_EXTENDED_SERVER_PORT"] = "127.0.0.1:5555" TEST_ENVIRON["TOR_PT_AUTH_COOKIE_FILE"] = "/lulzie" os.environ = TEST_ENVIRON self.plugin.init([]) self.assertEquals(self.plugin.config.getAuthCookieFile(), '/lulzie') self.assertEquals(self.plugin.config.getExtendedORPort(), ('127.0.0.1', 5555)) self.assertOutputLinesStartWith("VERSION ") def test_init_correct_transport_bindaddr(self): """Correct Extended ORPort configuration.""" os.environ = BASE_ENVIRON self.plugin.init(["dummy", "boom"]) bindaddr = self.plugin.getBindAddresses() self.assertEquals(bindaddr["dummy"], ('127.0.0.1', 5556)) self.assertEquals(bindaddr["boom"], ('127.0.0.1', 6666)) self.assertOutputLinesStartWith("VERSION ") class testServerOutput(PluginCoreTestMixin, unittest.TestCase): """ Test the output of pyptlib. That is, test the SMETHOD lines, etc. """ pluginType = ServerTransportPlugin def test_smethod_line(self): """Test output SMETHOD lines.""" os.environ = BASE_ENVIRON self.plugin.init(["dummy", "boom"]) for transport, transport_bindaddr in self.plugin.getBindAddresses().items(): self.plugin.reportMethodSuccess(transport, transport_bindaddr, None) self.plugin.reportMethodsEnd() self.assertIn("SMETHOD dummy 127.0.0.1:5556\n", self.getOutputLines()) self.assertIn("SMETHOD boom 127.0.0.1:6666\n", self.getOutputLines()) self.assertIn("SMETHODS DONE\n", self.getOutputLines()) def test_smethod_line_args(self): """Test an SMETHOD line with extra arguments.""" TEST_ENVIRON = dict(BASE_ENVIRON) TEST_ENVIRON["TOR_PT_SERVER_TRANSPORT_OPTIONS"] = "boom:roots=culture;random:no=care;boom:first=fire" os.environ = TEST_ENVIRON self.plugin.init(["dummy", "boom"]) for transport, transport_bindaddr in self.plugin.getBindAddresses().items(): self.plugin.reportMethodSuccess(transport, transport_bindaddr, None) self.plugin.reportMethodsEnd() self.assertIn("SMETHOD boom 127.0.0.1:6666 ARGS:roots=culture,first=fire\n", self.getOutputLines()) def test_smethod_line_explicit_args(self): """Test an SMETHOD line with extra arguments.""" os.environ = BASE_ENVIRON self.plugin.init(["dummy", "boom"]) for transport, transport_bindaddr in self.plugin.getBindAddresses().items(): self.plugin.reportMethodSuccess(transport, transport_bindaddr, "roots=culture,first=fire") self.plugin.reportMethodsEnd() self.assertIn("SMETHOD boom 127.0.0.1:6666 ARGS:roots=culture,first=fire\n", self.getOutputLines()) class testUtils(unittest.TestCase): def test_get_transport_options_wrong(self): """Invalid options string""" to_parse = "trebuchet_secret=nou" self.assertRaises(ValueError, get_transport_options_impl, to_parse) def test_get_transport_options_wrong_2(self): """No k=v value""" to_parse = "trebuchet:secret~nou" self.assertRaises(ValueError, get_transport_options_impl, to_parse) def test_get_transport_options_correct(self): to_parse = "trebuchet:secret=nou;trebuchet:cache=/tmp/cache;ballista:secret=yes;ballista:fun=no;archer:bow=yes" expected = {"trebuchet" : {"secret" : "nou", "cache" : "/tmp/cache"} , "ballista" : {"secret" : "yes", "fun" : "no"}, "archer" : {"bow" : "yes" } } result = get_transport_options_impl(to_parse) self.assertEquals(result, expected) if __name__ == '__main__': unittest.main() pyptlib-0.0.5/pyptlib/test/test_util.py000066400000000000000000000041401222335101500202200ustar00rootroot00000000000000import unittest import pyptlib.util # Tests borrowed from flashproxy. class ParseAddrSpecTest(unittest.TestCase): def test_ipv4(self): self.assertEqual(pyptlib.util.parse_addr_spec("192.168.0.1:9999"), ("192.168.0.1", 9999)) def test_ipv6(self): self.assertEqual(pyptlib.util.parse_addr_spec("[12::34]:9999"), ("12::34", 9999)) def test_defhost_defport_ipv4(self): self.assertEqual(pyptlib.util.parse_addr_spec("192.168.0.2:8888", defhost="192.168.0.1", defport=9999), ("192.168.0.2", 8888)) self.assertEqual(pyptlib.util.parse_addr_spec("192.168.0.2:", defhost="192.168.0.1", defport=9999), ("192.168.0.2", 9999)) self.assertEqual(pyptlib.util.parse_addr_spec("192.168.0.2", defhost="192.168.0.1", defport=9999), ("192.168.0.2", 9999)) self.assertEqual(pyptlib.util.parse_addr_spec(":8888", defhost="192.168.0.1", defport=9999), ("192.168.0.1", 8888)) self.assertEqual(pyptlib.util.parse_addr_spec(":", defhost="192.168.0.1", defport=9999), ("192.168.0.1", 9999)) self.assertEqual(pyptlib.util.parse_addr_spec("", defhost="192.168.0.1", defport=9999), ("192.168.0.1", 9999)) def test_defhost_defport_ipv6(self): self.assertEqual(pyptlib.util.parse_addr_spec("[1234::2]:8888", defhost="1234::1", defport=9999), ("1234::2", 8888)) self.assertEqual(pyptlib.util.parse_addr_spec("[1234::2]:", defhost="1234::1", defport=9999), ("1234::2", 9999)) self.assertEqual(pyptlib.util.parse_addr_spec("[1234::2]", defhost="1234::1", defport=9999), ("1234::2", 9999)) self.assertEqual(pyptlib.util.parse_addr_spec(":8888", defhost="1234::1", defport=9999), ("1234::1", 8888)) self.assertEqual(pyptlib.util.parse_addr_spec(":", defhost="1234::1", defport=9999), ("1234::1", 9999)) self.assertEqual(pyptlib.util.parse_addr_spec("", defhost="1234::1", defport=9999), ("1234::1", 9999)) def test_noresolve(self): """Test that parse_addr_spec does not do DNS resolution by default.""" self.assertRaises(ValueError, pyptlib.util.parse_addr_spec, "example.com") if __name__ == "__main__": unittest.main() pyptlib-0.0.5/pyptlib/test/test_util_subproc.py000066400000000000000000000103501222335101500217550ustar00rootroot00000000000000import unittest import signal import subprocess import time from pyptlib.util.subproc import auto_killall, create_sink, proc_is_alive, Popen, SINK from subprocess import PIPE # We ought to run auto_killall(), instead of manually calling proc.terminate() # but it's not very good form to use something inside the test for itself. :p def proc_wait(proc, wait_s): time.sleep(wait_s) proc.poll() # otherwise it doesn't exit properly class SubprocTest(unittest.TestCase): def name(self): return self.id().split(".")[-1].replace("test_", "") def getMainArgs(self): return ["python", "-m" "pyptlib.test.util_subproc_main", self.name()] def spawnMain(self, cmd=None, stdout=PIPE, **kwargs): # spawn the main test process and wait a bit for it to initialise proc = Popen(cmd or self.getMainArgs(), stdout = stdout, **kwargs) time.sleep(0.2) return proc def readChildPid(self, proc): line = proc.stdout.readline() self.assertTrue(line.startswith("child ")) return int(line.replace("child ", "")) def test_Popen_IOpassthru(self): """Test that output from the child passes through to the parent.""" output = subprocess.check_output(self.getMainArgs()) self.assertTrue(len(output) > 0) def test_Popen_SINK(self): """Test that output from the child is discarded when stdout = SINK.""" output = subprocess.check_output(self.getMainArgs()) self.assertTrue(len(output) == 0) def test_trap_sigint_multiple(self): """Test that adding multiple SIGINT handlers works as expected.""" proc = self.spawnMain() proc.send_signal(signal.SIGINT) self.assertEquals("run h1\n", proc.stdout.readline()) proc.send_signal(signal.SIGINT) self.assertEquals("run h2\n", proc.stdout.readline()) self.assertEquals("run h1\n", proc.stdout.readline()) proc.terminate() def test_trap_sigint_reset(self): """Test that resetting SIGINT handlers works as expected.""" proc = self.spawnMain() proc.send_signal(signal.SIGINT) self.assertEquals("run h2\n", proc.stdout.readline()) proc.terminate() def test_killall_kill(self): """Test that killall() can kill -9 a hung process.""" proc = self.spawnMain() pid = proc.pid cid = self.readChildPid(proc) self.assertTrue(proc_is_alive(cid), "child did not hang") time.sleep(2) self.assertTrue(proc_is_alive(cid), "child did not ignore TERM") time.sleep(4) self.assertFalse(proc_is_alive(cid), "child was not killed by parent") proc.terminate() def test_auto_killall_2_int(self): """Test that auto_killall works for 2-INT signals.""" proc = self.spawnMain() pid = proc.pid cid = self.readChildPid(proc) # test first signal is ignored proc.send_signal(signal.SIGINT) proc_wait(proc, 3) self.assertTrue(proc_is_alive(pid), "1 INT not ignored") self.assertTrue(proc_is_alive(cid), "1 INT not ignored") # test second signal is handled proc.send_signal(signal.SIGINT) proc_wait(proc, 3) self.assertFalse(proc_is_alive(pid), "2 INT not handled") self.assertFalse(proc_is_alive(cid), "2 INT not handled") def test_auto_killall_term(self): """Test that auto_killall works for TERM signals.""" proc = self.spawnMain() pid = proc.pid cid = self.readChildPid(proc) # test TERM is handled proc.send_signal(signal.SIGTERM) proc_wait(proc, 3) self.assertFalse(proc_is_alive(pid), "TERM not handled") self.assertFalse(proc_is_alive(cid), "TERM not handled") def test_auto_killall_exit(self): """Test that auto_killall works on normal exit.""" proc = self.spawnMain() pid = proc.pid cid = self.readChildPid(proc) # test exit is handled. main exits by itself after 1 seconds # exit handler takes ~2s to run, usually proc_wait(proc, 3) self.assertFalse(proc_is_alive(pid), "unexpectedly did not exit") self.assertFalse(proc_is_alive(cid), "parent did not kill child") if __name__ == "__main__": unittest.main() pyptlib-0.0.5/pyptlib/test/util_subproc_child.py000066400000000000000000000007721222335101500220700ustar00rootroot00000000000000#!/usr/bin/python import signal import sys import time def hangForever(signum=0, sframe=None): time.sleep(1000) def child_default(subcmd, *argv): time.sleep(100) def child_default_io(subcmd, *argv): print "child printing output" def child_killall_kill(subcmd, *argv): signal.signal(signal.SIGINT, hangForever) signal.signal(signal.SIGTERM, hangForever) child_default(None) if __name__ == '__main__': getattr(sys.modules[__name__], "child_%s" % sys.argv[1])(*sys.argv[1:]) pyptlib-0.0.5/pyptlib/test/util_subproc_main.py000066400000000000000000000034761222335101500217350ustar00rootroot00000000000000#!/usr/bin/python import os import signal import sys import time from pyptlib.util.subproc import auto_killall, killall, trap_sigint, Popen, SINK from subprocess import PIPE def startChild(subcmd, report=False, stdout=SINK, **kwargs): proc = Popen( ["python", "-m", "pyptlib.test.util_subproc_child", subcmd], stdout = stdout, **kwargs ) if report: print "child %s" % proc.pid sys.stdout.flush() return proc def sleepIgnoreInts(ignoreNumInts=3): for i in xrange(ignoreNumInts): time.sleep(100) def handler1(signum=0, sframe=None): print "run h1" sys.stdout.flush() def handler2(signum=0, sframe=None): print "run h2" sys.stdout.flush() def main_Popen_IOpassthru(testname, *argv): child = startChild("default_io", stdout=None) child.wait() def main_Popen_SINK(testname, *argv): child = startChild("default_io") child.wait() def main_trap_sigint_multiple(testname, *argv): trap_sigint(handler1) trap_sigint(handler2, 1) sleepIgnoreInts(2) def main_trap_sigint_reset(testname, *argv): trap_sigint(handler1) signal.signal(signal.SIGINT, lambda signum, sframe: None) trap_sigint(handler2) sleepIgnoreInts(1) def main_killall_kill(testname, *argv): child = startChild(testname, True) time.sleep(1) killall(wait_s=4) time.sleep(100) def main_auto_killall_2_int(testname, *argv): auto_killall(1) child = startChild("default", True) child.wait() def main_auto_killall_term(testname, *argv): auto_killall() child = startChild("default", True) child.wait() def main_auto_killall_exit(testname, *argv): auto_killall() child = startChild("default", True) time.sleep(1) if __name__ == "__main__": getattr(sys.modules[__name__], "main_%s" % sys.argv[1])(*sys.argv[1:]) pyptlib-0.0.5/pyptlib/util/000077500000000000000000000000001222335101500156315ustar00rootroot00000000000000pyptlib-0.0.5/pyptlib/util/__init__.py000066400000000000000000000064711222335101500177520ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- """ Utility functions. """ import re import socket # Deprecated; use pyptlib.config.checkClientMode() instead. # TODO(infinity0): remove this when all downstream migrates to new API from pyptlib.config import checkClientMode # This code is borrowed from flashproxy. Thanks David! def parse_addr_spec(spec, defhost = None, defport = None, resolve = False): """ Parse a host:port specification and return a 2-tuple ("host", port) as understood by the Python socket functions. If resolve is true, then the host in the specification or the defhost may be a domain name, which will be resolved. If resolve is false, then the host must be a numeric IPv4 or IPv6 address. IPv6 addresses must be enclosed in square brackets. :returns: tuple -- (address, port) :raises: ValueError if spec is not well formed. >>> parse_addr_spec("192.168.0.1:9999") ('192.168.0.1', 9999) If defhost or defport are given, those parts of the specification may be omitted; if so, they will be filled in with defaults. >>> parse_addr_spec("192.168.0.2:8888", defhost="192.168.0.1", defport=9999) ('192.168.0.2', 8888) >>> parse_addr_spec(":8888", defhost="192.168.0.1", defport=9999) ('192.168.0.1', 8888) >>> parse_addr_spec("192.168.0.2", defhost="192.168.0.1", defport=9999) ('192.168.0.2', 9999) >>> parse_addr_spec("192.168.0.2:", defhost="192.168.0.1", defport=9999) ('192.168.0.2', 9999) >>> parse_addr_spec(":", defhost="192.168.0.1", defport=9999) ('192.168.0.1', 9999) >>> parse_addr_spec("", defhost="192.168.0.1", defport=9999) ('192.168.0.1', 9999) """ host = None port = None af = 0 m = None # IPv6 syntax. if not m: m = re.match(ur'^\[(.+)\]:(\d*)$', spec) if m: host, port = m.groups() af = socket.AF_INET6 if not m: m = re.match(ur'^\[(.+)\]$', spec) if m: host, = m.groups() af = socket.AF_INET6 # IPv4/hostname/port-only syntax. if not m: try: host, port = spec.split(":", 1) except ValueError: host = spec if re.match(ur'^[\d.]+$', host): af = socket.AF_INET else: af = 0 host = host or defhost port = port or defport if host is None or port is None: raise ValueError("Bad address specification \"%s\"" % spec) # Now we have split around the colon and have a guess at the address family. # Forward-resolve the name into an addrinfo struct. Real DNS resolution is # done only if resolve is true; otherwise the address must be numeric. if resolve: flags = 0 else: flags = socket.AI_NUMERICHOST try: addrs = socket.getaddrinfo(host, port, af, socket.SOCK_STREAM, socket.IPPROTO_TCP, flags) except socket.gaierror, e: raise ValueError("Bad host or port: \"%s\" \"%s\": %s" % (host, port, str(e))) if not addrs: raise ValueError("Bad host or port: \"%s\" \"%s\"" % (host, port)) # Convert the result of socket.getaddrinfo (which is a 2-tuple for IPv4 and # a 4-tuple for IPv6) into a (host, port) 2-tuple. host, port = socket.getnameinfo(addrs[0][4], socket.NI_NUMERICHOST | socket.NI_NUMERICSERV) port = int(port) return host, port pyptlib-0.0.5/pyptlib/util/subproc.py000066400000000000000000000154511222335101500176660ustar00rootroot00000000000000"""Common tasks for managing child processes. To have child processes actually be managed by this module, you should use the Popen() here rather than subprocess.Popen() directly. Some parts do not yet work fully on windows (sending/trapping signals). """ import atexit import inspect import os import signal import subprocess import sys import time mswindows = (sys.platform == "win32") _CHILD_PROCS = [] # TODO(infinity0): add functionality to detect when any child dies, and # offer different response strategies for them (e.g. restart the child? or die # and kill the other children too). SINK = object() # get default args from subprocess.Popen to use in subproc.Popen a = inspect.getargspec(subprocess.Popen.__init__) _Popen_defaults = zip(a.args[-len(a.defaults):],a.defaults); del a if mswindows: # required for os.kill() to work _Popen_defaults['creationflags'] |= subprocess.CREATE_NEW_PROCESS_GROUP class Popen(subprocess.Popen): """Wrapper for subprocess.Popen that tracks every child process. See the subprocess module for documentation. Additionally, you may use subproc.SINK as the value for either of the stdout, stderr arguments to tell subprocess to discard anything written to those channels. """ def __init__(self, *args, **kwargs): kwargs = dict(_Popen_defaults + kwargs.items()) for f in ['stdout', 'stderr']: if kwargs[f] is SINK: kwargs[f] = create_sink() # super() does some magic that makes **kwargs not work, so just call # our super-constructor directly subprocess.Popen.__init__(self, *args, **kwargs) _CHILD_PROCS.append(self) # TODO(infinity0): perhaps replace Popen.std* with wrapped file objects # that don't buffer readlines() et. al. Currently one must avoid these and # use while/readline(); see man page for "python -u" for more details. def create_sink(): return open(os.devnull, "w", 0) if mswindows: # from http://www.madebuild.org/blog/?p=30 from ctypes import byref, windll from ctypes.wintypes import DWORD # GetExitCodeProcess uses a special exit code to indicate that the process is # still running. _STILL_ACTIVE = 259 def proc_is_alive(pid): """Check if a pid is still running.""" handle = windll.kernel32.OpenProcess(1, 0, pid) if handle == 0: return False # If the process exited recently, a pid may still exist for the handle. # So, check if we can get the exit code. exit_code = DWORD() is_running = ( windll.kernel32.GetExitCodeProcess(handle, byref(exit_code)) == 0) windll.kernel32.CloseHandle(handle) # See if we couldn't get the exit code or the exit code indicates that the # process is still running. return is_running or exit_code.value == _STILL_ACTIVE else: # adapted from http://stackoverflow.com/questions/568271/check-if-pid-is-not-in-use-in-python import errno def proc_is_alive(pid): """Check if a pid is still running.""" try: os.kill(pid, 0) except OSError as e: if e.errno == errno.EPERM: return True if e.errno == errno.ESRCH: return False raise # something else went wrong else: return True _SIGINT_RUN = {} def trap_sigint(handler, ignoreNum=0): """Register a handler for an INT signal. Successive traps registered via this function are cumulative, and override any previous handlers registered using signal.signal(). To reset these cumulative traps, call signal.signal() with another (maybe dummy) handler. Args: handler: a signal handler; see signal.signal() for details ignoreNum: number of signals to ignore before activating the handler, which will be run on all subsequent signals. """ prev_handler = signal.signal(signal.SIGINT, _run_sigint_handlers) if prev_handler != _run_sigint_handlers: _SIGINT_RUN.clear() _SIGINT_RUN.setdefault(ignoreNum, []).append(handler) _intsReceived = 0 def _run_sigint_handlers(signum=0, sframe=None): global _intsReceived _intsReceived += 1 # code snippet adapted from atexit._run_exitfuncs exc_info = None for i in xrange(_intsReceived).__reversed__(): for handler in _SIGINT_RUN.get(i, []).__reversed__(): try: handler(signum, sframe) except SystemExit: exc_info = sys.exc_info() except: import traceback print >> sys.stderr, "Error in subproc._run_sigint_handlers:" traceback.print_exc() exc_info = sys.exc_info() if exc_info is not None: raise exc_info[0], exc_info[1], exc_info[2] _isTerminating = False def killall(cleanup=lambda:None, wait_s=16): """Attempt to gracefully terminate all child processes. All children are told to terminate gracefully. A waiting period is then applied, after which all children are killed forcefully. If all children terminate before this waiting period is over, the function exits early. Args: cleanup: Run after all children are dead. For example, if your program does not automatically terminate after this, you can use this to signal that it should exit. In particular, Twisted applications ought to use this to call reactor.stop(). wait_s: Time in seconds to wait before trying to kill children. """ # TODO(infinity0): log this somewhere, maybe global _isTerminating, _CHILD_PROCS if _isTerminating: return _isTerminating = True # terminate all for proc in _CHILD_PROCS: if proc.poll() is None: proc.terminate() # wait and make sure they're dead for i in xrange(wait_s): _CHILD_PROCS = [proc for proc in _CHILD_PROCS if proc.poll() is None] if not _CHILD_PROCS: break time.sleep(1) # if still existing, kill them for proc in _CHILD_PROCS: if proc.poll() is None: proc.kill() time.sleep(0.5) # reap any zombies for proc in _CHILD_PROCS: proc.poll() cleanup() def auto_killall(ignoreNumSigInts=0, *args, **kwargs): """Automatically terminate all child processes on exit. Args: ignoreNumSigInts: this number of INT signals will be ignored before attempting termination. This will be attempted unconditionally in all other cases, such as on normal exit, or on a TERM signal. *args, **kwargs: See killall(). """ killall_handler = lambda signum, sframe: killall(*args, **kwargs) trap_sigint(killall_handler, ignoreNumSigInts) signal.signal(signal.SIGTERM, killall_handler) atexit.register(killall, *args, **kwargs) pyptlib-0.0.5/setup.cfg000066400000000000000000000000731222335101500150120ustar00rootroot00000000000000[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 pyptlib-0.0.5/setup.py000066400000000000000000000021161222335101500147030ustar00rootroot00000000000000#!/usr/bin/env python import sys from setuptools import setup, find_packages setup(name='pyptlib', version='0.0.5', description='A python implementation of the Pluggable Transports for Circumvention specification for Tor', long_description='A python implementation of the Pluggable Transports for Circumvention specification for Tor', author='asn, Brandon Wiley', author_email='asn@torproject.org, brandon@blanu.net', classifiers=[ "Development Status :: 3 - Alpha", "Environment :: No Input/Output (Daemon)", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Intended Audience :: Developers", "Operating System :: OS Independent", "Topic :: Internet", "Topic :: Security :: Cryptography", "Topic :: Software Development :: Libraries :: Python Modules", ], keywords='cryptography privacy internet', license='BSD', package_dir={'pyptlib': 'pyptlib'}, packages=find_packages(exclude=['*.test']), test_suite='pyptlib.test', ) pyptlib-0.0.5/sphinx/000077500000000000000000000000001222335101500145025ustar00rootroot00000000000000pyptlib-0.0.5/sphinx/API.rst000066400000000000000000000155171222335101500156560ustar00rootroot00000000000000API overview ============ Be sure to read :file:`API.rst` and :file:`glossary.rst` before reading this file. General Overview ################ Applications begin by initializing pyptlib. Then pyptlib informs the application about which transports it should spawn, in which ports they should listen for connections, etc. Then the application launches the appropriate transports as instructed, and for each transport it reports to pyptlib whether it was launched successfully or not. Finally, the application announces to pyptlib that it finished launching transports. From that point and on the application should forget about pyptlib and start accepting connections. Detailed API Overview ##################### 0) Find if it's a client or a server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ An application using pyptlib should start by calling :func:`pyptlib.config.checkClientMode` to learn whether Tor wants it to run as a client or as a server. You should then create a :class:`pyptlib.client.ClientTransportPlugin` or :class:`pyptlib.server.ServerTransportPlugin` as appropriate. This object is your main entry point to the pyptlib API, so you should keep it somewhere for later access. 1) Get transport information from Tor ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The next step is to run :func:`init ` to parse the rest of the configuration and communicate the results to Tor. You should pass a list of names of the transports your application supports. The application should be prepared for :exc:`pyptlib.config.EnvError`, which signifies that the environment was not prepared by Tor. Consider an example of the fictional application *rot0r* which implements the pluggable transports *rot13* and *rot26*. If *rot0r*, in step 1, learned that Tor expects it to act as a client, it should now do: .. code-block:: python from pyptlib.client import ClientTransportPlugin from pyptlib.config import EnvError client = ClientTransportPlugin() try: client.init(supported_transports=["rot13", "rot26"]) except EnvError, err: print "pyptlib could not bootstrap ('%s')." % str(err) Afterwards, the API's ``config`` attribute provides methods to find out how Tor wants your application to be configured. For example, if you store state, it should go in :func:`client.config.getStateLocation() `. For a complete list, see the documentation for that module. 2) Launch transports ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Client case (skip if you are a server) """"""""""""""""""""""""""""""""""""""""""" Your application should then use :func:`client.getTransports() ` to learn which transports it should launch. Proceeding with the previous example: .. code-block:: python if 'rot13' in client.getTransports(): launch_rot13_client() if 'rot26' in client.getTransports(): launch_rot26_client() For a full list of the methods available, see the module docs for :class:`client ` and :class:`client.config `. .. note:: Since the application runs as a client, it should launch a SOCKS server in the upstream side of the proxy. Server case (skip if you are a client): """""""""""""""""""""""""""""""""""""""""""" Your application should then use :func:`server.getBindAddresses() ` to learn which transports it should launch. Since the application runs as a server, it will push data to Tor's ORPort, which you can get using :func:`server.config.getORPort() `. Proceeding with the previous example: .. code-block:: python transports = server.getBindAddresses() if 'rot13' in transports: launch_rot13_server(transports['rot13'], server.config.getORPort()) if 'rot26' in transports: launch_rot26_server(transports['rot26'], server.config.getORPort()) For a full list of the methods available, see the module docs for :class:`server ` and :class:`server.config `. 3) Report results back to Tor. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For every transport that the application launches, it reports to pyptlib whether it was launched successfully or not. This way, Tor is informed on whether a transport is expected to work or not. Client case (skip if you are a server): """""""""""""""""""""""""""""""""""""""""""" Every time a transport is successfully launched, the application calls :func:`client.reportMethodSuccess ` with the name of the transport that was launched, the address where it is listening for connections, and the SOCKS version that the upstream SOCKS server supports. For example, if *rot13* was launched successfully, waits for connections in '127.0.0.1:42042' and supports SOCKSv4, the appropriate call would be: .. code-block:: python client.reportMethodSuccess('rot13', 'socks5', ('127.0.0.1', 42042)) Every time a transport failed to launch, the application calls :func:`client.reportMethodError ` with the name of the transport and a message. For example, if *rot26* failed to launch, the appropriate call would be: .. code-block:: python client.reportMethodError('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)') Server case (skip if you are a client): """""""""""""""""""""""""""""""""""""""""""" Everytime a transport is successfully launched, the application calls :func:`server.reportMethodSuccess ` with the name of the transport that was launched, and the address where it is listening for connections. For example, if *rot13* was launched successfully and waits for connections in '127.0.0.1:42042', the appropriate call would be: .. code-block:: python server.reportMethodSuccess('rot13', ('127.0.0.1', 42042)) Everytime a transport failed to launch, the application should call :func:`server.reportMethodError ` with the name of the transport and a message. For example, if *rot26* failed to launch, the appropriate call would be: .. code-block:: python server.reportMethodError('rot26', 'Could not bind to 127.0.0.1:666 (Operation not permitted)') 4) Stop using pyptlib and start accepting connections ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When the application finishes launching connections, it should call :func:`reportMethodsEnd() `, to announce to pyptlib that all transports were launched. This way, Tor knows that it can start pushing traffic to the application. After this point, the API object (in this current version of pyptlib) has no other use. pyptlib-0.0.5/sphinx/Makefile000066400000000000000000000130411222335101500161410ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = ../doc # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR)/* @rm -f ./stem.* ./modules.rst html: @rm -f ./pyptlib.* ./modules.rst @sphinx-apidoc -o . ../pyptlib $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pyptlib.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pyptlib.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/pyptlib" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pyptlib" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." pyptlib-0.0.5/sphinx/README.rst000077700000000000000000000000001222335101500200662../README.rstustar00rootroot00000000000000pyptlib-0.0.5/sphinx/conf.py000066400000000000000000000173211222335101500160050ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # pyptlib documentation build configuration file, created by # sphinx-quickstart on Fri Oct 5 11:46:40 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('..')) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = '1.1' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'pyptlib' copyright = u'2012, Brandon Wiley' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.0.5' # The full version, including alpha/beta/rc tags. release = '0.0.5.UNRELEASED' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. #html_theme = 'default' html_theme = 'haiku' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. html_short_title = 'pyptlib documentation' # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'pyptlibdoc' # -- Options for LaTeX output -------------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'pyptlib.tex', u'pyptlib Documentation', u'Brandon Wiley', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'pyptlib', u'pyptlib Documentation', [u'Brandon Wiley'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'pyptlib', u'pyptlib Documentation', u'Brandon Wiley', 'pyptlib', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' pyptlib-0.0.5/sphinx/glossary.rst000066400000000000000000000044711222335101500171050ustar00rootroot00000000000000Pluggable transports glossary """"""""""""""""""""""""""""" pluggable transport (sometimes also called 'transport') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pluggable transports obfuscate network traffic. Specifically, pluggable transports transform the Tor traffic flow between the client and the bridge. This way, censors who monitor traffic between the client and the bridge see innocent-looking transformed traffic instead of the actual Tor traffic. pluggable transport proxy ^^^^^^^^^^^^^^^^^^^^^^^^^ Pluggable transport proxies are programs that implement pluggable transports. They also implement the networking system that a pluggable transport needs (so that it can proxy data). obfsproxy ^^^^^^^^^ `obfsproxy `_ is a pluggable transport proxy written in C. It implements the `obfs2 `_ pluggable transport. upstream/downstream ^^^^^^^^^^^^^^^^^^^ The upstream side of a pluggable transport proxy is the side that communicates with Tor. Upstream data is non-obfuscated. The downstream side of a pluggable transport proxy is the side that communicates with the other pluggable transport proxy. Downstream data is obfuscated. client-mode / server-mode ^^^^^^^^^^^^^^^^^^^^^^^^^^ A pluggable transport is a client if it has a Tor client in its upstream side. A pluggable transport is a server if it has a Tor bridge in its upstream side. external-mode proxy ^^^^^^^^^^^^^^^^^^^ A pluggable transport proxy is in external-mode if the user explicitly configures it using its command-line interface. managed-mode proxy ^^^^^^^^^^^^^^^^^^ A pluggable transport proxy is in managed-mode if it's launched and managed by Tor using the managed-proxy configuration protocol. The managed-proxy configuration protocol is defined in the `pluggable transport specification `_. pyptlib ^^^^^^^ pyptlib is a library that implements the managed-proxy configuration protocol and makes it easier for application to be used as managed proxies. extended orport ^^^^^^^^^^^^^^^ Extended ORPort is an non-implemented feature of Tor that allows a pluggable transport proxy to communicate with Tor in real-time. pyptlib-0.0.5/sphinx/index.rst000066400000000000000000000013351222335101500163450ustar00rootroot00000000000000.. pyptlib documentation master file, created by sphinx-quickstart on Fri Oct 5 11:46:40 2012. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to pyptlib! =================================== pyptlib is a little Python library that makes the job of writing pluggable transports easier. .. toctree:: :maxdepth: 2 README API glossary :mod:`pyptlib.client` ---------------------- Client-side pyptlib API. :mod:`pyptlib.server` ---------------------- Server-side pyptlib API. :mod:`pyptlib.util` ---------------------- pyptlib utilities. Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` pyptlib-0.0.5/sphinx/modules.rst000066400000000000000000000000721222335101500167030ustar00rootroot00000000000000pyptlib ======= .. toctree:: :maxdepth: 4 pyptlib pyptlib-0.0.5/sphinx/pyptlib.rst000066400000000000000000000015351222335101500167230ustar00rootroot00000000000000pyptlib Package =============== :mod:`client` Module -------------------- .. automodule:: pyptlib.client :members: :undoc-members: :show-inheritance: :mod:`client_config` Module --------------------------- .. automodule:: pyptlib.client_config :members: :undoc-members: :show-inheritance: :mod:`config` Module -------------------- .. automodule:: pyptlib.config :members: :undoc-members: :show-inheritance: :mod:`server` Module -------------------- .. automodule:: pyptlib.server :members: :undoc-members: :show-inheritance: :mod:`server_config` Module --------------------------- .. automodule:: pyptlib.server_config :members: :undoc-members: :show-inheritance: :mod:`util` Module ------------------ .. automodule:: pyptlib.util :members: :undoc-members: :show-inheritance: