Closed gogasca closed 3 years ago
If you can I'd recommend using code-server --link
. That uses our own
"inverting proxy" and handles everything for you.
As for the issue here, it does look like it's having trouble with websockets. Are you using App Engine? The proxy readme says there are extra steps to get websockets working there: https://github.com/google/inverting-proxy#limitations
Thanks for replying, I'm using a Google internal version of the inverting Proxy. This version provides a shim.
I was curious if the Code Server is expecting some specific headers or require additional configuration if its behind a Proxy: For example remoteAuthority and authority fields.
<!-- Workbench Configuration -->
<meta id="vscode-workbench-web-configuration" data-settings='{"remoteAuthority":"dc49045da149f3f-x.y.z.com","logLevel":1,"workspaceProvider":{"payload":[["userDataPath","/var/lib/code-server"],["enableProposedApi","[]"]]},"homeIndicator":{"href":"https://github.com/cdr/code-server","icon":"code","title":"Home"}}' />
or
<meta id="vscode-remote-user-data-uri" data-settings='{"$mid":1,"path":"/var/lib/code-server","scheme":"vscode-remote","authority":"dc49045da149f3f-x.y.z.com"}' />
code-server --version
: 3.8.0 c4610f7829701aadb045d450013b84491c30580dProblem description:
When I try to access VSCode behind an inverse Proxy, I get a blank page. If I select "View source" in the blank page, I do see HTML. Not sure if its related to websockets or any other configuration.
Topology:
My URL is something like this: https://dc49045da149f3f-x.y.z.com
HTTPS -> HTTP Browser <---> HTTPS Proxy <---> [ Proxy Agent Docker <---> VM with Vscode 3.8 ]
Tested: Without Proxy: Browser <---> [ VM with Vscode 3.8 ] Works Without Proxy Agent: Browser <---> Proxy <---> [ VM with Vscode 3.8 ] Fails
Proxy: https://github.com/google/inverting-proxy
In Browser:
Should I configure an extra setting in VSCode with my external URL ? Any pointers are appreciated.
In View Source: