gitpod-io / gitpod-io/gitpod

Don't show ports that are bound only to localhost

Open
#5,303 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature: ports meta: never-stale type: feature request
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

Description

Bug description

When an application binds to a port on localhost only, as opposed to 0.0.0.0, there's no way that gitpod is going to be able to proxy it, so it might as well be ignored. AFAICT gitpod only proxies ports that are bound on all interfaces.

DrupalPod and ddev-gitpod use ddev, which for security reasons binds a number of ports to localhost only. In the context of Gitpod, there's no reason for Gitpod to even recognize these or point them out to end users, because they're not proxied by gitpod even though they're shown as ports.

Steps to reproduce

As a silly example,

A "Service is available on port 8888" popup will happen, and this port will be shown in the ports list.

But gitpod isn't going to be able to do anything with it, and the user isn't going to be able to do anything with it, because it's bound explicitly to localhost.

If we were to nc -l 0.0.0.0 8888 that would be entirely different, and gitpod and the user could do something with it (although usually only http works, but that's a different conversation).

Would it be possible to detect only listeners that actually matter, that can be proxied?

Expected behavior

Ports that gitpod can't do anything with can't be shown

Example repository

Above

Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with nc -l localhost 8888 and compare it with a listener on 0.0.0.0, then trace the port detection and proxy filtering entry points in the Gitpod repository. Done means localhost-only listeners no longer appear in the ports list or trigger availability notifications, while proxyable listeners still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cloud, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.