LoginSignup
9
13

More than 5 years have passed since last update.

ubuntuにプロキシサーバーを構築

Last updated at Posted at 2016-05-12

背景

  • 社内に、selenium webdriver+capybaraでテスト環境構築するが、capybara seleniumは認証付きproxyを超えられない

手順

squid3のインストール

$ sudo apt-get install squid3
  • 確認
$ squid3 -v
Squid Cache: Version 3.3.8

認証付きproxyを設定

sudo vi /etc/squid3/squid.conf
  • 以下のコードを追加
http_port 8080
cache_peer (proxyのhostname) parent 8080 7 no-query login=(proxyのユーザー名):(proxyのパスワード)
never_direct allow all
  • 再起動
$ sudo service squid3 restart
squid3 stop/waiting
squid3 start/running, process 13066

確認

  • firefoxに、プロキシを設定する

    • 127.0.0.1:8080
  • firefoxから、www.google.co.jpへアクセスする

    • 社内プロキシ認証なしで、アクセスできることを確認した

参照

9
13
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
9
13