Skip to content

feat(site): Add proxy menu into navbar #7715

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

Merged
merged 3 commits into from
May 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into bq/add-proxies-to-navbar
  • Loading branch information
BrunoQuaresma committed May 30, 2023
commit 2a0a836cfa7f1516c87bca06df85c5fa6f89d5e0
12 changes: 12 additions & 0 deletions site/src/contexts/ProxyContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ import {
import { ProxyLatencyReport, useProxyLatency } from "./useProxyLatency"

export interface ProxyContextValue {
// proxy is **always** the workspace proxy that should be used.
// The 'proxy.selectedProxy' field is the proxy being used and comes from either:
// 1. The user manually selected this proxy. (saved to local storage)
// 2. The default proxy auto selected because:
// a. The user has not selected a proxy.
// b. The user's selected proxy is not in the list of proxies.
// c. The user's selected proxy is not healthy.
// 3. undefined if there are no proxies.
//
// The values 'proxy.preferredPathAppURL' and 'proxy.preferredWildcardHostname' can
// always be used even if 'proxy.selectedProxy' is undefined. These values are sourced from
// the 'selectedProxy', but default to relative paths if the 'selectedProxy' is undefined.
proxy: PreferredProxy

// userProxy is always the proxy the user has selected. This value comes from local storage.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.