cvs commit: apache/src/modules/proxy mod_proxy.c mod_proxy.h proxy_ftp.c proxy_http.c proxy_util.c

1997-07-19 Thread Dean Gaudet
dgaudet 97/07/19 01:58:37

  Modified:htdocs/manual  new_features_1_3.html
   htdocs/manual/mod  mod_proxy.html
   src   CHANGES
   src/modules/proxy  mod_proxy.c mod_proxy.h proxy_ftp.c
proxy_http.c proxy_util.c
  Log:
  NoProxy and ProxyDomain directives.
  
  Submitted by: Martin Kraemer [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet
  
  Revision  ChangesPath
  1.9   +4 -0  apache/htdocs/manual/new_features_1_3.html
  
  Index: new_features_1_3.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/new_features_1_3.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -C3 -r1.8 -r1.9
  *** new_features_1_3.html 1997/07/18 21:01:31 1.8
  --- new_features_1_3.html 1997/07/19 08:58:31 1.9
  ***
  *** 105,110 
  --- 105,114 
before any requests are handled. This allows the module to set up
anything that need to be done once per processes. For example,
connections to databases.
  + 
  + listronga href=mod/mod_proxy.html#noproxyNoProxy/a/strong
  + and stronga href=mod/mod_proxy.html#proxydomainProxyDomain/a
  + /strong directives added to proxy, useful for intranets.

/ul

  
  
  
  1.26  +148 -0apache/htdocs/manual/mod/mod_proxy.html
  
  Index: mod_proxy.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/mod/mod_proxy.html,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -C3 -r1.25 -r1.26
  *** mod_proxy.html1997/07/06 17:19:18 1.25
  --- mod_proxy.html1997/07/19 08:58:32 1.26
  ***
  *** 42,47 
  --- 42,49 
lia href=#proxyremoteProxyRemote/a
lia href=#proxypassProxyPass/a
lia href=#proxyblockProxyBlock/a
  + lia href=#noproxyNoProxy/a
  + lia href=#proxydomainProxyDomain/a
lia href=#cacherootCacheRoot/a
lia href=#cachesizeCacheSize/a
lia href=#cachemaxexpireCacheMaxExpire/a
  ***
  *** 150,155 
  --- 152,284 

blocks connections to all sites.

  + A name=noproxyh2NoProxy/h2/A
  + strongSyntax:/strong NoProxy { A 
HREF=#domainemlt;Domaingt;/em/A
  +  | A 
HREF=#subnetemlt;SubNetgt;/em/A
  +  | A HREF=#ipaddremlt;IpAddrgt;/em/A
  +  | A 
HREF=#hostnameemlt;Hostnamegt;/em/A
  +  } br
  + strongContext:/strong server configbr
  + strongStatus:/strong Basebr
  + strongModule:/strong mod_proxybr
  + strongCompatibility:/strong NoProxy is only available in a patch to
  + Apache 1.2.1 and later.p
  + 
  + This directive is only useful for apache proxy servers within intranets.
  + The NoProxy directive specifies a list of subnets, IP addresses, hosts
  + and/or domains, separated by spaces. A request to a host which matches
  + one or more of these is always served directly, without forwarding to
  + the configured ProxyRemote proxy server(s).brExample:
  + 
  + pre
  +   ProxyRemote  *  http://firewall.mycompany.com:81
  +   NoProxy .mycompany.com 192.168.112.0/21 
  + /pre
  + The arguments to the NoProxy directive are one of the following type list:
  +DL
  + !-- = Domain === --
  + A NAME=domain
  + DTEMDomain/EM
  + DDA EMDomain/EM is a partially qualified DNS domain name, preceded
  + by a period.
  + It represents a list of hosts which logically belong to the same DNS
  + domain or zone (i.e. the suffixes of the hostnames are all ending 
in 
  + EMDomain/EM).BR
  + Examples: SAMP.com/SAMP   SAMP.apache.org./SAMP
SAMP.sni.de/SAMPBR
  + To distinguish EMDomain/EMs from A 
HREF=#hostnameEMHostname/EM/As (both
  + syntactically and semantically; a DNS domain can have a DNS A 
record,
  + too!), EMDomain/EMs are always written
  + with a leading period.BR
  + Note: Domain name comparisons are done without regard to the case,
  + and EMDomain/EMs are always assumed to be anchored in the root 
  + of the DNS tree, therefore two domains SAMP.MyDomain.com/SAMP 
