summaryrefslogtreecommitdiff
path: root/src/tinyproxy.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-07-14Allow numeric uid/gids in User and Group directivesMukund Sivaraman1-21/+50
This change allows numeric uid/gids to be specified in the User and Group directives in tinyproxy.conf. Formerly, only username and group names were accepted. This fixes bug #15, which was created after looking at a case on the OpenWrt wiki. X-Banu-Bugzilla-Ids: 15
2008-05-24Updated copyright, license notices in source codeMukund Sivaraman1-17/+21
The notices have been changed to a more GNU look. Documentation comments have been separated from the copyright header. I've tried to keep all copyright notices intact. Some author contact details have been updated.
2005-08-15* [Indent] Ran Source Through indentRobert James Kaes1-275/+272
I re-indented the source code using indent with the following options: indent -kr -bad -bap -nut -i8 -l80 -psl -sob -ss -ncs There are now _no_ tabs in the source files, and all indentation is eight spaces. Lines are 80 characters long, and the procedure type is on it's own line. Read the indent manual for more information about what each option means.
2005-07-12* Updated Copyright Email AddressesRobert James Kaes1-2/+2
Updated the copyright email addresses for Robert James Kaes. The users.sourceforge.net address should always exist.
2004-08-24(takesig): Fixed the return type to use the autoconf definedRobert James Kaes1-3/+3
RETSIGTYPE. This is portable, while simply using "void" is not.
2004-08-14Changed the calls to the config_compile() and config_parse()Robert James Kaes1-20/+21
functions. Also, if the "logfile" directive is used, it will now override use of the syslog system. Added an error message if neither is defined.
2004-08-13Change the code to use the new config_parse() method rather than theRobert James Kaes1-7/+12
flex/bison based configuration system.
2004-01-26Added reverse proxy support from Kim Holviala. His comments regardingRobert James Kaes1-4/+7
this addition follow: The patch implements a simple reverse proxy (with one funky extra feature). It has all the regular features: mapping remote servers to local namespace (ReversePath), disabling forward proxying (ReverseOnly) and HTTP redirect rewriting (ReverseBaseURL). The funky feature is this: You map Google to /google/ and the Google front page opens up fine. Type in stuff and click "Google Search" and you'll get an error from tinyproxy. Reason for this is that Google's form submits to "/search" which unfortunately bypasses our /google/ mapping (if they'd submit to "search" without the slash it would have worked ok). Turn on ReverseMagic and it starts working.... ReverseMagic "hijacks" one cookie which it sends to the client browser. This cookie contains the current reverse proxy path mapping (in the above case /google/) so that even if the site uses absolute links the reverse proxy still knows where to map the request. And yes, it works. No, I've never seen this done before - I couldn't find _any_ working OSS reverse proxies, and the commercial ones I've seen try to parse the page and fix all links (in the above case changing "/search" to "/google/search"). The problem with modifying the html is that it might not be parsable (very common) or it might be encoded so that the proxy can't read it (mod_gzip or likes). Hope you like that patch. One caveat - I haven't coded with C in like three years so my code might be a bit messy.... There shouldn't be any security problems thou, but you never know. I did all the stuff out of my memory without reading any RFC's, but I tested everything with Moz, Konq, IE6, Links and Lynx and they all worked fine.
2003-03-17# Moved the location of the "initializing" log message to below theRobert James Kaes1-3/+3
processing of the command line options.
2003-03-13# Added variables to config structure to keep track of the files to beRobert James Kaes1-6/+14
displayed for various HTTP errors and the stats page. [Steven Young]
2003-02-26(main): Removed duplicate code calling the filter_destroy() function.Robert James Kaes1-6/+2
Once is enough. [Detected by John M Wright]
2003-01-27(display_usage): Removed the output line mentioning that regularRobert James Kaes1-2/+1
expression support was included. It will be there always.
2002-12-04Removed the "bool_t" type since it conflicts with the newer C standards.Robert James Kaes1-4/+4
The type was just replaced by "unsigned int" types.
2002-11-21(main): Check to see if the PID file was created successfully, and ifRobert James Kaes1-2/+6
not report this to the user and close the program.
2002-11-03Removed all the code supporting the TCP tunnelling feature ofRobert James Kaes1-13/+1
tinyproxy. There is really no need for this code, since there are perfectly good programs out there (like rinetd) which are designed for TCP tunnelling. tinyproxy should be a good HTTP proxy, nothing more, and nothing less; therefore, the tunnelling code is gone.
2002-10-03Fixed up the storing and sending of the internal tinyproxy logs priorRobert James Kaes1-4/+13
to when the log file is created. Also, the log file is created with the proper owner permissions.
2002-07-12(main): Fixed up a bug reported by Oswald Buddenha where the log file was ↵Robert James Kaes1-6/+6
being initially created with the initial user's permissions, which is obviously a problem if tinyproxy is not running as the initial user. This is now fixed by delaying the creation of the log file until _after_ tinyproxy has been switched to the user it will run as. Confused yet?
2002-06-15Renamed the "log_rotation_request" boolean to "received_sighup".Robert James Kaes1-24/+5
(main): Removed the log file creation code because it has been moved into the log.c file. Also, removed the explicit fclose() for the log file since it will be close when the program has exited.
2002-06-06(display_usage): Added a message indicating whether transparent proxy ↵Robert James Kaes1-1/+4
support has been compiled in.
2002-05-31The log file is now opened in "append" mode so that you can restart ↵Robert James Kaes1-3/+3
tinyproxy without losing the log file.
2002-05-27Some spelling fixes.Robert James Kaes1-2/+2
2002-05-27(display_license): Updated the copyright datesRobert James Kaes1-11/+11
(main): Moved the signals around so that the appropriate signal is assigned to either the children or just the parrent process. Updated the copyright on the file.
2002-05-26Removed all the code relating to the DNS API (dnsclient.h) as it's noRobert James Kaes1-38/+9
longer needed with the new pre-forked model.
2002-05-24Fixed a tonne of spelling mistakes.Robert James Kaes1-2/+2
2002-05-23Added a new signal handler to handle SIGCHLD signals because of the newRobert James Kaes1-7/+50
dnsserver child process. Changed the set signal calls to use our new set_signal_handler() function. Added code to start the "dnsserver" child process.
2002-04-24Moved bind_address inside the config structure.Robert James Kaes1-2/+1
2002-04-22The log_message() function now stores the messages if the configurationRobert James Kaes1-1/+6
file has not been read yet. The reason for this is that we don't know where to log the messgaes until _after_ the config file has been processed.
2002-04-18Changed all calls to strdup to safestrdup. This should provide betterRobert James Kaes1-2/+2
memory usage tracking.
2002-04-18Moved the filter_destroy() logic from inside the signal handler. It's nowRobert James Kaes1-6/+6
been moved to inside the main() function.
2002-04-18Moved the log rotation code out of the signal handler and into it's ownRobert James Kaes1-50/+4
function. The signal handler now simply sets a flag which is monitored inside the thread_main_loop() function. The log rotation code has also been tightened to handle any error conditions better. Credit to Petr Lampa for suggesting that system functions inside of a signal handler is bad magic.
2002-04-08Just moved the looping code from main() into thread_main_loop().Robert James Kaes1-5/+3
2002-04-07Updated the copyright notice.Robert James Kaes1-2/+2
2002-01-25Added code to check for "errors" from the accept call in thread_main() andRobert James Kaes1-1/+3
also a new thread_kill_threads() function which should cancel all threads when the main thread is being closed.
2001-12-23Made the error message regarding the Idle timeout more verbose, andRobert James Kaes1-2/+2
changed the level to WARNING.
2001-12-15Removed the include "dnscache.h" header file.Robert James Kaes1-2/+1
2001-11-22Reformated text.Robert James Kaes1-44/+82
2001-10-25Header reorganization. Basically all system headers are now included inRobert James Kaes1-10/+1
tinyproxy.h and all the other files include the tinyproxy.h header. This moves all the dependancy issues into one file.
2001-09-16Added a check to make sure the Upstream and Tunnel directives are not bothRobert James Kaes1-1/+8
set in the configuration file.
2001-09-16Fixed a problem where log messages could be missed during a rotate.Robert James Kaes1-6/+10
2001-09-15Changed to rotating the log file instead of truncating it. Also using theRobert James Kaes1-8/+44
create_file_safely() function to eliminate potential security problems.
2001-09-07Error message cleanup.Robert James Kaes1-22/+22
2001-08-29Removed the new_dnscache() call.Robert James Kaes1-8/+1
2001-08-26Renamed versiondisp() to display_version() and added the PACKAGE, VERSION,Robert James Kaes1-26/+41
and TARGET_SYSTEM into the version list. Also moved the license into a separate function. Renamed usagedisp() to display_usage(). Fixed a problem where the anonymous search tree was being created _after_ it was being accessed.
2001-06-04Removed the DEFAULT_LOG, DEFAULT_PORT, and DEFAULT_USER directives sinceRobert James Kaes1-7/+6
these MUST be set in the configuration file.
2001-06-02LOG_EMERG doesn't exist anymore, so replace it with LOG_CRIT.Robert James Kaes1-2/+2
2001-05-27Added code to stop the creation of core files.Robert James Kaes1-31/+48
Changed all references to log() to log_message().
2000-12-08Fixed a problem with polling for the number of active threads. No longerRobert James Kaes1-2/+6
polls. :)
2000-11-23Fixed spelling mistake.Robert James Kaes1-2/+2
2000-10-23Added the initialization section for the DNS and Anonymous sub systems.Robert James Kaes1-1/+15
2000-09-21There is no LOG_EMERG level, so changed to LOG_CRIT.Robert James Kaes1-5/+5