|
NAMEstone - Simple RepeaterSYNOPSISstone [-C file] [-P command] [-Q options] [-N] [-d] [-p] [-n][-u max] [-f n] [-l] [-L file] [-a file] [-i file] [-X n] [-T n] [-A <n>] [-r] [-x port[,port][-port]... xhost... --] [-s send expect... --] [-b [var=val]... n master:port backup:port] [-B host:port host1:port1... --] [-I host] [-o n] [-g n] [-t dir] [-D] [-c dir] [-q SSL] [-z SSL] [-M install name] [-M remove name] st [-- st]... DESCRIPTIONStone is a TCP & UDP repeater in the application layer. It repeats TCP and UDP from inside to outside of a firewall, or from outside to inside.Stone has following features:
OPTIONSIf the -C file flag is used, the program read these options and sts from the configuration file file. If the -P command flag is used, the program executes specified pre-processor to read the configuration file. -Q options can be used to pass options to the pre-processor. If the -N flag is used, stone will terminate after parsing options and configuration file without opening the ports.If the -d flag is used, then increase the debug level. If the -p flag is used, data repeated by stone are dumped. If the -n is used, IP addresses and service port numbers are shown instead of host names and service names. If the -u max flag (max is integer) is used, the program memorize max UDP sources simultaneously. The default value is 100. If the -f n flag (n is integer) is used, the program spawn n child processes. The default behavior is not to spawn any child processes. If the -l flag is used, the program sends error messages to the syslog instead of stderr. If the -L file (file is a file name) flag is used, the program writes error messages to the file. If the -a file flag is used, the program writes accounting to the file. If the -i file flag is used, the program writes its process ID to the file. The -X n flag alters the buffer size of the repeater. The default value is 1000 bytes. If the -T n is used, the timeout of TCP sessions can be specified to n sec. Default: 600 (10 min). The -A flag specifies the maximum length the queue of pending connections may grow to. Default: 50. The -r flag is used, SO_REUSEADDR is set on the socket of st. Using the -x port[,port][-port]... xhost... -- flag, the http proxy (described later) can only connect to xhost:port. If more than one -x ... -- flags are designated, the posterior one whose port list matches the connecting port. If the -x -- is used, prior -x flags are ignored. The -b n master:port backup:port flag designates the backup destination for master:port. The program checks every n seconds whether master:port is connectable, using the health check script defined by -s flag described below. If not, the backup is used instead. Alternative host can be checked, using host=host and alternative port, using port=port. The -s send expect... -- flag defines the health check script. Sending send, then checks whether the response match the regular expression expect. The -B host:port host1:port1... -- is for the destination group. If the destination of st is host:port, the program chooses a destination randomly from the group. The destination host:port that is designated by -b flag and turned out unhealthy, is excluded from the group. The -I host designates the interface used as the source address of the connection to the desctination. If the -o n or -g n flag is used, the program set its uid or gid to n respectively. If the -t dir flag (dir is a directory) is used, the program change its root to the directory. If the -D flag is used, stone runs as a daemon. The -c dir flag designates the directory for core dump. The -M install name and the -M remove name flags are for NT service. name is the service name. Start the service using the command: net start name. To install stone service as the name repeater, for example: C:\>stone -M install repeater -C
C:\stone.cfg
C:\>net start repeater The -q SSL and the -z SSL flags are for SSL encryption. The -q SSL is for the client mode, that is, when stone connects to the other SSL server as a SSL client. The -z SSL if for the server mode, that is, when other SSL clients connect to the stone. SSL is one of the following.
st is one of the following. Multiple st can be designated, separated by --.
The program repeats the connection on port sport to the other machine host port port. If the machine, on which the program runs, has two or more interfaces, type (2) can be used to repeat the connection on the specified interface shost. You can also specify path name that begins with ``/'' or ``./'', instead of host:port so that the program handles a unix domain socket. Type (3) is a http proxy. Specify the machine, on which the program runs, and port sport in the http proxy settings of your WWW browser. Extentions can be added to the ``proxy'' like xhost/ext. ext is:
Type (4) relays stream over http request. request is the request specified in HTTP 1.0. In the request, is the escape character, and the following substitution occurs.
Type (5) repeats http request with header in the top of request headers. The above escapes can be also used. If /mproxy is designated instead of /proxy, header is added to each request headers. Type (6) designates the port that other programs can check whether the stone runs `healthy' or not. Following commands are available to check the stone.
var is one of the following:
The response of the stone is 2xx when normal, or 5xx when abnormal on the top of line. If the xhost are used, only machines or its IP addresses listed in xhost separated by space character can connect to the program and to be repeated. Extentions can be added to the xhost like xhost/ex,ex.... ex is:
Use ``!'' instead of ``xhost'', to deny machines by following xhost. Extentions can be added to the port like port/ext,ext.... ext is:
Extentions can be added to the sport like sport/ext,ext.... ext is:
EXAMPLES
Where fwall is a http proxy (port 8080):
HOMEPAGEThe official homepage of stone is:http://www.gcd.org/sengoku/stone/ COPYRIGHTAll rights about this program stone are reserved by the original author, Hiroaki Sengoku. The program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL). Furthermore you can link it with openssl.NO WARRANTYThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.AUTHORHiroaki Sengoku sengoku@gcd.org http://www.gcd.org/sengoku/
Visit the GSP FreeBSD Man Page Interface. |