and
  + SAMP.mydomain.com./SAMP (note the trailing period) are
  + considered equal. Since a domain comparison does not involve a DNS
  + lookup, it is much more efficient than subnet comparison.
  + 
  + !-- = SubNet === --
  + A NAME=subnet
  + DTEMSubNet/EM
  + DDA EMSubNet/EM is a partially qualified internet address in
  + numeric (dotted quad) form, optionally followed by a slash and the
  + netmask, specified as the number of significant bits in the
  + EMSubNet/EM. It is used to represent a subnet of hosts which can
  + be reached over a common 

cvs commit: apache/src/modules/proxy mod_proxy.c mod_proxy.h proxy_connect.c proxy_ftp.c proxy_http.c proxy_util.c

1997-04-10 Thread Chuck Murcko
chuck   97/04/10 22:10:55

  Modified:src/modules/proxy  mod_proxy.c mod_proxy.h proxy_connect.c
proxy_ftp.c  proxy_http.c proxy_util.c
  Log:
  For hosts with multiple IP addresses, try all additional addresses if
  necessary to get a connect(). Fail only if hostent address list is
  exhausted.
  
  Revision  ChangesPath
  1.10  +10 -4 apache/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===
  RCS file: /export/home/cvs/apache/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -C3 -r1.9 -r1.10
  *** mod_proxy.c   1997/03/02 05:05:21 1.9
  --- mod_proxy.c   1997/04/11 05:10:49 1.10
  ***
  *** 335,340 
  --- 335,341 
get_module_config (s-module_config, proxy_module);
struct noproxy_entry *new;
struct noproxy_entry *list=(struct noproxy_entry*)conf-noproxies-elts;
  + struct hostent hp;
int found = 0;
int i;

  ***
  *** 350,357 
new = push_array (conf-noproxies);
new-name = arg;
/* Don't do name lookups on things that aren't dotted */
  ! if (strchr(arg, '.') != NULL)
  ! proxy_host2addr(new-name, new-addr);
else
new-addr.s_addr = 0;
}
  --- 351,360 
new = push_array (conf-noproxies);
new-name = arg;
/* Don't do name lookups on things that aren't dotted */
  ! if (strchr(arg, '.') != NULL) {
  ! proxy_host2addr(new-name, hp);
  ! memcpy(new-addr, hp.h_addr, sizeof(struct in_addr));
  ! }
else
new-addr.s_addr = 0;
}
  ***
  *** 473,478 
  --- 476,482 
get_module_config (s-module_config, proxy_module);
struct nocache_entry *new;
struct nocache_entry *list=(struct nocache_entry*)conf-nocaches-elts;
  + struct hostent hp;
int found = 0;
int i;

  ***
  *** 488,495 
new = push_array (conf-nocaches);
new-name = arg;
/* Don't do name lookups on things that aren't dotted */
  ! if (strchr(arg, '.') != NULL)
  ! proxy_host2addr(new-name, new-addr);
else
new-addr.s_addr= 0;
}
  --- 492,501 
new = push_array (conf-nocaches);
new-name = arg;
/* Don't do name lookups on things that aren't dotted */
  ! if (strchr(arg, '.') != NULL) {
  ! proxy_host2addr(new-name, hp);
  ! memcpy(new-addr, hp.h_addr, sizeof(struct in_addr));
  ! }
