Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
たとえば、私はこの91.229.248.75:8085のようなプロキシサーバーを持っていますが、それが機能する場合は受信する必要があり、true機能しない場合は受信する必要がありfalseます。RoRでどのように実行できますか?
true
false
あなたはこれを試すことができます:
によってnet-pinggemをインストールします
gem install net-ping
次に、これを使用してプロキシを確認します。
require 'net/ping' Net::Ping::TCP.new('91.229.248.75', 8085).ping
例えば:
Net::Ping::TCP.new('www.google.com', 80).ping