Advertisement
Guest User

Untitled

a guest
Jun 5th, 2010
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.74 KB | None | 0 0
  1. <?php
  2. /*******************************************************************
  3. * Glype Proxy Script
  4. *
  5. * Copyright (c) 2008, http://www.glype.com/
  6. *
  7. * Permission to use this script is granted free of charge
  8. * subject to the terms displayed at http://www.glype.com/downloads
  9. * and in the LICENSE.txt document of the glype package.
  10. *******************************************************************
  11. * Our settings file. Self-explanatory - stores the config values.
  12. * Changelog:
  13. * - Prior to 1.0, settings were stored as constants. Now these are
  14. * in a $CONFIG array, which allows changes to be made by plugins.
  15. ******************************************************************/
  16.  
  17. /*****************************************************************
  18. * Installation options
  19. ******************************************************************/
  20.  
  21. // Theme/skin to use. This should be the name of the appropriate folder
  22. // inside the /themes/ folder.
  23. $CONFIG['theme'] = 'default';
  24.  
  25. // Temporary directory used by the script. By default, the caching feature
  26. // server-side cookie storage and logs use the temp dir. If using these features,
  27. // ensure the directory is writable.
  28. $CONFIG['tmp_dir'] = GLYPE_ROOT . '/tmp/';
  29.  
  30. // Use GZIP compression when sending pages back to the user. This reduces
  31. // bandwidth usage but at the cost of increased CPU load.
  32. $CONFIG['gzip_return'] = false;
  33.  
  34. // Warn users before browsing a secure site if on an unsecure connection
  35. $CONFIG['ssl_warning'] = true;
  36.  
  37. // Load limiter. This attempts to fetch the server load and the script stops
  38. // serving pages whenever we go over the limit. Set to 0 to disable.
  39. // Requires shell_exec() so safe_mode must be off.
  40. $CONFIG['load_limit'] = 0;
  41.  
  42. // Censor content. Any text in the list below will be replaced with '####'
  43. // in the returned parsed document.
  44. $CONFIG['censor_words'] = array();
  45.  
  46. // Footer include. Anything specified here will be added to the bottom of all
  47. // proxified pages just before the </body> tag.
  48. $CONFIG['footer_include'] = '';
  49.  
  50. // License key for removing copyright link. Leave blank if you don't have a license.
  51. $CONFIG['license_key'] = '';
  52.  
  53.  
  54. /*****************************************************************
  55. * URL encoding options
  56. ******************************************************************/
  57.  
  58. // Use PATH_INFO? Generates URL like: browse.php/aHr3i0fsde/33rds/dtd/
  59. $CONFIG['path_info_urls'] = false;
  60.  
  61. // Generate unique URLs for each visitor
  62. $CONFIG['unique_urls'] = false;
  63.  
  64.  
  65. /*****************************************************************
  66. * Hotlinking
  67. ******************************************************************/
  68.  
  69. // Protect against hotlinking - redirect users to index
  70. $CONFIG['stop_hotlinking'] = true;
  71.  
  72. // Allow hotlinking from these domains
  73. $CONFIG['hotlink_domains'] = array();
  74.  
  75.  
  76. /*****************************************************************
  77. * Caching options
  78. ******************************************************************/
  79.  
  80. // Enable or disable the cache feature
  81. $CONFIG['use_cache'] = false;
  82.  
  83. // Apply caching to requests for resources with these file extensions
  84. $CONFIG['cache_file_types'] = array('css', 'jpg', 'jpeg', 'png', 'gif', 'js', 'flv', 'zip', 'rar');
  85.  
  86. // Apply caching to all websites or only the sites explicitly listed?
  87. $CONFIG['cache_all'] = false;
  88.  
  89. // Apply caching to the following websites (if above is FALSE)
  90. $CONFIG['cache_sites'] = array('myspace.com', 'google.', 'facebook.com', 'bebo.com');
  91.  
  92. // URL to cache folder, e.g. http://www.yourproxy.com/cache/
  93. $CONFIG['cache_url'] = GLYPE_URL . '/tmp/cache/';
  94.  
  95. // Path to cache folder, e.g. /home/proxy/public_html/cache/
  96. $CONFIG['cache_path'] = $CONFIG['tmp_dir'] . 'cache/';
  97.  
  98. // Note: to share a cache folder between multiple proxies, simply set the
  99. // above locations to the appropriate values on all proxies.
  100.  
  101.  
  102. /*****************************************************************
  103. * Logging options
  104. ******************************************************************/
  105.  
  106. // Enable the logging feature
  107. $CONFIG['enable_logging'] = false;
  108.  
  109. // Destination for log files. Use an absolute path and ensure the
  110. // specified destination (file or directory) is writable.
  111. // - set to a file to log everything to a single file
  112. // - set to a directory (with trailing slash) for one log file per day
  113. $CONFIG['logging_destination'] = $CONFIG['tmp_dir'] . 'logs/';
  114.  
  115. // Log all requests? Set to false to log only HTML pages.
  116. $CONFIG['log_all'] = false;
  117.  
  118.  
  119. /*****************************************************************
  120. * Website access control
  121. * You can restrict access to websites through your proxy with either
  122. * a whitelist or a blacklist:
  123. * - Whitelist: any site that IS NOT on the list will be blocked.
  124. * - Blacklist: any site that IS on the list will be blocked
  125. ******************************************************************/
  126.  
  127. // Block everything except these sites
  128. $CONFIG['whitelist'] = array();
  129.  
  130. // Block the following sites
  131. $CONFIG['blacklist'] = array();
  132.  
  133.  
  134. /*****************************************************************
  135. * User access control
  136. * You can ban users from accessing your proxy by IP address.
  137. * Bans can be set by adding strings to the array in the format:
  138. * - single IP addresses or ranges (using a hyphen separator) in dotted quad format
  139. * - IP address ranges in slash notation
  140. * Examples of acceptable formats to use here:
  141. * 127.0.0.1 127.0.0.1-127.0.0.5
  142. * 192.168.17.1/16 127.0.0.1/255.255.255.255
  143. * 189.128/11
  144. ******************************************************************/
  145.  
  146. $CONFIG['ip_bans'] = array();
  147.  
  148.  
  149. /*****************************************************************
  150. * Transfer options
  151. ******************************************************************/
  152.  
  153. // Time to wait for the connection (seconds) [0 for no limit]
  154. $CONFIG['connection_timeout'] = 5;
  155.  
  156. // Time to allow for the entire transfer (seconds) [0 for no limit]
  157. $CONFIG['transfer_timeout'] = 0;
  158.  
  159. // Allow resuming of transfers
  160. $CONFIG['resume_transfers'] = false;
  161.  
  162. // Maximum filesize permitted for downloads through the proxy (bytes) [0 for no limit]
  163. $CONFIG['max_filesize'] = 0;
  164.  
  165. // Queue transfers up so we only have one transfer running at a time per user
  166. $CONFIG['queue_transfers'] = true;
  167.  
  168.  
  169. /*****************************************************************
  170. * Cookies
  171. ******************************************************************/
  172.  
  173. // All cookies must be sent to the proxy script. The script can then choose the
  174. // correct cookies to forward to the target server. However there are finite limits
  175. // in both the client's storage space and the size of the request Cookie: header that
  176. // the server will accept. For prolonged browsing, you may wish to store cookies
  177. // server side to avoid this problem.
  178. // This has obvious privacy issues - if using this option, ensure your site clearly
  179. // states how it handles cookies and protect the cookie data from unauthorised access.
  180. $CONFIG['cookies_on_server'] = false;
  181.  
  182. // Path to folder to use for cookie storage. Default is "/{$CONFIG['tmp_dir']}/cookies/"
  183. // but ideally this would be above the webroot to protect the data.
  184. $CONFIG['cookies_folder'] = $CONFIG['tmp_dir'] . 'cookies/';
  185.  
  186. // If the cookies are being forwarded to the client (as by default they are), the
  187. // name, the domain that set the cookie and value can be encoded.
  188. // Note: increases load and increases cookie sizes by 33%
  189. $CONFIG['encode_cookies'] = false;
  190.  
  191.  
  192. /*****************************************************************
  193. * Maintenance
  194. ******************************************************************/
  195.  
  196. // How often to clear the temporary files created by the script? [hours]
  197. // Set to 0 to disable automated cleaning of the tmp directory.
  198. // $CONFIG['tmp_dir'] must point to a writable folder to use this option.
  199. $CONFIG['tmp_cleanup_interval'] = 0;
  200.  
  201. // When should old log files be deleted? [days]
  202. // Set to 0 to never delete log files.
  203. $CONFIG['tmp_cleanup_logs'] = 0;
  204.  
  205.  
  206. /*****************************************************************
  207. * User configurable options.
  208. * These affect the user's browsing experience and are displayed on
  209. * the index page and the mini-form.
  210. * title = text displayed next to option
  211. * default = value to use unless/until overridden by user
  212. * desc = lengthier description displayed as tooltip on default theme
  213. * force = this allows you to remove the user choice and force default
  214. ******************************************************************/
  215.  
  216. $CONFIG['options'] = array(
  217.  
  218. 'encodeURL' => array('title' => 'Encode URL',
  219. 'default' => true,
  220. 'desc' => 'Encodes the URL of the page you are viewing so that it does not contain the target site in plaintext.',
  221. 'force' => false),
  222.  
  223. 'encodePage' => array('title' => 'Encode Page',
  224. 'default' => false,
  225. 'desc' => 'Helps avoid filters by encoding the page before sending it and decoding it with javascript once received. This is not 100% reliable and may break functionality in some browsers.',
  226. 'force' => false),
  227.  
  228. 'showForm' => array('title' => 'Show Form',
  229. 'default' => true,
  230. 'desc' => 'This provides a mini form at the top of each page to allow you to quickly jump to another site without returning to our homepage.',
  231. 'force' => true),
  232.  
  233. 'allowCookies' => array('title' => 'Allow Cookies',
  234. 'default' => true,
  235. 'desc' => 'Cookies may be required on interactive websites (especially where you need to log in) but advertisers also use cookies to track your browsing habits.',
  236. 'force' => false),
  237.  
  238. 'tempCookies' => array('title' => 'Force Temporary Cookies',
  239. 'default' => true,
  240. 'desc' => 'This option overrides the expiry date for all cookies and sets it to at the end of the session only - all cookies will be deleted when you shut your browser. (Recommended)',
  241. 'force' => true),
  242.  
  243. 'stripTitle' => array('title' => 'Remove Page Titles',
  244. 'default' => false,
  245. 'desc' => 'Removes titles from proxified pages.',
  246. 'force' => true),
  247.  
  248. 'stripJS' => array('title' => 'Remove Scripts',
  249. 'default' => false,
  250. 'desc' => 'Remove scripts to protect your anonymity and speed up page loads. However, not all sites will provide an HTML-only alternative. (Recommended)',
  251. 'force' => false),
  252.  
  253. 'stripObjects' => array('title' => 'Remove Objects',
  254. 'default' => false,
  255. 'desc' => 'You can increase page load times by removing unnecessary Flash, Java and other objects. If not removed, these may also compromise your anonymity.',
  256. 'force' => false)
  257. );
  258.  
  259.  
  260. /*****************************************************************
  261. * Do not edit this section manually!
  262. ******************************************************************/
  263.  
  264. // Settings file version for determining compatability with admin tool
  265. $CONFIG['version'] = '1.0';
  266.  
  267.  
  268. //---PRESERVE ME---
  269. // Anything below this line will be preserved when the admin control panel rewrites
  270. // the settings. Useful for storing settings that don't/can't be changed from the control panel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement