Project

General

Profile

Actions

Bug #12538

closed

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

Added by uy (西行寺 うゆ) almost 8 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
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0