~ctrlproxy/ctrlproxy/trunk

« back to all changes in this revision

Viewing changes to doc/socket.mod.xml

  • Committer: jelmer
  • Date: 2003-10-18 22:02:02 UTC
  • Revision ID: jelmer@samba.org-20031018220202-6801a76318fb4d13
Update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<ctrlproxy:module name="socket"
 
2
        xmlns:ctrlproxy="http://ctrlproxy.vernstok.nl/common">
 
3
        <modulemeta>
 
4
                <description>Support for IPv4, IPv6 and pipes</description>
 
5
                <version>0.1</version>
 
6
                <author>Jelmer Vernooij</author>
 
7
                <homepage>http://jelmer.vernstok.nl/ctrlproxy/</homepage>
 
8
                <requires>SSL(optional)</requires>
 
9
        </modulemeta>
 
10
 
 
11
        <description>
 
12
                <para>This module provides support for connecting to remote 
 
13
                servers using IPv4, IPv6 and unix pipes, as well 
 
14
                as listening for client connections using these connection 
 
15
                types.</para>
 
16
 
 
17
                <para>As this module is currently the only module providing 
 
18
                connection support, it is essential for basic use of 
 
19
                ctrlproxy.</para>
 
20
 
 
21
                <para>Connecting or listening using SSL over IPv4 or IPv6 
 
22
                is supported when a SSL library was found at configure time.</para>
 
23
 
 
24
                <para>When acting as a SSL server (e.g. waiting for connections from 
 
25
                        clients and communicating with them using SSL), ctrlproxy 
 
26
                        needs to have a certificate file and a private key file. 
 
27
                        This can be generated using the <filename>mksslcert.sh</filename>
 
28
                        script distributed with ctrlproxy.</para>
 
29
        </description>
 
30
 
 
31
        <configuration>
 
32
                <element name="sslkeyfile">
 
33
                        <description>Name of file to load private SSL key from. Only required when acting as a server</description>
 
34
                </element>
 
35
 
 
36
                <element name="sslcertfile">
 
37
                        <description>Name of file to load certificate from. Only required when acting as a server</description>
 
38
                </element>
 
39
        </configuration>
 
40
 
 
41
        <section>
 
42
                <title>Configuration</title>
 
43
 
 
44
                <para>After this module is loaded, the following three new elements are supported in &lt;listen&gt; and &lt;servers&gt;:</para>
 
45
 
 
46
                <simplelist>
 
47
                <member>ipv4</member>
 
48
                <member>ipv6</member>
 
49
                <member>pipe</member>
 
50
                </simplelist>
 
51
 
 
52
                <para>ipv4 and ipv6 support the following attributes:</para>
 
53
                <variablelist>
 
54
                        <varlistentry><term>ssl</term>
 
55
                        <listitem><para>Enable SSL</para></listitem>
 
56
                        </varlistentry>
 
57
 
 
58
                        <varlistentry><term>host</term>
 
59
                        <listitem><para>Host name or IP address to connect to.
 
60
                        </para></listitem></varlistentry>
 
61
 
 
62
                        <varlistentry><term>port</term>
 
63
                        <listitem><para>Port to connect to or listen on.</para></listitem>
 
64
                        </varlistentry>
 
65
                </variablelist>
 
66
 
 
67
                <para>When connecting, the pipe element can contain one member 
 
68
                element &lt;path&gt; and several &lt;arg&gt; elements. These 
 
69
                should contain a program with arguments to execute.</para>
 
70
 
 
71
                <para>In listen mode, a file attribute (attribute, not element!) should be specified, containing the file name of the unix socket to create. If no file name is specified, one will be generated.</para>
 
72
 
 
73
        </section>
 
74
 
 
75
        <example>
 
76
                <![CDATA[
 
77
                <ctrlproxy>
 
78
                        <plugins>
 
79
                                <plugin autoload="1" file="socket">
 
80
                                        <sslcertfile>ctrlproxy.pem</sslcertfile>
 
81
                                        <sslkeyfile>ctrlproxy.pem</sslkeyfile>
 
82
                                </plugin>
 
83
                        </plugins>
 
84
                        <networks>
 
85
                                <network name="BEE">
 
86
                                        <servers>
 
87
                                                <pipe>
 
88
                                                        <path>/usr/sbin/bitlbee</path>
 
89
                                                </pipe>
 
90
                                                <ipv4 host="localhost"/>
 
91
                                        </servers>
 
92
                                        <listen>
 
93
                                                <ipv4 ssl="1" port="6667"/>
 
94
                                </network>
 
95
                                <network name="DSR">
 
96
                                        <servers>
 
97
                                                <ipv6 host="irc.ipv6.distributed.net"/>
 
98
                                                <ipv4 host="irc.distributed.net" port="994" ssl="1"/>
 
99
                                        </servers>
 
100
                                        <listen>
 
101
                                                <ipv4 port="6668"/>
 
102
                                                <ipv6 port="6669" ssl="1"/>
 
103
                                        </listen>
 
104
                                </network>
 
105
                        </networks>
 
106
                </ctrlproxy>
 
107
        ]]>
 
108
        </example>
 
109
</ctrlproxy:module>