import { motion } from "framer-motion"; import { tabContentVariant, settingsPageVariant } from "./Variants"; import Dropdown from "./Dropdown"; import BareInput from "./BareInput"; import WispInput from "./WispInput"; import ProxyInput from "./ProxyInput"; import { changeTransport } from "../../util/transports"; import { useTranslation } from "react-i18next"; const Proxy = ({ id, active }) => { const { t } = useTranslation(); const engines = [ { id: "automatic", label: t("settings.proxy.automatic") }, { id: "ultraviolet", label: "Ultraviolet" }, { id: "rammerhead", label: "Rammerhead" }, { id: "dynamic", label: "Dynamic" } ]; const proxyModes = [ { id: "embed", label: t("settings.proxymodes.embed") }, { id: "direct", label: t("settings.proxymodes.direct") }, { id: "aboutblank", label: t("settings.proxymodes.aboutblank") } ]; const searchEngines = [ { id: "https://duckduckgo.com/?q=%s", label: "DuckDuckGo" }, { id: "https://google.com/search?q=%s", label: "Google" }, { id: "https://bing.com/search?q=%s", label: "Bing" } ]; const wispUrl = (location.protocol === "https:" ? "wss://" : "ws://") + location.host + "/wisp/"; //libcurl can be added here when it's stable const transports = [{ id: "epoxy", label: "Epoxy" }]; return (
{t("settings.proxy.title")}
{t("settings.proxy.subtitle")}
{t("settings.proxymodes.title")}
{t("settings.proxymodes.subtitle")}
{t("settings.search.title")}
{t("settings.search.subtitle")}
{t("settings.bare.title")}
{t("settings.bare.subtitle")}
Wisp Server
Enter the url of a Wisp server
Transport
Select the transport to use
changeTransport(value, wispUrl)} />
{t("settings.httpProxy.title")}
{t("settings.httpProxy.subtitle")}
{t("settings.httpProxy.link")}
); }; export default Proxy;