LoginSignup
0
0

squidでBasic認証に失敗したときの対処メモ

Posted at

squidで立てたプロキシサーバでBasic認証設定に手こずったので症状と解決策をまとめます

環境

OS: Windows 10
squidバージョン:4.14

image.png

症状

  1. ローカルPCにsquidをインストールし、以下のユーザ情報でBasic認証をする設定を行う。(設定手順参考ページ )
    ユーザID: user
    パスワード: pass123

  2. ターミナルから以下を実行する

curl.exe https://www.google.com/ -x http://user:pass123@localhost:3128


以下のエラーが出力される

curl: (56) CONNECT tunnel failed, response 407

このときログファイル(C:\Squid\var\log\squid\cache.log) には以下のエラーメッセージが無限に出力され続ける

2023/11/03 00:54:32| helperOpenServers: Starting 1/5 'basic_ncsa_auth.exe' processes
C:/squid/lib/squid/basic_ncsa_auth.exe: error while loading shared libraries: cygcrypt-2.dll: cannot open shared object file: No such file or directory

(このエラー出力はタスクマネージャからsquid.exeを強制終了することで止まった)

解決策

cygcrypto-2.dllを手動でC:\Squid\lib\squidに配置すると解決した

cygcrypto-2.dllはcygwinを使ってlibcyrpt2をインストールすることで入手できたので、以下その手順まとめ

  1. cygwinのインストーラを実行 (インストーラ配布ページ)
  2. Select Packages画面でlibcrypt2のバージョンを選択してインストールを進める
    image.png
    3. インストール完了できたら C:\cygwin64\bin\cygcrypt-2.dllC:\Squid\lib\squidにコピーする
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0