/** * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ import { withInjectables } from "@ogre-tools/injectable-react"; import { observer } from "mobx-react"; import React from "react"; import type { UserStore } from "../../../common/user-store"; import { Input } from "../input"; import { SubTitle } from "../layout/sub-title"; import { Switch } from "../switch"; import { Preferences } from "./preferences"; import userStoreInjectable from "../../../common/user-store/user-store.injectable"; interface Dependencies { userStore: UserStore; } const NonInjectedLensProxy = observer(({ userStore }: Dependencies) => { const [proxy, setProxy] = React.useState(userStore.httpsProxy || ""); return (

Proxy

setProxy(v)} onBlur={() => userStore.httpsProxy = proxy} /> Proxy is used only for non-cluster communication.

userStore.allowUntrustedCAs = !userStore.allowUntrustedCAs}> Allow untrusted Certificate Authorities This will make Lens to trust ANY certificate authority without any validations.{" "} Needed with some corporate proxies that do certificate re-writing.{" "} Does not affect cluster communications!
); }); export const LensProxy = withInjectables( NonInjectedLensProxy, { getProps: (di) => ({ userStore: di.inject(userStoreInjectable), }), }, );