Skip to content

impl: support for Toolbox 2.7 #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

impl: support for Toolbox 2.7 #135

wants to merge 13 commits into from

Conversation

fioan89
Copy link
Collaborator

@fioan89 fioan89 commented Jun 23, 2025

Things that were changed or added to TBX 2.7:

Support for Proxy Authentication

The new API introduced in TBX 2.7, and HTTP proxy authentication works flawlessly. However, SOCKS5 proxy authentication does not appear to be properly supported in the current TBX implementation.

While users can configure a SOCKS5 proxy with basic authentication, Toolbox fails to authenticate successfully. Coder uses OkHttp as the HTTP client, which in turn delegates SOCKS5 authentication to the JVM (java.net.SocksSocketImpl). We can configure a java.net.Authenticator with the credentials exposed by the new TBX API. However, since the Authenticator is set globally, doing so would affect all plugins — including TBX itself — which may not be desirable.

Customizable messages while loading the workspaces

The new TBX 2.7 API allows us to change the message displayed while loading the workspaces from "Loading environments" to "Loading workspaces"

UI pages with customizable titles
Support for custom aliases in the URI handling protocol

fioan89 added 13 commits June 23, 2025 23:41
With the new TBX API we can update the title of a UI page
without recreating the page and using hacks to force TBX
to update the internal state.
We still need to switch from the coder setup page back to the main screen
once the coder cli and the rest api poller is initialized.
Similar with the initial setup page we can use the new TBX API to
update the title of the uri handling page without recreating it and using
hacks to force TBX to update the internal state.
TBX 2.7 API prioritizes connection status to the remote TBX agent over
the workspace status. This would mean that a running workspace would be
listed as disconnected instead of ready. This is confusing as it only
happens for running workspaces and on top of that we also have a green
badge that is rendered by TBX when the agent connection is established.
A new API was added to allow proxy authentication
The new TBX 2.7 API allows us to change the message displayed
while loading the workspaces from "Loading environments" to
"Loading workspaces"
The new TBX 2.7 api exposes basic auth credentials for proxy.
The new API introduced in TBX 2.7, and HTTP proxy authentication works flawlessly. However,
SOCKS5 proxy authentication does not appear to be properly supported in the current TBX
implementation.

While users can configure a SOCKS5 proxy with basic authentication, Toolbox fails to
authenticate successfully. Coder uses OkHttp as the HTTP client, which in turn delegates
SOCKS5 authentication to the JVM (java.net.SocksSocketImpl). We can configure a java.net
.Authenticator with the credentials exposed by the new TBX API. However, since the
Authenticator is set globally, doing so would affect all plugins — including TBX itself —
which may not be desirable.
Introduces support for Toolbox 2.7
@fioan89 fioan89 requested review from matifali and f0ssel June 27, 2025 21:39
@fioan89 fioan89 marked this pull request as ready for review June 27, 2025 22:02
@@ -144,6 +150,10 @@ mitmproxy can do HTTP and SOCKS5 proxying. To configure one or the other:
5. Before authenticating to the Coder deployment we need to tell the plugin where can we find mitmproxy
certificates. In Coder's Settings page, set the `TLS CA path` to `~/.mitmproxy/mitmproxy-ca-cert.pem`

> ⚠️ Note: Coder Toolbox plugin handles only HTTP/HTTPS proxy authentication.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> ⚠️ Note: Coder Toolbox plugin handles only HTTP/HTTPS proxy authentication.
> [!NOTE]
> Coder Toolbox plugin handles only HTTP/HTTPS proxy authentication.

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