summaryrefslogtreecommitdiffstats
path: root/archives/extend/2015-January/000488.html
blob: ada46131f79e6dce2daa0637ebd533084e717d05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
 <HEAD>
   <TITLE> [99s-extend] websocket over ssl
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20websocket%20over%20ssl&In-Reply-To=%3CB264D9ED-5411-41D7-A481-1590E286DD74%40gmail.com%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <style type="text/css">
       pre {
           white-space: pre-wrap;       /* css-2.1, curent FF, Opera, Safari */
           }
   </style>
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="000490.html">
   <LINK REL="Next"  HREF="000489.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[99s-extend] websocket over ssl</H1>
    <B>Lee Sylvester</B> 
    <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20websocket%20over%20ssl&In-Reply-To=%3CB264D9ED-5411-41D7-A481-1590E286DD74%40gmail.com%3E"
       TITLE="[99s-extend] websocket over ssl">lee.sylvester at gmail.com
       </A><BR>
    <I>Sat Jan 10 15:39:41 CET 2015</I>
    <P><UL>
        <LI>Previous message: <A HREF="000490.html">[99s-extend] websocket over ssl
</A></li>
        <LI>Next message: <A HREF="000489.html">[99s-extend] websocket over ssl
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#488">[ date ]</a>
              <a href="thread.html#488">[ thread ]</a>
              <a href="subject.html#488">[ subject ]</a>
              <a href="author.html#488">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>I use Cowboy for websockets, but I find it&#8217;s a lot easier (and less stressful) to run Nginx in front of it to provide the SSL layer.

Lee


&gt;<i> On 10 Jan 2015, at 13:55, <A HREF="https://lists.ninenines.eu/listinfo/extend">e at bestmx.net</A> wrote:
</I>&gt;<i> 
</I>&gt;<i> Hello all.
</I>&gt;<i> 
</I>&gt;<i> I am trying to alter my cowboy-based websocket server from plain to SSL connection.
</I>&gt;<i> And I found out that I have failed to understand very basics of the combination of WS and SSL.
</I>&gt;<i> 
</I>&gt;<i> As far as i've understood the very nature of the WS it is a bit altered http connection (i open the http connection first, and then i change its status to WS)
</I>&gt;<i> 
</I>&gt;<i> On the other hand the whole &quot;HTTP story&quot; could be wrapped into SSL, so that SSL is an outer layer of data encoding (as seen transparent by an application)
</I>&gt;<i> 
</I>&gt;<i> thus,
</I>&gt;<i> if I open HTTPS connection (which implies SSL enveloping) and then alter the connection status to WS, the whole &quot;WS story&quot; appears naturally INSIDE THE PREVIOUSLY ESTABLISHED SSL CONNECTION.
</I>&gt;<i> 
</I>&gt;<i> Is it true?
</I>&gt;<i> 
</I>&gt;<i> In this regard i can hardly find a place in this world for the &quot;WSS&quot; term, what does it stand for?
</I>&gt;<i> 
</I>&gt;<i> Please, help me fit it in my head.
</I>&gt;<i> 
</I>&gt;<i> However, i might be confusing some Client-Side entities, that are involved in the process of starting up my WebSocket.
</I>&gt;<i> 
</I>&gt;<i> I am using a Browser with JavaScript.
</I>&gt;<i> 
</I>&gt;<i> The semantics of the very WebSocket.start() operation is not enough clear to me. Please, do not laugh.
</I>&gt;<i> 
</I>&gt;<i> when i do JS WebSocket.start() does it:
</I>&gt;<i> (a) opens an http connection and then alters it to WS
</I>&gt;<i> (b) alters the connection in the context of which the JS process is running
</I>&gt;<i> ????
</I>&gt;<i> 
</I>&gt;<i> I'll be damned if the answer was lying on the surface of the internet!
</I>&gt;<i> 
</I>&gt;<i> The third part of this ugly question is about cowboy actually.
</I>&gt;<i> How all these entities mentioned above do map into my_app.erl file?
</I>&gt;<i> what particular bits of cowboy's &quot;configuration&quot; (may i call this particular piece of code a &quot;setup&quot; or &quot;config&quot;?) affect what aspects of the connection initialization.
</I>&gt;<i> 
</I>&gt;<i> well, i am afraid it could be put in a simpler way:
</I>&gt;<i> &quot;Exactly When and Where the WSS story begins?&quot;
</I>&gt;<i> 
</I>&gt;<i> _______________________________________________
</I>&gt;<i> Extend mailing list
</I>&gt;<i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>&gt;<i> <A HREF="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A>
</I>
</PRE>



<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000490.html">[99s-extend] websocket over ssl
</A></li>
	<LI>Next message: <A HREF="000489.html">[99s-extend] websocket over ssl
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#488">[ date ]</a>
              <a href="thread.html#488">[ thread ]</a>
              <a href="subject.html#488">[ subject ]</a>
              <a href="author.html#488">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
mailing list</a><br>
</body></html>