summaryrefslogtreecommitdiffhomepage
path: root/src/tinyproxy.h
AgeCommit message (Collapse)Author
2009-08-07Rename tinyproxy.[ch] to main.[ch]Mukund Sivaraman
2008-12-08Convert tabs to spacesMukund Sivaraman
2008-12-01Reformat code to GNU coding styleMukund Sivaraman
This is a commit which simply ran all C source code files through GNU indent. No other modifications were made.
2008-07-14Allow numeric uid/gids in User and Group directivesMukund Sivaraman
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 Sivaraman
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-16* [Refactor] Moved Reverse Proxy CodeRobert James Kaes
Moved the reverse proxy code from reqs.c into it's own files (reverse_proxy.c). The code in reqs.c is way too complicated, so I want to move unrelated code into their own files to simplify the main concepts in reqs.c.
2005-08-15* [Indent] Ran Source Through indentRobert James Kaes
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 Kaes
Updated the copyright email addresses for Robert James Kaes. The users.sourceforge.net address should always exist.
2004-08-10Merged in changes from 1.6.3Robert James Kaes
2004-04-27Added the "BindSame" configure directive from Oswald Buddenhagen.Robert James Kaes
This allows tinyproxy to respond to a request bound to the same interface that the request came in on. As Oswald explains: "attached is a patch that adds the BindSame option. it causes binding an outgoing connection to the ip address of the respective incoming connection. that way one can simulate an entire proxy farm with a single instance of tinyproxy on a multi-homed machine." Cool.
2004-01-26Added reverse proxy support from Kim Holviala. His comments regardingRobert James Kaes
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-08-01Included patches from Steven Young to use the hashmap functionality toRobert James Kaes
manage the HTML error pages. It simplifies the source, and also make the object file smaller. Nice. Also added any casting from (void*) to ensure that the code compiles using a C++ compiler.
2003-06-20Removed the "ViaHeader" directive and replaced it with theRobert James Kaes
"ViaProxyName" directive. The "Via" HTTP header is _required_ by the HTTP spec, so the code has been changed to always send the header. However, including the proxy's host name could be considered a security threat, so the "ViaProxyName" directive is used to set the token sent in the "Via" header. If the directive is not enabled the proxy's host name will be used.
2003-06-02(upstream_get):Robert James Kaes
(upstream_add): Added support to allow ip addresses and networks to be used when matching an upstream proxy directive. [Code by Peter da Silva]
2003-05-29Improved the upstream proxy support by making the upstream proxyRobert James Kaes
server configurable based on the destination host. [Code written by Peter da Silva]
2003-03-13# Added variables to config structure to keep track of the files to beRobert James Kaes
displayed for various HTTP errors and the stats page. [Steven Young]
2003-01-27Added support for conditionally using case sensitive filtering files.Robert James Kaes
Code changes from James E. Flemer.
2002-12-04Removed the "bool_t" type since it conflicts with the newer C standards.Robert James Kaes
The type was just replaced by "unsigned int" types.
2002-11-26Included code to disable the sending of the Via header. This is nowRobert James Kaes
controlled by the ViaHeader configure directive.
2002-11-03Removed all the code supporting the TCP tunnelling feature ofRobert James Kaes
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-06-15Removed the "logf" FILE structure from the config structure, and also ↵Robert James Kaes
renamed the "log_rotation_request" boolean to "received_sighup".
2002-05-27Added into the config structure the filter_urls and filter_extended flags.Robert James Kaes
2002-05-23Moved all the system header includes into the common.h file.Robert James Kaes
2002-04-24Moved bind_address inside the config structure.Robert James Kaes
2002-04-22The log_message() function now stores the messages if the configurationRobert James Kaes
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-18Moved the log rotation code out of the signal handler and into it's ownRobert James Kaes
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-09The malloc/free functions should be in stdlib.h, but if we can't findRobert James Kaes
stdlib.h then try including malloc.h. Maybe this will allow clean compiling on some platforms.
2001-12-28Removed an unused header.Robert James Kaes
2001-12-23Add a pre-processor test around the sys/types.h header file, to make sureRobert James Kaes
it's available before we try to include it.
2001-12-23Fixed up the order of some of the includes to cope with OpenBSD. Also,Robert James Kaes
test for the MSG_NOSIGNAL define.
2001-11-26Added support for the <pthreads.h> header.Robert James Kaes
2001-11-26Increased the maximum buffer size to 96 KBRobert James Kaes
2001-11-25Added tests for _every_ header to make sure they are actually present onRobert James Kaes
the system.
2001-11-22Reformated text.Robert James Kaes
2001-10-25Header reorganization. Basically all system headers are now included inRobert James Kaes
tinyproxy.h and all the other files include the tinyproxy.h header. This moves all the dependancy issues into one file.
2001-10-25Some code clean up due to the creation of the conns.{c,h} files which nowRobert James Kaes
store the creation/destruction and definition of the connection structure.
2001-10-25Added the upstream flag to the conn_s structure.Robert James Kaes
2001-09-16Added the configure variables to support the upstream proxy.Robert James Kaes
2001-09-14Include the SSL field in the connection structure since we're going toRobert James Kaes
handle SSL connections.
2001-09-08Changed all the mallocs and callocs to use the new safemalloc andRobert James Kaes
safecalloc.
2001-08-29Text clean up.Robert James Kaes
2001-08-27Moved some of the includes around so that FreeBSD can compile correctly.Robert James Kaes
2001-08-26Removed the config.anonymous entry since we've moved the information intoRobert James Kaes
anonymous.c file.
2001-06-06Fixed the include order to better handle the sys/time.h and time.hRobert James Kaes
headers.
2001-06-02Fixed up the names of the DEFINES.Robert James Kaes
2001-05-27Added code to stop the creation of core files.Robert James Kaes
Changed all references to log() to log_message().
2001-05-23Made the safefree() macro enabled all the time.Robert James Kaes
2000-09-26Moved the safefree() macro to the tinyproxy.h header.Robert James Kaes
2000-09-14Need to do a check for the <stdint.h> header since it's not a standardRobert James Kaes
header available on all systems.
2000-09-12Fixed the change user/group ability.Robert James Kaes
Log when tinyproxy is using default values rather than specific ones. Cleaned up the command line arguments since tinyproxy now uses a configuration file. Removed the USR1 signal and added the thread creation code.