README 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. This is chutney. It doesn't do much so far. It isn't ready for prime-time.
  2. If it breaks, you get to keep all the pieces.
  3. It is supposed to be a good tool for:
  4. - Configuring a testing tor network
  5. - Launching and monitoring a testing tor network
  6. - Running tests on a testing tor network
  7. Right now it only sorta does these things.
  8. You will need, at the moment:
  9. - Tor installed somewhere in your path or the location of the 'tor' and
  10. 'tor-gencert' binaries specified through the environment variables
  11. CHUTNEY_TOR and CHUTNEY_TOR_GENCERT, respectively.
  12. - Python 2.7 or later
  13. Stuff to try:
  14. Automated Setup, Verification, and Shutdown:
  15. ./tools/test-network.sh --flavor basic-min
  16. ./tools/test-network.sh --tor-path <tor-build-directory>
  17. ./tools/test-network.sh --coverage
  18. Standard Actions:
  19. ./chutney configure networks/basic
  20. ./chutney start networks/basic
  21. ./chutney status networks/basic
  22. ./chutney verify networks/basic
  23. ./chutney hup networks/basic
  24. ./chutney stop networks/basic
  25. Bandwidth Tests:
  26. ./chutney configure networks/basic-min
  27. ./chutney start networks/basic-min
  28. ./chutney status networks/basic-min
  29. CHUTNEY_DATA_BYTES=104857600 ./chutney verify networks/basic-min
  30. # Send 100MB of data per client connection
  31. # verify produces performance figures for:
  32. # Single Stream Bandwidth: the speed of the slowest stream, end-to-end
  33. # Overall tor Bandwidth: the sum of the bandwidth across each tor instance
  34. # This approximates the CPU-bound tor performance on the current machine,
  35. # assuming everything is multithreaded and network performance is infinite.
  36. ./chutney stop networks/basic-min
  37. Connection Tests:
  38. ./chutney configure networks/basic-025
  39. ./chutney start networks/basic-025
  40. ./chutney status networks/basic-025
  41. CHUTNEY_CONNECTIONS=5 ./chutney verify networks/basic-025
  42. # Make 5 connections from each client through a random exit
  43. ./chutney stop networks/basic-025
  44. Note: If you create 7 or more connections to a hidden service from a single
  45. Tor 0.2.7 client, you'll likely get a verification failure due to #15937.
  46. This is fixed in 0.2.8.
  47. HS Connection Tests:
  48. ./chutney configure networks/hs-025
  49. ./chutney start networks/hs-025
  50. ./chutney status networks/hs-025
  51. CHUTNEY_HS_MULTI_CLIENT=1 ./chutney verify networks/hs-025
  52. # Make a connection from each client to each hs
  53. # Default behavior is one client connects to each HS
  54. ./chutney stop networks/hs-025
  55. Changing the network address:
  56. Chutney defaults to binding to localhost. To change the bind address,
  57. set the CHUTNEY_LISTEN_ADDRESS environment variable. Setting it to some
  58. interface's IP address allows us to make the simulated Tor network
  59. available on the network.
  60. IPv6 support for both Tor and Chutney is a work in progress. If your system
  61. returns IPv6 ::1 as the (first) address for localhost, you might need to
  62. set CHUTNEY_LISTEN_ADDRESS="127.0.0.1" for chutney to work.
  63. The configuration files:
  64. networks/basic holds the configuration for the network you're configuring
  65. above. It refers to some torrc template files in torrc_templates/.
  66. The working files:
  67. chutney sticks its working files, including all data directories, log
  68. files, etc, in ./net/. Each tor instance gets a subdirectory of net/nodes.
  69. You can override the directory "./net" with the CHUTNEY_DATA_DIR
  70. environment variable.
  71. Test scripts:
  72. The test scripts are stored in the "scripts/chutney_tests" directory. These
  73. Python files must define a "run_test(network)" function. Files starting with
  74. an underscore ("_") are ignored.
  75. Test scripts can be run using the following syntax:
  76. ./chutney <script-name> networks/<network-name>
  77. The chutney verify command is implemented using a test script.
  78. Test scripts in the test directory with the same name as standard commands
  79. are run instead of that standard command. This allows expert users to replace
  80. the standard chutney commands with modified versions.