PageViews: 140 hits / 54 nets

Short Tutorial for Beginners of DeleGate

This is a very short tutorial of DeleGate for beginners. See the reference manual (Manual.htm) and related documents for more details. A collection of usage examples in HowToDG.html might be helpful to see what you can do with DeleGate. The shortest tutorial is included in it.

Minumum instruction

a. The simplest way to use DeleGate as a HTTP proxy, on the port 8080, is like this:
    delegated -P8080 SERVER=http
where -Pxxxx specifies the port number used to accept request from clients, and SERVER=yyyy specifies the protocol name used to communicate with clients.

b. The validity and custody of cached data can be controlled using EXPIRE and CRON parameters.

    EXPIRE=1d CRON="0 * * * * -expire 2d"
c. DeleGate implicitly allows only access from networks local to the host of DeleGate. You can explicitly specify hosts, networks, or domains to be allowed using a PERMIT parameter like this:

A little advanced instruction

01. Execute DeleGate in debug mode (run in forground and put log to the console):
    delegated -v ...
02. Stop the DeleGate server running at the port 8080:
    delegated -P8080 -Fkill
03. Load and use configuration parameters at specified URL:
    delegated +=http://server/path/of/parameters.txt
04. Restrict network interface(s) to be used to accept clients' request:
    delegated -Phostname:8080 SERVER=http
05. Control the sequence of name resolution trials using multiple resolvers:
06. Connect via Socks server(s) if the destination is not local to your site:
    CONNECT="cache,socks:*:!*.my.domain" SOCKS=sockshost
07. Forward any requests to another proxy:
08. Forward requests toward some destination servers to another proxy:
09. Relay an arbitrary TCP protocol to a specified server:
10. Forward arbitrary TCP protocols to another DeleGate:
11. Relay an arbitrary UDP protocol to a specified server:
12. Bind the target server of DeleGate to provide the DeleGate as an origin server to clients:
    delegated -P80 SERVER=http://httpserver/
13. Restrict newsgroups to be provided to clients:
    delegated -P8119 SERVER=nntp://nntpserver/comp,misc,news
14. Merge multiple servers into a single virtual server using MOUNT parameter:
    SERVER=nntp MOUNT="= nntp://serv1/comp" MOUNT="= nntp://serv2/misc,news"
15. Gateway for HTTP clients to NNTP servers:
    SERVER=http MOUNT="/news1/* nntp://ns1/*" MOUNT="/news2/* nntp://ns2/*"
16. Use DeleGate as an origin HTTP server:
    -P80 SERVER=http MOUNT="/* /usr/local/www/*" REMITTABLE=file
17. Restrict destination hosts/nets/domains reachable via the DeleGate:

Yutaka Sato <ysato AT delegate DOT org>