yazproxy [-a filename] [-c config] [-i seconds] [-l filename] [-m num] [-n num] [-o level] [-t target] [-p pidfile] [-T seconds] [-u userid] [-v level] [-X] {host:port}
yazproxy 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. inetd operation is not supported. The host:port argument specifies host address to listen to, and the port to listen on. Use the host @ to listen for connections coming from any address.
yazproxy can be configured using command-line options or a configuration file. Configuration file options override values specified on the command-line.
yazproxy rereads its configuration file and reopens log files when it receives the hangup signal, SIGHUP.
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.
Specifies config filename. Configuration is in XML and is only supported if the YAZ proxy is compiled with libxml2.
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).
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.
Specifies the maximum number of client connections to be offered [default 150].
Sets maximum number of open files to num.
This is only available on systems that offers the
setrlimit(2)
call.
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).
When specified, yazproxy will create pidfile with the process ID of the proxy. The pidfile will be generated before the process changes identity (see option -u).
Specifies the default backend target to use when a client connects that does not explicitly specify a target in its initRequest.
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).
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.
Sets the logging level. level is a comma-separated list of members of the set {fatal,debug,warn,log,malloc,all,none}.
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 gdb. Don't run this in production.
The following command starts the proxy, listening on port 9000, with its default backend target set to Index Data's test server:
$ yazproxy -t indexdata.dk:210 @:9000
You can connect to the proxy via yaz-client as follows:
$ ./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
The YAZ command-line client, yaz-client, 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.
Suppose the proxy running on localhost, port 9000. To connect to British Library's server at blpcz.bl.uk:21021 use:
yaz-client -p localhost:9000 blpcz.bl.uk:21021/BLPC-ALL