summaryrefslogtreecommitdiff
path: root/src/config.h
blob: 0a8a7664ddc57138833795bd0b2a88a2a73601c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* $Id: config.h,v 1.2 2000-03-13 00:56:21 rjkaes Exp $
 *
 * Contains all the tune-able variables which are used by tinyproxy.
 * Modifications made to these variables WILL change the default behaviour
 * of tinyproxy. Please read the comments to better understand what each
 * variable does.
 *
 * Copyright (C) 1998  Steven Young
 * Copyright (C) 1999  Robert James Kaes (rjkaes@flarenet.com)
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 */

#ifndef _CONFIG_H_
#define _CONFIG_H_	1

/*
 * Define this if you want tinyproxy to use /proc/loadavg to determine
 * system load (Linux only, I think)
 */
#define USE_PROC

#ifndef USE_PROC
/*
 * Path to uptime to determin system load.  This path doesn't have to be
 * valid if DEFAULT_CUTOFFLOAD is 0
 */
#define UPTIME_PATH "/usr/bin/uptime"
#endif				/* !USE_PROC */

/*
 * The default load at which tinyproxy will start refusing connections.
 * 0 == disabled by default
 */
#define DEFAULT_CUTOFFLOAD 0

/*
 * NOTE: for DEFAULT_STATHOST:  this controls remote proxy stats display.
 * for example, the default DEFAULT_STATHOST of "tinyproxy.stats" will
 * mean that when you use the proxy to access http://tinyproxy.stats/",
 * you will be shown the proxy stats.  Set this to something obscure
 * if you don't want random people to be able to see them, or set it to
 * "" to disable.  In the future, I figure maybe some sort of auth
 * might be desirable, but that would involve a major simplicity
 * sacrifice.
 */

/* The "hostname" for getting tinyproxy stats. "" = disabled by default */
#define DEFAULT_STATHOST "tinyproxy.stats"

/*
 * NOTE: change these if you know what you're doing
 */
#define SOCK_TIMEOUT 5
/* Recalculate load avery 30 seconds */
#define LOAD_RECALCTIMER 30
/* Default HTTP port */
#define HTTP_PORT 80
/* Every time conncoll is called, nuke connections idle for > 60 seconds */
#define STALECONN_TIME (60 * 15)
/* Every 100 times through run the garbage collection */
#define GARBCOLL_INTERVAL 10

#endif