8000 Open the socket to a separate address from the URL host by jasonharmongit · Pull Request #146 · dominicletz/websockex · GitHub
[go: up one dir, main page]

Skip to content

Open the socket to a separate address from the URL host - #146

Closed
jasonharmongit wants to merge 1 commit into
dominicletz:masterfrom
surgeapi:connect-address
Closed

jasonharmongit wants to merge 1 commit into
dominicletz:masterfrom
surgeapi:connect-address

Conversation

@jasonharmongit
Copy link
Copy Markdown

WebSockex always opened the socket to the host in the URL, so the TCP address, the Host header, and the TLS name were the same value. Dialing an IP meant putting that IP in the URL, and the handshake then checked the certificate against the IP.

This change adds a :connect_host option and points open_socket at it. The Host header, the TLS server name, and the certificate check stay on the URL host, so the server still sees the name the client requested. If the option is left out, the socket opens to the URL host, same as before.

The Host header, TLS server name, and certificate check still use the URL host.

Co
8000
-authored-by: Cursor <cursoragent@cursor.com>
@jasonharmongit
Copy link
Copy Markdown
Author

Closed because this was opened against the wrong repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0