vworld
Silver Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Оговорюсь заранее, что творчество отчасти мое...неоценимую помощь оказал мне многоуважаемый член нашего форума ooptimum и сообщество с openNet. Итак про авторизацию под squidNT необходимо нам 3 файла я их назвал таким образом: auth.conf squid.conf auth.vbs Далее подробнее... ----------auth.conf-------- 1 1 #синтаксиси именно такой логин_пробел_пароль ----------------------------- ----------squid.conf------- http_port 192.168.0.198:3128 cache_peer 192.168.0.73 parent 80 7 no-query login=admin:baba icp_port 0 htcp_port 0 hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY cache_mem 32 MB cache_swap_low 80 cache_swap_high 95 maximum_object_size 8192 KB minimum_object_size 0 KB maximum_object_size_in_memory 8 KB ipcache_size 1024 ipcache_low 80 ipcache_high 95 fqdncache_size 1024 cache_replacement_policy lru memory_replacement_policy lru cache_dir awin32 c:/squid/var/cache 100 5 32 cache_access_log c:/squid/var/logs/access.log cache_log c:/squid/var/logs/cache.log cache_store_log c:/squid/var/logs/store.log log_mime_hdrs off #httpd_accel_port 0 auth_param basic program c:/windows/system32/cscript.exe //B //h:cscript //nologo C:/Squid/libexec/auth.vbs C:/Squid/etc/auth.conf auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 15 hours auth_param basic casesensitive off refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern . 0 20% 4320 quick_abort_pct 80 negative_ttl 1 minutes negative_dns_ttl 5 minute acl parol proxy_auth REQUIRED acl all src 0.0.0.0/0.0.0.0 acl print src 192.168.1.0/255.255.255.0 acl localhost src 127.0.0.1/255.255.255.255 acl manager proto cache_object acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl SSL_ports port 443 563 8084 http_access allow parol http_access deny !Safe_ports #http_access allow user localhost manager http_access deny all visible_hostname Squid announce_period 0 dns_testnames mail.print-image.com memory_pools off coredump_dir c:/squid/var/cache ie_refresh on error_directory c:/squid/share/errors/Russian-1251 #обратите отдельное внимание к путям до директорий и файлов #не все что есть в этом конфиге надо тупо копировать себе #у меня squid посредник-прокси до прокси WinRoute ----------------------------------------------------------------- --------------auth.vbs-------------------- Set Arg=WScript.Arguments Set FSO=CreateObject("Scripting.FileSystemObject") FileName=Arg(0) I=0 While I=0 StringPass=WScript.StdIn.ReadLine Reply="ERR" Set File=FSO.OpenTextFile(FileName,1) Stoped=0 While File.AtEndOfStream=False And Stoped=0 StringFile=File.ReadLine If MID(StringFile,1,1)<>"#" Then If StringFile=StringPass Then Reply="OK" Stoped=1 End If End If Wend WScript.StdOut.WriteLine Reply File.Close Wend --------------------------------------------------------- На самом деле есть задумка написать мануал как я все это мучил, но все руки не доходят З.Ы. в помощь прогу берите GetGnuWin32 подможет при создание конфига, а именно выбрасывает строки комментариев (ну кому надо конечно).
|