proxy代理   soft软件   IT 业界特快   norton 诺顿病毒库   代理列表   search FTP搜索   whois IP地理位置   blog 追求完美  
money理财   life生活   RSS聚合门户   firefox WEB浏览器   免费域名   typeset 假古文   AntiVirus 反病毒   ipcn 站点导航  

« squid ipcn.pac use URLHash2 of SPS(Super Proxy Script) - remove ipcnauth | Main | HoeKey - 超小巧超强悍的快捷键小工具 »

April 29, 2004

SquidNT - Squid 2.5 for Windows NT 4.0/2000/XP/2003

版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
https://windtear.net/archives/2004/04/29/000494.html

----->   homepage

http://www.acmeconsulting.it/pagine/opensource/squid/squidnt25.htm

Squid 2.5 for Windows NT 4.0/2000/XP/2003

Native port of Squid 2.5, with many NT service enhancement.

  • Current features:
    • Based on Squid 2.5 STABLE 5
    • Run as a native Windows NT Service
    • Currently supported build environments:
      • Microsoft Visual C++ 6.0 SP5
      • MSYS + MinGW
      • Cygwin
    • Multiple Squid service instances are allowed
    • Full Command line support when running as a service
    • Automatic Service restart after Squid failure on Windows 2000/XP/2003
    • Use PSAPI.DLL for full getrusage() emulation
    • Internal DNS looks in registry for configured DNS, resolv.conf no more needed
    • Multithreaded support for standard Squid external helpers or redirectors (pinger, unlinkd, dnsserver)
    • All squid -k switches (check, debug, interrupt, kill, parse, reconfigure, rotate, shutdown) works
    • Basic, NTLM and Digest Authentication schema
    • Native Windows NT Basic and NTLM Authenticators with NTLMv2 support
    • Cachemgr CGI interface supporting Microsoft IIS and Apache Web Server
    • SNMP
    • Revised awin32 async I/O
    • External ACL native WIN32 group helper for Windows Domains group membership check
    • OpenSSL Support at source level (no binary packages available)
    • Currently supported Windows platforms:
      • Windows NT 4.0 Workstation and Server SP4 and later
      • Windows 2000 Professional and Server
      • Windows XP Professional (Home Edition not tested)
      • Windows 2003 Server

    Current ChangeLog

    Some special builds are available on Squid download Page

  • Licensing
  • Install:
    • If You are upgrading from SquidNT 2.3, please uninstall the old service and merge your old squid.conf in the new squid.conf configuration file. Don't forget to take a look about squid.conf changes on Squid 2.4 and Squid 2.5 pages
    • Extract the binary archive in the desired directory (default c:\squid)
    • Read the CompileOptions.txt file
    • Copy squid.conf.default as squid.conf and mime.conf.default as mime.conf
    • Edit the squid.conf and change if needed the c:/squid path (use path with '/' char, NOT '\')
    • Manually create ALL the directories specified in squid.conf, except the contents of the cache directory
    • Starting with PRE9 revision, squid.exe was moved from bin to sbin directory.
      Please remove and reinstall SquidNT service to reflect the changes.
    • squid -i [-f configfile] [-n servicename] (installs the servicename Squid service using the configfile configuration file, default configfile is "c:/squid/etc/squid.conf", default servicename is "SquidNT")
    • squid -z [-f configfile] (creates the cache directories)
    • squid -O servicecommandline [-n servicename] (Set in Windows Registry the Squid servicename service command line)

  • Uninstall:
    • squid -r [-n servicename] (removes the servicename Squid service)

  • Usage:
      Service mode:
    • Start: Control Panel/Services: choose "Start" for the "SquidNT" service.
    • Stop: Control Panel/Services: choose "Stop" for the "SquidNT" service.
    • squid -h Print help message.
    • squid -n servicename [-f configfile] -k reconfigure | rotate | shutdown | interrupt | kill | debug | check
      Send signal to running copy and exit.
    • squid -O servicecommandline [-n servicename] Set Windows Service Command line options in Registry.
    • squid -v Print version.

      The rest of the (original) cmdline switches when running as a Service must be used once with the -O switch. If multiple service command line options must be specified, use quote.

      Don't use the "Start parameters" in the Windows 2000/XP/2003 Service applet: they are specific to Windows services functionality and Squid is not designed for understand they.

      Example:
      squid -O "-D -a 8080" -n squidsvc
      Don't forget to take a look on Squid documentation on http://www.squid-cache.org/

      This Squid build can support multiple Squid service instances running from the same executable, so the service name MUST be ALWAYS specified when using all -k, -O commands even running only one instance.

      Every instance must have a different service name, use different TCP ports, use different logs and cache directory and use a different configuration file.
      So, when installing the service, if don't using the default settings (c:/squid,SquidNT Service Name), the service name and the associated config file MUST be specified.
      The same when removing or running squid -k or -O commands.

      Command Line mode:
    • All Squid cmdline switches are available, except the -N (no daemon mode)

  • Compiling source code:
    • Microsoft build environment:
      • Microsoft Visual C++ 6.0 Service Pack 5
      • Microsoft latest Core SDK
      • Native CVS, gawk, perl,sed and patch for NT
    • MinGW environment:
      • MSYS 1.0.9 or later
      • MinGW 3.1.0 or later
      • Windows API 2.4.0 or later
      • MSYS Developer Tool Kit 1.0.1 or later
    • Build environments configuration
    • How obtain the sources:
    • Build using Microsoft Visual Studio:
      • Check ASCII format of all project files, must be DOS (CR+LF)
      • Check paths on all project files
      • Verify the Squid options defined in autoconf.h
      • Check default parameters on squid_mswin.mak file
      • Check settings on Install files project
    • Build using MinGW:
      • From MSYS prompt run:
        ./configure --prefix=c:/squid --enable-win32-service --enable-default-hostsfile=none
        make
      • For other configure options see Squid FAQ

  • Compatibility Notes:
    • It's recommended to use / char in Squid paths instead of \
    • Paths with spaces (like C:\Programs Files\Squid) are NOT supported by Squid
    • When using ACL like acl aclname acltype "file" the file must be in DOS text format (CR+LF) and the full Windows path must be specified, for example:
      acl blocklist url_regex -i "c:/squid/etc/blocked1.txt"
    • The WIN32 equivalent of /dev/null is NUL
    • Squid doesn't know how to run external helpers based on scripts, like .bat, .cmd, .vbs, .pl, etc. So in squid.conf the interpreter path must be always specified, for example:
      redirect_program c:/perl/bin/perl.exe c:/squid/libexec/redir.pl
      redirect_program c:/winnt/system32/cmd.exe /C c:/squid/libexec/redir.cmd
    • When Squid runs in command line mode, the launching user account must have administrative privilege on the system
    • "Start parameters" in the Windows 2000/XP/2003 Service applet cannot be used

  • Known Limitations:
    • Squid features not operational:
      DISKD: needs to be ported - Volunteers are welcome
      WCCP: cannot work because GRE support on Windows is missing - Volunteers are welcome
      Transparent Proxy: missing Windows non commercial interception driver
    • Some code sections can make blocking calls
    • Some external helpers may not work
    • File Descriptors number hard-limited to 2048
      At this time Windows is a platform partially supported from Squid Community.
      For general Squid configuration ask always on squid-users mailing list.

      No warranties of any kind. No time for support, sorry. Use at your own risk.

      SquidNT BUG Reports

      Original Port and some enhancements by Romeo Anghelache (see the ChangeLog)




      Squid Now!

  • ----->   download

    http://www.acmeconsulting.it/pagine/opensource/download/squid.htm

    http://albaweb.albacom.net/acmeconsulting.it/download/squid-2.5.STABLE5-NT-CVS.zip

    http://albaweb.albacom.net/acmeconsulting.it/download/squid-2.5.STABLE5-NT-bin.zip

    http://albaweb.albacom.net/acmeconsulting.it/download/squid-2.5.STABLE5-NT-bin-DELAYP.zip

    ----->   demo

    C:\squid\sbin>squid -v
    Squid Cache: Version 2.5.STABLE5-NT
    configure options: --enable-win32-service --enable-htcp --enable-icmp --disable-
    wccp --enable-underscores --enable-storeio='ufs awin32 null' --enable-removal-po
    licies='heap lru' --enable-snmp --enable-win32-service --enable-useragent-log --
    enable-referer-log --enable-auth='basic ntlm digest' --enable-basic-auth-helpers
    =win32_locallogon --enable-ntlm-auth-helpers=NTLMSSP-WIN32 --enable-external-acl
    -helpers=win32_group --prefix=c:/squid
    Compiled as Windows System Service.

    C:\squid\sbin>squid -h
    Usage: squid [-dhirsvzCDFRVYX] [-f config-file] [-[au] port] [-k signal] [-n nam
    e] [-O CommandLine]
           -a port   Specify HTTP port number (default: 3128).
           -d level  Write debugging to stderr also.
           -f file   Use given config-file instead of
                     c:/squid/etc/squid.conf
           -h        Print help message.
           -i        Installs as a Windows Service (see -n option).
           -k reconfigure|rotate|shutdown|interrupt|kill|debug|check|parse
                     Parse configuration file, then send signal to
                     running copy (except -k parse) and exit.
           -n name   Specify Windows Service name to use for service operations
                     default is: SquidNT.
           -r        Removes a Windows Service (see -n option).
           -s        Enable logging to syslog.
           -u port   Specify ICP port number (default: 3130), disable with 0.
           -v        Print version.
           -z        Create swap directories
           -C        Do not catch fatal signals.
           -D        Disable initial DNS tests.
           -F        Don't serve any requests until store is rebuilt.
           -O options
                     Set Windows Service Command line options in Registry.
           -R        Do not set REUSEADDR on port.
           -S        Double-check swap during rebuild.
           -V        Virtual host httpd-accelerator.
           -X        Force full debugging.
           -Y        Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.

    C:\squid\sbin>squid -z
    FATAL: Could not determine fully qualified hostname.  Please set 'visible_hostname'

    Squid Cache (Version 2.5.STABLE5-NT): Terminated abnormally.
    CPU Usage: 0.063 seconds = 0.031 user + 0.031 sys
    Maximum Resident Size: 3140 KB
    Page faults with physical i/o: 876

    abnormal program termination

    C:\squid\sbin>squid -z
    2004/04/28 16:02:07| Creating Swap Directories

    C:\squid\sbin>

    --- squid.conf.default  Sat Feb 28 17:18:40 2004
    +++ squid.conf  Wed Apr 28 16:02:06 2004
    @@ -700,6 +700,7 @@
     #
     #Default:
     # cache_dir ufs c:/squid/var/cache 100 16 256
    +cache_dir ufs E:/temp/cache 100 16 256
     
     #  TAG: cache_access_log
     #    Logs the client request activity.  Contains an entry for
    @@ -725,6 +726,7 @@
     #
     #Default:
     # cache_store_log c:/squid/var/logs/store.log
    +cache_store_log none
     
     #  TAG: cache_swap_log
     #    Location for the cache "swap.log."  This log file holds the
    @@ -2049,6 +2051,7 @@
     #
     #Default:
     # none
    +visible_hostname test.nt.proxy.ipcn.org
     
     #  TAG: unique_hostname
     #    If you want to have multiple machines with the same

     
    本blog WWW

    Posted by windtear at April 29, 2004 3:15 PM

    本站使用中的任何问题,请与 windtear @ windtear.net 联系
    Copyright© 1999-2024 Windtear. All rights reserved.