Name

metaproxy — Metaproxy - server

Synopsis

metaproxy [--help] [--version] [-v loglevel] [--config config] [-D] [-l logfile] [-m timeformat] [-p pidfile] [-s num] [-t] [-u ID] [-w dir] [-X]

DESCRIPTION

metaproxy is the Metaproxy daemon

OPTIONS

--help

Display help message.

--version

Display Metaproxy version.

-v loglevel

Specify YAZ log level (all, debug, log)

--config config

Specify the configuration.

-D

Puts Metaproxy in the background after startup.

-l logfile

Specifies YAZ log file.

-m timeformat

Set the format of time-stamps for all logging performed via yaz_log. Refer to strftime(3) man page for the format.

-p pidfile

Specify file which holds PID after startup.

-s num

Set soft and hard limit for total files in use (includes sockets). This uses setrlimit type RLIMIT_NOFILE - ulimit -n in shell.

-t

Test configuration. Returns exit code 0 on success; non-zero on failure.

-u ID

Change user ID upon startup.

-w dir

Change working directory to dir.

-X

Operate in debug mode.

CONFIGURATION

Metaproxy's configuration is XML based. All elements should be in namespace http://indexdata.com/metaproxy.

The root element must be named metaproxy and must specify a version. Currently the version must be 1.0. The children elements of metaproxy are:

dlpath

Specifies the path for Loadable filter modules

start

Specifies the start route. Takes a route attribute with the name of the route.

filters

Specifies all filters. Includes one or more filter elements with filter-specific configuration material.

routes

Specifies all routes. Includes one or more route elements. Each route in turn includes one or more filter specifications.

The configuration is described in more detail in the Metaproxy manual.

EXAMPLES

The configuration below specifies a simple Z39.50 proxy, and illustrates most configuration elements of Metaproxy.

<?xml version="1.0"?>
<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
  <dlpath>/usr/local/metaproxy/filters</dlpath>
  <start route="start"/>
  <filters>
    <filter id="frontend" type="frontend_net">
      <threads>10</threads>
      <port>@:9000</port>
    </filter>
    <filter id="backend" type="z3950_client">
     <timeout>30</timeout>
     <default_target>z3950.indexdata.com</default_target>
    </filter>
  </filters>
  <routes>
    <route id="start">
      <filter refid="frontend"/>
      <filter type="log">
        <message>log</message>
      </filter>
      <filter refid="backend"/>
      <filter type="bounce"/>
    </route>
  </routes>
</metaproxy>

   

Start server with configuration in my.xml.

       metaproxy --config my.xml
     

SCHEMA

# Metaproxy XML config file schemas
#
#   Copyright (C) Index Data
#   See the LICENSE file for details.
#
#
# The RELAX NG Compact Syntax file 'metaproxy.rnc' is the master copy.
#
# See http://www.indexdata.com/metaproxy/doc/config-file-syntax-check.html
#
# The RELAX NG XML Syntax and XML Schema are generated using 'trang':
# trang metaproxy.rnc metaproxy.rng
# trang metaproxy.rnc metaproxy.xsd

# Config file validation is done using 'xmllint':
# xmllint --noout --relaxng metaproxy.rng ../../etc/config1.xml
# xmllint --noout --schema metaproxy.xsd ../../etc/config1.xml
#
# For information on RELAX NG see http://relaxng.org/
# see also http://books.xmlschemata.org/relaxng/

namespace mp = "http://indexdata.com/metaproxy"

start |= metaproxy

include "filter_auth_simple.rnc"
include "filter_backend_test.rnc"
include "filter_bounce.rnc"
include "filter_cgi.rnc"
include "filter_cql_rpn.rnc"
include "filter_frontend_net.rnc"
include "filter_http_client.rnc"
include "filter_http_file.rnc"
include "filter_http_rewrite.rnc"
include "filter_http_rewrite1.rnc"
include "filter_limit.rnc"
include "filter_load_balance.rnc"
include "filter_log.rnc"
include "filter_multi.rnc"
include "filter_present_chunk.rnc"
include "filter_query_rewrite.rnc"
include "filter_record_transform.rnc"
include "filter_sd_remove.rnc"
include "filter_session_shared.rnc"
include "filter_sort.rnc"
include "filter_sru_z3950.rnc"
include "filter_virt_db.rnc"
include "filter_z3950_client.rnc"
include "filter_zoom.rnc"

any = (text | element * { attribute * { text }*, any })*

metaproxy =
  element mp:metaproxy {
    attribute version { "1.0" },
    element mp:dlpath { xsd:string }?,
    element mp:start {
            attribute route { xsd:NCName }
    },
    element mp:filters { filter+ }?,
    element mp:routes { route+ }
  }

route =
  element mp:route {
    attribute id { xsd:NCName },
    filters+
  }

filters =
  filter |
  element mp:filters {
    filters+
  }

filter =
  element mp:filter {
    filter_refid
    | filter_auth_simple
    | filter_backend_test
    | filter_bounce
    | filter_cgi
    | filter_cql_rpn
    | filter_frontend_net
    | filter_http_client
    | filter_http_file
    | filter_http_rewrite
    | filter_http_rewrite1
    | filter_limit
    | filter_load_balance
    | filter_log
    | filter_multi
    | filter_present_chunk
    | filter_query_rewrite
    | filter_record_transform
    | filter_sd_remove
    | filter_session_shared
    | filter_sort
    | filter_sru_z3950
    | filter_virt_db
    | filter_z3950_client
    | filter_zoom
  }

filter_refid = attribute refid { xsd:NCName }

   

FILES

None important.

SEE ALSO

auth_simple(3mp), backend_test(3mp), bounce(3mp), frontend_net(3mp), http_file(3mp), log(3mp), multi(3mp), query_rewrite(3mp), record_transform(3mp), session_shared(3mp), sru_z3950(3mp), template(3mp), virt_db(3mp), z3950_client(3mp).

The Metaproxy manual.

COPYRIGHT

Copyright (C) 2005-2023 Index Data