irclb 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/irclb/ssl_server.rb +6 -6
- data/lib/irclb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7b99506ea5a619842e4d1d9ade839fefdada38493c3d8af91a6eae7d4bfe694
|
4
|
+
data.tar.gz: 3fc80c689db7d3ccb00fd164152709d46220ac49fe75cadf2bc97dd75ab7bf30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz: '
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '082e5c76148bcee618d2fb301b2130eaab38095f67786fcbf318a3b42ee16c8cc42de00163c424f26f9f7d8ba435ce3108a762c60a027d2d984114af79ca56ff'
|
7
|
+
data.tar.gz: 1816bb6935b0ffd0c8f70b51530cd82fa8a82fdc382b3857a523fc30e67dd149fc9655c09811aaf3c284621e2e9d65cd9bf0542d83add50f1d63217152feb591
|
data/lib/irclb/ssl_server.rb
CHANGED
@@ -9,17 +9,17 @@ require 'irclb/config'
|
|
9
9
|
module IrcLB
|
10
10
|
class Socket
|
11
11
|
def initialize
|
12
|
-
tcp_srv = TCPServer.new 6697
|
13
|
-
ssl_ctx = OpenSSL::SSL::SSLContext.new
|
14
|
-
ssl_ctx.min_version = OpenSSL::SSL::TLS1_1_VERSION
|
15
|
-
ssl_ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION
|
16
|
-
ssl_sock = OpenSSL::SSL::SSLSocket.new(tcp_srv, ssl_ctx)
|
12
|
+
@tcp_srv = TCPServer.new 6697
|
13
|
+
@ssl_ctx = OpenSSL::SSL::SSLContext.new
|
14
|
+
@ssl_ctx.min_version = OpenSSL::SSL::TLS1_1_VERSION
|
15
|
+
@ssl_ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION
|
16
|
+
@ssl_sock = OpenSSL::SSL::SSLSocket.new(@tcp_srv, @ssl_ctx)
|
17
17
|
dont_block
|
18
18
|
end
|
19
19
|
|
20
20
|
def dont_block
|
21
21
|
loop do
|
22
|
-
Thread.start(ssl_sock.accept) do |client|
|
22
|
+
Thread.start(@ssl_sock.accept) do |client|
|
23
23
|
until client.gets =~ /^USER .*/
|
24
24
|
client.puts ":irc.lb NOTICE * :This server is running IRClb, an IRC load balancer\r\n"
|
25
25
|
client.puts ":irc.lb NOTICE * :IRClb is written by Ken Spencer / iota\r\n"
|
data/lib/irclb/version.rb
CHANGED