Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
language: php

php:
- "5.4"
- "5.5"
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary to support HHVM. However we should run tests with PHP 7.1 and 7.2.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not touch those files.


before_script:
- sudo apt-get update -qq
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ Add php-torcontrol to your `composer.json`:
Usage
-----

When using `password authentication` while controlling TOR, the password must be generated using the command:
`~> tor --hash-password "random_password"`
which will generate a `hashed password` beginning with `16:DEE07A96....` (just an example).
This `hashed password` must be inserted in `/etc/tor/torrc`:
`HashedControlPassword 16:DEE07A96....`

```php
<?php

Expand All @@ -42,7 +48,8 @@ $tc = new TorControl\TorControl(
array(
'hostname' => 'localhost',
'port' => 9051,
'password' => 'MySecr3tPassw0rd',
'password' => 'random_password',
// the original password not the hashed one
'authmethod' => 1
)
);
Expand All @@ -56,10 +63,6 @@ $res = $tc->executeCommand('SIGNAL NEWNYM');

// Echo the server reply code and message
echo $res[0]['code'].': '.$res[0]['message'];

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

// Quit
$tc->quit();

```

Related
Expand Down