<s> """<STR_LIT>""" <EOL> from twisted . protocols import portforward <EOL> from twisted . python import usage <EOL> from twisted . application import strports <EOL> class Options ( usage . Options ) : <EOL> synopsis = "<STR_LIT>" <EOL> longdesc = '<STR_LIT>' <EOL> optParameters = [ <EOL> [ "<STR_LIT:port>" , "<STR_LIT:p>" , "<STR_LIT>" , "<STR_LIT>" ] , <EOL> [ "<STR_LIT:host>" , "<STR_LIT:h>" , "<STR_LIT:localhost>" , "<STR_LIT>" ] , <EOL> [ "<STR_LIT>" , "<STR_LIT:d>" , <NUM_LIT> , "<STR_LIT>" ] , <EOL> ] <EOL> compData = usage . Completions ( <EOL> optActions = { "<STR_LIT:host>" : usage . CompleteHostnames ( ) } <EOL> ) <EOL> def makeService ( config ) : <EOL> f = portforward . ProxyFactory ( config [ '<STR_LIT:host>' ] , int ( config [ '<STR_LIT>' ] ) ) <EOL> return strports . service ( config [ '<STR_LIT:port>' ] , f ) </s>
