Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P pluggable transports
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Anti-censorship
  • Pluggable Transports
  • pluggable transports
  • Issues
  • #7822
Closed
Open
Created Dec 30, 2012 by David Fifield@dcfOwner

Create an ezpt pluggable transports wrapper

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.)

Assignee
Assign to
Time tracking