bluerobotics / bluerobotics/BlueOS

Extension-manager: bridge extensions to the local network by default

Open
#2,869 1 comment 2 reactions 0 assignees View on GitHub
core enhancement triage ui
Dominant language
Vue
Stars
453
Forks
151
Avg merge
1d 3h
Merged PRs (30d)
174

Description

### Current behaviour

In a similar vein to #1640, it would be nice if each extension was automatically set up with a network bridge to the local network of the host computer.

With a default approach we could avoid [extensions needing to define it manually](https://github.com/BlueOS-community/blueos-code-server/pull/5), and the confusion that may come from doing that.

### Expected or desired behaviour

Inject an `ExtraHosts` binding (e.g. `blueos.internal:host-gateway`) into the Docker permissions for any extension that doesn't already have ExtraHosts defined. This allows extension code to be obvious when it is connecting to the internal BlueOS network.

---

Considered alternative host addresses include:
1. `host.docker.internal`
- This is our currently documented recommendation, and is used in some of our existing extensions
- It's likely the easiest to find external documentation for this, but also isn't very intuitive for people who aren't already familiar with Docker, which may be many of our potential Extension developers
- We care more about helping people to learn and use our system than teaching them Docker standards and common practices
1. `blueos.local`
- This allows the same code to be run in and outside an extension, which is a nice convenience feature
- It may run into access conflicts if the developer includes an mDNS receiver in their extension
- It may cause confusion for developers who are used to using/testing on systems with a custom mDNS address configured (since this address is unrelated to the external address/domain that BlueOS is accessed from)
1. `blueos`
- This is nice and clean, but may not seem as much like a URL, which could be confusing

### Prerequisites

- [X] I have checked to make sure that a similar request has not already been filed or fixed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.