dunglas / torcontrol-bundle
PHP TorControl 库在 Symfony 中的集成
v1.0.1
2017-01-25 09:29 UTC
Requires
- php: >=5.4
- dunglas/php-torcontrol: ^1.0
- symfony/config: ^2.3 || ^3.0
- symfony/dependency-injection: ^2.3 || ^3.0
- symfony/http-kernel: ^2.3 || ^3.0
Requires (Dev)
- phpunit/phpunit: ^4.6 || ^5.0
- symfony/finder: ^2.8 || ^3.0
- symfony/framework-bundle: ^2.8 || ^3.0
This package is auto-updated.
Last update: 2024-08-27 02:24:06 UTC
README
使用 PHP TorControl 库 与 Symfony。TorControl 允许控制 Tor 服务器。
安装
使用 Composer 安装此包
composer require dunglas/torcontrol-bundle
将包添加到应用程序内核
$bundles = array( // ... new Dunglas\TorControlBundle\DunglasTorControlBundle(), );
配置
# app/config/config.yml dunglas_tor_control: # Hostname or IP of the Tor server (default to localhost) hostname: ~ # Port (default to 9051) port: ~ # "null" for no authentication, "password" for password auth, "cookie" for cookie file auth (default to autodetect) authmethod: "null" # Password to use if the password auth method is used (no default) password: ~ # Cookie file is this auth method is used (no default) cookiefile: ~ # Connection timeout (default to php.ini setting) timeout: ~
使用方法
// Get an instance of the PHP TorControl library as a service $tc = $this->get('torcontrol');
致谢
此包由 Kévin Dunglas 编写。