man-psocks.but 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. \cfg{man-identity}{psocks}{1}{2021-04-08}{PuTTY tool suite}{PuTTY tool suite}
  2. \H{psocks-manpage} Man page for \cw{psocks}
  3. \S{psocks-manpage-name} NAME
  4. \cw{psocks} \- simple SOCKS proxy server
  5. \S{psocks-manpage-synopsis} SYNOPSIS
  6. \c psocks [ -d ] [ -f | -p pipe-cmd ] [ -g ] [ port-number ]
  7. \e bbbbbb bb bb bb iiiiiiii bb iiiiiiiiiii
  8. \S{psocks-manpage-description} DESCRIPTION
  9. \cw{psocks} is a simple SOCKS4/5 proxy server. It supports proxying
  10. IPv4 and IPv6 connections. It does not support requiring
  11. authentication of its clients.
  12. \cw{psocks} can be used together with an SSH client such as
  13. \cw{putty}(\e{1}) to implement a reverse dynamic SSH tunnel. It can
  14. also be used for network protocol debugging, as it can record all the
  15. traffic passing through it in various ways.
  16. By default, \cw{psocks} listens to connections from localhost only,
  17. on TCP port 1080. A different \e{port-number} can optionally be
  18. supplied, and with \cw{-g} it will listen to connections from any
  19. host.
  20. \cw{psocks} will emit log messages about connections it receives on
  21. standard error. With \cw{-d}, it will log the contents of those
  22. connections too.
  23. \S{psocks-manpage-options} OPTIONS
  24. The command-line options supported by \cw{psocks} are:
  25. \dt \cw{-g}
  26. \dd Accept connections from anywhere. By default, \cw{psocks} only
  27. accepts connections on the loopback interface.
  28. \dt \cw{--exec} \e{command}
  29. \dd \cw{psocks} will run the provided command as a subprocess. When
  30. the subprocess terminates, \cw{psocks} will terminate as well.
  31. \lcont{
  32. All arguments on the \cw{psocks} command line after \cw{--exec} will be
  33. treated as part of the command to run, even if they look like other
  34. valid \cw{psocks} options.
  35. }
  36. \dt \cw{-d}
  37. \dd Log all traffic to standard error, in a more or less human-readable
  38. form (in addition to messages about connections being opened and
  39. closed, which are always logged).
  40. \dt \cw{-f}
  41. \dd Record all traffic to files. For every incoming connection, two
  42. files are created, \cw{sockout.NNNN} and \cw{sockin.NNNN}, where
  43. \e{NNNN} is a decimal index starting at 0 identifying the proxied
  44. connection. These record, respectively, traffic from the SOCKS client,
  45. and from the server it connected to through the proxy.
  46. \dt \cw{-p} \e{pipe-cmd}
  47. \dd Pipe all traffic to a command. For every incoming connection,
  48. \e{pipe-cmd} is invoked twice:
  49. \lcont{
  50. \c pipe-cmd out N
  51. \e iiiiiiii bbb i
  52. \c pipe-cmd in N
  53. \e iiiiiiii bb i
  54. Each command will run for the direction of a proxied connection, and
  55. have the connection's traffic piped into it, similar to \cw{-f}.
  56. }
  57. \S{psocks-manpage-examples} EXAMPLES
  58. In combination with the \cw{plink}(\e{1}) SSH client, to set up a
  59. reverse dynamic SSH tunnel, in which the remote listening port 1080 on
  60. remote host \cw{myhost} acts as a SOCKS server giving access to your
  61. local network:
  62. \c psocks 12345 --exec plink -R 1080:localhost:12345 user@myhost