pickwick(8) FreeBSD System Manager's Manual pickwick(8)
NAME
pickwick -- KQueue-Based Small Group Chat Server
SYNOPSIS
pickwick [-i <interface> -p <port> -m <max-clients> -u <user> -g <group>
-x]
DESCRIPTION
Pickwick is a plain text small group chat server. It uses a simple
obfuscation scheme to keep traffic to and from the server unintelligible
to casual perusal. A client program, named weller(1) is also provided.
By default Pickwick accepts a maximum of two client connections at any
one time. This value may be increased with the -m command-line option.
Pickwick does not provide the means for clients to create their own rooms
or channels. In the parlance of MU*s, Pickwick is a one-room "talker."
Pickwick understands a small command set:
Command Action Abbreviations
:who show who is online :, :w, :wh
:exit close connection :exi, :ex, :e
:quit close connection :qui, :qu, :q
:help show command list :hel, :he, :h
All other input is chat input. The chat input any one client generates
is distributed to all clients.
Although Pickwick can be run on a third-party host, it is not necessary.
One individual may run the server locally, and use Weller to connect over
the loopback interface. He or she may then email the hostname or IP
address of their system to other individuals, who may use Weller to con-
nect over the network. No authentication mechanism is used.
If a client sends an input message longer than their multiplexing quantum
(1kib minus the length of the client's user name), or if a TCP segment
gets re-encapsulated into multiple segments in transit and they do not
arrive at the server in rapid succession, a client input message will be
broken into multiple output messages, which may become interleaved in the
server's output stream with other client messages. Each non-terminal
portion of the broken-up message will have ellipses appended to it, as a
visual clue that more of the message is pending.
Pickwick and Weller were designed to work with 8-bit character sets, but
they will work with UTF-8, with one caveat. If an input message is bro-
ken up into multiple parts, and a break occurs inside a multi-byte
sequence, the broken character would be split over two output messages,
turning that character into junk.
Pickwick and Weller scramble data with a trivial reversable binary trans-
formation of character codes. It is enough protection to foil the curi-
ous sysadmin who peruses a connection's TCP data flow for amusement. If
greater security is desired, the author recommends using sshd(8)'s port-
forwarding ability to divert client-server traffic over a cryptographi-
cally-secure tunnel. Detailing how to do this is beyond the scope of
this manual page.
Pickwick will drop connections which have been idle for 20 minutes.
Pickwick writes its pid into /var/run/pickwick.pid, if it can (ie., it is
started as root), and may be stopped with a SIGTERM. A rc.d script is
provided and installed in /usr/local/etc/rc.d/. Add the following lines
to /etc/rc.conf to start pickwick on system boot-up. Replace the items
in brackets with values appropriate for your system, and/or add or remove
options as suits your system. The available options are described in
full at the end of this manual page.
pickwick_enable="YES"
pickwick_flags="-u <user> -g <group>"
Once your /etc/rc.conf is configured you may start, stop, or restart
pickwick, or determine if it is running with the following commands:
/usr/local/etc/rc.d/pickwick start
/usr/local/etc/rc.d/pickwick stop
/usr/local/etc/rc.d/pickwick restart
/usr/local/etc/rc.d/pickwick status
If you do not want pickwick started on system start, then set
pickwick_enable="NO"
and use the following commands:
/usr/local/etc/rc.d/pickwick forcestart
/usr/local/etc/rc.d/pickwick forcestop
/usr/local/etc/rc.d/pickwick forcerestart
/usr/local/etc/rc.d/pickwick forcestatus
If the server encounters an error reading or writing data to or from a
client, or runs out of memory, the particular connection which generated
the error will be dropped. All other errors will be logged via sys-
log(3), and may be found in /var/log/messages.
The following arguments are recognized. They are all optional.
-p The -p option specifies the port to listen on. This defaults to 7331
if not specified.
-i By default, pickwick accepts connections on all interfaces it can
find capable of IPv4 or IPv6. The -i option, when present, overrides
this behavior, by limiting pickwick to accepting connections from a
specified interface only. The option accepts the IP address of the
desired interface as an argument. The address must be expressed in
the presentation format for either IPv4 or IPv6.
-m The -m option specifies the maximum number of clients which may be
connected at any one time. If not specified, it defaults to 2.
-u
-g The -u and the -g options may be used to specify the user and group
for the server to change to after it has bound to the listening
socket. If not specified, both values default to "nobody". Note
that in order for the server to change user the server must be
started as root. If not started as root, two error messages will be
syslog()ed at start-up, complaining about the inability of the server
to change user and group. You can suppress them by providing values
to -u and -g to override the default "nobody" with the actual user
and group under which the server runs.
-x The -x option, if present, prevents pickwick from becoming a daemon.
It will then run in the foreground of the terminal where it was
started, and may be stopped with signals (ie., Control-C). The
server also will not write its pid to /var/run/pickwick.pid when the
-x option is used.
AUTHORS
James Bailie <jimmy@mammothcheese.ca>
http://www.mammothcheese.ca
Apr 30, 2010