Added tor-client to the build
This commit is contained in:
parent
4a44f640e1
commit
7379020ef3
|
@ -1,6 +1,6 @@
|
||||||
/vendor/
|
/vendor/
|
||||||
/.idea/
|
/.idea/
|
||||||
*~
|
*~
|
||||||
/tor-client/
|
|
||||||
/tor*/
|
/tor*/
|
||||||
tor*.tar*
|
tor*.tar*
|
||||||
|
!/tor-client/
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env php
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Sikofitt\Tor\Console\Command\TorDownloadCommand;
|
||||||
|
use Sikofitt\Tor\Console\Command\TorSpiderCommand;
|
||||||
|
use Symfony\Component\Console\Application;
|
||||||
|
|
||||||
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
|
$application = new Application('Tor Spider', '0.0.1');
|
||||||
|
$torDownloadCommand = new TorDownloadCommand();
|
||||||
|
$torDownloadCommand->setBaseDir(dirname(__DIR__));
|
||||||
|
$application->addCommands(array(
|
||||||
|
new TorSpiderCommand(),
|
||||||
|
$torDownloadCommand,
|
||||||
|
));
|
||||||
|
$application->run();
|
|
@ -9,13 +9,20 @@
|
||||||
"email": "sikofitt@gmail.com"
|
"email": "sikofitt@gmail.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Sikofitt\\":"src/Sikofitt"
|
||||||
|
}
|
||||||
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5",
|
"php": ">=5.5",
|
||||||
"megahertz/guzzle-tor": "^1.0",
|
"megahertz/guzzle-tor": "^1.0",
|
||||||
"guzzlehttp/guzzle": "^6.2",
|
"guzzlehttp/guzzle": "^6.2",
|
||||||
"symfony/browser-kit": "^2.8",
|
"symfony/browser-kit": "^2.8",
|
||||||
"symfony/css-selector": "^2.8",
|
"symfony/css-selector": "^2.8",
|
||||||
"symfony/process": "^2.8"
|
"symfony/process": "^2.8",
|
||||||
|
"symfony/dom-crawler": "^2.8",
|
||||||
|
"symfony/console": "^2.8"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "2f77ec5f4f739822ce62a0203bb4d689",
|
"hash": "7a82807babab3d996722517a360f1566",
|
||||||
"content-hash": "20bdacfba5aa47d264eb3fafd1331e1e",
|
"content-hash": "c31f2eb8e902c95a35f2557762156959",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/guzzle",
|
"name": "guzzlehttp/guzzle",
|
||||||
|
@ -273,6 +273,53 @@
|
||||||
],
|
],
|
||||||
"time": "2016-08-06 14:39:51"
|
"time": "2016-08-06 14:39:51"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/log",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/log.git",
|
||||||
|
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||||
|
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Log\\": "Psr/Log/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "http://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for logging libraries",
|
||||||
|
"homepage": "https://github.com/php-fig/log",
|
||||||
|
"keywords": [
|
||||||
|
"log",
|
||||||
|
"psr",
|
||||||
|
"psr-3"
|
||||||
|
],
|
||||||
|
"time": "2016-10-10 12:19:37"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/browser-kit",
|
"name": "symfony/browser-kit",
|
||||||
"version": "v2.8.15",
|
"version": "v2.8.15",
|
||||||
|
@ -330,6 +377,67 @@
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2016-09-06 10:55:00"
|
"time": "2016-09-06 10:55:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/console",
|
||||||
|
"version": "v2.8.15",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/console.git",
|
||||||
|
"reference": "d5643cd095e5e37d31e004bb2606b5dd7e96602f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/console/zipball/d5643cd095e5e37d31e004bb2606b5dd7e96602f",
|
||||||
|
"reference": "d5643cd095e5e37d31e004bb2606b5dd7e96602f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.9",
|
||||||
|
"symfony/debug": "~2.7,>=2.7.2|~3.0.0",
|
||||||
|
"symfony/polyfill-mbstring": "~1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"psr/log": "~1.0",
|
||||||
|
"symfony/event-dispatcher": "~2.1|~3.0.0",
|
||||||
|
"symfony/process": "~2.1|~3.0.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"psr/log": "For using the console logger",
|
||||||
|
"symfony/event-dispatcher": "",
|
||||||
|
"symfony/process": ""
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.8-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\Console\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony Console Component",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"time": "2016-12-06 11:59:35"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
"version": "v2.8.15",
|
"version": "v2.8.15",
|
||||||
|
@ -383,6 +491,63 @@
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2016-11-03 07:52:58"
|
"time": "2016-11-03 07:52:58"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/debug",
|
||||||
|
"version": "v2.8.15",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/debug.git",
|
||||||
|
"reference": "62a68f640456f6761d752c62d81631428ef0d8a1"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/debug/zipball/62a68f640456f6761d752c62d81631428ef0d8a1",
|
||||||
|
"reference": "62a68f640456f6761d752c62d81631428ef0d8a1",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.9",
|
||||||
|
"psr/log": "~1.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/class-loader": "~2.2|~3.0.0",
|
||||||
|
"symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.8-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\Debug\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony Debug Component",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"time": "2016-11-15 12:53:17"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dom-crawler",
|
"name": "symfony/dom-crawler",
|
||||||
"version": "v2.8.15",
|
"version": "v2.8.15",
|
||||||
|
@ -1248,53 +1413,6 @@
|
||||||
],
|
],
|
||||||
"time": "2015-10-02 06:51:40"
|
"time": "2015-10-02 06:51:40"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "psr/log",
|
|
||||||
"version": "1.0.2",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-fig/log.git",
|
|
||||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
|
||||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Psr\\Log\\": "Psr/Log/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "PHP-FIG",
|
|
||||||
"homepage": "http://www.php-fig.org/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Common interface for logging libraries",
|
|
||||||
"homepage": "https://github.com/php-fig/log",
|
|
||||||
"keywords": [
|
|
||||||
"log",
|
|
||||||
"psr",
|
|
||||||
"psr-3"
|
|
||||||
],
|
|
||||||
"time": "2016-10-10 12:19:37"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "sebastian/comparator",
|
"name": "sebastian/comparator",
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
|
@ -1667,124 +1785,6 @@
|
||||||
"homepage": "https://github.com/sebastianbergmann/version",
|
"homepage": "https://github.com/sebastianbergmann/version",
|
||||||
"time": "2015-06-21 13:59:46"
|
"time": "2015-06-21 13:59:46"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "symfony/console",
|
|
||||||
"version": "v2.8.15",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/console.git",
|
|
||||||
"reference": "d5643cd095e5e37d31e004bb2606b5dd7e96602f"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/d5643cd095e5e37d31e004bb2606b5dd7e96602f",
|
|
||||||
"reference": "d5643cd095e5e37d31e004bb2606b5dd7e96602f",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.9",
|
|
||||||
"symfony/debug": "~2.7,>=2.7.2|~3.0.0",
|
|
||||||
"symfony/polyfill-mbstring": "~1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"psr/log": "~1.0",
|
|
||||||
"symfony/event-dispatcher": "~2.1|~3.0.0",
|
|
||||||
"symfony/process": "~2.1|~3.0.0"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"psr/log": "For using the console logger",
|
|
||||||
"symfony/event-dispatcher": "",
|
|
||||||
"symfony/process": ""
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "2.8-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Symfony\\Component\\Console\\": ""
|
|
||||||
},
|
|
||||||
"exclude-from-classmap": [
|
|
||||||
"/Tests/"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Fabien Potencier",
|
|
||||||
"email": "fabien@symfony.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Symfony Community",
|
|
||||||
"homepage": "https://symfony.com/contributors"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Symfony Console Component",
|
|
||||||
"homepage": "https://symfony.com",
|
|
||||||
"time": "2016-12-06 11:59:35"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "symfony/debug",
|
|
||||||
"version": "v2.8.15",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/debug.git",
|
|
||||||
"reference": "62a68f640456f6761d752c62d81631428ef0d8a1"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/debug/zipball/62a68f640456f6761d752c62d81631428ef0d8a1",
|
|
||||||
"reference": "62a68f640456f6761d752c62d81631428ef0d8a1",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.9",
|
|
||||||
"psr/log": "~1.0"
|
|
||||||
},
|
|
||||||
"conflict": {
|
|
||||||
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"symfony/class-loader": "~2.2|~3.0.0",
|
|
||||||
"symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "2.8-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Symfony\\Component\\Debug\\": ""
|
|
||||||
},
|
|
||||||
"exclude-from-classmap": [
|
|
||||||
"/Tests/"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Fabien Potencier",
|
|
||||||
"email": "fabien@symfony.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Symfony Community",
|
|
||||||
"homepage": "https://symfony.com/contributors"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Symfony Debug Component",
|
|
||||||
"homepage": "https://symfony.com",
|
|
||||||
"time": "2016-11-15 12:53:17"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v2.8.15",
|
"version": "v2.8.15",
|
||||||
|
|
14
phpunit.xml
14
phpunit.xml
|
@ -5,16 +5,8 @@
|
||||||
backupGlobals="false"
|
backupGlobals="false"
|
||||||
verbose="true">
|
verbose="true">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="small">
|
<testsuite name="Binary Test">
|
||||||
<directory suffix="Test.php">tests/Framework</directory>
|
<directory suffix="Test.php">tests</directory>
|
||||||
<directory suffix="Test.php">tests/Extensions</directory>
|
|
||||||
<directory suffix="Test.php">tests/Runner</directory>
|
|
||||||
<directory suffix="Test.php">tests/Util</directory>
|
|
||||||
</testsuite>
|
|
||||||
|
|
||||||
<testsuite name="large">
|
|
||||||
<directory suffix=".phpt">tests/TextUI</directory>
|
|
||||||
<directory suffix=".phpt">tests/Regression</directory>
|
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
|
@ -22,7 +14,7 @@
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
<directory suffix=".php">src</directory>
|
<directory suffix=".php">src</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<file>src/Framework/Assert/Functions.php</file>
|
<directory>src</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
264
phpunit.xsd
264
phpunit.xsd
|
@ -1,264 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation source="https://phpunit.de/manual/4.8/en/appendixes.configuration.html">
|
|
||||||
This Schema file defines the rules by which the XML configuration file of PHPUnit 4.8 may be structured.
|
|
||||||
</xs:documentation>
|
|
||||||
<xs:appinfo source="http://www.phpunit.de/manual/current/en/appendixes.configuration.html"/>
|
|
||||||
</xs:annotation>
|
|
||||||
<xs:element name="phpunit" type="phpUnitType">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>Root Element</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
</xs:element>
|
|
||||||
<xs:complexType name="filtersType">
|
|
||||||
<xs:choice>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="blacklist" type="filterType"/>
|
|
||||||
<xs:element name="whitelist" type="whiteListType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="whitelist" type="whiteListType"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:choice>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="filterType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:group ref="pathGroup"/>
|
|
||||||
<xs:element name="exclude" maxOccurs="unbounded" minOccurs="0">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:group ref="pathGroup"/>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="whiteListType">
|
|
||||||
<xs:complexContent>
|
|
||||||
<xs:extension base="filterType">
|
|
||||||
<xs:attribute name="addUncoveredFilesFromWhitelist" default="false" type="xs:boolean"/>
|
|
||||||
<xs:attribute name="processUncoveredFilesFromWhitelist" default="true" type="xs:boolean"/>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:complexContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="groupsType">
|
|
||||||
<xs:choice>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="include" type="groupType"/>
|
|
||||||
<xs:element name="exclude" type="groupType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="exclude" type="groupType"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:choice>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="groupType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="group" type="xs:string" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="listenersType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="listener" type="objectType" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="objectType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="arguments" minOccurs="0">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:group ref="argumentsGroup"/>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="class" type="xs:string" use="required"/>
|
|
||||||
<xs:attribute name="file" type="xs:anyURI"/>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="arrayType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="element" type="argumentType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="argumentType">
|
|
||||||
<xs:group ref="argumentChoice"/>
|
|
||||||
<xs:attribute name="key" use="required"/>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:group name="argumentsGroup">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="null" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:group>
|
|
||||||
<xs:group name="argumentChoice">
|
|
||||||
<xs:choice>
|
|
||||||
<xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="null" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:choice>
|
|
||||||
</xs:group>
|
|
||||||
<xs:complexType name="loggersType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="log" type="loggerType" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="loggerType">
|
|
||||||
<xs:attribute name="type">
|
|
||||||
<xs:simpleType>
|
|
||||||
<xs:restriction base="xs:string">
|
|
||||||
<xs:enumeration value="coverage-html"/>
|
|
||||||
<xs:enumeration value="coverage-text"/>
|
|
||||||
<xs:enumeration value="coverage-clover"/>
|
|
||||||
<xs:enumeration value="coverage-crap4j"/>
|
|
||||||
<xs:enumeration value="coverage-xml"/>
|
|
||||||
<xs:enumeration value="json"/>
|
|
||||||
<xs:enumeration value="plain"/>
|
|
||||||
<xs:enumeration value="tap"/>
|
|
||||||
<xs:enumeration value="junit"/>
|
|
||||||
<xs:enumeration value="testdox-html"/>
|
|
||||||
<xs:enumeration value="testdox-text"/>
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
</xs:attribute>
|
|
||||||
<xs:attribute name="target" type="xs:anyURI"/>
|
|
||||||
<xs:attribute name="lowUpperBound" type="xs:nonNegativeInteger" default="35"/>
|
|
||||||
<xs:attribute name="highLowerBound" type="xs:nonNegativeInteger" default="70"/>
|
|
||||||
<xs:attribute name="logIncompleteSkipped" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="threshold" type="xs:nonNegativeInteger" default="30"/>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:group name="pathGroup">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="directory" type="directoryFilterType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="file" type="fileFilterType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:group>
|
|
||||||
<xs:complexType name="directoryFilterType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:anyURI">
|
|
||||||
<xs:attribute type="xs:string" name="suffix" default="Test.php"/>
|
|
||||||
<xs:attributeGroup ref="phpVersionGroup"/>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="fileFilterType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:anyURI">
|
|
||||||
<xs:attributeGroup ref="phpVersionGroup"/>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:attributeGroup name="phpVersionGroup">
|
|
||||||
<xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/>
|
|
||||||
<xs:attribute name="phpVersionOperator" type="xs:string" default=">="/>
|
|
||||||
</xs:attributeGroup>
|
|
||||||
<xs:complexType name="phpType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:choice maxOccurs="unbounded">
|
|
||||||
<xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:choice>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="namedValueType">
|
|
||||||
<xs:attribute name="name" use="required" type="xs:string"/>
|
|
||||||
<xs:attribute name="value" use="required" type="xs:anySimpleType"/>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="phpUnitType">
|
|
||||||
<xs:annotation>
|
|
||||||
<xs:documentation>The main type specifying the document structure</xs:documentation>
|
|
||||||
</xs:annotation>
|
|
||||||
<xs:group ref="configGroup"/>
|
|
||||||
<xs:attributeGroup ref="configAttributeGroup"/>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:attributeGroup name="configAttributeGroup">
|
|
||||||
<xs:attribute name="backupGlobals" type="xs:boolean" default="true"/>
|
|
||||||
<xs:attribute name="backupStaticAttributes" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="bootstrap" type="xs:anyURI"/>
|
|
||||||
<xs:attribute name="cacheTokens" type="xs:boolean"/>
|
|
||||||
<xs:attribute name="colors" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="columns" type="xs:integer" default="80"/>
|
|
||||||
<xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/>
|
|
||||||
<xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/>
|
|
||||||
<xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/>
|
|
||||||
<xs:attribute name="forceCoversAnnotation" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="mapTestClassNameToCoveredClassName" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="printerClass" type="xs:string" default="PHPUnit_TextUI_ResultPrinter"/>
|
|
||||||
<xs:attribute name="printerFile" type="xs:anyURI"/>
|
|
||||||
<xs:attribute name="processIsolation" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="stopOnError" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="beStrictAboutTestSize" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="checkForUnintentionallyCoveredCode" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="strict" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="testSuiteLoaderClass" type="xs:string" default="PHPUnit_Runner_StandardTestSuiteLoader"/>
|
|
||||||
<xs:attribute name="testSuiteLoaderFile" type="xs:anyURI"/>
|
|
||||||
<xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/>
|
|
||||||
<xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/>
|
|
||||||
<xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/>
|
|
||||||
<xs:attribute name="verbose" type="xs:boolean" default="false"/>
|
|
||||||
<xs:attribute name="stderr" type="xs:boolean" default="false"/>
|
|
||||||
</xs:attributeGroup>
|
|
||||||
<xs:group name="configGroup">
|
|
||||||
<xs:all>
|
|
||||||
<xs:element ref="testSuiteFacet" minOccurs="0"/>
|
|
||||||
<xs:element name="groups" type="groupsType" minOccurs="0"/>
|
|
||||||
<xs:element name="filter" type="filtersType" minOccurs="0"/>
|
|
||||||
<xs:element name="logging" type="loggersType" minOccurs="0"/>
|
|
||||||
<xs:element name="listeners" type="listenersType" minOccurs="0"/>
|
|
||||||
<xs:element name="php" type="phpType" minOccurs="0"/>
|
|
||||||
<xs:element name="selenium" type="seleniumType" minOccurs="0"/>
|
|
||||||
</xs:all>
|
|
||||||
</xs:group>
|
|
||||||
<xs:complexType name="seleniumType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="browser" type="browserType"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="browserType">
|
|
||||||
<xs:attribute name="name" type="xs:string"/>
|
|
||||||
<xs:attribute name="browser" type="xs:string"/>
|
|
||||||
<xs:attribute name="host" type="xs:anyURI"/>
|
|
||||||
<xs:attribute name="port" type="xs:nonNegativeInteger"/>
|
|
||||||
<xs:attribute name="timeout" type="xs:nonNegativeInteger"/>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:element name="testSuiteFacet" abstract="true"/>
|
|
||||||
<xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/>
|
|
||||||
<xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/>
|
|
||||||
<xs:complexType name="testSuitesType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="testSuiteType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:group ref="pathGroup"/>
|
|
||||||
<xs:element name="exclude" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
<xs:attribute name="name" type="xs:string" use="required"/>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:schema>
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: eric
|
||||||
|
* Date: 12/22/16
|
||||||
|
* Time: 4:27 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sikofitt\Tor\Console\Command;
|
||||||
|
|
||||||
|
use GuzzleHttp\Client;
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Symfony\Component\Process\ProcessBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TorDownloadCommand
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @package Sikofitt\Tor\Console\Command
|
||||||
|
*/
|
||||||
|
class TorDownloadCommand extends Command {
|
||||||
|
|
||||||
|
private $downloadUrls = [
|
||||||
|
'linux' => [
|
||||||
|
'file' => 'https://www.torproject.org/dist/tor-0.2.9.8.tar.gz',
|
||||||
|
'filename' => 'tor-0.2.9.8.tar.gz',
|
||||||
|
'sig' => 'https://www.torproject.org/dist/tor-0.2.9.8.tar.gz.asc',
|
||||||
|
'b64' => 'LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSWNCQUFCQWdBR0JRSllWL043QUFvSkVHcis1dFNla3JZQkxPMFAvMGpxYU5GbW0vOVQxOGlUWFE1eWg1SWcKZVNqRENWZndvSFhCSXFjTC9GbGc0dkxGOWlaSEFDNWhTVU5BTjA1VVcrSWRFcllpb1lNSGFpdW5EbGJEdEh3Nwp2N2FRTDY0eHMxaWxJamh5Q0VlWXdqYXU0L0gwci9kVFNvREw1eFozOGpsOFlMY21MVXBmaDFmcWxxb1prbENTCnZDdHc5dDhsb2ppSlVZK1pyNVZCd1hrL2h4LzdEM2tSVzcxRzJBYTh6ODMxMFN3Q1JjRy8xTnh6dElQdlJWczAKeDZFYlorMTk1Zk1CMUwyL0FHeHFDSmdyeGQrekNqRGp2dGh6S0wrbldrTkQrUUk0MStmRTNiWUdFVHRkZ1B0Tgp0WkVlQU9sUVV3Ujl5RW5FbjlQYlpyQzdVZktCaFBtV0hFM3BSNzltUzNVa0ZVcWJXSUVkUVJrcDIvODh4RFpWCi9hbUtMMWdoVCtOUStCMXUrenJQamhvSGFHZzZRaUp0eGQzTTVMdHZjdytjUU1KblZKeFlTdXRYVXA4Y0c0WUIKN2UrQVhyM2szWTg5OTV1MUJ5UC9uYzd6ekdtSnJTZitSV3RuYnN6d01kK0x1RWpjajQ1TUY4MU84WHdlbXVtcwp2anorWGpzWUJPMDJuSXpYVUNKWER6QURGSlJTbEtRWDh2Y0haTXVtOVg2Rnl4eUp6MXF6TFlBL1dkWUtKMjdFCk11Yk9pSzZua3BmR3dRY1pFbFNCcjI3M1hvR01zRlFTTlZ0SHJnNEtiT2wyVm5ha2lObFVJZVlteFdadlkraisKUll3allpcVk4SjVCSDBId1pYcFBNU0MvSGV1d3I4K1o2bFJ2bXVoVDBpQU03cXNYdHJ2YzYwdCtVQ1RQSTU4cgp5L0t1NDI1VThIa1BuSkRpVVdGQwo9THZtOQotLS0tLUVORCBQR1AgU0lHTkFUVVJFLS0tLS0K',
|
||||||
|
],
|
||||||
|
'windows' => [
|
||||||
|
'file' => 'https://www.torproject.org/dist/torbrowser/6.0.8/tor-win32-0.2.8.11.zip',
|
||||||
|
'sig' => 'https://www.torproject.org/dist/torbrowser/6.0.8/tor-win32-0.2.8.11.zip.asc',
|
||||||
|
'b64' => 'LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSWNCQUFCQ2dBR0JRSllUKzF6QUFvSkVDNGF4bzdVQ0JUZ2ZTa1Avamk3aUtMTlR3UUNzNis3eEVDZFc5MkUKbU5QaFNpQ3pqS25nM0E5RCt0Sy9LQlVxOHVueDYvRll5WUQ0UFRpNU50clgvV3BPVU9xU1FZT3VFQmFaTnFuMgovemg0R0o3bi93bHQ0Y3Z0MHZvRXhRanhYMUFwS1lGNGJDb1hJcis2ZkloVlM3Z0ZJREtIVHBOQkZDQy85TExUCjNwbVkwbkhaQkk1SU11R2Jaell6THJWUEU4aWFEa0wzdVNkYUVBT3p3WW5wM29yY1Q4SlJnK04xS1o1MjZ2WGYKaml5NFF1MEV2RVZ6NmtGTmdqV3hTaitldVhlc081b2MvdjZtT1JsVWN4SURybDRGZnBmbjdsS0t3SnhQWS92cQpKc0M2Mlp0cFRjK0luWTJMV1dkVHhRMnpzdEo0bDZGZGxjSFNJd09SZDVKU1M0Um8rZjlBWEh5YjUvNW5nUnZ6CkR2eHRpV29tYTdzTkM2dWVSeHN6STIxRWtNZHdicXd2TWdTNG43R2U3d3ZWY1Z0WFByeEpJL3dITit1SnJYWkIKbmZaVUhaZkdqbENxdkhDS2ZWemVjamFLaVpSYjNiQzZadHNNWkF5UG9RbjlUUzhHTmtweGN4bG4ycHM1cUFqaAp6K0ttemxvTU1jWE93LzJRZ2pDMnJBeWdubTY1N0hHTFRQRFBzdDkwRkdvZmlpdExLVGJBRVpKZktKeTg3U1VvCnRYejhLSGE3WHBqRVhDSG85dVI1STJTMkUvL1o3aUZ6T1JXaTBYUms0S2FPOHNtNlNJK29BKzhUcSsrT2M0OSsKcmN5RlJzdG5QdXF6c1poZXgrZmwwWk9tN3c5RG5VWkpXWUtHak83b0RWQlJzSzZUVi9kZnFVdTVjdVU1ekVWLwpBbTNSRjJHQU5vUUg4TzVFS0Z1Vgo9ZnBPOQotLS0tLUVORCBQR1AgU0lHTkFUVVJFLS0tLS0K',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
private $baseDir;
|
||||||
|
|
||||||
|
public function setBaseDir($baseDir) {
|
||||||
|
$this->baseDir = $baseDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configure() {
|
||||||
|
$this->setName('tor:download')
|
||||||
|
->setAliases(array('download'))
|
||||||
|
->setDescription('Downloads the tor client');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function execute(InputInterface $input, OutputInterface $output)
|
||||||
|
{
|
||||||
|
if(false === file_exists($this->baseDir . '/' . $this->downloadUrls['linux']['filename']))
|
||||||
|
{
|
||||||
|
$guzzle = new Client();
|
||||||
|
$file = $guzzle->get($this->downloadUrls['linux']['file']);
|
||||||
|
file_put_contents($this->baseDir . '/' . $this->downloadUrls['linux']['filename'], $file->getBody()->getContents());
|
||||||
|
}
|
||||||
|
|
||||||
|
$tar = new ProcessBuilder();
|
||||||
|
$tar->setPrefix('/bin/tar')
|
||||||
|
->setWorkingDirectory($this->baseDir)
|
||||||
|
->setArguments(array('-zxvf', $this->downloadUrls['linux']['filename']));
|
||||||
|
$process = $tar->getProcess();
|
||||||
|
$process->run();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: eric
|
||||||
|
* Date: 12/22/16
|
||||||
|
* Time: 4:22 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sikofitt\Tor\Console\Command;
|
||||||
|
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TorSpiderCommand
|
||||||
|
* https://www.torproject.org/dist/tor-0.2.9.8.tar.gz
|
||||||
|
* https://www.torproject.org/dist/tor-0.2.9.8.tar.gz.asc
|
||||||
|
* https://www.torproject.org/dist/torbrowser/6.0.8/tor-win32-0.2.8.11.zip
|
||||||
|
* https://www.torproject.org/dist/torbrowser/6.0.8/tor-win32-0.2.8.11.zip.asc
|
||||||
|
* @package Sikofitt\Tor\Console\Command
|
||||||
|
*/
|
||||||
|
class TorSpiderCommand extends Command {
|
||||||
|
|
||||||
|
public function configure() {
|
||||||
|
$this->setName('tor:spider')
|
||||||
|
->setDescription('Spiders a url')
|
||||||
|
->setAliases(['tor', 'spider']);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: eric
|
||||||
|
* Date: 12/22/16
|
||||||
|
* Time: 3:47 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sikofitt\Tor;
|
||||||
|
|
||||||
|
|
||||||
|
class TorBinary extends \SplFileInfo {
|
||||||
|
|
||||||
|
public function __construct($fileName) {
|
||||||
|
parent::__construct($fileName);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: eric
|
||||||
|
* Date: 12/22/16
|
||||||
|
* Time: 3:41 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sikofitt\Tor;
|
||||||
|
|
||||||
|
|
||||||
|
class TorLocator {
|
||||||
|
|
||||||
|
private $locations;
|
||||||
|
private $torBinary;
|
||||||
|
|
||||||
|
public function __construct($path = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(null === $path) {
|
||||||
|
$this->locations = array(
|
||||||
|
'/usr/bin',
|
||||||
|
'/usr/local/bin',
|
||||||
|
);
|
||||||
|
} elseif(is_string($path)) {
|
||||||
|
$this->locations = array($path);
|
||||||
|
} elseif(is_array($path)) {
|
||||||
|
$this->locations = $path;
|
||||||
|
} elseif(is_object($path)) {
|
||||||
|
$this->locations = (array)$path;
|
||||||
|
} else {
|
||||||
|
throw new \Exception('Can\'t use $path');
|
||||||
|
}
|
||||||
|
$this->torBinary = $this->locate();
|
||||||
|
|
||||||
|
if(false === $this->torBinary) {
|
||||||
|
throw new \Exception('Couldn\'t find the tor binary.');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Sikofitt\Tor\TorBinary
|
||||||
|
*/
|
||||||
|
public function getBinary()
|
||||||
|
{
|
||||||
|
return new TorBinary($this->torBinary);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function locate()
|
||||||
|
{
|
||||||
|
foreach($this->locations as $location) {
|
||||||
|
$torExecutable = sprintf('%s/tor', $location);
|
||||||
|
if(false === file_exists($torExecutable) && false === is_executable($torExecutable)) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
return $torExecutable;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Sikofitt\Tor\TorLocator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TorLocatorTest
|
||||||
|
*/
|
||||||
|
class TorLocatorTest extends PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
|
private $torExecutableDir;
|
||||||
|
private $torExecutableFailureDir;
|
||||||
|
|
||||||
|
public function setUp() {
|
||||||
|
$this->torExecutableDir = __DIR__ . '/../tor-client/bin';
|
||||||
|
$this->torExecutableFailureDir = '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testLocatorSuccess()
|
||||||
|
{
|
||||||
|
|
||||||
|
$locator = new TorLocator($this->torExecutableDir);
|
||||||
|
$torBinary = $locator->getBinary();
|
||||||
|
$testBinary = new \SplFileInfo(__DIR__ . '/../tor-client/bin/tor');
|
||||||
|
|
||||||
|
$this->assertSame($testBinary->getRealPath(), $torBinary->getRealPath());
|
||||||
|
$this->assertSame(__DIR__ . '/../tor-client/bin', $torBinary->getPath());
|
||||||
|
$this->assertSame(__DIR__ . '/../tor-client/bin/tor', $torBinary->getPathname());
|
||||||
|
$this->assertTrue($torBinary->isExecutable(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testLocatorAutoResolveSuccess()
|
||||||
|
{
|
||||||
|
|
||||||
|
$locator = new TorLocator();
|
||||||
|
$torBinary = $locator->getBinary();
|
||||||
|
$this->assertSame('/usr/bin/tor', $torBinary->getPathname());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testLocatorFailureWithCatch() {
|
||||||
|
|
||||||
|
try {
|
||||||
|
$locator = new TorLocator($this->torExecutableFailureDir);
|
||||||
|
$torBinary = $locator->getBinary();
|
||||||
|
} catch(\Exception $e) {
|
||||||
|
$this->assertSame('Couldn\'t find the tor binary.', $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @expectedException \Exception
|
||||||
|
*/
|
||||||
|
public function testLocatorFailure()
|
||||||
|
{
|
||||||
|
|
||||||
|
$locator = new TorLocator($this->torExecutableFailureDir);
|
||||||
|
$torBinary = $locator->getBinary();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: eric
|
||||||
|
* Date: 12/22/16
|
||||||
|
* Time: 3:53 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
require 'vendor/autoload.php';
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,61 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# This script used to call (the now deprecated) tsocks as a fallback in case
|
||||||
|
# torsocks wasn't installed.
|
||||||
|
# Now, it's just a backwards compatible shim around torsocks with reasonable
|
||||||
|
# behavior if -v/--verbose or -h/--help arguments are passed.
|
||||||
|
#
|
||||||
|
# Copyright (c) 2004, 2006, 2009 Peter Palfrader
|
||||||
|
# Modified by Jacob Appelbaum <jacob@appelbaum.net> April 16th 2006
|
||||||
|
# Stripped of all the tsocks cruft by ugh on February 22nd 2012
|
||||||
|
# May be distributed under the same terms as Tor itself
|
||||||
|
|
||||||
|
|
||||||
|
compat() {
|
||||||
|
echo "torify is now just a wrapper around torsocks(1) for backwards compatibility."
|
||||||
|
}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
compat
|
||||||
|
echo "Usage: $0 [-hv] <command> [<options>...]"
|
||||||
|
}
|
||||||
|
|
||||||
|
case $# in 0)
|
||||||
|
usage >&2
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $# in 1)
|
||||||
|
case $1 in -h|--help)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
esac
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $1 in -v|--verbose)
|
||||||
|
compat >&2
|
||||||
|
shift
|
||||||
|
esac
|
||||||
|
|
||||||
|
# taken from Debian's Developer's Reference, 6.4
|
||||||
|
pathfind() {
|
||||||
|
OLDIFS="$IFS"
|
||||||
|
IFS=:
|
||||||
|
for p in $PATH; do
|
||||||
|
if [ -x "$p/$*" ]; then
|
||||||
|
IFS="$OLDIFS"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$OLDIFS"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if pathfind torsocks; then
|
||||||
|
exec torsocks "$@"
|
||||||
|
echo "$0: Failed to exec torsocks $@" >&2
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "$0: torsocks not found in your PATH. Perhaps it isn't installed? (tsocks is no longer supported, for security reasons.)" >&2
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,206 @@
|
||||||
|
## Configuration file for a typical Tor user
|
||||||
|
## Last updated 22 September 2015 for Tor 0.2.7.3-alpha.
|
||||||
|
## (may or may not work for much older or much newer versions of Tor.)
|
||||||
|
##
|
||||||
|
## Lines that begin with "## " try to explain what's going on. Lines
|
||||||
|
## that begin with just "#" are disabled commands: you can enable them
|
||||||
|
## by removing the "#" symbol.
|
||||||
|
##
|
||||||
|
## See 'man tor', or https://www.torproject.org/docs/tor-manual.html,
|
||||||
|
## for more options you can use in this file.
|
||||||
|
##
|
||||||
|
## Tor will look for this file in various places based on your platform:
|
||||||
|
## https://www.torproject.org/docs/faq#torrc
|
||||||
|
|
||||||
|
## Tor opens a SOCKS proxy on port 9050 by default -- even if you don't
|
||||||
|
## configure one below. Set "SOCKSPort 0" if you plan to run Tor only
|
||||||
|
## as a relay, and not make any local application connections yourself.
|
||||||
|
#SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections.
|
||||||
|
#SOCKSPort 192.168.0.1:9100 # Bind to this address:port too.
|
||||||
|
|
||||||
|
## Entry policies to allow/deny SOCKS requests based on IP address.
|
||||||
|
## First entry that matches wins. If no SOCKSPolicy is set, we accept
|
||||||
|
## all (and only) requests that reach a SOCKSPort. Untrusted users who
|
||||||
|
## can access your SOCKSPort may be able to learn about the connections
|
||||||
|
## you make.
|
||||||
|
#SOCKSPolicy accept 192.168.0.0/16
|
||||||
|
#SOCKSPolicy accept6 FC00::/7
|
||||||
|
#SOCKSPolicy reject *
|
||||||
|
|
||||||
|
## Logs go to stdout at level "notice" unless redirected by something
|
||||||
|
## else, like one of the below lines. You can have as many Log lines as
|
||||||
|
## you want.
|
||||||
|
##
|
||||||
|
## We advise using "notice" in most cases, since anything more verbose
|
||||||
|
## may provide sensitive information to an attacker who obtains the logs.
|
||||||
|
##
|
||||||
|
## Send all messages of level 'notice' or higher to /home/eric/projects/tor/tor-0.2.9.8/../tor-client/var/log/tor/notices.log
|
||||||
|
#Log notice file /home/eric/projects/tor/tor-0.2.9.8/../tor-client/var/log/tor/notices.log
|
||||||
|
## Send every possible message to /home/eric/projects/tor/tor-0.2.9.8/../tor-client/var/log/tor/debug.log
|
||||||
|
#Log debug file /home/eric/projects/tor/tor-0.2.9.8/../tor-client/var/log/tor/debug.log
|
||||||
|
## Use the system log instead of Tor's logfiles
|
||||||
|
#Log notice syslog
|
||||||
|
## To send all messages to stderr:
|
||||||
|
#Log debug stderr
|
||||||
|
|
||||||
|
## Uncomment this to start the process in the background... or use
|
||||||
|
## --runasdaemon 1 on the command line. This is ignored on Windows;
|
||||||
|
## see the FAQ entry if you want Tor to run as an NT service.
|
||||||
|
#RunAsDaemon 1
|
||||||
|
|
||||||
|
## The directory for keeping all the keys/etc. By default, we store
|
||||||
|
## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
|
||||||
|
#DataDirectory /home/eric/projects/tor/tor-0.2.9.8/../tor-client/var/lib/tor
|
||||||
|
|
||||||
|
## The port on which Tor will listen for local connections from Tor
|
||||||
|
## controller applications, as documented in control-spec.txt.
|
||||||
|
#ControlPort 9051
|
||||||
|
## If you enable the controlport, be sure to enable one of these
|
||||||
|
## authentication methods, to prevent attackers from accessing it.
|
||||||
|
#HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C
|
||||||
|
#CookieAuthentication 1
|
||||||
|
|
||||||
|
############### This section is just for location-hidden services ###
|
||||||
|
|
||||||
|
## Once you have configured a hidden service, you can look at the
|
||||||
|
## contents of the file ".../hidden_service/hostname" for the address
|
||||||
|
## to tell people.
|
||||||
|
##
|
||||||
|
## HiddenServicePort x y:z says to redirect requests on port x to the
|
||||||
|
## address y:z.
|
||||||
|
|
||||||
|
#HiddenServiceDir /home/eric/projects/tor/tor-0.2.9.8/../tor-client/var/lib/tor/hidden_service/
|
||||||
|
#HiddenServicePort 80 127.0.0.1:80
|
||||||
|
|
||||||
|
#HiddenServiceDir /home/eric/projects/tor/tor-0.2.9.8/../tor-client/var/lib/tor/other_hidden_service/
|
||||||
|
#HiddenServicePort 80 127.0.0.1:80
|
||||||
|
#HiddenServicePort 22 127.0.0.1:22
|
||||||
|
|
||||||
|
################ This section is just for relays #####################
|
||||||
|
#
|
||||||
|
## See https://www.torproject.org/docs/tor-doc-relay for details.
|
||||||
|
|
||||||
|
## Required: what port to advertise for incoming Tor connections.
|
||||||
|
#ORPort 9001
|
||||||
|
## If you want to listen on a port other than the one advertised in
|
||||||
|
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
|
||||||
|
## follows. You'll need to do ipchains or other port forwarding
|
||||||
|
## yourself to make this work.
|
||||||
|
#ORPort 443 NoListen
|
||||||
|
#ORPort 127.0.0.1:9090 NoAdvertise
|
||||||
|
|
||||||
|
## The IP address or full DNS name for incoming connections to your
|
||||||
|
## relay. Leave commented out and Tor will guess.
|
||||||
|
#Address noname.example.com
|
||||||
|
|
||||||
|
## If you have multiple network interfaces, you can specify one for
|
||||||
|
## outgoing traffic to use.
|
||||||
|
# OutboundBindAddress 10.0.0.5
|
||||||
|
|
||||||
|
## A handle for your relay, so people don't have to refer to it by key.
|
||||||
|
## Nicknames must be between 1 and 19 characters inclusive, and must
|
||||||
|
## contain only the characters [a-zA-Z0-9].
|
||||||
|
#Nickname ididnteditheconfig
|
||||||
|
|
||||||
|
## Define these to limit how much relayed traffic you will allow. Your
|
||||||
|
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
||||||
|
## be at least 75 kilobytes per second.
|
||||||
|
## Note that units for these config options are bytes (per second), not
|
||||||
|
## bits (per second), and that prefixes are binary prefixes, i.e. 2^10,
|
||||||
|
## 2^20, etc.
|
||||||
|
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
||||||
|
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
||||||
|
|
||||||
|
## Use these to restrict the maximum traffic per day, week, or month.
|
||||||
|
## Note that this threshold applies separately to sent and received bytes,
|
||||||
|
## not to their sum: setting "40 GB" may allow up to 80 GB total before
|
||||||
|
## hibernating.
|
||||||
|
##
|
||||||
|
## Set a maximum of 40 gigabytes each way per period.
|
||||||
|
#AccountingMax 40 GBytes
|
||||||
|
## Each period starts daily at midnight (AccountingMax is per day)
|
||||||
|
#AccountingStart day 00:00
|
||||||
|
## Each period starts on the 3rd of the month at 15:00 (AccountingMax
|
||||||
|
## is per month)
|
||||||
|
#AccountingStart month 3 15:00
|
||||||
|
|
||||||
|
## Administrative contact information for this relay or bridge. This line
|
||||||
|
## can be used to contact you if your relay or bridge is misconfigured or
|
||||||
|
## something else goes wrong. Note that we archive and publish all
|
||||||
|
## descriptors containing these lines and that Google indexes them, so
|
||||||
|
## spammers might also collect them. You may want to obscure the fact that
|
||||||
|
## it's an email address and/or generate a new address for this purpose.
|
||||||
|
#ContactInfo Random Person <nobody AT example dot com>
|
||||||
|
## You might also include your PGP or GPG fingerprint if you have one:
|
||||||
|
#ContactInfo 0xFFFFFFFF Random Person <nobody AT example dot com>
|
||||||
|
|
||||||
|
## Uncomment this to mirror directory information for others. Please do
|
||||||
|
## if you have enough bandwidth.
|
||||||
|
#DirPort 9030 # what port to advertise for directory connections
|
||||||
|
## If you want to listen on a port other than the one advertised in
|
||||||
|
## DirPort (e.g. to advertise 80 but bind to 9091), you can do it as
|
||||||
|
## follows. below too. You'll need to do ipchains or other port
|
||||||
|
## forwarding yourself to make this work.
|
||||||
|
#DirPort 80 NoListen
|
||||||
|
#DirPort 127.0.0.1:9091 NoAdvertise
|
||||||
|
## Uncomment to return an arbitrary blob of html on your DirPort. Now you
|
||||||
|
## can explain what Tor is if anybody wonders why your IP address is
|
||||||
|
## contacting them. See contrib/tor-exit-notice.html in Tor's source
|
||||||
|
## distribution for a sample.
|
||||||
|
#DirPortFrontPage /home/eric/projects/tor/tor-0.2.9.8/../tor-client/etc/tor/tor-exit-notice.html
|
||||||
|
|
||||||
|
## Uncomment this if you run more than one Tor relay, and add the identity
|
||||||
|
## key fingerprint of each Tor relay you control, even if they're on
|
||||||
|
## different networks. You declare it here so Tor clients can avoid
|
||||||
|
## using more than one of your relays in a single circuit. See
|
||||||
|
## https://www.torproject.org/docs/faq#MultipleRelays
|
||||||
|
## However, you should never include a bridge's fingerprint here, as it would
|
||||||
|
## break its concealability and potentially reveal its IP/TCP address.
|
||||||
|
#MyFamily $keyid,$keyid,...
|
||||||
|
|
||||||
|
## A comma-separated list of exit policies. They're considered first
|
||||||
|
## to last, and the first match wins.
|
||||||
|
##
|
||||||
|
## If you want to allow the same ports on IPv4 and IPv6, write your rules
|
||||||
|
## using accept/reject *. If you want to allow different ports on IPv4 and
|
||||||
|
## IPv6, write your IPv6 rules using accept6/reject6 *6, and your IPv4 rules
|
||||||
|
## using accept/reject *4.
|
||||||
|
##
|
||||||
|
## If you want to _replace_ the default exit policy, end this with either a
|
||||||
|
## reject *:* or an accept *:*. Otherwise, you're _augmenting_ (prepending to)
|
||||||
|
## the default exit policy. Leave commented to just use the default, which is
|
||||||
|
## described in the man page or at
|
||||||
|
## https://www.torproject.org/documentation.html
|
||||||
|
##
|
||||||
|
## Look at https://www.torproject.org/faq-abuse.html#TypicalAbuses
|
||||||
|
## for issues you might encounter if you use the default exit policy.
|
||||||
|
##
|
||||||
|
## If certain IPs and ports are blocked externally, e.g. by your firewall,
|
||||||
|
## you should update your exit policy to reflect this -- otherwise Tor
|
||||||
|
## users will be told that those destinations are down.
|
||||||
|
##
|
||||||
|
## For security, by default Tor rejects connections to private (local)
|
||||||
|
## networks, including to the configured primary public IPv4 and IPv6 addresses,
|
||||||
|
## and any public IPv4 and IPv6 addresses on any interface on the relay.
|
||||||
|
## See the man page entry for ExitPolicyRejectPrivate if you want to allow
|
||||||
|
## "exit enclaving".
|
||||||
|
##
|
||||||
|
#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports on IPv4 and IPv6 but no more
|
||||||
|
#ExitPolicy accept *:119 # accept nntp ports on IPv4 and IPv6 as well as default exit policy
|
||||||
|
#ExitPolicy accept *4:119 # accept nntp ports on IPv4 only as well as default exit policy
|
||||||
|
#ExitPolicy accept6 *6:119 # accept nntp ports on IPv6 only as well as default exit policy
|
||||||
|
#ExitPolicy reject *:* # no exits allowed
|
||||||
|
|
||||||
|
## Bridge relays (or "bridges") are Tor relays that aren't listed in the
|
||||||
|
## main directory. Since there is no complete public list of them, even an
|
||||||
|
## ISP that filters connections to all the known Tor relays probably
|
||||||
|
## won't be able to block all the bridges. Also, websites won't treat you
|
||||||
|
## differently because they won't know you're running Tor. If you can
|
||||||
|
## be a real relay, please do; but if not, be a bridge!
|
||||||
|
#BridgeRelay 1
|
||||||
|
## By default, Tor will advertise your bridge to users through various
|
||||||
|
## mechanisms like https://bridges.torproject.org/. If you want to run
|
||||||
|
## a private bridge, for example because you'll give out your bridge
|
||||||
|
## address manually to your friends, uncomment this line:
|
||||||
|
#PublishServerDescriptor 0
|
||||||
|
|
|
@ -0,0 +1,897 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
|
||||||
|
<meta name="generator" content="AsciiDoc 8.6.8" />
|
||||||
|
<title>tor-gencert(1)</title>
|
||||||
|
<style type="text/css">
|
||||||
|
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
|
||||||
|
|
||||||
|
/* Default font. */
|
||||||
|
body {
|
||||||
|
font-family: Georgia,serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Title font. */
|
||||||
|
h1, h2, h3, h4, h5, h6,
|
||||||
|
div.title, caption.title,
|
||||||
|
thead, p.table.header,
|
||||||
|
#toctitle,
|
||||||
|
#author, #revnumber, #revdate, #revremark,
|
||||||
|
#footer {
|
||||||
|
font-family: Arial,Helvetica,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 1em 5% 1em 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: blue;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
a:visited {
|
||||||
|
color: fuchsia;
|
||||||
|
}
|
||||||
|
|
||||||
|
em {
|
||||||
|
font-style: italic;
|
||||||
|
color: navy;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #083194;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: #527bbd;
|
||||||
|
margin-top: 1.2em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3 {
|
||||||
|
border-bottom: 2px solid silver;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
h3 + * {
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
h5 {
|
||||||
|
font-size: 1.0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sectionbody {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border: 1px solid silver;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol, li > p {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
ul > li { color: #aaa; }
|
||||||
|
ul > li > * { color: black; }
|
||||||
|
|
||||||
|
.monospaced, code, pre {
|
||||||
|
font-family: "Courier New", Courier, monospace;
|
||||||
|
font-size: inherit;
|
||||||
|
color: navy;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#author {
|
||||||
|
color: #527bbd;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
#email {
|
||||||
|
}
|
||||||
|
#revnumber, #revdate, #revremark {
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
font-size: small;
|
||||||
|
border-top: 2px solid silver;
|
||||||
|
padding-top: 0.5em;
|
||||||
|
margin-top: 4.0em;
|
||||||
|
}
|
||||||
|
#footer-text {
|
||||||
|
float: left;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
#footer-badges {
|
||||||
|
float: right;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#preamble {
|
||||||
|
margin-top: 1.5em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
div.imageblock, div.exampleblock, div.verseblock,
|
||||||
|
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
||||||
|
div.admonitionblock {
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
div.admonitionblock {
|
||||||
|
margin-top: 2.0em;
|
||||||
|
margin-bottom: 2.0em;
|
||||||
|
margin-right: 10%;
|
||||||
|
color: #606060;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.content { /* Block element content. */
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Block element titles. */
|
||||||
|
div.title, caption.title {
|
||||||
|
color: #527bbd;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: left;
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
div.title + * {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td div.title:first-child {
|
||||||
|
margin-top: 0.0em;
|
||||||
|
}
|
||||||
|
div.content div.title:first-child {
|
||||||
|
margin-top: 0.0em;
|
||||||
|
}
|
||||||
|
div.content + div.title {
|
||||||
|
margin-top: 0.0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sidebarblock > div.content {
|
||||||
|
background: #ffffee;
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-left: 4px solid #f0f0f0;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.listingblock > div.content {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-left: 5px solid #f0f0f0;
|
||||||
|
background: #f8f8f8;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.quoteblock, div.verseblock {
|
||||||
|
padding-left: 1.0em;
|
||||||
|
margin-left: 1.0em;
|
||||||
|
margin-right: 10%;
|
||||||
|
border-left: 5px solid #f0f0f0;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.quoteblock > div.attribution {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.verseblock > pre.content {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
div.verseblock > div.attribution {
|
||||||
|
padding-top: 0.75em;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
|
||||||
|
div.verseblock + div.attribution {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admonitionblock .icon {
|
||||||
|
vertical-align: top;
|
||||||
|
font-size: 1.1em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: underline;
|
||||||
|
color: #527bbd;
|
||||||
|
padding-right: 0.5em;
|
||||||
|
}
|
||||||
|
div.admonitionblock td.content {
|
||||||
|
padding-left: 0.5em;
|
||||||
|
border-left: 3px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.exampleblock > div.content {
|
||||||
|
border-left: 3px solid #dddddd;
|
||||||
|
padding-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.imageblock div.content { padding-left: 0; }
|
||||||
|
span.image img { border-style: none; }
|
||||||
|
a.image:visited { color: white; }
|
||||||
|
|
||||||
|
dl {
|
||||||
|
margin-top: 0.8em;
|
||||||
|
margin-bottom: 0.8em;
|
||||||
|
}
|
||||||
|
dt {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-style: normal;
|
||||||
|
color: navy;
|
||||||
|
}
|
||||||
|
dd > *:first-child {
|
||||||
|
margin-top: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
list-style-position: outside;
|
||||||
|
}
|
||||||
|
ol.arabic {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
ol.loweralpha {
|
||||||
|
list-style-type: lower-alpha;
|
||||||
|
}
|
||||||
|
ol.upperalpha {
|
||||||
|
list-style-type: upper-alpha;
|
||||||
|
}
|
||||||
|
ol.lowerroman {
|
||||||
|
list-style-type: lower-roman;
|
||||||
|
}
|
||||||
|
ol.upperroman {
|
||||||
|
list-style-type: upper-roman;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.compact ul, div.compact ol,
|
||||||
|
div.compact p, div.compact p,
|
||||||
|
div.compact div, div.compact div {
|
||||||
|
margin-top: 0.1em;
|
||||||
|
margin-bottom: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
tfoot {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
td > div.verse {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.hdlist {
|
||||||
|
margin-top: 0.8em;
|
||||||
|
margin-bottom: 0.8em;
|
||||||
|
}
|
||||||
|
div.hdlist tr {
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
dt.hdlist1.strong, td.hdlist1.strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
td.hdlist1 {
|
||||||
|
vertical-align: top;
|
||||||
|
font-style: normal;
|
||||||
|
padding-right: 0.8em;
|
||||||
|
color: navy;
|
||||||
|
}
|
||||||
|
td.hdlist2 {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
div.hdlist.compact tr {
|
||||||
|
margin: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment {
|
||||||
|
background: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footnote, .footnoteref {
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.footnote, span.footnoteref {
|
||||||
|
vertical-align: super;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footnotes {
|
||||||
|
margin: 20px 0 20px 0;
|
||||||
|
padding: 7px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footnotes div.footnote {
|
||||||
|
margin: 0 0 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footnotes hr {
|
||||||
|
border: none;
|
||||||
|
border-top: 1px solid silver;
|
||||||
|
height: 1px;
|
||||||
|
text-align: left;
|
||||||
|
margin-left: 0;
|
||||||
|
width: 20%;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.colist td {
|
||||||
|
padding-right: 0.5em;
|
||||||
|
padding-bottom: 0.3em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
div.colist td img {
|
||||||
|
margin-top: 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
#footer-badges { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#toc {
|
||||||
|
margin-bottom: 2.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toctitle {
|
||||||
|
color: #527bbd;
|
||||||
|
font-size: 1.1em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
div.toclevel2 {
|
||||||
|
margin-left: 2em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
div.toclevel3 {
|
||||||
|
margin-left: 4em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
div.toclevel4 {
|
||||||
|
margin-left: 6em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.aqua { color: aqua; }
|
||||||
|
span.black { color: black; }
|
||||||
|
span.blue { color: blue; }
|
||||||
|
span.fuchsia { color: fuchsia; }
|
||||||
|
span.gray { color: gray; }
|
||||||
|
span.green { color: green; }
|
||||||
|
span.lime { color: lime; }
|
||||||
|
span.maroon { color: maroon; }
|
||||||
|
span.navy { color: navy; }
|
||||||
|
span.olive { color: olive; }
|
||||||
|
span.purple { color: purple; }
|
||||||
|
span.red { color: red; }
|
||||||
|
span.silver { color: silver; }
|
||||||
|
span.teal { color: teal; }
|
||||||
|
span.white { color: white; }
|
||||||
|
span.yellow { color: yellow; }
|
||||||
|
|
||||||
|
span.aqua-background { background: aqua; }
|
||||||
|
span.black-background { background: black; }
|
||||||
|
span.blue-background { background: blue; }
|
||||||
|
span.fuchsia-background { background: fuchsia; }
|
||||||
|
span.gray-background { background: gray; }
|
||||||
|
span.green-background { background: green; }
|
||||||
|
span.lime-background { background: lime; }
|
||||||
|
span.maroon-background { background: maroon; }
|
||||||
|
span.navy-background { background: navy; }
|
||||||
|
span.olive-background { background: olive; }
|
||||||
|
span.purple-background { background: purple; }
|
||||||
|
span.red-background { background: red; }
|
||||||
|
span.silver-background { background: silver; }
|
||||||
|
span.teal-background { background: teal; }
|
||||||
|
span.white-background { background: white; }
|
||||||
|
span.yellow-background { background: yellow; }
|
||||||
|
|
||||||
|
span.big { font-size: 2em; }
|
||||||
|
span.small { font-size: 0.6em; }
|
||||||
|
|
||||||
|
span.underline { text-decoration: underline; }
|
||||||
|
span.overline { text-decoration: overline; }
|
||||||
|
span.line-through { text-decoration: line-through; }
|
||||||
|
|
||||||
|
div.unbreakable { page-break-inside: avoid; }
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xhtml11 specific
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
div.tableblock {
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
div.tableblock > table {
|
||||||
|
border: 3px solid #527bbd;
|
||||||
|
}
|
||||||
|
thead, p.table.header {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #527bbd;
|
||||||
|
}
|
||||||
|
p.table {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
/* Because the table frame attribute is overriden by CSS in most browsers. */
|
||||||
|
div.tableblock > table[frame="void"] {
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
div.tableblock > table[frame="hsides"] {
|
||||||
|
border-left-style: none;
|
||||||
|
border-right-style: none;
|
||||||
|
}
|
||||||
|
div.tableblock > table[frame="vsides"] {
|
||||||
|
border-top-style: none;
|
||||||
|
border-bottom-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* html5 specific
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
table.tableblock {
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
thead, p.tableblock.header {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #527bbd;
|
||||||
|
}
|
||||||
|
p.tableblock {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
table.tableblock {
|
||||||
|
border-width: 3px;
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #527bbd;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
th.tableblock, td.tableblock {
|
||||||
|
border-width: 1px;
|
||||||
|
padding: 4px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #527bbd;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.tableblock.frame-topbot {
|
||||||
|
border-left-style: hidden;
|
||||||
|
border-right-style: hidden;
|
||||||
|
}
|
||||||
|
table.tableblock.frame-sides {
|
||||||
|
border-top-style: hidden;
|
||||||
|
border-bottom-style: hidden;
|
||||||
|
}
|
||||||
|
table.tableblock.frame-none {
|
||||||
|
border-style: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
th.tableblock.halign-left, td.tableblock.halign-left {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
th.tableblock.halign-center, td.tableblock.halign-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
th.tableblock.halign-right, td.tableblock.halign-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
th.tableblock.valign-top, td.tableblock.valign-top {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
th.tableblock.valign-middle, td.tableblock.valign-middle {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* manpage specific
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
body.manpage h1 {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
border-top: 2px solid silver;
|
||||||
|
border-bottom: 2px solid silver;
|
||||||
|
}
|
||||||
|
body.manpage h2 {
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
body.manpage div.sectionbody {
|
||||||
|
margin-left: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
body.manpage div#toc { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
/*<![CDATA[*/
|
||||||
|
var asciidoc = { // Namespace.
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
// Table Of Contents generator
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/* Author: Mihai Bazon, September 2002
|
||||||
|
* http://students.infoiasi.ro/~mishoo
|
||||||
|
*
|
||||||
|
* Table Of Content generator
|
||||||
|
* Version: 0.4
|
||||||
|
*
|
||||||
|
* Feel free to use this script under the terms of the GNU General Public
|
||||||
|
* License, as long as you do not remove or alter this notice.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* modified by Troy D. Hanson, September 2006. License: GPL */
|
||||||
|
/* modified by Stuart Rackham, 2006, 2009. License: GPL */
|
||||||
|
|
||||||
|
// toclevels = 1..4.
|
||||||
|
toc: function (toclevels) {
|
||||||
|
|
||||||
|
function getText(el) {
|
||||||
|
var text = "";
|
||||||
|
for (var i = el.firstChild; i != null; i = i.nextSibling) {
|
||||||
|
if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
|
||||||
|
text += i.data;
|
||||||
|
else if (i.firstChild != null)
|
||||||
|
text += getText(i);
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
function TocEntry(el, text, toclevel) {
|
||||||
|
this.element = el;
|
||||||
|
this.text = text;
|
||||||
|
this.toclevel = toclevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
function tocEntries(el, toclevels) {
|
||||||
|
var result = new Array;
|
||||||
|
var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
|
||||||
|
// Function that scans the DOM tree for header elements (the DOM2
|
||||||
|
// nodeIterator API would be a better technique but not supported by all
|
||||||
|
// browsers).
|
||||||
|
var iterate = function (el) {
|
||||||
|
for (var i = el.firstChild; i != null; i = i.nextSibling) {
|
||||||
|
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
|
||||||
|
var mo = re.exec(i.tagName);
|
||||||
|
if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
|
||||||
|
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
|
||||||
|
}
|
||||||
|
iterate(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
iterate(el);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
var toc = document.getElementById("toc");
|
||||||
|
if (!toc) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete existing TOC entries in case we're reloading the TOC.
|
||||||
|
var tocEntriesToRemove = [];
|
||||||
|
var i;
|
||||||
|
for (i = 0; i < toc.childNodes.length; i++) {
|
||||||
|
var entry = toc.childNodes[i];
|
||||||
|
if (entry.nodeName.toLowerCase() == 'div'
|
||||||
|
&& entry.getAttribute("class")
|
||||||
|
&& entry.getAttribute("class").match(/^toclevel/))
|
||||||
|
tocEntriesToRemove.push(entry);
|
||||||
|
}
|
||||||
|
for (i = 0; i < tocEntriesToRemove.length; i++) {
|
||||||
|
toc.removeChild(tocEntriesToRemove[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rebuild TOC entries.
|
||||||
|
var entries = tocEntries(document.getElementById("content"), toclevels);
|
||||||
|
for (var i = 0; i < entries.length; ++i) {
|
||||||
|
var entry = entries[i];
|
||||||
|
if (entry.element.id == "")
|
||||||
|
entry.element.id = "_toc_" + i;
|
||||||
|
var a = document.createElement("a");
|
||||||
|
a.href = "#" + entry.element.id;
|
||||||
|
a.appendChild(document.createTextNode(entry.text));
|
||||||
|
var div = document.createElement("div");
|
||||||
|
div.appendChild(a);
|
||||||
|
div.className = "toclevel" + entry.toclevel;
|
||||||
|
toc.appendChild(div);
|
||||||
|
}
|
||||||
|
if (entries.length == 0)
|
||||||
|
toc.parentNode.removeChild(toc);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
// Footnotes generator
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/* Based on footnote generation code from:
|
||||||
|
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
footnotes: function () {
|
||||||
|
// Delete existing footnote entries in case we're reloading the footnodes.
|
||||||
|
var i;
|
||||||
|
var noteholder = document.getElementById("footnotes");
|
||||||
|
if (!noteholder) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var entriesToRemove = [];
|
||||||
|
for (i = 0; i < noteholder.childNodes.length; i++) {
|
||||||
|
var entry = noteholder.childNodes[i];
|
||||||
|
if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
|
||||||
|
entriesToRemove.push(entry);
|
||||||
|
}
|
||||||
|
for (i = 0; i < entriesToRemove.length; i++) {
|
||||||
|
noteholder.removeChild(entriesToRemove[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rebuild footnote entries.
|
||||||
|
var cont = document.getElementById("content");
|
||||||
|
var spans = cont.getElementsByTagName("span");
|
||||||
|
var refs = {};
|
||||||
|
var n = 0;
|
||||||
|
for (i=0; i<spans.length; i++) {
|
||||||
|
if (spans[i].className == "footnote") {
|
||||||
|
n++;
|
||||||
|
var note = spans[i].getAttribute("data-note");
|
||||||
|
if (!note) {
|
||||||
|
// Use [\s\S] in place of . so multi-line matches work.
|
||||||
|
// Because JavaScript has no s (dotall) regex flag.
|
||||||
|
note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
|
||||||
|
spans[i].innerHTML =
|
||||||
|
"[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
|
||||||
|
"' title='View footnote' class='footnote'>" + n + "</a>]";
|
||||||
|
spans[i].setAttribute("data-note", note);
|
||||||
|
}
|
||||||
|
noteholder.innerHTML +=
|
||||||
|
"<div class='footnote' id='_footnote_" + n + "'>" +
|
||||||
|
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
|
||||||
|
n + "</a>. " + note + "</div>";
|
||||||
|
var id =spans[i].getAttribute("id");
|
||||||
|
if (id != null) refs["#"+id] = n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (n == 0)
|
||||||
|
noteholder.parentNode.removeChild(noteholder);
|
||||||
|
else {
|
||||||
|
// Process footnoterefs.
|
||||||
|
for (i=0; i<spans.length; i++) {
|
||||||
|
if (spans[i].className == "footnoteref") {
|
||||||
|
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
|
||||||
|
href = href.match(/#.*/)[0]; // Because IE return full URL.
|
||||||
|
n = refs[href];
|
||||||
|
spans[i].innerHTML =
|
||||||
|
"[<a href='#_footnote_" + n +
|
||||||
|
"' title='View footnote' class='footnote'>" + n + "</a>]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
install: function(toclevels) {
|
||||||
|
var timerId;
|
||||||
|
|
||||||
|
function reinstall() {
|
||||||
|
asciidoc.footnotes();
|
||||||
|
if (toclevels) {
|
||||||
|
asciidoc.toc(toclevels);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function reinstallAndRemoveTimer() {
|
||||||
|
clearInterval(timerId);
|
||||||
|
reinstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
timerId = setInterval(reinstall, 500);
|
||||||
|
if (document.addEventListener)
|
||||||
|
document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
|
||||||
|
else
|
||||||
|
window.onload = reinstallAndRemoveTimer;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
asciidoc.install();
|
||||||
|
/*]]>*/
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body class="manpage">
|
||||||
|
<div id="header">
|
||||||
|
<h1>
|
||||||
|
tor-gencert(1) Manual Page
|
||||||
|
</h1>
|
||||||
|
<h2>NAME</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<p>tor-gencert -
|
||||||
|
Generate certs and keys for Tor directory authorities
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_synopsis">SYNOPSIS</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p><strong>tor-gencert</strong> [-h|--help] [-v] [-r|--reuse] [--create-identity-key] [-i <em>id_file</em>] [-c
|
||||||
|
<em>cert_file</em>] [-m <em>num</em>] [-a <em>address</em>:<em>port</em>]</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_description">DESCRIPTION</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p><strong>tor-gencert</strong> generates certificates and private keys for use by Tor
|
||||||
|
directory authorities running the v3 Tor directory protocol, as used by
|
||||||
|
Tor 0.2.0 and later. If you are not running a directory authority, you
|
||||||
|
don’t need to use tor-gencert.<br /></p></div>
|
||||||
|
<div class="paragraph"><p>Every directory authority has a long term authority <em>identity</em> <em>key</em> (which
|
||||||
|
is distinct from the identity key it uses as a Tor server); this key
|
||||||
|
should be kept offline in a secure location. It is used to certify
|
||||||
|
shorter-lived <em>signing</em> <em>keys</em>, which are kept online and used by the
|
||||||
|
directory authority to sign votes and consensus documents.<br /></p></div>
|
||||||
|
<div class="paragraph"><p>After you use this program to generate a signing key and a certificate,
|
||||||
|
copy those files to the keys subdirectory of your Tor process, and send
|
||||||
|
Tor a SIGHUP signal. DO NOT COPY THE IDENTITY KEY.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_options">OPTIONS</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="dlist"><dl>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-v</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Display verbose output.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-h</strong> or <strong>--help</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Display help text and exit.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-r</strong> or <strong>--reuse</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Generate a new certificate, but not a new signing key. This can be used to
|
||||||
|
change the address or lifetime associated with a given key.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>--create-identity-key</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Generate a new identity key. You should only use this option the first time
|
||||||
|
you run tor-gencert; in the future, you should use the identity key that’s
|
||||||
|
already there.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-i</strong> <em>FILENAME</em>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Read the identity key from the specified file. If the file is not present
|
||||||
|
and --create-identity-key is provided, create the identity key in the
|
||||||
|
specified file. Default: "./authority_identity_key"
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-s</strong> <em>FILENAME</em>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Write the signing key to the specified file. Default:
|
||||||
|
"./authority_signing_key"
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-c</strong> <em>FILENAME</em>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Write the certificate to the specified file. Default:
|
||||||
|
"./authority_certificate"
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-m</strong> <em>NUM</em>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Number of months that the certificate should be valid. Default: 12.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>--passphrase-fd</strong> <em>FILEDES</em>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Filedescriptor to read the passphrase from. Ends at the first NUL or
|
||||||
|
newline. Default: read from the terminal.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-a</strong> <em>address</em>:<em>port</em>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
If provided, advertise the address:port combination as this authority’s
|
||||||
|
preferred directory port in its certificate. If the address is a hostname,
|
||||||
|
the hostname is resolved to an IP before it’s published.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
</dl></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_bugs">BUGS</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p>This probably doesn’t run on Windows. That’s not a big issue, since we don’t
|
||||||
|
really want authorities to be running on Windows anyway.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_see_also">SEE ALSO</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p><strong>tor</strong>(1)<br /></p></div>
|
||||||
|
<div class="paragraph"><p>See also the "dir-spec.txt" file, distributed with Tor.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_authors">AUTHORS</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="literalblock">
|
||||||
|
<div class="content">
|
||||||
|
<pre><code>Roger Dingledine <arma@mit.edu>, Nick Mathewson <nickm@alum.mit.edu>.</code></pre>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="footnotes"><hr /></div>
|
||||||
|
<div id="footer">
|
||||||
|
<div id="footer-text">
|
||||||
|
Last updated 2016-10-20 14:13:52 UTC
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,830 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
|
||||||
|
<meta name="generator" content="AsciiDoc 8.6.8" />
|
||||||
|
<title>tor-resolve(1)</title>
|
||||||
|
<style type="text/css">
|
||||||
|
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
|
||||||
|
|
||||||
|
/* Default font. */
|
||||||
|
body {
|
||||||
|
font-family: Georgia,serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Title font. */
|
||||||
|
h1, h2, h3, h4, h5, h6,
|
||||||
|
div.title, caption.title,
|
||||||
|
thead, p.table.header,
|
||||||
|
#toctitle,
|
||||||
|
#author, #revnumber, #revdate, #revremark,
|
||||||
|
#footer {
|
||||||
|
font-family: Arial,Helvetica,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 1em 5% 1em 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: blue;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
a:visited {
|
||||||
|
color: fuchsia;
|
||||||
|
}
|
||||||
|
|
||||||
|
em {
|
||||||
|
font-style: italic;
|
||||||
|
color: navy;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #083194;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: #527bbd;
|
||||||
|
margin-top: 1.2em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3 {
|
||||||
|
border-bottom: 2px solid silver;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
h3 + * {
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
h5 {
|
||||||
|
font-size: 1.0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sectionbody {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border: 1px solid silver;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol, li > p {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
ul > li { color: #aaa; }
|
||||||
|
ul > li > * { color: black; }
|
||||||
|
|
||||||
|
.monospaced, code, pre {
|
||||||
|
font-family: "Courier New", Courier, monospace;
|
||||||
|
font-size: inherit;
|
||||||
|
color: navy;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#author {
|
||||||
|
color: #527bbd;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
#email {
|
||||||
|
}
|
||||||
|
#revnumber, #revdate, #revremark {
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
font-size: small;
|
||||||
|
border-top: 2px solid silver;
|
||||||
|
padding-top: 0.5em;
|
||||||
|
margin-top: 4.0em;
|
||||||
|
}
|
||||||
|
#footer-text {
|
||||||
|
float: left;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
#footer-badges {
|
||||||
|
float: right;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#preamble {
|
||||||
|
margin-top: 1.5em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
div.imageblock, div.exampleblock, div.verseblock,
|
||||||
|
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
||||||
|
div.admonitionblock {
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
div.admonitionblock {
|
||||||
|
margin-top: 2.0em;
|
||||||
|
margin-bottom: 2.0em;
|
||||||
|
margin-right: 10%;
|
||||||
|
color: #606060;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.content { /* Block element content. */
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Block element titles. */
|
||||||
|
div.title, caption.title {
|
||||||
|
color: #527bbd;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: left;
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
div.title + * {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td div.title:first-child {
|
||||||
|
margin-top: 0.0em;
|
||||||
|
}
|
||||||
|
div.content div.title:first-child {
|
||||||
|
margin-top: 0.0em;
|
||||||
|
}
|
||||||
|
div.content + div.title {
|
||||||
|
margin-top: 0.0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sidebarblock > div.content {
|
||||||
|
background: #ffffee;
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-left: 4px solid #f0f0f0;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.listingblock > div.content {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-left: 5px solid #f0f0f0;
|
||||||
|
background: #f8f8f8;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.quoteblock, div.verseblock {
|
||||||
|
padding-left: 1.0em;
|
||||||
|
margin-left: 1.0em;
|
||||||
|
margin-right: 10%;
|
||||||
|
border-left: 5px solid #f0f0f0;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.quoteblock > div.attribution {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.verseblock > pre.content {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
div.verseblock > div.attribution {
|
||||||
|
padding-top: 0.75em;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
|
||||||
|
div.verseblock + div.attribution {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admonitionblock .icon {
|
||||||
|
vertical-align: top;
|
||||||
|
font-size: 1.1em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: underline;
|
||||||
|
color: #527bbd;
|
||||||
|
padding-right: 0.5em;
|
||||||
|
}
|
||||||
|
div.admonitionblock td.content {
|
||||||
|
padding-left: 0.5em;
|
||||||
|
border-left: 3px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.exampleblock > div.content {
|
||||||
|
border-left: 3px solid #dddddd;
|
||||||
|
padding-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.imageblock div.content { padding-left: 0; }
|
||||||
|
span.image img { border-style: none; }
|
||||||
|
a.image:visited { color: white; }
|
||||||
|
|
||||||
|
dl {
|
||||||
|
margin-top: 0.8em;
|
||||||
|
margin-bottom: 0.8em;
|
||||||
|
}
|
||||||
|
dt {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-style: normal;
|
||||||
|
color: navy;
|
||||||
|
}
|
||||||
|
dd > *:first-child {
|
||||||
|
margin-top: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
list-style-position: outside;
|
||||||
|
}
|
||||||
|
ol.arabic {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
ol.loweralpha {
|
||||||
|
list-style-type: lower-alpha;
|
||||||
|
}
|
||||||
|
ol.upperalpha {
|
||||||
|
list-style-type: upper-alpha;
|
||||||
|
}
|
||||||
|
ol.lowerroman {
|
||||||
|
list-style-type: lower-roman;
|
||||||
|
}
|
||||||
|
ol.upperroman {
|
||||||
|
list-style-type: upper-roman;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.compact ul, div.compact ol,
|
||||||
|
div.compact p, div.compact p,
|
||||||
|
div.compact div, div.compact div {
|
||||||
|
margin-top: 0.1em;
|
||||||
|
margin-bottom: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
tfoot {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
td > div.verse {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.hdlist {
|
||||||
|
margin-top: 0.8em;
|
||||||
|
margin-bottom: 0.8em;
|
||||||
|
}
|
||||||
|
div.hdlist tr {
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
dt.hdlist1.strong, td.hdlist1.strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
td.hdlist1 {
|
||||||
|
vertical-align: top;
|
||||||
|
font-style: normal;
|
||||||
|
padding-right: 0.8em;
|
||||||
|
color: navy;
|
||||||
|
}
|
||||||
|
td.hdlist2 {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
div.hdlist.compact tr {
|
||||||
|
margin: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment {
|
||||||
|
background: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footnote, .footnoteref {
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.footnote, span.footnoteref {
|
||||||
|
vertical-align: super;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footnotes {
|
||||||
|
margin: 20px 0 20px 0;
|
||||||
|
padding: 7px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footnotes div.footnote {
|
||||||
|
margin: 0 0 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footnotes hr {
|
||||||
|
border: none;
|
||||||
|
border-top: 1px solid silver;
|
||||||
|
height: 1px;
|
||||||
|
text-align: left;
|
||||||
|
margin-left: 0;
|
||||||
|
width: 20%;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.colist td {
|
||||||
|
padding-right: 0.5em;
|
||||||
|
padding-bottom: 0.3em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
div.colist td img {
|
||||||
|
margin-top: 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
#footer-badges { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#toc {
|
||||||
|
margin-bottom: 2.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toctitle {
|
||||||
|
color: #527bbd;
|
||||||
|
font-size: 1.1em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
div.toclevel2 {
|
||||||
|
margin-left: 2em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
div.toclevel3 {
|
||||||
|
margin-left: 4em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
div.toclevel4 {
|
||||||
|
margin-left: 6em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.aqua { color: aqua; }
|
||||||
|
span.black { color: black; }
|
||||||
|
span.blue { color: blue; }
|
||||||
|
span.fuchsia { color: fuchsia; }
|
||||||
|
span.gray { color: gray; }
|
||||||
|
span.green { color: green; }
|
||||||
|
span.lime { color: lime; }
|
||||||
|
span.maroon { color: maroon; }
|
||||||
|
span.navy { color: navy; }
|
||||||
|
span.olive { color: olive; }
|
||||||
|
span.purple { color: purple; }
|
||||||
|
span.red { color: red; }
|
||||||
|
span.silver { color: silver; }
|
||||||
|
span.teal { color: teal; }
|
||||||
|
span.white { color: white; }
|
||||||
|
span.yellow { color: yellow; }
|
||||||
|
|
||||||
|
span.aqua-background { background: aqua; }
|
||||||
|
span.black-background { background: black; }
|
||||||
|
span.blue-background { background: blue; }
|
||||||
|
span.fuchsia-background { background: fuchsia; }
|
||||||
|
span.gray-background { background: gray; }
|
||||||
|
span.green-background { background: green; }
|
||||||
|
span.lime-background { background: lime; }
|
||||||
|
span.maroon-background { background: maroon; }
|
||||||
|
span.navy-background { background: navy; }
|
||||||
|
span.olive-background { background: olive; }
|
||||||
|
span.purple-background { background: purple; }
|
||||||
|
span.red-background { background: red; }
|
||||||
|
span.silver-background { background: silver; }
|
||||||
|
span.teal-background { background: teal; }
|
||||||
|
span.white-background { background: white; }
|
||||||
|
span.yellow-background { background: yellow; }
|
||||||
|
|
||||||
|
span.big { font-size: 2em; }
|
||||||
|
span.small { font-size: 0.6em; }
|
||||||
|
|
||||||
|
span.underline { text-decoration: underline; }
|
||||||
|
span.overline { text-decoration: overline; }
|
||||||
|
span.line-through { text-decoration: line-through; }
|
||||||
|
|
||||||
|
div.unbreakable { page-break-inside: avoid; }
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xhtml11 specific
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
div.tableblock {
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
div.tableblock > table {
|
||||||
|
border: 3px solid #527bbd;
|
||||||
|
}
|
||||||
|
thead, p.table.header {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #527bbd;
|
||||||
|
}
|
||||||
|
p.table {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
/* Because the table frame attribute is overriden by CSS in most browsers. */
|
||||||
|
div.tableblock > table[frame="void"] {
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
div.tableblock > table[frame="hsides"] {
|
||||||
|
border-left-style: none;
|
||||||
|
border-right-style: none;
|
||||||
|
}
|
||||||
|
div.tableblock > table[frame="vsides"] {
|
||||||
|
border-top-style: none;
|
||||||
|
border-bottom-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* html5 specific
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
table.tableblock {
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
thead, p.tableblock.header {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #527bbd;
|
||||||
|
}
|
||||||
|
p.tableblock {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
table.tableblock {
|
||||||
|
border-width: 3px;
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #527bbd;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
th.tableblock, td.tableblock {
|
||||||
|
border-width: 1px;
|
||||||
|
padding: 4px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #527bbd;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.tableblock.frame-topbot {
|
||||||
|
border-left-style: hidden;
|
||||||
|
border-right-style: hidden;
|
||||||
|
}
|
||||||
|
table.tableblock.frame-sides {
|
||||||
|
border-top-style: hidden;
|
||||||
|
border-bottom-style: hidden;
|
||||||
|
}
|
||||||
|
table.tableblock.frame-none {
|
||||||
|
border-style: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
th.tableblock.halign-left, td.tableblock.halign-left {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
th.tableblock.halign-center, td.tableblock.halign-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
th.tableblock.halign-right, td.tableblock.halign-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
th.tableblock.valign-top, td.tableblock.valign-top {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
th.tableblock.valign-middle, td.tableblock.valign-middle {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* manpage specific
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
body.manpage h1 {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
border-top: 2px solid silver;
|
||||||
|
border-bottom: 2px solid silver;
|
||||||
|
}
|
||||||
|
body.manpage h2 {
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
body.manpage div.sectionbody {
|
||||||
|
margin-left: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
body.manpage div#toc { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
/*<![CDATA[*/
|
||||||
|
var asciidoc = { // Namespace.
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
// Table Of Contents generator
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/* Author: Mihai Bazon, September 2002
|
||||||
|
* http://students.infoiasi.ro/~mishoo
|
||||||
|
*
|
||||||
|
* Table Of Content generator
|
||||||
|
* Version: 0.4
|
||||||
|
*
|
||||||
|
* Feel free to use this script under the terms of the GNU General Public
|
||||||
|
* License, as long as you do not remove or alter this notice.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* modified by Troy D. Hanson, September 2006. License: GPL */
|
||||||
|
/* modified by Stuart Rackham, 2006, 2009. License: GPL */
|
||||||
|
|
||||||
|
// toclevels = 1..4.
|
||||||
|
toc: function (toclevels) {
|
||||||
|
|
||||||
|
function getText(el) {
|
||||||
|
var text = "";
|
||||||
|
for (var i = el.firstChild; i != null; i = i.nextSibling) {
|
||||||
|
if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
|
||||||
|
text += i.data;
|
||||||
|
else if (i.firstChild != null)
|
||||||
|
text += getText(i);
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
function TocEntry(el, text, toclevel) {
|
||||||
|
this.element = el;
|
||||||
|
this.text = text;
|
||||||
|
this.toclevel = toclevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
function tocEntries(el, toclevels) {
|
||||||
|
var result = new Array;
|
||||||
|
var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
|
||||||
|
// Function that scans the DOM tree for header elements (the DOM2
|
||||||
|
// nodeIterator API would be a better technique but not supported by all
|
||||||
|
// browsers).
|
||||||
|
var iterate = function (el) {
|
||||||
|
for (var i = el.firstChild; i != null; i = i.nextSibling) {
|
||||||
|
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
|
||||||
|
var mo = re.exec(i.tagName);
|
||||||
|
if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
|
||||||
|
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
|
||||||
|
}
|
||||||
|
iterate(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
iterate(el);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
var toc = document.getElementById("toc");
|
||||||
|
if (!toc) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete existing TOC entries in case we're reloading the TOC.
|
||||||
|
var tocEntriesToRemove = [];
|
||||||
|
var i;
|
||||||
|
for (i = 0; i < toc.childNodes.length; i++) {
|
||||||
|
var entry = toc.childNodes[i];
|
||||||
|
if (entry.nodeName.toLowerCase() == 'div'
|
||||||
|
&& entry.getAttribute("class")
|
||||||
|
&& entry.getAttribute("class").match(/^toclevel/))
|
||||||
|
tocEntriesToRemove.push(entry);
|
||||||
|
}
|
||||||
|
for (i = 0; i < tocEntriesToRemove.length; i++) {
|
||||||
|
toc.removeChild(tocEntriesToRemove[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rebuild TOC entries.
|
||||||
|
var entries = tocEntries(document.getElementById("content"), toclevels);
|
||||||
|
for (var i = 0; i < entries.length; ++i) {
|
||||||
|
var entry = entries[i];
|
||||||
|
if (entry.element.id == "")
|
||||||
|
entry.element.id = "_toc_" + i;
|
||||||
|
var a = document.createElement("a");
|
||||||
|
a.href = "#" + entry.element.id;
|
||||||
|
a.appendChild(document.createTextNode(entry.text));
|
||||||
|
var div = document.createElement("div");
|
||||||
|
div.appendChild(a);
|
||||||
|
div.className = "toclevel" + entry.toclevel;
|
||||||
|
toc.appendChild(div);
|
||||||
|
}
|
||||||
|
if (entries.length == 0)
|
||||||
|
toc.parentNode.removeChild(toc);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
// Footnotes generator
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/* Based on footnote generation code from:
|
||||||
|
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
footnotes: function () {
|
||||||
|
// Delete existing footnote entries in case we're reloading the footnodes.
|
||||||
|
var i;
|
||||||
|
var noteholder = document.getElementById("footnotes");
|
||||||
|
if (!noteholder) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var entriesToRemove = [];
|
||||||
|
for (i = 0; i < noteholder.childNodes.length; i++) {
|
||||||
|
var entry = noteholder.childNodes[i];
|
||||||
|
if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
|
||||||
|
entriesToRemove.push(entry);
|
||||||
|
}
|
||||||
|
for (i = 0; i < entriesToRemove.length; i++) {
|
||||||
|
noteholder.removeChild(entriesToRemove[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rebuild footnote entries.
|
||||||
|
var cont = document.getElementById("content");
|
||||||
|
var spans = cont.getElementsByTagName("span");
|
||||||
|
var refs = {};
|
||||||
|
var n = 0;
|
||||||
|
for (i=0; i<spans.length; i++) {
|
||||||
|
if (spans[i].className == "footnote") {
|
||||||
|
n++;
|
||||||
|
var note = spans[i].getAttribute("data-note");
|
||||||
|
if (!note) {
|
||||||
|
// Use [\s\S] in place of . so multi-line matches work.
|
||||||
|
// Because JavaScript has no s (dotall) regex flag.
|
||||||
|
note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
|
||||||
|
spans[i].innerHTML =
|
||||||
|
"[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
|
||||||
|
"' title='View footnote' class='footnote'>" + n + "</a>]";
|
||||||
|
spans[i].setAttribute("data-note", note);
|
||||||
|
}
|
||||||
|
noteholder.innerHTML +=
|
||||||
|
"<div class='footnote' id='_footnote_" + n + "'>" +
|
||||||
|
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
|
||||||
|
n + "</a>. " + note + "</div>";
|
||||||
|
var id =spans[i].getAttribute("id");
|
||||||
|
if (id != null) refs["#"+id] = n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (n == 0)
|
||||||
|
noteholder.parentNode.removeChild(noteholder);
|
||||||
|
else {
|
||||||
|
// Process footnoterefs.
|
||||||
|
for (i=0; i<spans.length; i++) {
|
||||||
|
if (spans[i].className == "footnoteref") {
|
||||||
|
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
|
||||||
|
href = href.match(/#.*/)[0]; // Because IE return full URL.
|
||||||
|
n = refs[href];
|
||||||
|
spans[i].innerHTML =
|
||||||
|
"[<a href='#_footnote_" + n +
|
||||||
|
"' title='View footnote' class='footnote'>" + n + "</a>]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
install: function(toclevels) {
|
||||||
|
var timerId;
|
||||||
|
|
||||||
|
function reinstall() {
|
||||||
|
asciidoc.footnotes();
|
||||||
|
if (toclevels) {
|
||||||
|
asciidoc.toc(toclevels);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function reinstallAndRemoveTimer() {
|
||||||
|
clearInterval(timerId);
|
||||||
|
reinstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
timerId = setInterval(reinstall, 500);
|
||||||
|
if (document.addEventListener)
|
||||||
|
document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
|
||||||
|
else
|
||||||
|
window.onload = reinstallAndRemoveTimer;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
asciidoc.install();
|
||||||
|
/*]]>*/
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body class="manpage">
|
||||||
|
<div id="header">
|
||||||
|
<h1>
|
||||||
|
tor-resolve(1) Manual Page
|
||||||
|
</h1>
|
||||||
|
<h2>NAME</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<p>tor-resolve -
|
||||||
|
resolve a hostname to an IP address via tor
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_synopsis">SYNOPSIS</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p><strong>tor-resolve</strong> [-4|-5] [-v] [-x] [-p <em>socksport</em>] <em>hostname</em> [<em>sockshost</em>[:<em>socksport</em>]]</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_description">DESCRIPTION</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p><strong>tor-resolve</strong> is a simple script to connect to a SOCKS proxy that knows about
|
||||||
|
the SOCKS RESOLVE command, hand it a hostname, and return an IP address.</p></div>
|
||||||
|
<div class="paragraph"><p>By default, <strong>tor-resolve</strong> uses the Tor server running on 127.0.0.1 on SOCKS
|
||||||
|
port 9050. If this isn’t what you want, you should specify an explicit
|
||||||
|
<em>sockshost</em> and/or <em>socksport</em> on the command line.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_options">OPTIONS</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="dlist"><dl>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-v</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Display verbose output.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-x</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Perform a reverse lookup: get the PTR record for an IPv4 address.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-5</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Use the SOCKS5 protocol. (Default)
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-4</strong>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Use the SOCKS4a protocol rather than the default SOCKS5 protocol. Doesn’t
|
||||||
|
support reverse DNS.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt class="hdlist1">
|
||||||
|
<strong>-p</strong> <em>socksport</em>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Override the default SOCKS port without setting the hostname.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
</dl></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_see_also">SEE ALSO</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p><strong>tor</strong>(1), <strong>torify</strong>(1).<br /></p></div>
|
||||||
|
<div class="paragraph"><p>See doc/socks-extensions.txt in the Tor package for protocol details.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_authors">AUTHORS</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p>Roger Dingledine <<a href="mailto:arma@mit.edu">arma@mit.edu</a>>, Nick Mathewson <<a href="mailto:nickm@alum.mit.edu">nickm@alum.mit.edu</a>>.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="footnotes"><hr /></div>
|
||||||
|
<div id="footer">
|
||||||
|
<div id="footer-text">
|
||||||
|
Last updated 2016-10-20 14:13:52 UTC
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,790 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
|
||||||
|
<meta name="generator" content="AsciiDoc 8.6.8" />
|
||||||
|
<title>torify(1)</title>
|
||||||
|
<style type="text/css">
|
||||||
|
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
|
||||||
|
|
||||||
|
/* Default font. */
|
||||||
|
body {
|
||||||
|
font-family: Georgia,serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Title font. */
|
||||||
|
h1, h2, h3, h4, h5, h6,
|
||||||
|
div.title, caption.title,
|
||||||
|
thead, p.table.header,
|
||||||
|
#toctitle,
|
||||||
|
#author, #revnumber, #revdate, #revremark,
|
||||||
|
#footer {
|
||||||
|
font-family: Arial,Helvetica,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 1em 5% 1em 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: blue;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
a:visited {
|
||||||
|
color: fuchsia;
|
||||||
|
}
|
||||||
|
|
||||||
|
em {
|
||||||
|
font-style: italic;
|
||||||
|
color: navy;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #083194;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: #527bbd;
|
||||||
|
margin-top: 1.2em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3 {
|
||||||
|
border-bottom: 2px solid silver;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
h3 + * {
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
h5 {
|
||||||
|
font-size: 1.0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sectionbody {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border: 1px solid silver;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol, li > p {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
ul > li { color: #aaa; }
|
||||||
|
ul > li > * { color: black; }
|
||||||
|
|
||||||
|
.monospaced, code, pre {
|
||||||
|
font-family: "Courier New", Courier, monospace;
|
||||||
|
font-size: inherit;
|
||||||
|
color: navy;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#author {
|
||||||
|
color: #527bbd;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
#email {
|
||||||
|
}
|
||||||
|
#revnumber, #revdate, #revremark {
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
font-size: small;
|
||||||
|
border-top: 2px solid silver;
|
||||||
|
padding-top: 0.5em;
|
||||||
|
margin-top: 4.0em;
|
||||||
|
}
|
||||||
|
#footer-text {
|
||||||
|
float: left;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
#footer-badges {
|
||||||
|
float: right;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#preamble {
|
||||||
|
margin-top: 1.5em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
div.imageblock, div.exampleblock, div.verseblock,
|
||||||
|
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
||||||
|
div.admonitionblock {
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
div.admonitionblock {
|
||||||
|
margin-top: 2.0em;
|
||||||
|
margin-bottom: 2.0em;
|
||||||
|
margin-right: 10%;
|
||||||
|
color: #606060;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.content { /* Block element content. */
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Block element titles. */
|
||||||
|
div.title, caption.title {
|
||||||
|
color: #527bbd;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: left;
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
div.title + * {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td div.title:first-child {
|
||||||
|
margin-top: 0.0em;
|
||||||
|
}
|
||||||
|
div.content div.title:first-child {
|
||||||
|
margin-top: 0.0em;
|
||||||
|
}
|
||||||
|
div.content + div.title {
|
||||||
|
margin-top: 0.0em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sidebarblock > div.content {
|
||||||
|
background: #ffffee;
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-left: 4px solid #f0f0f0;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.listingblock > div.content {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-left: 5px solid #f0f0f0;
|
||||||
|
background: #f8f8f8;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.quoteblock, div.verseblock {
|
||||||
|
padding-left: 1.0em;
|
||||||
|
margin-left: 1.0em;
|
||||||
|
margin-right: 10%;
|
||||||
|
border-left: 5px solid #f0f0f0;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.quoteblock > div.attribution {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.verseblock > pre.content {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
div.verseblock > div.attribution {
|
||||||
|
padding-top: 0.75em;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
|
||||||
|
div.verseblock + div.attribution {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.admonitionblock .icon {
|
||||||
|
vertical-align: top;
|
||||||
|
font-size: 1.1em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: underline;
|
||||||
|
color: #527bbd;
|
||||||
|
padding-right: 0.5em;
|
||||||
|
}
|
||||||
|
div.admonitionblock td.content {
|
||||||
|
padding-left: 0.5em;
|
||||||
|
border-left: 3px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.exampleblock > div.content {
|
||||||
|
border-left: 3px solid #dddddd;
|
||||||
|
padding-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.imageblock div.content { padding-left: 0; }
|
||||||
|
span.image img { border-style: none; }
|
||||||
|
a.image:visited { color: white; }
|
||||||
|
|
||||||
|
dl {
|
||||||
|
margin-top: 0.8em;
|
||||||
|
margin-bottom: 0.8em;
|
||||||
|
}
|
||||||
|
dt {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-style: normal;
|
||||||
|
color: navy;
|
||||||
|
}
|
||||||
|
dd > *:first-child {
|
||||||
|
margin-top: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
list-style-position: outside;
|
||||||
|
}
|
||||||
|
ol.arabic {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
ol.loweralpha {
|
||||||
|
list-style-type: lower-alpha;
|
||||||
|
}
|
||||||
|
ol.upperalpha {
|
||||||
|
list-style-type: upper-alpha;
|
||||||
|
}
|
||||||
|
ol.lowerroman {
|
||||||
|
list-style-type: lower-roman;
|
||||||
|
}
|
||||||
|
ol.upperroman {
|
||||||
|
list-style-type: upper-roman;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.compact ul, div.compact ol,
|
||||||
|
div.compact p, div.compact p,
|
||||||
|
div.compact div, div.compact div {
|
||||||
|
margin-top: 0.1em;
|
||||||
|
margin-bottom: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
tfoot {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
td > div.verse {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.hdlist {
|
||||||
|
margin-top: 0.8em;
|
||||||
|
margin-bottom: 0.8em;
|
||||||
|
}
|
||||||
|
div.hdlist tr {
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
dt.hdlist1.strong, td.hdlist1.strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
td.hdlist1 {
|
||||||
|
vertical-align: top;
|
||||||
|
font-style: normal;
|
||||||
|
padding-right: 0.8em;
|
||||||
|
color: navy;
|
||||||
|
}
|
||||||
|
td.hdlist2 {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
div.hdlist.compact tr {
|
||||||
|
margin: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment {
|
||||||
|
background: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footnote, .footnoteref {
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.footnote, span.footnoteref {
|
||||||
|
vertical-align: super;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footnotes {
|
||||||
|
margin: 20px 0 20px 0;
|
||||||
|
padding: 7px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footnotes div.footnote {
|
||||||
|
margin: 0 0 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footnotes hr {
|
||||||
|
border: none;
|
||||||
|
border-top: 1px solid silver;
|
||||||
|
height: 1px;
|
||||||
|
text-align: left;
|
||||||
|
margin-left: 0;
|
||||||
|
width: 20%;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.colist td {
|
||||||
|
padding-right: 0.5em;
|
||||||
|
padding-bottom: 0.3em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
div.colist td img {
|
||||||
|
margin-top: 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
#footer-badges { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#toc {
|
||||||
|
margin-bottom: 2.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toctitle {
|
||||||
|
color: #527bbd;
|
||||||
|
font-size: 1.1em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
div.toclevel2 {
|
||||||
|
margin-left: 2em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
div.toclevel3 {
|
||||||
|
margin-left: 4em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
div.toclevel4 {
|
||||||
|
margin-left: 6em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.aqua { color: aqua; }
|
||||||
|
span.black { color: black; }
|
||||||
|
span.blue { color: blue; }
|
||||||
|
span.fuchsia { color: fuchsia; }
|
||||||
|
span.gray { color: gray; }
|
||||||
|
span.green { color: green; }
|
||||||
|
span.lime { color: lime; }
|
||||||
|
span.maroon { color: maroon; }
|
||||||
|
span.navy { color: navy; }
|
||||||
|
span.olive { color: olive; }
|
||||||
|
span.purple { color: purple; }
|
||||||
|
span.red { color: red; }
|
||||||
|
span.silver { color: silver; }
|
||||||
|
span.teal { color: teal; }
|
||||||
|
span.white { color: white; }
|
||||||
|
span.yellow { color: yellow; }
|
||||||
|
|
||||||
|
span.aqua-background { background: aqua; }
|
||||||
|
span.black-background { background: black; }
|
||||||
|
span.blue-background { background: blue; }
|
||||||
|
span.fuchsia-background { background: fuchsia; }
|
||||||
|
span.gray-background { background: gray; }
|
||||||
|
span.green-background { background: green; }
|
||||||
|
span.lime-background { background: lime; }
|
||||||
|
span.maroon-background { background: maroon; }
|
||||||
|
span.navy-background { background: navy; }
|
||||||
|
span.olive-background { background: olive; }
|
||||||
|
span.purple-background { background: purple; }
|
||||||
|
span.red-background { background: red; }
|
||||||
|
span.silver-background { background: silver; }
|
||||||
|
span.teal-background { background: teal; }
|
||||||
|
span.white-background { background: white; }
|
||||||
|
span.yellow-background { background: yellow; }
|
||||||
|
|
||||||
|
span.big { font-size: 2em; }
|
||||||
|
span.small { font-size: 0.6em; }
|
||||||
|
|
||||||
|
span.underline { text-decoration: underline; }
|
||||||
|
span.overline { text-decoration: overline; }
|
||||||
|
span.line-through { text-decoration: line-through; }
|
||||||
|
|
||||||
|
div.unbreakable { page-break-inside: avoid; }
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xhtml11 specific
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
div.tableblock {
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
div.tableblock > table {
|
||||||
|
border: 3px solid #527bbd;
|
||||||
|
}
|
||||||
|
thead, p.table.header {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #527bbd;
|
||||||
|
}
|
||||||
|
p.table {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
/* Because the table frame attribute is overriden by CSS in most browsers. */
|
||||||
|
div.tableblock > table[frame="void"] {
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
div.tableblock > table[frame="hsides"] {
|
||||||
|
border-left-style: none;
|
||||||
|
border-right-style: none;
|
||||||
|
}
|
||||||
|
div.tableblock > table[frame="vsides"] {
|
||||||
|
border-top-style: none;
|
||||||
|
border-bottom-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* html5 specific
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
table.tableblock {
|
||||||
|
margin-top: 1.0em;
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
thead, p.tableblock.header {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #527bbd;
|
||||||
|
}
|
||||||
|
p.tableblock {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
table.tableblock {
|
||||||
|
border-width: 3px;
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #527bbd;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
th.tableblock, td.tableblock {
|
||||||
|
border-width: 1px;
|
||||||
|
padding: 4px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #527bbd;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.tableblock.frame-topbot {
|
||||||
|
border-left-style: hidden;
|
||||||
|
border-right-style: hidden;
|
||||||
|
}
|
||||||
|
table.tableblock.frame-sides {
|
||||||
|
border-top-style: hidden;
|
||||||
|
border-bottom-style: hidden;
|
||||||
|
}
|
||||||
|
table.tableblock.frame-none {
|
||||||
|
border-style: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
th.tableblock.halign-left, td.tableblock.halign-left {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
th.tableblock.halign-center, td.tableblock.halign-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
th.tableblock.halign-right, td.tableblock.halign-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
th.tableblock.valign-top, td.tableblock.valign-top {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
th.tableblock.valign-middle, td.tableblock.valign-middle {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* manpage specific
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
|
||||||
|
body.manpage h1 {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
border-top: 2px solid silver;
|
||||||
|
border-bottom: 2px solid silver;
|
||||||
|
}
|
||||||
|
body.manpage h2 {
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
body.manpage div.sectionbody {
|
||||||
|
margin-left: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
body.manpage div#toc { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
/*<![CDATA[*/
|
||||||
|
var asciidoc = { // Namespace.
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
// Table Of Contents generator
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/* Author: Mihai Bazon, September 2002
|
||||||
|
* http://students.infoiasi.ro/~mishoo
|
||||||
|
*
|
||||||
|
* Table Of Content generator
|
||||||
|
* Version: 0.4
|
||||||
|
*
|
||||||
|
* Feel free to use this script under the terms of the GNU General Public
|
||||||
|
* License, as long as you do not remove or alter this notice.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* modified by Troy D. Hanson, September 2006. License: GPL */
|
||||||
|
/* modified by Stuart Rackham, 2006, 2009. License: GPL */
|
||||||
|
|
||||||
|
// toclevels = 1..4.
|
||||||
|
toc: function (toclevels) {
|
||||||
|
|
||||||
|
function getText(el) {
|
||||||
|
var text = "";
|
||||||
|
for (var i = el.firstChild; i != null; i = i.nextSibling) {
|
||||||
|
if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
|
||||||
|
text += i.data;
|
||||||
|
else if (i.firstChild != null)
|
||||||
|
text += getText(i);
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
function TocEntry(el, text, toclevel) {
|
||||||
|
this.element = el;
|
||||||
|
this.text = text;
|
||||||
|
this.toclevel = toclevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
function tocEntries(el, toclevels) {
|
||||||
|
var result = new Array;
|
||||||
|
var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
|
||||||
|
// Function that scans the DOM tree for header elements (the DOM2
|
||||||
|
// nodeIterator API would be a better technique but not supported by all
|
||||||
|
// browsers).
|
||||||
|
var iterate = function (el) {
|
||||||
|
for (var i = el.firstChild; i != null; i = i.nextSibling) {
|
||||||
|
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
|
||||||
|
var mo = re.exec(i.tagName);
|
||||||
|
if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
|
||||||
|
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
|
||||||
|
}
|
||||||
|
iterate(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
iterate(el);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
var toc = document.getElementById("toc");
|
||||||
|
if (!toc) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete existing TOC entries in case we're reloading the TOC.
|
||||||
|
var tocEntriesToRemove = [];
|
||||||
|
var i;
|
||||||
|
for (i = 0; i < toc.childNodes.length; i++) {
|
||||||
|
var entry = toc.childNodes[i];
|
||||||
|
if (entry.nodeName.toLowerCase() == 'div'
|
||||||
|
&& entry.getAttribute("class")
|
||||||
|
&& entry.getAttribute("class").match(/^toclevel/))
|
||||||
|
tocEntriesToRemove.push(entry);
|
||||||
|
}
|
||||||
|
for (i = 0; i < tocEntriesToRemove.length; i++) {
|
||||||
|
toc.removeChild(tocEntriesToRemove[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rebuild TOC entries.
|
||||||
|
var entries = tocEntries(document.getElementById("content"), toclevels);
|
||||||
|
for (var i = 0; i < entries.length; ++i) {
|
||||||
|
var entry = entries[i];
|
||||||
|
if (entry.element.id == "")
|
||||||
|
entry.element.id = "_toc_" + i;
|
||||||
|
var a = document.createElement("a");
|
||||||
|
a.href = "#" + entry.element.id;
|
||||||
|
a.appendChild(document.createTextNode(entry.text));
|
||||||
|
var div = document.createElement("div");
|
||||||
|
div.appendChild(a);
|
||||||
|
div.className = "toclevel" + entry.toclevel;
|
||||||
|
toc.appendChild(div);
|
||||||
|
}
|
||||||
|
if (entries.length == 0)
|
||||||
|
toc.parentNode.removeChild(toc);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
// Footnotes generator
|
||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/* Based on footnote generation code from:
|
||||||
|
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
footnotes: function () {
|
||||||
|
// Delete existing footnote entries in case we're reloading the footnodes.
|
||||||
|
var i;
|
||||||
|
var noteholder = document.getElementById("footnotes");
|
||||||
|
if (!noteholder) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var entriesToRemove = [];
|
||||||
|
for (i = 0; i < noteholder.childNodes.length; i++) {
|
||||||
|
var entry = noteholder.childNodes[i];
|
||||||
|
if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
|
||||||
|
entriesToRemove.push(entry);
|
||||||
|
}
|
||||||
|
for (i = 0; i < entriesToRemove.length; i++) {
|
||||||
|
noteholder.removeChild(entriesToRemove[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rebuild footnote entries.
|
||||||
|
var cont = document.getElementById("content");
|
||||||
|
var spans = cont.getElementsByTagName("span");
|
||||||
|
var refs = {};
|
||||||
|
var n = 0;
|
||||||
|
for (i=0; i<spans.length; i++) {
|
||||||
|
if (spans[i].className == "footnote") {
|
||||||
|
n++;
|
||||||
|
var note = spans[i].getAttribute("data-note");
|
||||||
|
if (!note) {
|
||||||
|
// Use [\s\S] in place of . so multi-line matches work.
|
||||||
|
// Because JavaScript has no s (dotall) regex flag.
|
||||||
|
note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
|
||||||
|
spans[i].innerHTML =
|
||||||
|
"[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
|
||||||
|
"' title='View footnote' class='footnote'>" + n + "</a>]";
|
||||||
|
spans[i].setAttribute("data-note", note);
|
||||||
|
}
|
||||||
|
noteholder.innerHTML +=
|
||||||
|
"<div class='footnote' id='_footnote_" + n + "'>" +
|
||||||
|
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
|
||||||
|
n + "</a>. " + note + "</div>";
|
||||||
|
var id =spans[i].getAttribute("id");
|
||||||
|
if (id != null) refs["#"+id] = n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (n == 0)
|
||||||
|
noteholder.parentNode.removeChild(noteholder);
|
||||||
|
else {
|
||||||
|
// Process footnoterefs.
|
||||||
|
for (i=0; i<spans.length; i++) {
|
||||||
|
if (spans[i].className == "footnoteref") {
|
||||||
|
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
|
||||||
|
href = href.match(/#.*/)[0]; // Because IE return full URL.
|
||||||
|
n = refs[href];
|
||||||
|
spans[i].innerHTML =
|
||||||
|
"[<a href='#_footnote_" + n +
|
||||||
|
"' title='View footnote' class='footnote'>" + n + "</a>]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
install: function(toclevels) {
|
||||||
|
var timerId;
|
||||||
|
|
||||||
|
function reinstall() {
|
||||||
|
asciidoc.footnotes();
|
||||||
|
if (toclevels) {
|
||||||
|
asciidoc.toc(toclevels);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function reinstallAndRemoveTimer() {
|
||||||
|
clearInterval(timerId);
|
||||||
|
reinstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
timerId = setInterval(reinstall, 500);
|
||||||
|
if (document.addEventListener)
|
||||||
|
document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
|
||||||
|
else
|
||||||
|
window.onload = reinstallAndRemoveTimer;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
asciidoc.install();
|
||||||
|
/*]]>*/
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body class="manpage">
|
||||||
|
<div id="header">
|
||||||
|
<h1>
|
||||||
|
torify(1) Manual Page
|
||||||
|
</h1>
|
||||||
|
<h2>NAME</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<p>torify -
|
||||||
|
wrapper for torsocks and tor
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_synopsis">SYNOPSIS</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p><strong>torify</strong> <em>application</em> [<em>application’s</em> <em>arguments</em>]</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_description">DESCRIPTION</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p><strong>torify</strong> is a simple wrapper that attempts to find the best underlying Tor
|
||||||
|
wrapper available on a system. It calls torsocks with a tor specific
|
||||||
|
configuration file.<br /></p></div>
|
||||||
|
<div class="paragraph"><p>torsocks is an improved wrapper that explicitly rejects UDP, safely resolves DNS
|
||||||
|
lookups and properly socksifies your TCP connections.<br /></p></div>
|
||||||
|
<div class="paragraph"><p>Please note that since both method use LD_PRELOAD, torify cannot be applied to
|
||||||
|
suid binaries.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_warning">WARNING</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p>When used with torsocks, torify should not leak DNS requests or UDP data.<br /></p></div>
|
||||||
|
<div class="paragraph"><p>Both will leak ICMP data.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_see_also">SEE ALSO</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p><strong>tor</strong>(1), <strong>tor-resolve</strong>(1), <strong>torsocks</strong>(1)</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sect1">
|
||||||
|
<h2 id="_authors">AUTHORS</h2>
|
||||||
|
<div class="sectionbody">
|
||||||
|
<div class="paragraph"><p>Peter Palfrader and Jacob Appelbaum wrote this manual.</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="footnotes"><hr /></div>
|
||||||
|
<div id="footer">
|
||||||
|
<div id="footer-text">
|
||||||
|
Last updated 2016-10-20 14:13:52 UTC
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,117 @@
|
||||||
|
'\" t
|
||||||
|
.\" Title: tor-gencert
|
||||||
|
.\" Author: Nick Mathewson
|
||||||
|
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||||
|
.\" Date: 10/20/2016
|
||||||
|
.\" Manual: Tor Manual
|
||||||
|
.\" Source: Tor
|
||||||
|
.\" Language: English
|
||||||
|
.\"
|
||||||
|
.TH "TOR\-GENCERT" "1" "10/20/2016" "Tor" "Tor Manual"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * Define some portability stuff
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.\" http://bugs.debian.org/507673
|
||||||
|
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.ie \n(.g .ds Aq \(aq
|
||||||
|
.el .ds Aq '
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * MAIN CONTENT STARTS HERE *
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.SH "NAME"
|
||||||
|
tor-gencert \- Generate certs and keys for Tor directory authorities
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
.sp
|
||||||
|
\fBtor\-gencert\fR [\-h|\-\-help] [\-v] [\-r|\-\-reuse] [\-\-create\-identity\-key] [\-i \fIid_file\fR] [\-c \fIcert_file\fR] [\-m \fInum\fR] [\-a \fIaddress\fR:\fIport\fR]
|
||||||
|
.SH "DESCRIPTION"
|
||||||
|
.sp
|
||||||
|
\fBtor\-gencert\fR generates certificates and private keys for use by Tor directory authorities running the v3 Tor directory protocol, as used by Tor 0\&.2\&.0 and later\&. If you are not running a directory authority, you don\(cqt need to use tor\-gencert\&.
|
||||||
|
.sp
|
||||||
|
Every directory authority has a long term authority \fIidentity\fR \fIkey\fR (which is distinct from the identity key it uses as a Tor server); this key should be kept offline in a secure location\&. It is used to certify shorter\-lived \fIsigning\fR \fIkeys\fR, which are kept online and used by the directory authority to sign votes and consensus documents\&.
|
||||||
|
.sp
|
||||||
|
After you use this program to generate a signing key and a certificate, copy those files to the keys subdirectory of your Tor process, and send Tor a SIGHUP signal\&. DO NOT COPY THE IDENTITY KEY\&.
|
||||||
|
.SH "OPTIONS"
|
||||||
|
.PP
|
||||||
|
\fB\-v\fR
|
||||||
|
.RS 4
|
||||||
|
Display verbose output\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-h\fR or \fB\-\-help\fR
|
||||||
|
.RS 4
|
||||||
|
Display help text and exit\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-r\fR or \fB\-\-reuse\fR
|
||||||
|
.RS 4
|
||||||
|
Generate a new certificate, but not a new signing key\&. This can be used to change the address or lifetime associated with a given key\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-\-create\-identity\-key\fR
|
||||||
|
.RS 4
|
||||||
|
Generate a new identity key\&. You should only use this option the first time you run tor\-gencert; in the future, you should use the identity key that\(cqs already there\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-i\fR \fIFILENAME\fR
|
||||||
|
.RS 4
|
||||||
|
Read the identity key from the specified file\&. If the file is not present and \-\-create\-identity\-key is provided, create the identity key in the specified file\&. Default: "\&./authority_identity_key"
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-s\fR \fIFILENAME\fR
|
||||||
|
.RS 4
|
||||||
|
Write the signing key to the specified file\&. Default: "\&./authority_signing_key"
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-c\fR \fIFILENAME\fR
|
||||||
|
.RS 4
|
||||||
|
Write the certificate to the specified file\&. Default: "\&./authority_certificate"
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-m\fR \fINUM\fR
|
||||||
|
.RS 4
|
||||||
|
Number of months that the certificate should be valid\&. Default: 12\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-\-passphrase\-fd\fR \fIFILEDES\fR
|
||||||
|
.RS 4
|
||||||
|
Filedescriptor to read the passphrase from\&. Ends at the first NUL or newline\&. Default: read from the terminal\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-a\fR \fIaddress\fR:\fIport\fR
|
||||||
|
.RS 4
|
||||||
|
If provided, advertise the address:port combination as this authority\(cqs preferred directory port in its certificate\&. If the address is a hostname, the hostname is resolved to an IP before it\(cqs published\&.
|
||||||
|
.RE
|
||||||
|
.SH "BUGS"
|
||||||
|
.sp
|
||||||
|
This probably doesn\(cqt run on Windows\&. That\(cqs not a big issue, since we don\(cqt really want authorities to be running on Windows anyway\&.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.sp
|
||||||
|
\fBtor\fR(1)
|
||||||
|
.sp
|
||||||
|
See also the "dir\-spec\&.txt" file, distributed with Tor\&.
|
||||||
|
.SH "AUTHORS"
|
||||||
|
.sp
|
||||||
|
.if n \{\
|
||||||
|
.RS 4
|
||||||
|
.\}
|
||||||
|
.nf
|
||||||
|
Roger Dingledine <arma@mit\&.edu>, Nick Mathewson <nickm@alum\&.mit\&.edu>\&.
|
||||||
|
.fi
|
||||||
|
.if n \{\
|
||||||
|
.RE
|
||||||
|
.\}
|
||||||
|
.SH "AUTHOR"
|
||||||
|
.PP
|
||||||
|
\fBNick Mathewson\fR
|
||||||
|
.RS 4
|
||||||
|
Author.
|
||||||
|
.RE
|
|
@ -0,0 +1,79 @@
|
||||||
|
'\" t
|
||||||
|
.\" Title: tor-resolve
|
||||||
|
.\" Author: Peter Palfrader
|
||||||
|
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||||
|
.\" Date: 10/20/2016
|
||||||
|
.\" Manual: Tor Manual
|
||||||
|
.\" Source: Tor
|
||||||
|
.\" Language: English
|
||||||
|
.\"
|
||||||
|
.TH "TOR\-RESOLVE" "1" "10/20/2016" "Tor" "Tor Manual"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * Define some portability stuff
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.\" http://bugs.debian.org/507673
|
||||||
|
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.ie \n(.g .ds Aq \(aq
|
||||||
|
.el .ds Aq '
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * MAIN CONTENT STARTS HERE *
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.SH "NAME"
|
||||||
|
tor-resolve \- resolve a hostname to an IP address via tor
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
.sp
|
||||||
|
\fBtor\-resolve\fR [\-4|\-5] [\-v] [\-x] [\-p \fIsocksport\fR] \fIhostname\fR [\fIsockshost\fR[:\fIsocksport\fR]]
|
||||||
|
.SH "DESCRIPTION"
|
||||||
|
.sp
|
||||||
|
\fBtor\-resolve\fR is a simple script to connect to a SOCKS proxy that knows about the SOCKS RESOLVE command, hand it a hostname, and return an IP address\&.
|
||||||
|
.sp
|
||||||
|
By default, \fBtor\-resolve\fR uses the Tor server running on 127\&.0\&.0\&.1 on SOCKS port 9050\&. If this isn\(cqt what you want, you should specify an explicit \fIsockshost\fR and/or \fIsocksport\fR on the command line\&.
|
||||||
|
.SH "OPTIONS"
|
||||||
|
.PP
|
||||||
|
\fB\-v\fR
|
||||||
|
.RS 4
|
||||||
|
Display verbose output\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-x\fR
|
||||||
|
.RS 4
|
||||||
|
Perform a reverse lookup: get the PTR record for an IPv4 address\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-5\fR
|
||||||
|
.RS 4
|
||||||
|
Use the SOCKS5 protocol\&. (Default)
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-4\fR
|
||||||
|
.RS 4
|
||||||
|
Use the SOCKS4a protocol rather than the default SOCKS5 protocol\&. Doesn\(cqt support reverse DNS\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-p\fR \fIsocksport\fR
|
||||||
|
.RS 4
|
||||||
|
Override the default SOCKS port without setting the hostname\&.
|
||||||
|
.RE
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.sp
|
||||||
|
\fBtor\fR(1), \fBtorify\fR(1)\&.
|
||||||
|
.sp
|
||||||
|
See doc/socks\-extensions\&.txt in the Tor package for protocol details\&.
|
||||||
|
.SH "AUTHORS"
|
||||||
|
.sp
|
||||||
|
Roger Dingledine <arma@mit\&.edu>, Nick Mathewson <nickm@alum\&.mit\&.edu>\&.
|
||||||
|
.SH "AUTHOR"
|
||||||
|
.PP
|
||||||
|
\fBPeter Palfrader\fR
|
||||||
|
.RS 4
|
||||||
|
Author.
|
||||||
|
.RE
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,52 @@
|
||||||
|
'\" t
|
||||||
|
.\" Title: torify
|
||||||
|
.\" Author: [see the "AUTHORS" section]
|
||||||
|
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||||
|
.\" Date: 10/20/2016
|
||||||
|
.\" Manual: Tor Manual
|
||||||
|
.\" Source: Tor
|
||||||
|
.\" Language: English
|
||||||
|
.\"
|
||||||
|
.TH "TORIFY" "1" "10/20/2016" "Tor" "Tor Manual"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * Define some portability stuff
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.\" http://bugs.debian.org/507673
|
||||||
|
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.ie \n(.g .ds Aq \(aq
|
||||||
|
.el .ds Aq '
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * MAIN CONTENT STARTS HERE *
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.SH "NAME"
|
||||||
|
torify \- wrapper for torsocks and tor
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
.sp
|
||||||
|
\fBtorify\fR \fIapplication\fR [\fIapplication\(cqs\fR \fIarguments\fR]
|
||||||
|
.SH "DESCRIPTION"
|
||||||
|
.sp
|
||||||
|
\fBtorify\fR is a simple wrapper that attempts to find the best underlying Tor wrapper available on a system\&. It calls torsocks with a tor specific configuration file\&.
|
||||||
|
.sp
|
||||||
|
torsocks is an improved wrapper that explicitly rejects UDP, safely resolves DNS lookups and properly socksifies your TCP connections\&.
|
||||||
|
.sp
|
||||||
|
Please note that since both method use LD_PRELOAD, torify cannot be applied to suid binaries\&.
|
||||||
|
.SH "WARNING"
|
||||||
|
.sp
|
||||||
|
When used with torsocks, torify should not leak DNS requests or UDP data\&.
|
||||||
|
.sp
|
||||||
|
Both will leak ICMP data\&.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.sp
|
||||||
|
\fBtor\fR(1), \fBtor\-resolve\fR(1), \fBtorsocks\fR(1)
|
||||||
|
.SH "AUTHORS"
|
||||||
|
.sp
|
||||||
|
Peter Palfrader and Jacob Appelbaum wrote this manual\&.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
33
tor.php
33
tor.php
|
@ -4,20 +4,45 @@ use GuzzleHttp\Client;
|
||||||
use GuzzleHttp\Handler\CurlHandler;
|
use GuzzleHttp\Handler\CurlHandler;
|
||||||
use GuzzleHttp\HandlerStack;
|
use GuzzleHttp\HandlerStack;
|
||||||
use GuzzleTor\Middleware;
|
use GuzzleTor\Middleware;
|
||||||
|
use Symfony\Component\DomCrawler\Crawler;
|
||||||
|
|
||||||
|
|
||||||
require 'vendor/autoload.php';
|
require 'vendor/autoload.php';
|
||||||
|
|
||||||
|
function debug($content) {
|
||||||
|
print 'Debug : ' . $content . PHP_EOL;
|
||||||
|
}
|
||||||
function get_tor_ip()
|
function get_tor_ip()
|
||||||
{
|
{
|
||||||
|
|
||||||
$stack = new HandlerStack();
|
$stack = new HandlerStack();
|
||||||
|
debug('$stack = new HandlerStack();');
|
||||||
$stack->setHandler(new CurlHandler());
|
$stack->setHandler(new CurlHandler());
|
||||||
$stack->push(Middleware::tor());
|
debug('$stack->setHandler(new CurlHandler());');
|
||||||
$client = new Client(['handler' => $stack]);
|
$stack->push(Middleware::tor());
|
||||||
|
debug('$stack->push(MiddleWare::tor());');
|
||||||
|
|
||||||
|
$client = new Client(['handler' => $stack]);
|
||||||
|
debug('$client = new Client([\'handler\' => $stack]);');
|
||||||
//$response = $client->get('https://check.torproject.org/');
|
//$response = $client->get('https://check.torproject.org/');
|
||||||
|
debug('$response = $client->get(\'http://skunksworkedp2cg.onion/sites.html\');');
|
||||||
$response = $client->get('http://skunksworkedp2cg.onion/sites.html');
|
$response = $client->get('http://skunksworkedp2cg.onion/sites.html');
|
||||||
file_put_contents('sites.html', $response->getBody()->getContents());
|
$crawler = new Crawler();
|
||||||
|
debug('$crawler = new Crawler();');
|
||||||
|
$crawler->addHtmlContent($response->getBody()->getContents());
|
||||||
|
debug('$crawler->addHtmlContent($response->getBody()->getContents());');
|
||||||
|
$links = $crawler->filter('a');
|
||||||
|
debug('$links = $crawler->filter(\'a\');');
|
||||||
|
debug('links filtered');
|
||||||
|
$hrefs = [];
|
||||||
|
foreach($links as $domElement) {
|
||||||
|
$href = $domElement->getAttribute('href');
|
||||||
|
if(0 !== strlen(parse_url($href, PHP_URL_SCHEME))) {
|
||||||
|
$hrefs[] = $href;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
file_put_contents('elements.json', json_encode($hrefs, JSON_PRETTY_PRINT));
|
||||||
//if (preg_match('/<strong>([\d.]+)<\/strong>/', $response->getBody(), $matches)) {
|
//if (preg_match('/<strong>([\d.]+)<\/strong>/', $response->getBody(), $matches)) {
|
||||||
// return $matches[1];
|
// return $matches[1];
|
||||||
//} else {
|
//} else {
|
||||||
|
@ -25,4 +50,4 @@ function get_tor_ip()
|
||||||
//}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
print get_tor_ip();
|
get_tor_ip();
|
||||||
|
|
Loading…
Reference in New Issue