Deployed 5222190
with MkDocs version: 1.0.4
This commit is contained in:
@ -94,6 +94,15 @@
|
|||||||
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
|
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
|
||||||
<ul class="nav bs-sidenav">
|
<ul class="nav bs-sidenav">
|
||||||
<li class="main active"><a href="#changelog">Changelog</a></li>
|
<li class="main active"><a href="#changelog">Changelog</a></li>
|
||||||
|
<li><a href="#760-2019-12-19">[7.6.0] - 2019-12-19</a></li>
|
||||||
|
<li><a href="#758-2019-12-18">[7.5.8] - 2019-12-18</a></li>
|
||||||
|
<li><a href="#757-2019-12-18">[7.5.7] - 2019-12-18</a></li>
|
||||||
|
<li><a href="#756-2019-12-18">[7.5.6] - 2019-12-18</a></li>
|
||||||
|
<li><a href="#755-2019-12-17">[7.5.5] - 2019-12-17</a></li>
|
||||||
|
<li><a href="#754-2019-12-16">[7.5.4] - 2019-12-16</a></li>
|
||||||
|
<li><a href="#753-2019-12-12">[7.5.3] - 2019-12-12</a></li>
|
||||||
|
<li><a href="#752-2019-12-11">[7.5.2] - 2019-12-11</a></li>
|
||||||
|
<li><a href="#751-2019-12-06">[7.5.1] - 2019-12-06</a></li>
|
||||||
<li><a href="#750-2019-12-05">[7.5.0] - 2019-12-05</a></li>
|
<li><a href="#750-2019-12-05">[7.5.0] - 2019-12-05</a></li>
|
||||||
<li><a href="#745-2019-12-03">[7.4.5] - 2019-12-03</a></li>
|
<li><a href="#745-2019-12-03">[7.4.5] - 2019-12-03</a></li>
|
||||||
<li><a href="#744-2019-12-03">[7.4.4] - 2019-12-03</a></li>
|
<li><a href="#744-2019-12-03">[7.4.4] - 2019-12-03</a></li>
|
||||||
@ -157,6 +166,32 @@
|
|||||||
|
|
||||||
<h1 id="changelog">Changelog</h1>
|
<h1 id="changelog">Changelog</h1>
|
||||||
<p>All notable changes to this project will be documented in this file.</p>
|
<p>All notable changes to this project will be documented in this file.</p>
|
||||||
|
<h2 id="760-2019-12-19">[7.6.0] - 2019-12-19</h2>
|
||||||
|
<p>(cobra) Add TLS options to all cobra commands and classes. Add example to the doc.</p>
|
||||||
|
<h2 id="758-2019-12-18">[7.5.8] - 2019-12-18</h2>
|
||||||
|
<p>(cobra-to-sentry) capture application version from device field</p>
|
||||||
|
<h2 id="757-2019-12-18">[7.5.7] - 2019-12-18</h2>
|
||||||
|
<p>(tls) Experimental TLS server support with mbedtls (windows) + process cert tlsoption (client + server)</p>
|
||||||
|
<h2 id="756-2019-12-18">[7.5.6] - 2019-12-18</h2>
|
||||||
|
<p>(tls servers) Make it clear that apple ssl and mbedtls backends do not support SSL in server mode</p>
|
||||||
|
<h2 id="755-2019-12-17">[7.5.5] - 2019-12-17</h2>
|
||||||
|
<p>(tls options client) TLSOptions struct _validated member should be initialized to false</p>
|
||||||
|
<h2 id="754-2019-12-16">[7.5.4] - 2019-12-16</h2>
|
||||||
|
<p>(websocket client) improve the error message when connecting to a non websocket server</p>
|
||||||
|
<p>Before:</p>
|
||||||
|
<pre><code>Connection error: Got bad status connecting to example.com:443, status: 200, HTTP Status line: HTTP/1.1 200 OK
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>After:</p>
|
||||||
|
<pre><code>Connection error: Expecting status 101 (Switching Protocol), got 200 status connecting to example.com:443, HTTP Status line: HTTP/1.1 200 OK
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h2 id="753-2019-12-12">[7.5.3] - 2019-12-12</h2>
|
||||||
|
<p>(server) attempt at fixing #131 by using blocking writes in server mode</p>
|
||||||
|
<h2 id="752-2019-12-11">[7.5.2] - 2019-12-11</h2>
|
||||||
|
<p>(ws) cobra to sentry - created events with sentry tags based on tags present in the cobra messages</p>
|
||||||
|
<h2 id="751-2019-12-06">[7.5.1] - 2019-12-06</h2>
|
||||||
|
<p>(mac) convert SSL errors to utf8</p>
|
||||||
<h2 id="750-2019-12-05">[7.5.0] - 2019-12-05</h2>
|
<h2 id="750-2019-12-05">[7.5.0] - 2019-12-05</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>(ws) cobra to sentry. Handle Error 429 Too Many Requests and politely wait before sending more data to sentry.</li>
|
<li>(ws) cobra to sentry. Handle Error 429 Too Many Requests and politely wait before sending more data to sentry.</li>
|
||||||
|
@ -226,5 +226,5 @@ webSocket.send("hello world");
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
MkDocs version : 1.0.4
|
MkDocs version : 1.0.4
|
||||||
Build Date UTC : 2019-12-05 23:59:42
|
Build Date UTC : 2019-12-20 04:55:44
|
||||||
-->
|
-->
|
||||||
|
File diff suppressed because one or more lines are too long
14
sitemap.xml
14
sitemap.xml
@ -2,37 +2,37 @@
|
|||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-12-05</lastmod>
|
<lastmod>2019-12-19</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-12-05</lastmod>
|
<lastmod>2019-12-19</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-12-05</lastmod>
|
<lastmod>2019-12-19</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-12-05</lastmod>
|
<lastmod>2019-12-19</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-12-05</lastmod>
|
<lastmod>2019-12-19</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-12-05</lastmod>
|
<lastmod>2019-12-19</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-12-05</lastmod>
|
<lastmod>2019-12-19</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
BIN
sitemap.xml.gz
BIN
sitemap.xml.gz
Binary file not shown.
117
ws/index.html
117
ws/index.html
@ -99,7 +99,7 @@
|
|||||||
<li class="main "><a href="#websocket-proxy">Websocket proxy</a></li>
|
<li class="main "><a href="#websocket-proxy">Websocket proxy</a></li>
|
||||||
<li class="main "><a href="#file-transfer">File transfer</a></li>
|
<li class="main "><a href="#file-transfer">File transfer</a></li>
|
||||||
<li class="main "><a href="#http-client">HTTP Client</a></li>
|
<li class="main "><a href="#http-client">HTTP Client</a></li>
|
||||||
<li class="main "><a href="#cobra-client">Cobra Client</a></li>
|
<li class="main "><a href="#cobra-client-and-server">Cobra client and server</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div></div>
|
</div></div>
|
||||||
<div class="col-md-9" role="main">
|
<div class="col-md-9" role="main">
|
||||||
@ -327,8 +327,119 @@ Options:
|
|||||||
--transfer-timeout INT Transfer timeout
|
--transfer-timeout INT Transfer timeout
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h2 id="cobra-client">Cobra Client</h2>
|
<h2 id="cobra-client-and-server">Cobra client and server</h2>
|
||||||
<p><a href="https://github.com/machinezone/cobra">cobra</a> is a real time messenging server. ws has a sub-command to interact with cobra.</p></div>
|
<p><a href="https://github.com/machinezone/cobra">cobra</a> is a real time messenging server. ws has several sub-command to interact with cobra. There is also a minimal cobra compatible server named snake available.</p>
|
||||||
|
<p>Below are examples on running a snake server and clients with TLS enabled (the server only works with the OpenSSL backend for now).</p>
|
||||||
|
<p>First, generate certificates.</p>
|
||||||
|
<pre><code>$ cd /path/to/IXWebSocket
|
||||||
|
$ cd ixsnake/ixsnake
|
||||||
|
$ bash ../../ws/generate_certs.sh
|
||||||
|
Generating RSA private key, 2048 bit long modulus
|
||||||
|
.....+++
|
||||||
|
.................+++
|
||||||
|
e is 65537 (0x10001)
|
||||||
|
generated ./.certs/trusted-ca-key.pem
|
||||||
|
generated ./.certs/trusted-ca-crt.pem
|
||||||
|
Generating RSA private key, 2048 bit long modulus
|
||||||
|
..+++
|
||||||
|
.......................................+++
|
||||||
|
e is 65537 (0x10001)
|
||||||
|
generated ./.certs/trusted-server-key.pem
|
||||||
|
Signature ok
|
||||||
|
subject=/O=machinezone/O=IXWebSocket/CN=trusted-server
|
||||||
|
Getting CA Private Key
|
||||||
|
generated ./.certs/trusted-server-crt.pem
|
||||||
|
Generating RSA private key, 2048 bit long modulus
|
||||||
|
...................................+++
|
||||||
|
..................................................+++
|
||||||
|
e is 65537 (0x10001)
|
||||||
|
generated ./.certs/trusted-client-key.pem
|
||||||
|
Signature ok
|
||||||
|
subject=/O=machinezone/O=IXWebSocket/CN=trusted-client
|
||||||
|
Getting CA Private Key
|
||||||
|
generated ./.certs/trusted-client-crt.pem
|
||||||
|
Generating RSA private key, 2048 bit long modulus
|
||||||
|
..............+++
|
||||||
|
.......................................+++
|
||||||
|
e is 65537 (0x10001)
|
||||||
|
generated ./.certs/untrusted-ca-key.pem
|
||||||
|
generated ./.certs/untrusted-ca-crt.pem
|
||||||
|
Generating RSA private key, 2048 bit long modulus
|
||||||
|
..........+++
|
||||||
|
................................................+++
|
||||||
|
e is 65537 (0x10001)
|
||||||
|
generated ./.certs/untrusted-client-key.pem
|
||||||
|
Signature ok
|
||||||
|
subject=/O=machinezone/O=IXWebSocket/CN=untrusted-client
|
||||||
|
Getting CA Private Key
|
||||||
|
generated ./.certs/untrusted-client-crt.pem
|
||||||
|
Generating RSA private key, 2048 bit long modulus
|
||||||
|
.....................................................................................+++
|
||||||
|
...........+++
|
||||||
|
e is 65537 (0x10001)
|
||||||
|
generated ./.certs/selfsigned-client-key.pem
|
||||||
|
Signature ok
|
||||||
|
subject=/O=machinezone/O=IXWebSocket/CN=selfsigned-client
|
||||||
|
Getting Private key
|
||||||
|
generated ./.certs/selfsigned-client-crt.pem
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Now run the snake server.</p>
|
||||||
|
<pre><code>$ export certs=.certs
|
||||||
|
$ ws snake --tls --port 8765 --cert-file ${certs}/trusted-server-crt.pem --key-file ${certs}/trusted-server-key.pem --ca-file ${certs}/trusted-ca-crt.pem
|
||||||
|
{
|
||||||
|
"apps": {
|
||||||
|
"FC2F10139A2BAc53BB72D9db967b024f": {
|
||||||
|
"roles": {
|
||||||
|
"_sub": {
|
||||||
|
"secret": "66B1dA3ED5fA074EB5AE84Dd8CE3b5ba"
|
||||||
|
},
|
||||||
|
"_pub": {
|
||||||
|
"secret": "1c04DB8fFe76A4EeFE3E318C72d771db"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
redis host: 127.0.0.1
|
||||||
|
redis password:
|
||||||
|
redis port: 6379
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>As a new connection comes in, such output should be printed</p>
|
||||||
|
<pre><code>[2019-12-19 20:27:19.724] [info] New connection
|
||||||
|
id: 0
|
||||||
|
Uri: /v2?appkey=_health
|
||||||
|
Headers:
|
||||||
|
Connection: Upgrade
|
||||||
|
Host: 127.0.0.1:8765
|
||||||
|
Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits=15; client_max_window_bits=15
|
||||||
|
Sec-WebSocket-Key: d747B0fE61Db73f7Eh47c0==
|
||||||
|
Sec-WebSocket-Protocol: json
|
||||||
|
Sec-WebSocket-Version: 13
|
||||||
|
Upgrade: websocket
|
||||||
|
User-Agent: ixwebsocket/7.5.8 macos ssl/OpenSSL OpenSSL 1.0.2q 20 Nov 2018 zlib 1.2.11
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>To connect and publish a message, do:</p>
|
||||||
|
<pre><code>$ export certs=.certs
|
||||||
|
$ cd /path/to/ws/folder
|
||||||
|
$ ls cobraMetricsSample.json
|
||||||
|
cobraMetricsSample.json
|
||||||
|
$ ws cobra_publish --endpoint wss://127.0.0.1:8765 --appkey FC2F10139A2BAc53BB72D9db967b024f --rolename _pub --rolesecret 1c04DB8fFe76A4EeFE3E318C72d771db --channel foo --cert-file ${certs}/trusted-client-crt.pem --key-file ${certs}/trusted-client-key.pem --ca-file ${certs}/trusted-ca-crt.pem cobraMetricsSample.json
|
||||||
|
[2019-12-19 20:46:42.656] [info] Publisher connected
|
||||||
|
[2019-12-19 20:46:42.657] [info] Connection: Upgrade
|
||||||
|
[2019-12-19 20:46:42.657] [info] Sec-WebSocket-Accept: rs99IFThoBrhSg+k8G4ixH9yaq4=
|
||||||
|
[2019-12-19 20:46:42.657] [info] Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits=15; client_max_window_bits=15
|
||||||
|
[2019-12-19 20:46:42.657] [info] Server: ixwebsocket/7.5.8 macos ssl/OpenSSL OpenSSL 1.0.2q 20 Nov 2018 zlib 1.2.11
|
||||||
|
[2019-12-19 20:46:42.657] [info] Upgrade: websocket
|
||||||
|
[2019-12-19 20:46:42.658] [info] Publisher authenticated
|
||||||
|
[2019-12-19 20:46:42.658] [info] Published msg 3
|
||||||
|
[2019-12-19 20:46:42.659] [info] Published message id 3 acked
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>To use OpenSSL on macOS, compile with <code>make ws_openssl</code>. First you will have to install OpenSSL libraries, which can be done with Homebrew.</p></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer class="col-md-12">
|
<footer class="col-md-12">
|
||||||
|
Reference in New Issue
Block a user