.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "YAZPROXY" "8" "25 November 2005" "" ""
.SH NAME
yazproxy \- The YAZ toolkit's transparent Z39.50/SRW/SRU proxy
.SH SYNOPSIS
\fByazproxy\fR [ \fB-a \fIfilename\fB\fR ] [ \fB-c \fIconfig\fB\fR ] [ \fB-i \fIseconds\fB\fR ] [ \fB-l \fIfilename\fB\fR ] [ \fB-m \fInum\fB\fR ] [ \fB-n \fInum\fB\fR ] [ \fB-o \fIlevel\fB\fR ] [ \fB-t \fItarget\fB\fR ] [ \fB-p \fIpidfile\fB\fR ] [ \fB-T \fIseconds\fB\fR ] [ \fB-u \fIuserid\fB\fR ] [ \fB-v \fIlevel\fB\fR ] [ \fB-X\fR ] \fB\fIhost\fB:\fIport\fB\fR
.SH "DESCRIPTION"
.PP
\fByazproxy\fR is a proxy that accepts connections
from Z39.50/SRW/SRU clients and contacts a Z39.50 backend.
The listening port must be specified on the command-line.
\fBinetd\fR operation is not supported.
The \fIhost\fR:\fIport\fR
argument specifies host address to listen to, and the port to
listen on. Use the host @
to listen for connections coming from any address.
.PP
\fByazproxy\fR can be configured using command-line
options or a configuration file.
Configuration file options override values specified
on the command-line.
.PP
\fByazproxy\fR rereads its configuration file and
reopens log files when it receives the hangup signal, SIGHUP.
.SH "OPTIONS"
.TP
\fB-a \fIfilename\fB\fR
Specifies the name of a file to which to write a log of the
APDUs (protocol packets) that pass through the proxy. The
special filename - may be used to indicate
standard output.
.TP
\fB-c \fIconfig\fB\fR
Specifies config filename. Configuration is in XML
and is only supported if the YAZ proxy is compiled with
libxml2.
.TP
\fB-i \fIseconds\fB\fR
Specifies in seconds the idle time for communication between
client and proxy. If a connection is inactive for this long
it will be closed. Default: 600 seconds (10 minutes).
.TP
\fB-l \fIfilename\fB\fR
Specifies the name of a file to which to write a log of the
YAZ proxy activity. This uses the logging facility as provided
by the YAZ toolkit. If this options is omitted, the output
directed to stderr.
.TP
\fB-m \fInum\fB\fR
Specifies the maximum number of client connections to be
offered [default 150].
.TP
\fB-n \fInum\fB\fR
Sets maximum number of open files to \fInum\fR\&.
This is only available on systems that offers the
\fBsetrlimit(2)\fR call.
.TP
\fB-o \fIlevel\fB\fR
Sets level for optimization. Use zero to disable; non-zero
to enable. Handling for this is not fully implemented;
we will probably use a bit mask to enable/disable specific
features. By default optimization is enabled (value 1).
.TP
\fB-p \fIpidfile\fB\fR
When specified, yazproxy will create \fIpidfile\fR
with the process ID of the proxy. The pidfile will be generated
before the process changes identity (see option -u).
.TP
\fB-t \fItarget\fB\fR
Specifies the default backend target to use when a client
connects that does not explicitly specify a target in its
initRequest\&.
.TP
\fB-T \fIseconds\fB\fR
Specifies in seconds the idle time for communication between
proxy and backend target.
If a connection is inactive for this long
it will be closed. Default: 600 seconds (10 minutes).
.TP
\fB-u \fIuserid\fB\fR
When specified, yazproxy will change identity to the user ID
specified, just after the proxy has started listening to a
possibly privileged port and after the PID file has been created
if specified by option -u\&.
.TP
\fB-v \fIlevel\fB\fR
Sets the logging level. \fIlevel\fR is
a comma-separated list of members of the set
{fatal,debug,warn,log,malloc,all,none}.
.TP
\fB-X\fR
Enables debugging mode for the proxy. When specified, the proxy will
not fork itself, thus any violations becomes fatal. Useful if
you run yazproxy inside \fBgdb\fR\&.
Don't run this in production.
.SH "EXAMPLES"
.PP
The following command starts the proxy, listening on port
9000, with its default backend target set to Index Data's
test server:
.nf
$ yazproxy -t indexdata.dk:210 @:9000
.fi
.PP
You can connect to the proxy via yaz-client as follows:
.nf
$ ./yaz-client localhost:9000/gils
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID : 81
Name : Zebra Information Server/GFS/YAZ (YAZ Proxy)
Version: Zebra 1.3.15/1.23/2.0.19
Options: search present delSet scan sort extendedServices namedResultSets
Elapsed: 0.152108
Z> f computer
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 3, setno 1
SearchResult-1: computer(3)
records returned: 0
Elapsed: 0.172533
.fi
.PP
The YAZ command-line client,
\fByaz-client\fR,
allows you to set the proxy address by specifying option -p. In
that case, the actual backend target is specified as part of the
Initialize Request.
.PP
Suppose the proxy running on localhost, port 9000.
To connect to British Library's server at
blpcz.bl.uk:21021 use:
.nf
yaz-client -p localhost:9000 blpcz.bl.uk:21021/BLPC-ALL
.fi
.SH "SEE ALSO"
.PP
\fByaz\fR(7)
\fByaz-client\fR(1)