dunglas/torcontrol-bundle

PHP TorControl 库在 Symfony 中的集成

资助包维护!
dunglas

安装: 330

依赖者: 0

建议者: 0

安全: 0

星标: 13

关注者: 4

分支: 0

开放问题: 0

类型:symfony-bundle

v1.0.1 2017-01-25 09:29 UTC

This package is auto-updated.

Last update: 2024-08-27 02:24:06 UTC


README

使用 PHP TorControl 库Symfony。TorControl 允许控制 Tor 服务器。

Build Status SensioLabsInsight StyleCI

安装

使用 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 编写。