>
yaz-proxyThe proxy runs stand-alone (not from inetd). 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.
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 the maximum number of connections to be cached [default 50].
Sets the logging level. level is a comma-separated list of members of the set {fatal,debug,warn,log,malloc,all,none}.
Specifies the default backend target to use when a client connects that does not explicitly specify a target in its initRequest.
Specifies authentication info to be sent to the backend target. This is useful if you happen to have an internal target that requires authentication, or if the client software does not allow you to set it.
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).
Specifies in seconds the idle time for communication for proxy. If a connection is inactive for this long it willl be closed. Default: 600 seconds (10 minutes).
The following command starts the proxy, listening on port 9000, with its default backend target set to the Library of Congress bibliographic server:
$ yaz-proxy -t z3950.loc.gov:7090 @:9000 |
The LOC target is sometimes very slow. You can connect to it using yaz-client as follows:
$ yaz-client localhost:9000/voyager Connecting...Ok. Sent initrequest. Connection accepted by target. ID : 34 Name : Voyager LMS - Z39.50 Server Version: 1.13 Options: search present Elapsed: 7.131197 Z> f computer Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 10000 records returned: 0 Elapsed: 6.695174 Z> f computer Sent searchRequest. Received SearchResponse. Search was a success. Number of hits: 10000 records returned: 0 Elapsed: 0.001417 |
In this test, the second search was more than 4000 times faster than the first, because the proxy cached the result of the first search and noticed that the second was the same.
The YAZ command-line client, yaz-client, allows you to set the proxy target as part of the Initialize Request using option -p. For example, to connect to Index Data's target you could use:
yaz-client -p indexdata.dk localhost:9000/gils |