[tor-bugs] #7822 [Pluggable transport]: Create an ezpt pluggable transports wrapper
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Dec 30 01:29:34 UTC 2012
#7822: Create an ezpt pluggable transports wrapper
---------------------------------+------------------------------------------
Reporter: dcf | Owner: asn
Type: project | Status: new
Priority: normal | Milestone:
Component: Pluggable transport | Version:
Keywords: | Parent:
Points: | Actualpoints:
---------------------------------+------------------------------------------
There should be a program that is a managed-transport wrapper: it
understands pt environment variables, has a SOCKS listener, and forks a
command of your choice to transform input to output and vice versa. For
example,
{{{
ezpt -m rot13 'tr "[a-zA-Z]" "[n-za-mN-ZA-M]"'
ezpt -m xor255 "perl -e '$|=1;while(read(STDIN,$_,1)){print
chr(ord^0xff);}'"
ezpt -m double "perl -e '$|=1;while(read(STDIN,$_,1)){print "$_$_";}'"
"perl -e '$|=1;while(read(STDIN,$_,2)){print chop;}'"
}}}
If one command is given, the same command is used for encoding and
decoding. If two commands are given, one is used for encoding and one is
used for decoding. `-m` gives the method name.
Use in `torrc`:
{{{
ClientTransportPlugin rot13 exec ezpt -m rot13 'tr "[a-zA-Z]" "[n-za-mN-
Za-M]"'
ServerTransportPlugin rot13 exec ezpt -m rot13 'tr "[a-zA-Z]" "[n-za-mN-
Za-M]"'
}}}
Invoked subprograms may need to always flush their buffers to prevent
deadlock; that's their problem. (That's what the `$|=1` does in Perl.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7822>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list