Advertisement
anoncheg

Squid анонимный публичный прокси anonymous proxy настойка

Apr 12th, 2014
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 23.22 KB | None | 0 0
  1. Лабораторная работа Установка и настройка Proxy-сервера SQUID.
  2.  
  3. Цель работы: Приобрести навыки установки и настройки Proxy-сервера SQUID.
  4.  
  5. ВЫПОЛНЕНИЯ РАБОТЫ
  6.  
  7. Будем использовать операционную систему Debian GNU/Linux.
  8. Буду устанавливать Squid для использовать в экспериментальных целях на персональном компьютере.
  9. Squid часто используется в програмных комплексах middleware и как web cache для веб-сервера.
  10. 1. Установите squid.
  11. # aptitude search squid
  12. ...
  13. #aptitude install squid3
  14. The following NEW packages will be installed:
  15.   libecap2{a} squid-langpack{a} squid3 squid3-common{a}
  16.  
  17. #apt-cache show squid3
  18. or
  19. # squid3 -v
  20. Squid Cache: Version 3.3.8
  21.  
  22.     Следующая комманда поможет нам проверть файл настроек:
  23.     #squid3 -k parse
  24.  
  25.     Запуск будет производить стандартными коммандами:
  26.     #service squid3 start|stop|restart|reload
  27.  
  28.     Нам понадобится информация из http://wiki.squid-cache.org/SquidFaq/ConfiguringSquid
  29.  
  30. 2. Перейдите в директорию /etc/squid и откройте файл squid.conf. Все необходимые параметры там уже прописаны, но большинство из них закомментированы.
  31. -rw-r--r--   1 root root   1547 Mar  2 15:09 errorpage.css
  32. -rw-r--r--   1 root root    421 Mar  2 15:10 msntauth.conf
  33. -rw-r--r--   1 root root 259118 Mar  2 15:10 squid.conf
  34. Ещё я создам папочку "my" c дополнительными файлами настроек
  35. 3. Включите следующие параметры:
  36.  
  37. http_port 3128
  38.  
  39. #cache_dir ufs /var/spool/squid 100 16 256
  40. #не буду указывать, чтобы кэш расположить в памяти
  41. #cache_mem 8 MB
  42.  
  43. cache_mem 200 MB
  44. cache_swap_low 90
  45. cache_swap_low 5
  46. cache_swap_high 95
  47.  
  48. #minimum_object_size 0 KB #be default
  49. #maximum_object_size 4 MB #be dafault
  50. #maximum_object_size_in_memory 8 KB
  51.  
  52. maximum_object_size_in_memory  4 MB
  53.  
  54. #ipcache_size 1024 (размер кэша для хранения IP-адресов)
  55. #ipcache_low 90 (минимальный процент заполнения кэша)
  56. #ipcache_high 95 (максимальный процент заполнения кэша)
  57. #quick_abort_min 16 KB (минимальный размер объекта, устанавливающий при обрыве соединения необходимость закончить его скачивание и полностью сохранить)
  58. #quick_abort_max 16 KB (максимальный остаток объекта, при котором закачка будет прервана в случае обрыва соединения)
  59.  
  60.      quick_abort_max 1024 KB
  61.    
  62. #quick_abort_pct 95 (максимальный процент уже полученной информации)
  63. #negative_ttl 5 minutes (количество минут, за которые нужно кэшировать негативный ответ сервера)
  64. #positive_dns_ttl 6 hours ( время, в течение которого нужно кэшировать положительный результат DNS-запроса)
  65. #negative_dns_ttl 1 minute (промежуток времени, в пределах которого нужно кэшировать негативный ответ DNS-сервера)
  66. #range_offset_limit 0 KB(информация в запрошенном объеме будет передаваться между сервером и клиентом без кэширования на прокси-сервере)
  67. #cache_log /var/log/squid/cache.log
  68. #cache_store_log /var/log/squid/store.log #none by default
  69. #log_mime_hdrs off (не сохранять заголовки MIME)
  70. #icp_port 3130 #disabled by defalut
  71. #htcp_port 4827 (номер порта, который будет использоваться для ICP-протокола, работающего поверх TCP/IP) #disabled by default
  72. #icp_query_timeout 0 (время ожидания в миллисекундах) #dynamic
  73. #acl good_url    url_regex     "/etc/squid/acl/good_url"
  74. #acl bad_urlpath urlpath_regex "/etc/squid/acl/bad_url_path"
  75. #acl bad_url     url_regex     "/etc/squid/acl/bad_url"
  76.  
  77.     #in config by default
  78.     acl SSL_ports port 443
  79.     acl Safe_ports port 80      # http
  80.     acl Safe_ports port 21      # ftp
  81.     acl Safe_ports port 443     # https
  82.     acl Safe_ports port 70      # gopher
  83.     acl Safe_ports port 210     # wais
  84.     acl Safe_ports port 1025-65535  # unregistered ports
  85.     acl Safe_ports port 280     # http-mgmt
  86.     acl Safe_ports port 488     # gss-http
  87.     acl Safe_ports port 591     # filemaker
  88.     acl Safe_ports port 777     # multiling http
  89.     acl CONNECT method CONNECT
  90.     #in config by default
  91.  
  92.     acl Safe_ports port 3128  
  93.     #proxyport
  94.     acl spam port 25 80
  95.     #smtp http
  96.     acl smtp port 25
  97.     #smtp
  98.  
  99.     acl alls src all
  100.     #все IP адреса источники
  101.     #From 3.2 further configuration cleanups have been done to make things easier and safer. The manager, localhost, and to_localhost ACL definitions are now built-in.
  102.     #acl manager proto cache_object
  103.     #acl localhost src 127.0.0.1/32
  104.     acl blockls src 94.232.8.0/21 #94.232.8.0 – 94.232.15.255
  105.  
  106.     #acl to_localhost dst 127.0.0.0/8      0.0.0.0/32  
  107.     acl to_localnet dst 10.0.0.0/8
  108.     acl blockld dst 94.232.8.0/21
  109.  
  110.     acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
  111.     acl localnet2 src 192.168.0.0/16    # RFC1918 possible internal network
  112.    
  113.     acl banlist src "/etc/squid3/my/banlist.txt"
  114.     acl badbrowsers browser "/etc/squid3/my/badbrowsers.txt"
  115.     #acl checkers src "/etc/squid3/my/allowedcheckers.txt"
  116.  
  117.     acl botcharset req_header Accept-Charset "/etc/squid3/my/badlcharset.txt"
  118.     acl botlanguage req_header Accept-Language "/etc/squid3/my/badlanguage.txt"
  119.     acl proxybotsx req_header X-Forwarded-For . #to deny bots with proxy
  120.  
  121.     acl upload_control req_header Content-Length [2-9][0-9]{6,}
  122.     #bytes 1024*1024=1048576=1MB=7 chars
  123.  
  124.     acl night time 01:00-09:00
  125.  
  126.     #блокируем доступ к локальной сети
  127.     http_access deny to_localnet
  128.     #блокируем доступ самомим себе
  129.     http_access deny to_localhost
  130.     #блокируем доступ из особо опасного диапозона адресов
  131.     http_access deny  blockls
  132.     #блокируем доступ к особо опасному диапозону адресов
  133.     http_access deny blockld
  134.     #блокируем доступ из локальной сети
  135.     http_access deny localnet
  136.     #блокируем доступ из локальной сети
  137.     http_access deny localnet2
  138.     http_access allow checkers
  139.  
  140.     http_access deny botcharset
  141.     #блокируем по заголовку на заливание слишком больших файлов
  142.     http_access deny upload_control
  143.     #список айпиадресов и диапозонов
  144.     http_access deny banlist
  145.     #список regex плохих useragent
  146.     http_access deny badbrowsers
  147.  
  148.     http_access deny botlanguage
  149.     #закрываем доступ для тех кто использует низкокачественные прокси серверы
  150.     #http_access deny proxybotsx
  151.  
  152.     # Only allow cachemgr access from localhost
  153.     http_access allow manager localhost
  154.     http_access deny manager
  155.  
  156.     ############
  157.     http_access deny CONNECT smtp
  158.     #############
  159.     http_access allow CONNECT
  160.     #############
  161.     #access from all IP adresses
  162.     http_access allow alls
  163.     #http_access allow localhost
  164.     http_access deny all
  165.  
  166.     follow_x_forwarded_for deny all
  167.  
  168.     via off
  169.     follow_x_forwarded_for deny all
  170.  
  171. request_header_access Allow allow all
  172. request_header_access Authorization allow all
  173. #       request_header_access WWW-Authenticate allow all
  174. #request_header_access User-Agent allow all
  175. request_header_access Proxy-Authorization allow all
  176. request_header_access Proxy-Authenticate allow all
  177. request_header_access Cache-Control allow all
  178. request_header_access Content-Encoding allow all
  179. request_header_access Content-Length allow all
  180. request_header_access Content-Type allow all
  181. request_header_access Date allow all
  182. request_header_access Expires allow all
  183. request_header_access Host allow all
  184. request_header_access If-Modified-Since allow all
  185. request_header_access Last-Modified allow all
  186. request_header_access Location allow all
  187. request_header_access Pragma allow all
  188. request_header_access Accept allow all
  189. request_header_access Accept-Charset allow all
  190. request_header_access Accept-Encoding allow all
  191. request_header_access Accept-Language allow all
  192. request_header_access Content-Language allow all
  193. request_header_access Mime-Version allow all
  194. request_header_access Retry-After allow all
  195. request_header_access Title allow all
  196. request_header_access Connection allow all
  197. request_header_access Proxy-Connection allow all
  198. request_header_access Keep-Alive allow all     
  199. request_header_access All deny all
  200.  
  201. #header_replace Accept-Language ru,en-us;q=0.7,en;q=0.3
  202. request_header_replace Accept-Language en,en-us;q=0.7,ru;q=0.3
  203. request_header_replace Accept-Encoding gzip,deflate
  204. request_header_replace Accept-Charset windows-1251,utf-8;q=0.7,*;q=0.7
  205. request_header_replace Accept "напиши"
  206. request_header_add User-Agent "Mozilla/5.0 (Windows; U; Windows NT 5.2; ru; rv:1.9.1.10) Gecko/20100504 SeaMonkey/2.0.5"
  207. request_header_add Dnt 1
  208.  
  209. cache_mgr your_email@mail.com
  210. httpd_suppress_version_string on
  211. shutdown_lifetime 10 seconds
  212.  
  213. logformat squid %ts %4>st %6<st %15>a %9mt %5rm %3>Hs %ru %un %Sh/%<A %Ss
  214. logformat useragent %>a   "%{Accept-Language}>h"    "%{Accept-Charset}>h"    "%{User-Agent}>h" %Ss:%Sh
  215. logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
  216.  
  217. #access_log /var/log/squid3/access.log squid !banlist
  218. #access_log /var/log/squid3/user-agent.log useragent !banlist !badbrowsers !botcharset !botlanguage
  219. #access_log /var/log/squid3/banned_badbrowsers.log useragent badbrowsers
  220. #access_log /var/log/squid3/banned_botlanguage.log useragent botlanguage
  221. #access_log /var/log/squid3/banned_nocharset.log useragent botcharset
  222.  
  223. #дадим приоритет запросам с нашего же хоста
  224. delay_pools 2
  225. delay_class 1 1
  226. delay_class 2 2
  227. delay_access 1 allow localhost
  228. delay_access 1 deny all
  229. delay_parameters 1 -1/-1
  230. delay_parameters 2 240000/240000 48000/48000
  231.  
  232. #можно использовать сторонние сервера для разрешения днс
  233. dns_nameservers 1.1.1.1 8.8.8.8
  234.  
  235. memory_pools_limit 100 MB
  236. forwarded_for off
  237. client_db off
  238.  
  239. 4. В каталоге /etc/squid создайте папку acl.
  240. 5. В этой папке создайте 3 файла: bad_url, bad_url_path, good_url. С помощью них и acl будем бороться с рекламой, баннерами, всплывающими окнами и т.п.
  241.  
  242.     Файл badbrowsers.txt
  243. ^$
  244. ^-$
  245. ^Mozilla/5\.0$
  246. ^Mozilla/[7-9]
  247. Netscape
  248. (.*?)MSIE 5
  249. (.*?)MSIE 4
  250. (.*?)MSIE 3
  251. (.*?)Gecko/200
  252. (.*?)firefox/[0-2]
  253. (.*?)Firefox/3\.0
  254. (.*?)Firefox/3\.5
  255. (.*?)Firefox/3\.6\.[0-7]
  256. (.*?)SeaMonkey/0
  257. (.*?)SeaMonkey/1
  258. (.*?)Opera [7-9]
  259. ^Opera/[5-8]
  260. ^Opera/9
  261. (.*?)Chrome/5\.0\.375\.125
  262. (.*?)Windows 98
  263. (.*?)Windows 2000
  264. (.*?)Windows NT4\.0
  265. (.*?)Ubuntu/9
  266. (.*?)Safari/4
  267. (.*?)Safari/52
  268. (.*?)Safari/53[0-2]
  269. (.*?)Safari/533\.1[0-6]
  270. (.*?)rv:1\.7\.
  271. ^Speedy
  272. ^Nutch
  273. ^Java
  274. ^shelob
  275. ^ISC
  276. ^TrackBack
  277. ^ichiro
  278. ^bot
  279. ^HouxouCrawler
  280. ^User
  281. ^user
  282. ^Attentio
  283. ^Mp3Bot
  284. ^NameOfAgent
  285. ^yacybot
  286. ^WWW-Mechanize
  287. ^MLBot
  288. ^WebAlta
  289. ^MJ12bot
  290. ^Python
  291. ^libwww
  292. ^Libwww
  293. ^trackback
  294. ^heretrix
  295. ^jakarta
  296. ^Jakarta
  297. ^LibWWW
  298. ^Mozilla/1
  299. ^Larbin
  300. ^larbin
  301. ^Gator
  302. ^gator
  303. ^Mozilla/[0-4]
  304. (.*?)Googlebot
  305. ^Aport
  306. ^Yandex
  307. ^MobileRunner-J2ME
  308. ^Mozilla 4
  309. ^Mozilla / 4
  310. ^Mozilla/5\.0 \( Windows; U; Windows NT5\.0; FireFox \)$
  311. ^bnflow
  312. (.*?)NetCaptor
  313. ^mozilla/4
  314. (.*?)DigiExt
  315. ^Twisted PageGetter
  316. ^Mozilla Firefox
  317. ^Filangy
  318. ^Penetrator
  319. ip_stats
  320. ^MOT-V
  321. ^SIE-A
  322. (.*?)Nokia
  323. ^ScrapeBox
  324. (.*?)athome0
  325. ^Mozilla/5\.0 \(compatible; MSIE 6\.0; Windows NT 5\.1\)$
  326. (.*?)Firefox/3\.6$
  327. ^Secunia PSI$
  328. (.*?)Avant Browser
  329. ^WMD
  330. ^AsyncDownloadMgr$
  331. ^fimap\.googlecode
  332. ^SEC
  333. ^Microsoft
  334. ^DoCoMo
  335. (.*?)GTB7
  336. (.*?)RPT-HTTPClient
  337. ^ebuddy
  338. ^w3m
  339. (.*?)MozillaDeveloperPreview
  340. (.*?)Trident
  341. ^TMUFE
  342. (.*?)hotvideobar
  343. ^GRLevel
  344. (.*?)sputnik
  345. ^curl
  346. (.*?)HttpClient
  347. ^NSPlayer
  348. (.*?)Windows Live
  349. (.*?)MSNIA
  350. ^IE/
  351. ^Windows
  352. ^Sony
  353. (.*?)LUDI2
  354. ^Space Bison
  355. (.*?)Yahoo
  356. (.*?)MRA [0-9]
  357. ^Panda Security
  358. ^Internet
  359. (.*?)iPhone
  360. (.*?)Compaq
  361. ^Adobe
  362. ^Ruby/69$
  363. ^Bros4.Whenbye$
  364. ^KDDI-HI
  365. ^Opera$
  366. ^MSIE
  367. ^Wget
  368. ^SIE
  369. ^xmlrpclib
  370.  
  371.  
  372. Файл badlanguage.txt
  373. ^$
  374. ^en$
  375. ^fr$
  376. ^ja$
  377. ^de$
  378. ^ru$
  379. ^zh-cn$
  380. ^ru-RU$
  381. ^en-us$
  382. ^en-US$
  383. ^ja-jp$
  384.  
  385.  
  386. Файл badlcharset.txt
  387. ^$
  388. ^-$
  389. ^UTF-8,\*$
  390.  
  391.  
  392. Файл banlist.txt
  393. 109.86.246.7
  394. 109.87.7.115
  395.  
  396. 6. В файл bad_url поместите плохие URL:
  397. 7.
  398. 8. http://microsoft.com
  399. 9. http://.*doubleclick
  400. 10. http://.*-ad.flycast.com/server/img/
  401. 11. http://1000.stars.ru/cgi-bin/1000.cgi
  402. 12. http://1000.stars.ru/cgi-bin/1000.cgi
  403. 13. http://12.16.1.10/~web_ani/  
  404. 14.
  405. 15. В bad_url_path – плохие имена:
  406. 16.
  407. 17. 88x31.*gif
  408. 18. 88x31.*GIF
  409. 19. 100x80.*gif
  410. 20. 100x80.*GIF
  411. 21. 100x100.*gif  
  412. 22.
  413. 23. В good_url пропишите:
  414. 24.
  415. 25. http://google.ru/linux
  416. 26. http://linuxforum.ru
  417. 27. http://linuxcenter.ru
  418. 28. http://linuxformat.ru
  419. 29. http://bsu.org
  420. 30.
  421. 31. Теперь в командной строке наберите:
  422. 32.
  423.  
  424.  
  425.  
  426.  
  427. Для поддержки HTTS придётся повозиться. **********Есть одна загвоздка HTTPS не направляется через cache_peer/ ***** это технология в squid называется ssl-bump
  428. http://www.mydlp.com/how-to-configure-squid-3-2-ssl-bumping-dynamic-ssl-certificate-generation/
  429. дополнительно http://wiki.squid-cache.org/Features/DynamicSslCert
  430. Перекомпиляция squid-3.4.5:
  431. ``FATAL: Received Segment Violation...dying''
  432. % cd squid-x.y
  433. % make distclean
  434. you need csh:
  435. % setenv CFLAGS='-g -Wall'
  436.  
  437. Я включил эти опции в конфиг:
  438. '--build=i486-linux-gnu' '--prefix=/home/user/ProgramsMy/squid' '--includedir=${prefix}/include' '--bindir=${prefix}/sbin' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=${prefix}/etc' '--localstatedir=${prefix}/var' '--libexecdir=${prefix}/lib' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--datadir=${prefix}/share' '--sysconfdir=${prefix}/etc' '--mandir=${prefix}/share/man' '--enable-inline' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd,rock' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-underscores' '--enable-icap-client' '--enable-follow-x-forwarded-for' '--enable-auth-basic=DB,fake,getpwnam,LDAP,MSNT,MSNT-multi-domain,NCSA,NIS,PAM,POP3,RADIUS,SASL,SMB' '--enable-auth-digest=file,LDAP' '--enable-auth-negotiate=kerberos,wrapper' '--enable-auth-ntlm=fake,smb_lm' '--enable-external-acl-helpers=file_userip,kerberos_ldap_group,LDAP_group,session,SQL_session,unix_group,wbinfo_group' '--enable-url-rewrite-helpers=fake' '--enable-eui' '--enable-esi' '--enable-icmp' '--enable-zph-qos' '--enable-ecap' '--disable-translation' '--with-swapdir=${prefix}/spool' '--with-logdir=${prefix}/log' '--with-pidfile=${prefix}/run/squid3.pid' '--with-filedescriptors=65536' '--with-large-files' '--with-default-user=proxy' '--enable-linux-netfilter' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O0 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'LDFLAGS=-fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' '--enable-ssl' '--enable-ssl-crtd'
  439.  
  440.  
  441.  
  442. 1)
  443. создаём где-нибудь папку ssl_cert и ssl_db
  444. Впервую папку ssl_cert создаём ключи:
  445. openssl genrsa 4096 > private.pem
  446. openssl req -new -x509 -days 3650 -key private.pem -out public.pem
  447. openssl x509 -in public.pem -outform DER -out user.der
  448. 2)
  449. user.der
  450. Включаем в сертификаты браузера:
  451. For example, in FireFox:
  452.     Open 'Preferences'
  453.     Go to the 'Advanced' section, 'Encryption' tab
  454.     Press the 'View Certificates' button and go to the 'Authorities' tab
  455.     Press the 'Import' button, select the .der file that was created previously and pres 'OK'
  456. 3) Заменяем следующие настройки в etc/squid.conf
  457. http_port 3128 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB key=/...ssl_cert/private.pem cert=/.../ssl_cert/public.pem
  458.  
  459. always_direct allow all
  460. ssl_bump server-first all #ssl_bump allow all - устарела
  461. sslproxy_cert_error allow all
  462. # Or may be deny all according to your company policy
  463. # sslproxy_cert_error deny all
  464. sslproxy_flags DONT_VERIFY_PEER
  465. sslcrtd_program /usr/lib/squid3/ssl_crtd -s /var/lib/ssl_db -M 4MB
  466. sslcrtd_children 5
  467. #№ssl_crtd - это скрипт который находится в папке lib
  468. ssl_db - это напи созданная директория из пункат 1.
  469.  
  470. 4) Squid may require to ssl_crtd caching directories to be created manually and change directory ownership of this caching folder to user that Squid use. For this case, please use the commands below;
  471. Нужно выполнить одну комманду ...lib/squid3/ssl_crtd -c -s ssl_db
  472. ssl_crtd и ssl_db из пункта 4 и пункта 3 должны совпадать и иметь права proxy proxy
  473.  
  474.  
  475.  
  476. squid.conf
  477.  
  478.  
  479. acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
  480. acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
  481. acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
  482. acl localnet src fc00::/7       # RFC 4193 local private network range
  483. acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
  484. acl SSL_ports port 443
  485. acl Safe_ports port 80      # http
  486. acl Safe_ports port 21      # ftp
  487. acl Safe_ports port 443     # https
  488. acl Safe_ports port 70      # gopher
  489. acl Safe_ports port 210     # wais
  490. acl Safe_ports port 1025-65535  # unregistered ports
  491. acl Safe_ports port 280     # http-mgmt
  492. acl Safe_ports port 488     # gss-http
  493. acl Safe_ports port 591     # filemaker
  494. acl Safe_ports port 777     # multiling http
  495. acl CONNECT method CONNECT
  496. acl squid_port port 3182
  497. acl spam port 25 80
  498. acl smtp port 25
  499. acl inetera src 94.232.8.0/21
  500. acl to_localnet dst 10.0.0.0/8
  501. acl to_TOR dstdom_regex -i \.onion
  502. acl to_I2P dstdom_regex -i \.i2p
  503. acl to_SSL proto HTTPS
  504. acl banlist src "/etc/squid3/my/banlist.txt"
  505. acl badbrowsers browser "/etc/squid3/my/badbrowsers.txt"
  506. acl dstdnsban  dstdomain  .rutracker.ru  .eurobattle.net .rutracker.org
  507. acl botcharset req_header Accept-Charset "/etc/squid3/my/badlcharset.txt"
  508. acl botlanguage req_header Accept-Language "/etc/squid3/my/badlanguage.txt"
  509. acl proxybotsx req_header X-Forwarded-For .
  510. acl upload_control req_header Content-Length [2-9][0-9]{6,}
  511. acl night time 01:00-09:00
  512. acl to_TOR dstdom_regex -i \.onion
  513. acl to_I2P dstdom_regex -i \.i2p
  514. acl to_SSL proto HTTPS
  515. http_access deny to_localhost
  516. http_access deny botcharset
  517. http_access deny banlist
  518. http_access deny badbrowsers
  519. http_access deny botlanguage
  520. http_access deny CONNECT smtp
  521. http_access allow manager localhost
  522. http_access deny manager
  523. http_access allow CONNECT
  524. follow_x_forwarded_for deny all
  525. http_access allow localhost manager
  526. http_access deny manager
  527. http_access allow localnet
  528. http_access allow localhost
  529. http_access deny all
  530. htcp_access deny all
  531. htcp_clr_access deny all
  532. http_port 3128 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB key=/home/user/ProgramsMy/ssl_cert2/private.pem cert=/home/user/ProgramsMy/ssl_cert2/public.pem
  533. sslcrtd_program /home/user/ProgramsMy/squid/lib/ssl_crtd -s /home/user/ProgramsMy/squid/var/lib/ssl_db -M 10MB
  534. always_direct allow to_SSL
  535. ssl_bump client-first all
  536. sslproxy_cert_error allow all
  537. sslproxy_flags DONT_VERIFY_PEER
  538. always_direct deny all
  539. never_direct allow all
  540. cache_peer 119.31.123.207 parent 8000 0 no-query no-netdb-exchange no-digest
  541. cache_peer 127.0.0.2 parent 8123 0 default no-query no-digest no-netdb-exchange proxy-only
  542. cache_peer_access 127.0.0.2 allow to_TOR
  543. cache_peer_access 127.0.0.2 deny all
  544. cache_peer 127.0.0.1 parent 4444 0 default no-query no-digest no-netdb-exchange proxy-only
  545. cache_peer_access 127.0.0.1 allow to_I2P !to_SSL
  546. cache_peer_access 127.0.0.1 deny all
  547. cache_mem 512 MB
  548. maximum_object_size_in_memory 7 MB
  549. memory_cache_shared off
  550. logformat squid      %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
  551. logformat common     %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
  552. logformat combined   %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
  553. logformat referrer   %ts.%03tu %>a %{Referer}>h %ru
  554. logformat useragent  %>a [%tl] "%{User-Agent}>h"
  555. access_log daemon:/home/user/ProgramsMy/squid/log/access.log squid
  556. cache_log /home/user/ProgramsMy/squid/log/cache.log
  557. coredump_dir /home/user/ProgramsMy/squid/spool
  558. pinger_enable off
  559. refresh_pattern ^ftp:       1440    20% 10080
  560. refresh_pattern ^gopher:    1440    0%  1440
  561. refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
  562. refresh_pattern .       0   20% 4320
  563. request_body_max_size 10 MB
  564. adaptation_uses_indirect_client off
  565. via off
  566. request_header_access Allow allow all
  567. request_header_access Authorization allow all
  568. request_header_access Proxy-Authorization allow all
  569. request_header_access Proxy-Authenticate allow all
  570. request_header_access Cache-Control allow all
  571. request_header_access Content-Encoding allow all
  572. request_header_access Content-Length allow all
  573. request_header_access Content-Type allow all
  574. request_header_access Date allow all
  575. request_header_access Expires allow all
  576. request_header_access Host allow all
  577. request_header_access If-Modified-Since allow all
  578. request_header_access Last-Modified allow all
  579. request_header_access Location allow all
  580. request_header_access Pragma allow all
  581. request_header_access Accept allow all
  582. request_header_access Accept-Encoding allow all
  583. request_header_access Accept-Language allow all
  584. request_header_access Content-Language allow all
  585. request_header_access Mime-Version allow all
  586. request_header_access Retry-After allow all
  587. request_header_access Title allow all
  588. request_header_access Connection allow all
  589. request_header_access Proxy-Connection allow all
  590. request_header_access Keep-Alive allow all
  591. request_header_access Cookie allow all
  592. request_header_access All deny all
  593. request_header_replace Accept-Language en-US,en;q=0.5
  594. request_header_replace Accept-Encoding gzip,deflate
  595. request_header_replace Accept "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
  596. request_header_add User-Agent "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0"
  597. request_header_add Dnt 2
  598. shutdown_lifetime 5 seconds
  599. httpd_suppress_version_string on
  600. digest_generation off
  601. nonhierarchical_direct off
  602. memory_pools_limit 50 MB
  603. forwarded_for delete
  604. client_db off
  605. connect_retries 2
  606. windows_ipaddrchangemonitor off
  607. eui_lookup off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement