Changed the filter_host command to filter_url.
This commit is contained in:
		
							parent
							
								
									1a2b20af5b
								
							
						
					
					
						commit
						b023ff577f
					
				@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: filter.c,v 1.2 2000-09-11 23:43:59 rjkaes Exp $
 | 
					/* $Id: filter.c,v 1.3 2000-11-23 04:46:25 rjkaes Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (c) 1999  George Talusan (gstalusan@uwaterloo.ca)
 | 
					 * Copyright (c) 1999  George Talusan (gstalusan@uwaterloo.ca)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@ -107,7 +107,7 @@ void filter_destroy(void)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* returns 0 if host is not an element of filter list, non-zero otherwise */
 | 
					/* returns 0 if host is not an element of filter list, non-zero otherwise */
 | 
				
			||||||
int filter_host(char *host)
 | 
					int filter_url(char *host)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct filter_list *p;
 | 
						struct filter_list *p;
 | 
				
			||||||
	char *s, *port;
 | 
						char *s, *port;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: filter.h,v 1.2 2000-09-11 23:43:59 rjkaes Exp $
 | 
					/* $Id: filter.h,v 1.3 2000-11-23 04:46:25 rjkaes Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * See 'filter.c' for a detailed description.
 | 
					 * See 'filter.c' for a detailed description.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@ -20,6 +20,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
extern void filter_init(void);
 | 
					extern void filter_init(void);
 | 
				
			||||||
extern void filter_destroy(void);
 | 
					extern void filter_destroy(void);
 | 
				
			||||||
extern int filter_host(char *host);
 | 
					extern int filter_url(char *host);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: reqs.c,v 1.9 2000-09-26 04:57:46 rjkaes Exp $
 | 
					/* $Id: reqs.c,v 1.10 2000-11-23 04:46:25 rjkaes Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This is where all the work in tinyproxy is actually done. Incoming
 | 
					 * This is where all the work in tinyproxy is actually done. Incoming
 | 
				
			||||||
 * connections have a new thread created for them. The thread then
 | 
					 * connections have a new thread created for them. The thread then
 | 
				
			||||||
@ -214,7 +214,7 @@ static int process_method(struct conn_s *connptr)
 | 
				
			|||||||
#ifdef FILTER_ENABLE
 | 
					#ifdef FILTER_ENABLE
 | 
				
			||||||
	/* Filter domains out */
 | 
						/* Filter domains out */
 | 
				
			||||||
	if (config.filter) {
 | 
						if (config.filter) {
 | 
				
			||||||
		if (filter_host(uri->authority)) {
 | 
							if (filter_url(uri->authority)) {
 | 
				
			||||||
			log(LOG_ERR, "clientreq: Filtered connection (%s)",
 | 
								log(LOG_ERR, "clientreq: Filtered connection (%s)",
 | 
				
			||||||
			    peer_ipaddr);
 | 
								    peer_ipaddr);
 | 
				
			||||||
			httperr(connptr, 404,
 | 
								httperr(connptr, 404,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user