… | |
… | |
91 | EOF |
91 | EOF |
92 | } |
92 | } |
93 | |
93 | |
94 | sub conn::err_blocked { |
94 | sub conn::err_blocked { |
95 | my $self = shift; |
95 | my $self = shift; |
96 | my $ip = $self->{remote_addr}; |
96 | my $ip = $self->{remote_id}; |
97 | my $ctime = $HTTP_NOW; |
97 | my $ctime = $HTTP_NOW; |
98 | my $etime = time2str $conn::blocked{$ip} = $::NOW + $::BLOCKTIME; |
98 | my $etime = time2str $conn::blocked{$ip} = $::NOW + $::BLOCKTIME; |
99 | |
99 | |
100 | Coro::Event::do_timer(after => 20*rand); |
100 | Coro::Event::do_timer(after => 20*rand); |
101 | |
101 | |
… | |
… | |
117 | <p>You have been blocked because you opened too many connections. You |
117 | <p>You have been blocked because you opened too many connections. You |
118 | may retry at</p> |
118 | may retry at</p> |
119 | |
119 | |
120 | <p><blockquote>$etime.</blockquote></p> |
120 | <p><blockquote>$etime.</blockquote></p> |
121 | |
121 | |
122 | <p>For your reference, the current time is:</p> |
122 | <p>For your reference, the current time and your identifier is:</p> |
123 | |
123 | |
124 | <p><blockquote>$ctime.</blockquote></p> |
124 | <p><blockquote>$ctime | $id</blockquote></p> |
125 | |
125 | |
126 | <p>Until then, each new access will renew the block. You might want to have a |
126 | <p>Until then, each new access will renew the block. You might want to have a |
127 | look at the <a href="http://www.goof.com/pcg/marc/animefaq.html#blocked">FAQ</a>.</p> |
127 | look at the <a href="http://www.goof.com/pcg/marc/animefaq.html#blocked">FAQ</a>.</p> |
128 | |
128 | |
129 | </body></html> |
129 | </body></html> |