else
new-addr.s_addr= 0;
}
  
  
  
  1.10  +1 -1  apache/src/modules/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===
  RCS file: /export/home/cvs/apache/src/modules/proxy/mod_proxy.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -C3 -r1.9 -r1.10
  *** mod_proxy.h   1997/03/20 18:40:14 1.9
  --- mod_proxy.h   1997/04/11 05:10:50 1.10
  ***
  *** 270,275 
server_rec *s);
BUFF *proxy_cache_error(struct cache_req *r);
int proxyerror(request_rec *r, const char *message);
  ! const char *proxy_host2addr(const char *host, struct in_addr *addr);
int proxy_doconnect(int sock, struct sockaddr_in *addr, request_rec *r);

  --- 270,275 
server_rec *s);
BUFF *proxy_cache_error(struct cache_req *r);
int proxyerror(request_rec *r, const char *message);
  ! const char *proxy_host2addr(const char *host, struct hostent *reqhp);
int proxy_doconnect(int sock, struct sockaddr_in *addr, request_rec *r);

  
  
  
  1.7   +12 -3 apache/src/modules/proxy/proxy_connect.c
  
  Index: proxy_connect.c
  ===
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_connect.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -C3 -r1.6 -r1.7
  *** proxy_connect.c   1997/01/07 21:51:57 1.6
  --- proxy_connect.c   1997/04/11 05:10:50 1.7
  ***
  *** 88,98 
{
struct sockaddr_in server;
struct in_addr destaddr;
const char *host, *err;
char *p;
int   port, sock;
char buffer[HUGE_STRING_LEN];
  ! int  nbytes, i;
fd_set fds;

void *sconf = r-server-module_config;
  --- 88,99 
{
struct sockaddr_in server;
struct in_addr destaddr;
  + struct hostent server_hp;
const char *host, *err;
char *p;
int   port, sock;
char buffer[HUGE_STRING_LEN];
  ! int  nbytes, i, j;
fd_set fds;

void *sconf = r-server-module_config;
  ***
  *** 136,142 
Explain2(CONNECT to %s on port %d, host, port);
 
server.sin_port = htons(port);
  ! err = 

cvs commit: apache/src/modules/proxy mod_proxy.c mod_proxy.h

1997-03-01 Thread Chuck Murcko
chuck   97/03/01 21:05:23

  Modified:src/modules/proxy  mod_proxy.c mod_proxy.h
  Log:
  Add table slot for header parser.
  
  Revision  ChangesPath
  1.9   +2 -1  apache/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===
  RCS file: /export/home/cvs/apache/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -C3 -r1.8 -r1.9
  *** mod_proxy.c   1997/01/05 09:06:05 1.8
  --- mod_proxy.c   1997/03/02 05:05:21 1.9
  ***
  *** 546,551 
   NULL,/* check access */
   NULL,/* type_checker */
   proxy_fixup, /* pre-run fixups */
  !NULL /* logger */
};

  --- 546,552 
   NULL,/* check access */
   NULL,/* type_checker */
   proxy_fixup, /* pre-run fixups */
  !NULL,/* logger */
  !NULL /* header parser */
};

  
  
  
  1.8   +1 -1  apache/src/modules/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===
  RCS file: /export/home/cvs/apache/src/modules/proxy/mod_proxy.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -C3 -r1.7 -r1.8
  *** mod_proxy.h   1997/01/05 09:06:05 1.7
  --- mod_proxy.h   1997/03/02 05:05:22 1.8
  ***
  *** 82,88 

1. add 230 response output for ftp now that it works

  ! 2. Add gopher  WAIS

3. Use protocol handler struct a la Apache module handlers (Dirk van Gulik)
 
  --- 82,88 

1. add 230 response output for ftp now that it works

  ! 2. Make the ftp proxy transparent, also same with (future) gopher  wais

3. Use protocol handler struct a la Apache module handlers (Dirk van Gulik)