16 Commits

Author SHA1 Message Date
Piotr Piotrowski
6570ee2c8e [FIXED] Get rid of server dev dependencies in nats package (#1441)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Co-authored-by: masumomo <masumotomiki18@gmail.com>
2023-10-15 18:59:15 +02:00
Ivan Kozlovic
d963c7d71e [UPDATED] Compression library for Websocket (#1259)
Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Co-authored-by: Derek Collison <derek@nats.io>
2023-05-03 17:31:11 +02:00
Piotr Piotrowski
32b9daa3d2 [ADDED] Service api improvements (#1160)
Co-authored-by: Tomasz Pietrek <melgaer@gmail.com>
2022-12-20 12:52:16 +01:00
Waldemar Quevedo
65b787031b Add SkipTLSHandshake small interface to CustomDialer
Signed-off-by: Waldemar Quevedo <wally@nats.io>

Co-authored-by: Piotr Piotrowski <piotr@synadia.com>
2022-11-29 15:23:25 -08:00
Ivan Kozlovic
787e58b7c5 Updated TLS certs, move to Go 1.18, fix code due staticcheck report
Fixed a TLS test that fails on macOS but passes on Linux.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-07-29 11:35:42 -06:00
Ido Gold
4f94f48de9 Refactored test 2022-05-10 18:27:55 +03:00
Ido Gold
c00acdc728 Random port on test 2022-05-04 13:25:40 +03:00
Ido Gold
ded0e1833f Fix test 2022-05-03 17:51:25 +03:00
Ido Gold
e0099bfda6 Added a test 2022-05-03 16:08:53 +03:00
Ivan Kozlovic
16beecb7e3 [FIXED] Websocket: deadlock on authentication failure
This was due to the fact that server sends a websocket CLOSE protocol,
to which the library tried to respond to, but since it was done during
the "connect" handshake under the connection lock, this caused a
deadlock.

Resolves #925

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-03-14 14:51:58 -06:00
Ivan Kozlovic
97d75321ed [FIXED] Websocket: discovered urls would not have "wss://" scheme
If the user originally connects with "wss://" but has not configured
any secure related option (Options.Secure/TLSConfig), then when
adding implicit URLs (from the server INFO) the library would add
the "ws://" prefix to the received URL.
When trying to connect to those URLs, the library would not try
to make a TLS handshake and would get an error back that would
result in a "websocket invalid connection".

Resolves #914

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-02-18 14:05:53 -07:00
Ivan Kozlovic
a9296373fe Added Go 1.17 to Travis, update server deps, fix staticcheck reports
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-01-07 17:25:15 -07:00
Ivan Kozlovic
d8b749672a [FIXED] Websocket: possible panic when decoding CLOSE frame
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-09-13 12:47:26 -06:00
Ivan Kozlovic
9fc5222c60 [FIXED] Websocket decompression of continuation frames
When compression is used, the full message payload need to be
assembled (in case there are continuation frames) before being
decompressed.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-06-21 11:06:43 -06:00
Ivan Kozlovic
92272d3f21 Fixed SubscribeSync that could possibly share channel across 2 subs
Also added missing subscription's lock when setting some fields
at the end of initialization.

Fixed some flappers and missing defers.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-04-29 16:18:13 -06:00
Ivan Kozlovic
995f67177d Added websocket support
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-04-23 12:26:09 -06:00