gateway.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef GATEWAY_H_INCLUDED
  2. #define GATEWAY_H_INCLUDED
  3. /*********************************************************************
  4. *
  5. * File : $Source: /cvsroot/ijbswa/current/gateway.h,v $
  6. *
  7. * Purpose : Contains functions to connect to a server, possibly
  8. * using a "gateway" (i.e. HTTP proxy and/or SOCKS4
  9. * proxy). Also contains the list of gateway types.
  10. *
  11. * Copyright : Written by and Copyright (C) 2001-2009 the
  12. * Privoxy team. https://www.privoxy.org/
  13. *
  14. * Based on the Internet Junkbuster originally written
  15. * by and Copyright (C) 1997 Anonymous Coders and
  16. * Junkbusters Corporation. http://www.junkbusters.com
  17. *
  18. * This program is free software; you can redistribute it
  19. * and/or modify it under the terms of the GNU General
  20. * Public License as published by the Free Software
  21. * Foundation; either version 2 of the License, or (at
  22. * your option) any later version.
  23. *
  24. * This program is distributed in the hope that it will
  25. * be useful, but WITHOUT ANY WARRANTY; without even the
  26. * implied warranty of MERCHANTABILITY or FITNESS FOR A
  27. * PARTICULAR PURPOSE. See the GNU General Public
  28. * License for more details.
  29. *
  30. * The GNU General Public License should be included with
  31. * this file. If not, you can view it at
  32. * http://www.gnu.org/copyleft/gpl.html
  33. * or write to the Free Software Foundation, Inc., 59
  34. * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  35. *
  36. *********************************************************************/
  37. struct forward_spec;
  38. struct http_request;
  39. struct client_state;
  40. extern jb_socket forwarded_connect(const struct forward_spec *fwd,
  41. struct http_request *http,
  42. struct client_state *csp);
  43. #ifdef FEATURE_CONNECTION_SHARING
  44. extern void initialize_reusable_connections(void);
  45. extern void forget_connection(jb_socket sfd);
  46. extern void remember_connection(const struct reusable_connection *connection);
  47. extern int close_unusable_connections(void);
  48. #endif /* FEATURE_CONNECTION_SHARING */
  49. extern void mark_connection_closed(struct reusable_connection *closed_connection);
  50. #ifdef FEATURE_CONNECTION_KEEP_ALIVE
  51. extern int connection_destination_matches(const struct reusable_connection *connection,
  52. const struct http_request *http,
  53. const struct forward_spec *fwd);
  54. #endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
  55. #ifdef FUZZ
  56. extern jb_err socks_fuzz(struct client_state *csp);
  57. #endif
  58. #endif /* ndef GATEWAY_H_INCLUDED */
  59. /*
  60. Local Variables:
  61. tab-width: 3
  62. end:
  63. */