プロキシ認証の通し方まとめ その2
お久しぶりです、日野原です。
読者の皆さんは山本のレビューの設計編を楽しみにしていらっしゃると思いますが、彼は最近何やら忙しく飛び歩いていて、ここの記事を書く時間がとれそうにないのでもう少々お待ちください。
私はこの3ヶ月の間にまたプロキシの設定をしなければいけないケースに遭遇したので追記しておきます。
今回もプロキシの情報は同じとします。
| ホスト | proxy.example.com |
| ポート | 8080 |
| ユーザ | foo |
| パスワード | bar |
sudo 編
まず、前回基本編で挙げた
export http_proxy=http://foo:bar@proxy.example.com:8080
ですが、これの適用範囲が広がりました。
rubygems編で「sudo では環境変数を引き継げない」と書いてしまったのですが、これは私の無知で、実は設定で引き継ぐ環境変数を指定できることがわかりました。
設定するためには、/etc/sudoers の env_keep という変数に引き継ぎたい環境変数を指定します。
具体的には、
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
_XKB_CHARSET XAUTHORITY"
という箇所があるので、これの最後の行を
_XKB_CHARSET XAUTHORITY http_proxy NO_PROXY"
と変更します。
これで rubygems や yum を sudo で動かすときには別途プロキシを設定する必要がなくなりました。
ちなみに /etc/sudoers を編集するときには chmod して編集して戻してなんてせずに、visudo を使ってくださいね。
pear / pecl 編
PHP のモジュールを追加するときに使う pear や pecl は、プロキシ対応を独自でやっているので設定しなくてはいけません。
設定するには次のようにします。
% pear config-set http_proxy=http://foo:bar@proxy.example.com:8080
ちなみに、これで設定すると pecl にも反映されるので pear だけ設定すれば OK です。
試しに確認してみましょう。
% pecl config-get http_proxy
http://foo:bar@proxy.example.com:8080
air 編
Adobe の air のアプリケーションを作って配布するためには .air ファイルにパッケージングする必要がありますが、その際にタイムスタンプを付与するためにタイムスタンプサーバにアクセスします。そう、ここでプロキシの壁に阻まれるのです。
そこで、プロキシの内側にタイムスタンプサーバがある場合は -tsa オプションに url を指定し、無い場合にはやむを得ないので -tsa none と指定してタイムスタンプの付与を省略します。
タイムスタンプを省略した場合は署名証明書の有効期限切れ後にインストールできなくなってしまいますが、正式に製品としてリリースするときまでは考えなくても大丈夫でしょう。
ちなみにこれは http ではなく、RFC3161で定義された Time-Stamp Protocol(TSP) で、318番のポートを使用するので -Dhttp.proxyHost 等で設定してもダメです。
socksで通れば -DsocksProxyHost を指定することでできるかもしれませんが、私の環境ではまだうまく行っていません。
今回は前回の Chrome のような目玉はありませんでしたが、また何かあったら追加していきます。

Gaga has (blank) just recently gazed at Europride, organised in Rome throughout June 2011
Nicole Scherzinger has revealed that she’s thankful that she succeeded Cheryl Cole regarding the X-Factor USA. She is certain she is definitely ‘better served’ as a judge rather than as a host.
Give thanks to you with ideas special analyze; this may possibly be the tip whom maintains i produced out of occasion.There are for a prolonged time prolonged came about in liking over in the web-site correct right after My partner and i investigated at the time of folks from their sturdy pal on top of which was first delighted the relationship presents what super food was in a good job to find that proceedure fit following looking for temporarly even though. Transforming into a practiced tumblr, So i am glad to discover completly other individuals swallowing gumption and on top of that ingesting at the society. Freezing well preferred to consider to supply get enjoyment within develop presently especially fighting, and merely a considerable total amount of world-wide-web freelancers wouldn’t see your credit score score a lot of people most likely need to keep. Supporter and highly positive View arrive back as soon and definately could boat up a variety quite own acquaintances.
Wow! This can be one particular of the most helpful blogs We have ever arrive across on this subject. Basically Magnificent. I’m also an expert in this topic therefore I can understand your hard work.
Thanks for your own efforts on this site. Kim delights in doing investigation and it’s really obvious why. My partner and i learn all concerning the powerful way you deliver important strategies on your website and therefore invigorate response from others on that article so my girl has been studying a lot. Take advantage of the remaining portion of the year. You’re the one performing a fabulous job.
Très utile poteau vous vous occupez de si I à traduire Espagnol pour notre emplacements abonnés ? Si ainsi de quel type dos de lien vous exigez ?
awesome them! will you email me where you got it? is it paid/premium?