Skip to content

fix: fix connection errors when using custom system certificates and an http proxy.#807

Open
zicklag wants to merge 1 commit intorailwayapp:masterfrom
zicklag:push-unywnxuylwmr
Open

fix: fix connection errors when using custom system certificates and an http proxy.#807
zicklag wants to merge 1 commit intorailwayapp:masterfrom
zicklag:push-unywnxuylwmr

Conversation

@zicklag
Copy link

@zicklag zicklag commented Mar 6, 2026

When trying to use the Railway CLI behind an HTTP proxy that requires a custom certificate ( such as some VPNs ), the CLI would previously fail with a certificate error. This adds the rustls-tls-native-roots feature reqwest to trust the native platform's system certificate store to fix that.

Railway commands that require a websocket connection were also failing to go through the proxy, because while reqwest automatically sends requests through the proxy async-tungstenite would not. This removes async-tungstenite in favor of reqwest-websocket which is simpler and uses reqwest to properly send the initial HTTP request through the proxy before the websocket upgrade.

…an http proxy.

When trying to use the Railway CLI behind an HTTP proxy that requires
a custom certificate ( such as some VPNs ), the CLI would previously
fail with a certificate error. This adds the `rustls-tls-native-roots`
feature reqwest to trust the native platform's system certificate store to
fix that.

Railway commands that require a websocket connection were also
failing to go through the proxy, because while `reqwest` automatically
sends requests through the proxy `async-tungstenite` would not. This
removes `async-tungstenite` in favor of `reqwest-websocket` which is
simpler and uses `reqwest` to properly send the initial HTTP request
through the proxy before the websocket upgrade.
@brody192
Copy link
Collaborator

brody192 commented Mar 6, 2026

Could we ask for your initial confirmation that these changes have not modified any existing behavior, and for how you reached that conclusion?

@zicklag
Copy link
Author

zicklag commented Mar 6, 2026

I tried to make sure the new code didn't change any behavior.

I tested the CLI locally where I have an http proxy with a custom certificate, and I also tested on a cloud server which has no proxy. On both of them I was able to use several railway commands to connect to my environment including login, logs, ssh, service status, link, and variable set.

Everything worked as expected. All the code is hand-written without AI assistance if that makes any difference. :)

I also ran the tests, all of which are passing. There is a clippy warning, but that was already there before this PR.

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.

2 participants