Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket improvements, SSL server, custom headers. #32683

Merged
merged 5 commits into from Oct 11, 2019

Conversation

@Faless
Copy link
Contributor

Faless commented Oct 9, 2019

In this PR:

  • Reimplement WebSocketPeer get_connected_port and get_connected_host (as always, not supported in HTML5)
  • Allow specifying the X509 certificate to be trusted by WebSocketClient when using SSL (an alternative to use project-wise certs).
  • Implement WebSocketServer SSL support via new properties private_key, ssl_certificate.
  • Allow using passing custom headers to WebSocketClient.connect_to_url (Closes #27129 , Closes #25999 )

Document all the new goodies.

Faless added 5 commits Oct 4, 2019
Was lost during library switch
Via the `trusted_ssl_certificate` property.
This commit also converts all PoolVector<String> parameters to
`const Vector<String>` in both WebSocketServer and WebSocketClient.
@Faless Faless added this to the 3.2 milestone Oct 9, 2019
@Faless Faless requested a review from godotengine/network as a code owner Oct 9, 2019
When using SSL (see [member private_key] and [member ssl_certificate]), you can set this to a valid [X509Certificate] to be provided as additional CA chain information during the SSL handshake.
</member>
<member name="private_key" type="CryptoKey" setter="set_private_key" getter="get_private_key">
When set to a valid [CryptoKey] (along with [member ssl_certificate]) will cause the server to require SSL instead of regular TCP (i.e. the `wss://` protocol).

This comment has been minimized.

Copy link
@akien-mga

akien-mga Oct 9, 2019

Member

Should be [code]wss://[/code].

This comment has been minimized.

Copy link
@akien-mga

akien-mga Oct 11, 2019

Member

I'll do the fixup in a post-merge commit, I have a few other doc things to check in.

This comment has been minimized.

Copy link
@Faless

Faless Oct 11, 2019

Author Contributor

Oh, thanks, sorry about the delay

When set to a valid [CryptoKey] (along with [member ssl_certificate]) will cause the server to require SSL instead of regular TCP (i.e. the `wss://` protocol).
</member>
<member name="ssl_certificate" type="X509Certificate" setter="set_ssl_certificate" getter="get_ssl_certificate">
When set to a valid [X509Certificate] (along with [member private_key]) will cause the server to require SSL instead of regular TCP (i.e. the `wss://` protocol).

This comment has been minimized.

Copy link
@akien-mga

akien-mga Oct 9, 2019

Member

Same here.

<return type="String">
</return>
<description>
Return the IP address of the currently connected host.

This comment has been minimized.

Copy link
@akien-mga

akien-mga Oct 9, 2019

Member

Should these two also mention that they're not supported on HTML5?

@akien-mga akien-mga merged commit be44603 into godotengine:master Oct 11, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@akien-mga

This comment has been minimized.

Copy link
Member

akien-mga commented Oct 11, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.