anycable-core 1.6.1 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/anycable/cli.rb +1 -1
- data/lib/anycable/config.rb +19 -12
- data/lib/anycable/middlewares/exceptions.rb +1 -1
- data/lib/anycable/rpc.rb +1 -1
- data/lib/anycable/version.rb +1 -1
- data/sig/anycable/config.rbs +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b804d301dcb7d7c66c1e10456bd947938e0f4d4687c1ab3fb5d17e0e545a0f8
|
|
4
|
+
data.tar.gz: 1d39a7597cfe89f453835613ac3d7e651f64fddd6c4558753ad26b8c9e9b027c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37171d5afc7b3c9535590d41c607556fd6f29ceaf1fa90d638af12b4b562234db6e00dbdee4e51aa2eeed702a508add3e515586a0172f2935f01de4eaa25be8a
|
|
7
|
+
data.tar.gz: 47f3c1dad688a3f9039311a70e45adc87c7ed049d8a6b8e62e8b88d6692a59f604bd72eb4da34474ef7068bb21309b8b191f105c445793ce769d1dd6282f7b94
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## master
|
|
4
4
|
|
|
5
|
+
## 1.6.3 (2026-02-19)
|
|
6
|
+
|
|
7
|
+
- Handle nil input from gRPC. ([@palkan][])
|
|
8
|
+
|
|
9
|
+
- Add `redis_tls_ca_cert_path` configuration option. ([@palkan][])
|
|
10
|
+
|
|
11
|
+
## 1.6.2 (2025-12-18)
|
|
12
|
+
|
|
13
|
+
- Use the same default port for HTTP broadcasts as in AnyCable. ([@palkan][])
|
|
14
|
+
|
|
5
15
|
## 1.6.1 (2025-08-19)
|
|
6
16
|
|
|
7
17
|
- Update gRPC server keepalive configuration. ([@palkan][])
|
data/lib/anycable/cli.rb
CHANGED
|
@@ -55,7 +55,7 @@ module AnyCable
|
|
|
55
55
|
|
|
56
56
|
print_version!
|
|
57
57
|
|
|
58
|
-
logger.info "Serving #{defined?(::Rails)
|
|
58
|
+
logger.info "Serving #{"Rails " if defined?(::Rails)}application from #{boot_file}" unless embedded?
|
|
59
59
|
|
|
60
60
|
verify_connection_factory!
|
|
61
61
|
|
data/lib/anycable/config.rb
CHANGED
|
@@ -47,6 +47,7 @@ module AnyCable
|
|
|
47
47
|
redis_tls_verify: false,
|
|
48
48
|
redis_tls_client_cert_path: nil,
|
|
49
49
|
redis_tls_client_key_path: nil,
|
|
50
|
+
redis_tls_ca_cert_path: nil,
|
|
50
51
|
|
|
51
52
|
### NATS options
|
|
52
53
|
nats_servers: "nats://localhost:4222",
|
|
@@ -55,7 +56,7 @@ module AnyCable
|
|
|
55
56
|
nats_options: {},
|
|
56
57
|
|
|
57
58
|
### HTTP broadcasting options
|
|
58
|
-
http_broadcast_url:
|
|
59
|
+
http_broadcast_url: nil,
|
|
59
60
|
# DEPRECATED: use `broadcast_key` instead
|
|
60
61
|
http_broadcast_secret: nil,
|
|
61
62
|
|
|
@@ -101,6 +102,11 @@ module AnyCable
|
|
|
101
102
|
!http_health_port.nil? && http_health_port != ""
|
|
102
103
|
end
|
|
103
104
|
|
|
105
|
+
def http_broadcast_url
|
|
106
|
+
# AnyCable accepts broadcast on a different port by default when no authentication configured
|
|
107
|
+
super || (broadcast_key! ? "http://localhost:8080/_broadcast" : "http://localhost:8090/_broadcast")
|
|
108
|
+
end
|
|
109
|
+
|
|
104
110
|
def broadcast_key!
|
|
105
111
|
if http_broadcast_secret && !broadcast_key
|
|
106
112
|
self.broadcast_key ||= http_broadcast_secret
|
|
@@ -146,6 +152,7 @@ module AnyCable
|
|
|
146
152
|
--redis-tls-verify=yes|no Whether to perform server certificate check in case of rediss:// protocol. Default: yes
|
|
147
153
|
--redis-tls-client_cert-path=path Default: nil
|
|
148
154
|
--redis-tls-client_key-path=path Default: nil
|
|
155
|
+
--redis-tls-ca-path=path Default: nil
|
|
149
156
|
|
|
150
157
|
NATS
|
|
151
158
|
--nats-servers=<...addresses> NATS servers for broadcasting, default: "nats://localhost:4222"
|
|
@@ -180,21 +187,21 @@ module AnyCable
|
|
|
180
187
|
end.tap do |params|
|
|
181
188
|
next unless redis_url.match?(/rediss:\/\//)
|
|
182
189
|
|
|
183
|
-
|
|
184
|
-
|
|
190
|
+
cert_path, key_path, ca_path = redis_tls_client_cert_path, redis_tls_client_key_path, redis_tls_ca_cert_path
|
|
191
|
+
|
|
192
|
+
ssl_params = {}
|
|
193
|
+
|
|
194
|
+
if cert_path && key_path
|
|
195
|
+
ssl_params[:cert] = OpenSSL::X509::Certificate.new(File.read(cert_path))
|
|
196
|
+
ssl_params[:key] = OpenSSL::PKey.read(File.read(key_path))
|
|
197
|
+
ssl_params[:ca_path] if ca_path
|
|
185
198
|
end
|
|
186
199
|
|
|
187
200
|
if !redis_tls_verify?
|
|
188
|
-
|
|
189
|
-
else
|
|
190
|
-
cert_path, key_path = redis_tls_client_cert_path, redis_tls_client_key_path
|
|
191
|
-
if cert_path && key_path
|
|
192
|
-
params[:ssl_params] = {
|
|
193
|
-
cert: OpenSSL::X509::Certificate.new(File.read(cert_path)),
|
|
194
|
-
key: OpenSSL::PKey.read(File.read(key_path))
|
|
195
|
-
}
|
|
196
|
-
end
|
|
201
|
+
ssl_params[:verify_mode] = OpenSSL::SSL::VERIFY_NONE
|
|
197
202
|
end
|
|
203
|
+
|
|
204
|
+
params[:ssl_params] = ssl_params unless ssl_params.empty?
|
|
198
205
|
end
|
|
199
206
|
end
|
|
200
207
|
|
|
@@ -17,7 +17,7 @@ module AnyCable
|
|
|
17
17
|
private
|
|
18
18
|
|
|
19
19
|
def notify_exception(exp, method_name, request)
|
|
20
|
-
AnyCable::ExceptionsHandling.notify(exp, method_name.to_s, request
|
|
20
|
+
AnyCable::ExceptionsHandling.notify(exp, method_name.to_s, request&.to_h)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def response_class(method_name)
|
data/lib/anycable/rpc.rb
CHANGED
data/lib/anycable/version.rb
CHANGED
data/sig/anycable/config.rbs
CHANGED
|
@@ -27,6 +27,8 @@ module AnyCable
|
|
|
27
27
|
def redis_tls_client_cert_path=: (String) -> void
|
|
28
28
|
def redis_tls_client_key_path: () -> String?
|
|
29
29
|
def redis_tls_client_key_path=: (String) -> void
|
|
30
|
+
def redis_tls_ca_cert_path: () -> String?
|
|
31
|
+
def redis_tls_ca_cert_path=: (String) -> void
|
|
30
32
|
def nats_servers: () -> Array[String]
|
|
31
33
|
def nats_servers=: (Array[String]) -> void
|
|
32
34
|
def nats_channel: () -> String
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anycable-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vladimir Dementyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-02-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: anyway_config
|