We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
以下ではno_proxyがありませんが、
doctree/refm/api/src/open-uri.rd
Line 153 in 1689342
たぶん以下のfind_proxyまで降りてno_proxyが設定できる気がするので確認して追加する。
The text was updated successfully, but these errors were encountered:
こちらのissueの確認をしました。 Ruby 3.2.2の open-uri のデフォルトで no_proxy 環境変数が有効になっていました。
open-uri
no_proxy
以下は確認した内容です。
Webrickのプロキシサーバを立ち上げておき、そのプロキシに対して open-uri で no_proxy 環境変数の指定によってプロキシ経由でアクセスする/しないを確認しました。
Webrickのプロキシサーバのコード。
require "webrick" require "webrick/httpproxy" s = WEBrick::HTTPProxyServer.new(Port: 8080) Signal.trap('INT') do s.shutdown end s.start
Webrickのプロキシサーバを実行した時のログ。
$ ruby proxy.rb [2023-12-16 15:14:19] INFO WEBrick 1.8.1 [2023-12-16 15:14:19] INFO ruby 3.2.2 (2023-03-30) [x86_64-linux] [2023-12-16 15:14:19] INFO WEBrick::HTTPProxyServer#start: pid=28219 port=8080 127.0.0.1 - - [16/Dec/2023:15:15:05 JST] "CONNECT 2023.rubyworld-conf.org:443 HTTP/1.1" 200 0 - -> 2023.rubyworld-conf.org:443
open-uri のコード。
require 'open-uri' ENV['https_proxy'] = "http://localhost:8080" ENV['no_proxy'] = "www.ruby-lang.org" # no_proxy環境変数で設定したホスト名でプロキシを経由しない URI.open("https://www.ruby-lang.org/en/") {|f| f.each_line { |l| puts(l) } } # localhost:8080 で立ち上げたプロキシを経由する URI.open("https://2023.rubyworld-conf.org/ja/") {|f| f.each_line { |l| puts(l) } }
open-uri の該当位置の説明に no_proxy 環境変数を追加します。
Sorry, something went wrong.
sho-h
No branches or pull requests
以下ではno_proxyがありませんが、
doctree/refm/api/src/open-uri.rd
Line 153 in 1689342
たぶん以下のfind_proxyまで降りてno_proxyが設定できる気がするので確認して追加する。
The text was updated successfully, but these errors were encountered: