Windows版Squidを立ち上げる
仕事で時々プロキシサーバーの検証環境が必要になるのでメモ。
SquidフォルダをCドライブ直下に配置(Squidフォルダ自体は以前入手したものを使用) ↓ C:\squid\etc\squid.conf を編集 ↓ acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 の下あたりに 「acl <任意の名前> src 192.168.100.0/24」(右のIPアドレスは接続を許可するIP帯) を記載 ↓ http_access allow が集まっている行に 「http_access allow <上でつけた名前> 」 を記載 ↓ http_port <ポート番号>を記載 ↓ 保存 ↓ コマンドプロンプトから「C:\squid\sbin\squid.exe」を実行 (オプションなしで実行するだけでexeが常時動作している状態になる。 Windowsのサービスとして登録したい場合は下記のヘルプを参照)
◇ squid.exeのヘルプ
Usage: squid [-hirvzCDFIRYX] [-d level] [-s | -l facility] [-f config-file] [port] [-k signal] [-n name] [-O command-line] -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: Squid. -r Removes a Windows Service (see -n option). -s | -l facility 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. -I Override HTTP port with the bound socket passed in on stdin. -N No daemon mode. -O options Set Windows Service Command line options in Registry. -R Do not set REUSEADDR on port. -S Double-check swap during rebuild. -X Force full debugging. -Y Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.