Port forwarding feature via subdomain/path
See original GitHub issueIs it possible to provide port forwarding feature that native VS Code provides?
The Coder web version of VS Code also provides this here: https://coder.com/docs/code-server/latest/guide#accessing-web-services-1
The above linked service does it by proxying all requests to <port>.somesubdomain.com
to the application running on that port in the container. Another way it provides is <url_to_access_vscode_online>/proxy/<port>
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to redirect (sub)domain to a certain IP address along with ...
Yes, it is possible to redirect your subdomain to the IP address along with a port in the same way. However, if you...
Read more >Is there a way to forward a port based on subdomain? [duplicate]
First up, there's no explicit requirement in your question that all of those names resolve to the same IP address -- so, you...
Read more >Redirect Subdomains allowing all port traffic to flow without ...
I have several sites I want to be able direct the subdomain to an internal IP. I created map settings in "system /...
Read more >How do I route a subdomain to an application running on my ...
Create a DNAT rule on the router, forwarding TCP\80 to 192.168.0.13:9177. easy peasy. if you want people to be able to hit it...
Read more >How can I Forward a subDomain to a specific port?
It can't be done by anything. When the remote computer opens a TCP connection, all it tells you is the IP address and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
fyi, we implemented that feature via an nginx trick in our SWAG reverse proxy. We simply use a named group in the
server_name
regex to capture the port as a var, and use that var in theproxy_pass
directive: https://github.com/linuxserver/reverse-proxy-confs/blob/master/openvscode-server.subdomain.conf.sample#L74I think there are a couple of possible duplicate issues: #320 and to some extent #163
The mentioned workaround by @aptalca works using an additional prefix rather than a subpath. Could we get it to work with a subpath, too?
Something along the lines of:
where we should get it running on
example.com:8888/code
. That doesn’t work though, but I’ve got no clue if this is at all possible with only an NGINX configuration.