Photon——Secure Websockets Setup 安全Websockets设置

 

     To allow your clients connecting your Photon Server using secure websockets with ‘wss://…’ please proceed as follows.

     允许你的客户端连接你的Photon服务器使用安全websockets。

 

  • Obtain a SSL certificate. 获取SSL证书
    • For development purposes, you can generate a self-signed SSL certificate. 对于开发者而言,你可以生成一个自签名的SSL证书

 

                    如果你已安装了IIS7,按照以下步骤:

 

                    The “friendly name” should be the same name which your web clients use to access your server, e.g.: photon.example.com:

                     “friendly name” 必须是相同的名字当你的web客户端访问服务器的时候。

 

                    After you are done, make sure that the certificate is installed into the correct certificate store.

                    当您完成后,请确保该证书被安装到正确的证书存储中

      • Open the Microsoft Management Console by typing “mmc.exe” on the command line.
      • From the “File” menu, choose “Add / Remove snap-in”.
      • Select “Certificates” -> “Add” -> “Computer Account” -> “Local Computer” -> “OK”.

 

      • Expand the nodes on the left hand to “Certificates” -> “Personal” -> “Certificates”.
      • Your certificate should show up like this:
      •  

                    这有更多的细节去解释如何使用Management Console。

 

    • If you don’t have IIS 7 installed on your machine, follow one of the various tutorials that are available on the internet to generate a self-signed SSL certificate for your machine.如果你的机器上没有安装IIS 7,遵循互联网上的各种教程为你的机器生成一个自签名的SSL证书。

                    Once you have generated the certificate, open the “Local computer” certificate store as described in 1.1

                    一旦你已经生成了证书,打开“本地计算机”证书存储区

 

                    Right-click on the “Personal” node, choose “All Tasks” -> “Import”. Follow the wizard to import your certificate.

                    右击 “Personal” 节点,选择“All Tasks”-> “Import”。按照向导来导入您的证书

 

 

      • Restart your Photon Server … voila!
      • 重启你的Photon服务器

 

                    This is an example Photon Server configuration for secure websockets:

                    这是一个Photon服务器配置安全websockets的例子

 

...

<WebSocketListeners>

     

    <-- Web Sockets Listener with SSL -->

    <WebSocketListener

        IPAddress="0.0.0.0"

        Port="9091"

        DisableNagle="true"

        InactivityTimeout="10000"

        OverrideApplication="Lite"

        Secure = "true"

        StoreName = "My"

        CertificateName = "server1.example.com"

        UseMachineStore = "true">     

    </WebSocketListener>

     

</WebSocketListeners>

...

原文链接:https://www.cnblogs.com/liusuqi/archive/2013/05/15/3079751.html

原创文章,作者:优速盾-小U,如若转载,请注明出处:https://www.cdnb.net/bbs/archives/18075

(0)
上一篇 2023年7月2日
下一篇 2023年7月3日

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

优速盾注册领取大礼包www.cdnb.net
/sitemap.xml