简体   繁体   English

Google Cloud Node.js套接字服务器应用程序托管

[英]Google Cloud Node.js Socket Server Application Hosting

I have two node js application. 我有两个节点js应用程序。 One of them is a webserver. 其中之一是网络服务器。 It serves static html css javascript and image files. 它提供静态HTML CSS CSS和图像文件。 This web server is running on google cloud app engine. 此网络服务器在google cloud app引擎上运行。 I have a domain that is bind to this app engine. 我有一个绑定到此应用程序引擎的域。 And whenever a user visits my domain my webserver gives responses to it and it gets my frontend of my website. 每当用户访问我的域时,我的网络服务器都会对其做出响应,并且它会获得我网站的前端。

The other node application is a socket server(socket io). 另一个节点应用程序是套接字服务器(socket io)。 It runs on a compute engine and i want this socket server to communicate securely. 它运行在计算引擎上,我希望此套接字服务器能够安全通信。 Because there are important messages for me in a communication of client and server sockets. 因为在客户端和服务器套接字的通信中有一些对我来说很重要的消息。 Thats why i bought an ssl certificate. 那就是为什么我买了SSL证书。

I applied my ssl certificate to my domain and now i want my client sockets to connect to a port of my domain(for example to https://www.example.com:8443 ) 我将ssl证书应用于我的域,现在我希望客户端套接字连接到我域的端口(例如https://www.example.com:8443

However i dont know how to forward 8443 port of my domain into my compute engine's 8443 port without terminating the https security. 但是我不知道如何在不终止https安全的情况下将域的8443端口转发到计算引擎的8443端口。

How can i do that? 我怎样才能做到这一点?

Thank you in advance 先感谢您

Well the Google Console has a networking section from where you can open ports for your applications. 好的,Google控制台有一个网络部分,您可以在其中打开应用程序的端口。 See this link: https://console.cloud.google.com/networking/firewalls/list?project= {your-project-id}. 请参阅以下链接: https : //console.cloud.google.com/networking/firewalls/list? project = {your-project-id}。 Replace {your-project-id} with your project id. 将{your-project-id}替换为您的项目ID。

Another option is that instead of using a ssl certificate, you can encrypt the messages sent between your server and client 另一个选择是,可以使用服务器和客户端之间发送的消息进行加密,而不必使用ssl证书。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM