Re: how dns in squid works?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: 03 Mar 2003 14:33:47 +0100

mån 2003-03-03 klockan 10.27 skrev atit:
> how dns in squid works?
>
> can u give me bried idea of how follwing hostname is resolved
> www.yahoo.com
>
> give answer in terms of sequence of steps carried out in squid..
>
> in squid source code there are 2 file for dns
> 1)dns.c
> 2)dns_internal.c

This is because there is two implementations. One (dns.cc) using the
external dnsserver helper process which calls gethostbyname(), and one
(dns_internal.cc) which talks DNS directly with your DNS server(s).

> how gopher protocol is handled in squid?

When Squid receives requests over HTTP for gopher:// URLs it converts
these to GOPHER according to the rules in RFC1738 and then converts the
result back into HTTP (and HTML) for the client.

> flow goes to fwdStart function?
> can u give me how flow reach to fwdStart for gopher?

For all protocols except for the CONNECT method the flow is

- request parsing

- access controls

- redirection

- peer selection

- fwdStart to the selected peer

- protocol specific xxxStart called when the connection have been
established. gopherStart for gopher:// URLs, ftpStart for ftp:// URLs,
httpStart for http:// URLs and requests forwarded to another HTTP proxy.

Regards
Henrik

-- 
Henrik Nordstrom <hno@squid-cache.org>
MARA Systems AB, Sweden
Received on Mon Mar 03 2003 - 06:34:01 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:24 MST