You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add TLS/SSL configuration, proxy support, and connection statistics
Major features:
- Add TLS/SSL configuration API for WebSocket client, server, and HTTP requests
- SetTLSCertAndKey, SetTLSCAFile, SetTLSCiphers methods
- HostnameValidation property for certificate verification
- Add proxy support (HTTP/HTTPS/SOCKS5) for WebSocket and HTTP clients
- SetProxy, ClearProxy methods and HasProxy property
- Add connection statistics for WebSocket client (for debug)
- MessagesSent/Received, BytesSent/Received, PingsSent/Received, etc.
- Add timeout configuration options
- PingTimeout, IdleTimeout, SendTimeout, CloseTimeout, HandshakeTimeout
- Add HTTP authentication methods (SetBasicAuth, SetBearerAuth, ClearAuth)
- Add WebSocket subprotocol support (AddSubProtocol, RemoveSubProtocol, ClearSubProtocols)
- Add connection pooling and keep-alive options for HTTP requests
- Add write_flg parameter to WriteJSON for JSON formatting control (closes#10)
Build system:
- Rebuild OpenSSL static libraries
- Add NOMINMAX define for Windows to fix std::min/max conflicts
- Add /ignore:4099 linker flag to suppress PDB warnings
Refactoring:
- Rename ws_natives.cpp to ws_natives_client.cpp for clarity
- Split ws.inc into ws_client.inc and ws_server.inc for better organization
- Convert IXWebSocket and zlib to git submodules
- Move AMBuilder files for third-party libraries to root third_party directory
- Rename WebsocketState enum to WebSocketState for consistency
- Replace DisableDeflate/IsDeflateEnabled with PerMessageDeflate property
- Change default ping interval to -1 (disabled) for WebSocket server
Documentation:
- Update README with proxy support, SSL dependencies, and build instructions
- Add comprehensive API documentation for new features
- Add WSS (WebSocket Secure) server example script
- Note about forked IXWebSocket with core modifications
Copy file name to clipboardExpand all lines: README.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,20 @@
4
4
This is a [SourceMod](http://www.sourcemod.net/) extension that provides some methods for HTTP JSON and websocket communication
5
5
6
6
## Features
7
-
* Relies on [IXWebSocket](https://github.com/machinezone/IXWebSocket) which is C++ library for WebSocket client and server development. It has minimal dependencies
7
+
* Relies on [IXWebSocket](https://github.com/ProjectSky/IXWebSocket/tree/cpp17-refactor) which is C++ library for WebSocket client and server development. It has minimal dependencies
8
8
* Support TEXT and JSON data
9
9
* Support client and server
10
10
* Support permessage-deflate
11
11
* Support SSL
12
12
* Support x64
13
+
* Support Proxy (HTTP/SOCKS5)
13
14
* Support HTTP RESTful API with JSON and form data
14
15
15
16
## Dependencies
16
17
*[sm-ext-json](https://github.com/ProjectSky/sm-ext-json) - **Optional**. Required only for JSON-related features. If not installed, TEXT-based WebSocket communication and non-JSON HTTP features will still work
18
+
***For Linux users** - **Required**: SSL/TLS support requires OpenSSL development packages
19
+
- For x64: `libssl-dev`
20
+
- For x86: `libssl-dev:i386`
17
21
18
22
## Installation
19
23
1.**(Optional)** If you need JSON functionality, download and install [sm-ext-json](https://github.com/ProjectSky/sm-ext-json/releases) first
@@ -24,8 +28,9 @@ This is a [SourceMod](http://www.sourcemod.net/) extension that provides some me
-[x] Use sourcemod extension interface for JSON functionality instead of bundling json library
46
51
-[x] Allow JSON library as an optional dependency
52
+
-[x] TLS/SSL configuration API
53
+
-[x] Proxy support
54
+
-[x] Include IXWebSocket and libz via git submodules
47
55
48
56
## NOTES
49
57
* Server will not process data during the hibernation. You can set sv_hibernate_when_empty to 0 to disable hibernation
58
+
* This extension uses a [forked version of IXWebSocket](https://github.com/ProjectSky/IXWebSocket/tree/cpp17-refactor) with significant core modifications to support new features (proxy, connection pooling, statistics, timeouts, etc.). The upstream IXWebSocket library is not compatible with this extension
0 commit comments