DeleGate with RELAY="delegate" provides a special proxying without
changing "proxy configuration" in browsers.
When the URL of such DeleGate is http://delegate/,
a user can access target URL via the DeleGate
by giving a URL like http://delegate/-_-URL to the browser.
A request message for the URL from the client will be in form of
/-_-URL which is regarded as a request for URL
by DeleGate.
Then the DeleGate rewrites a URL included in a response messages to client
so that the access to the URL is directed to the DeleGate again.
This redirection is achieved by prefixing the URL of DeleGate
(http://delegate/) and "-_-" sign before original URL like
http://delegate/-_-URL.
U->C:
user opens http://delegate/-_-http://www/path1
C->D: GET /-_-http://www/path1
D->S: GET /path1
D<-S: HREF=/path2
C<-D: HREF=http://delegate/-_-http://www/path2
U->C: user clicks the anchor
C->D: GET /-_-http://www/path2
D->S: GET /path2
S->D: HREF=ftp://ftp/path
D->C: HREF=http://delegate/-_-ftp://ftp/path
Originally, this redirection mechanism was implemented for Gopher proxy,
and extended to HTTP protocol,
then extended to a generic MOUNT mechanism.
Now almost the same effect with "-_-" redirection can be emulated
with a MOUNT parameter like follows, allowing to replace "-_-" with
an arbitrary string.
You can write a DeleGate switching table in HTML.
Suppose that you have two DeleGate hosts connected to different network
provider each other, and you want to select one of them explicitly
but without changing configuration of your browser
and without typing a lengthy URL prefixed with "http://delegate/-_-".
You can write a table in HTML to switch DeleGate like this:
<A HREF="http://proxy1:8080/-_-http://www.w3.org/"> W3C via firewall1 </A>
<A HREF="http://proxy2:8080/-_-http://www.w3.org/"> W3C via firewall2 </A>
This table works independently of if the client is using DeleGate
or not,
because DeleGate does not do URL redirection in response message
described above if the URL is already redirected like above.
Right after the -_- mark, optional "/Modifier/" form can be inserted
as follows:
http://delegate/-_-/Modifier/URL
Modifier can be a list of multiple Modifiers separated each other by
by comma (,) character.
cc.outCode[.inCode]
the character code of text data toward the client,
"cc.JIS" for example.
Fflags
flags is a list of flag characters
"C" to disable cache,
"N" to force using not name but address overriding DELEGATE parameter,
"J" to make JIS (ISO-2022-JP) output overriding CHARCODE parameter,
and so on.