Project

General

Profile

Actions

Bug #12538

closed

hostsを書き換えてwebrickで書いたプロキシ―に繋いでいるとrubyが落ちる

Added by uy (西行寺 うゆ) over 7 years ago. Updated about 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-mswin32_100]
[ruby-dev:49701]
Tags:

Description

環境
OS:Win10
ブラウザ:Firefox

広告NG用にhostsを書きかえてプロキシーに接続してブラウジングしていると
しばらくしてrubyは動作を停止しましたと言われます

#coding:utf-8
require 'webrick'
require 'webrick/httpproxy'

handler = Proc.new() {| q , res |

}

s = WEBrick::HTTPProxyServer.new(
:BindAddress => '127.0.0.1',
:Port => 8082,
:Logger => WEBrick::Log::new($stderr, WEBrick::Log::DEBUG),
:ProxyVia => false,
:ProxyContentHandler => handler
)
Signal.trap('INT') do
s.shutdown
exit
end

s.start


Files

hosts.txt (11.2 KB) hosts.txt uy (西行寺 うゆ), 07/01/2016 12:37 PM
log.txt (261 KB) log.txt uy (西行寺 うゆ), 07/04/2016 09:13 AM
4gxFT71[1].png (10.3 KB) 4gxFT71[1].png uy (西行寺 うゆ), 07/04/2016 09:15 AM

Updated by nagachika (Tomoyuki Chikanaga) over 7 years ago

  • Status changed from Open to Feedback

提示された proxy のスクリプトと hosts.txt を使ってしばらく運用してみましたが、再現できませんでした。
(2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] / Firefox 47.0)

異常終了した時のログはありませんか?
また ruby の -d オプションをつけて実行すると例外などがダンプされるので、終了時になにがおきたのかなにかわかるかもしれません。

Updated by uy (西行寺 うゆ) over 7 years ago

-d オプションを付けて実行してみました

正常にdumpされてるかは分かりませんが
コンソールに流していたログは保存出来たので上げておきます

Updated by jeremyevans0 (Jeremy Evans) about 3 years ago

  • Status changed from Feedback to Closed

Closing as webrick is no longer part of the standard library. If this is still an issue, please report it to https://github.com/ruby/webrick

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0