1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
6 <meta name=
"generator" content=
"Docutils 0.5: http://docutils.sourceforge.net/" />
7 <title>libtorrent manual
</title>
8 <meta name=
"author" content=
"Arvid Norberg, arvid@rasterbar.com" />
9 <link rel=
"stylesheet" href=
"style.css" type=
"text/css" />
12 <div class=
"document" id=
"libtorrent-manual">
13 <h1 class=
"title">libtorrent manual
</h1>
14 <table class=
"docinfo" frame=
"void" rules=
"none">
15 <col class=
"docinfo-name" />
16 <col class=
"docinfo-content" />
18 <tr><th class=
"docinfo-name">Author:
</th>
19 <td>Arvid Norberg,
<a class=
"last reference external" href=
"mailto:arvid@rasterbar.com">arvid
@rasterbar.com
</a></td></tr>
22 <div class=
"contents topic" id=
"table-of-contents">
23 <p class=
"topic-title first">Table of contents
</p>
25 <li><a class=
"reference internal" href=
"#running-and-building-tests" id=
"id3">running and building tests
</a></li>
26 <li><a class=
"reference internal" href=
"#id1" id=
"id4">lighty
</a></li>
27 <li><a class=
"reference internal" href=
"#delegate" id=
"id5">delegate
</a></li>
28 <li><a class=
"reference internal" href=
"#openssl" id=
"id6">OpenSSL
</a></li>
31 <div class=
"section" id=
"running-and-building-tests">
32 <h1>running and building tests
</h1>
33 <p>Some of the tests of libtorrent are not self contained. For instance, in
34 order to test the
<tt class=
"docutils literal"><span class=
"pre">http_connection
</span></tt> class in libtorrent, the test requires
35 <a class=
"reference external" href=
"http://www.lighttpd.net">lighty
</a>. This document outlines the requirements of the tests as well as
36 describes how to set up your environment to be able to run them.
</p>
38 <div class=
"section" id=
"id1">
40 <p>Download
<a class=
"reference external" href=
"http://www.lighttpd.net">lighty
</a>. I've tested with
<tt class=
"docutils literal"><span class=
"pre">lighttpd-
1.4.19</span></tt>. If libtorrent is built
41 with SSL support (which it is by default), lighty needs SSL support as well.
</p>
42 <p>To build lighty with SSL support do:
</p>
43 <pre class=
"literal-block">
44 ./configure --with-openssl
47 <pre class=
"literal-block">
50 <p>Make sure you have SSL support in lighty by running:
</p>
51 <pre class=
"literal-block">
54 <p>Which gives you a list of all enabled features.
</p>
56 <div class=
"section" id=
"delegate">
58 <p><a class=
"reference external" href=
"http://www.delegate.org">Delegate
</a> can act as many different proxies, which makes it a convenient
59 tool to use to test libtorrent's support for SOCKS4, SOCKS5, HTTPS and
61 <p>You can download prebuilt binaries for the most common platforms on
62 <a class=
"reference external" href=
"http://www.delegate.org/delegate/download/">deletate's download page
</a>. Make sure to name the executable
<tt class=
"docutils literal"><span class=
"pre">delegated
</span></tt>
63 and put it in a place where a shell can pick it up, in its
<tt class=
"docutils literal"><span class=
"pre">PATH
</span></tt>. For
64 instance
<tt class=
"docutils literal"><span class=
"pre">/bin
</span></tt>.
</p>
66 <div class=
"section" id=
"openssl">
68 <p>In order to create an SSL certificate for
<a class=
"reference external" href=
"http://www.lighttpd.net">lighty
</a>, openssl is used. More
69 specifically, the following command is issued by the test to create the
71 <pre class=
"literal-block">
72 echo -e
"AU\ntest province\ntest city\ntest company\ntest department\n\
73 tester\ntest
@test.com
" | openssl req -new -x509 -keyout server.pem \
74 -out server.pem -days
365 -nodes
76 <p>This will write
<tt class=
"docutils literal"><span class=
"pre">server.pem
</span></tt> which is referenced in the lighty
77 confiuration file.
</p>
78 <p>OpenSSL comes installed with most Linux and BSD distros, including Mac OS X.
79 You can download it from
<a class=
"reference external" href=
"http://www.openssl.org/">the openssl homepage
</a>.
</p>