* fix(watchdog): Add functions to avoid dangling file descriptors
* Change function name and add comment under core/endpoint.go
- change the function name of CloseHTTPConnection() to Close()
- add some comments above Close() function
* Update core/endpoint.go
* Update core/endpoint.go
* fix(client): Honor client.insecure when doing TLS checking
* add features in client/client.go to enable client.insecure when doing TLS checking
---------
Co-authored-by: Richard Cheng <richard_cheng@trendmicro.com>
Co-authored-by: TwiN <twin@linux.com>
* feat: support monitoring WebSocket endpoints
WebSocket endpoints are automatically identified by the URL protocol
specification: `wss://` or `ws://`. The request body is used as the
"message" written to the server, and the answer is stored in the
`[BODY]`.
Optionally, the user can set the `jsonrpc` flag to automatically wrap
the request body in a JSON RPC 2.0 method call.
* core:websocket: close connection after using it
* test: add tests related to WebSocket support
- test we can identify the endpoint type for WebSockets based on the URL
supplied: `wss://` (with SSL/TLS) and `ws://` (plain text).
- test we can generate a JsonRPC 2.0 message via the new endpoint flag
`JsonRPC`.
* core:endpoint: fix name of jsonrpc parameter
See https://en.wikipedia.org/wiki/JSON-RPC#Version_2.0
* core:websocket: fix dangling open connection on error
Move the `defer ws.Close()` to after opening the connection, so the
socket is closed also in case of errors.
* remove jsonrpc flag
* core:websocket: fix nil pointer dereference
The connection should only be closed if successfully opened.
* Move websocket function to client
* update go.mod
* Fix build errors
* Fix errors
* Update client/client.go
---------
Co-authored-by: TwiN <twin@linux.com>
update go-ping to pro-ping maintained fork
additionally add a hint in the README for previliged mode
Co-authored-by: floj <floj@users.noreply.github.com>
Co-authored-by: TwiN <twin@linux.com>
* Initial implementation
* Added OAuth2 support to `client` config
* Revert "Initial implementation"
This reverts commit 7f2f3a603a.
* Restore vendored clientcredentials
* configureOAuth2 is now a func (including tests)
* README update
* Use the same OAuth2Config in all related tests
* Cleanup & comments
* protocol: starttls: add timeout support
Signed-off-by: Charles Decoux <charles@phowork.fr>
* protocol: add ssl support
Signed-off-by: Charles Decoux <charles@phowork.fr>