text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```xml import React from 'react'; import LogsSearchLink from './LogsSearchLink'; import { formatNumber } from '../../helpers/helpers'; interface CellProps { value: number; percent: number; color: string; search?: string; onSearchRedirect?: (...args: unknown[]) => string; } const Cell = ({ value,...
/content/code_sandbox/client/src/components/ui/Cell.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
208
```css .version { font-size: 0.8rem; } @media screen and (min-width: 1280px) { .version { font-size: 0.85rem; } } .version__value { font-weight: 600; } @media screen and (min-width: 992px) { .version__value { max-width: 100%; overflow: visible; } } .version__link { ...
/content/code_sandbox/client/src/components/ui/Version.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
172
```xml import React from 'react'; import { Trans } from 'react-i18next'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import Topline from './Topline'; import { getUpdate } from '../../actions'; import { MANUAL_UPDATE_LINK } from '../../helpers/constants'; import { RootState } from '../../init...
/content/code_sandbox/client/src/components/ui/UpdateTopline.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
334
```xml import React from 'react'; import classnames from 'classnames'; import Tab from './Tab'; import './Tabs.css'; interface TabsProps { controlClass?: string; tabs: object; activeTabLabel: string; setActiveTabLabel: (...args: unknown[]) => unknown; children: React.ReactElement; } const Tabs = ...
/content/code_sandbox/client/src/components/ui/Tabs.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
282
```css .topline { position: relative; z-index: 102; margin-bottom: 0; padding: 0.75rem 0; } ```
/content/code_sandbox/client/src/components/ui/Topline.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
35
```css .checkbox { display: inline-block; margin: 0; } .checkbox--single { display: block; margin: 2px auto 6px; } .checkbox--single .checkbox__label:before { margin-right: 0; } .checkbox--settings .checkbox__label:before { top: 2px; margin-right: 20px; } .checkbox--settings .checkbox__l...
/content/code_sandbox/client/src/components/ui/Checkbox.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
621
```css .nav-tabs .nav-link.active { border-color: var(--btn-success-bgcolor); color: var(--btn-success-bgcolor); background: transparent; } .nav-tabs .nav-link.active:hover { border-color: #4b9400; color: #4b9400; } .nav-icon { width: 15px; height: 15px; margin-right: 6px; stroke: ...
/content/code_sandbox/client/src/components/Header/Header.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,019
```css .select.select--theme { height: 45px; padding: 0 32px 2px 11px; outline: 0; border-color: var(--ctrl-select-bgcolor); background-image: url("data:image/svg+xml;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIjYgOSAxMiAxNSAxOCA5Ij48L3BvbHlsaW5lPgo8L3N2Zz...
/content/code_sandbox/client/src/components/ui/Select.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
691
```xml import React from 'react'; interface CellWrapProps { value?: string | number; formatValue?: (...args: unknown[]) => unknown; formatTitle?: (...args: unknown[]) => unknown; } const CellWrap = ({ value }: CellWrapProps, formatValue?: any, formatTitle = formatValue) => { if (!value) { retu...
/content/code_sandbox/client/src/components/ui/CellWrap.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
173
```xml import React from 'react'; import './Topline.css'; interface ToplineProps { children: React.ReactNode; type: string; } const Topline = (props: ToplineProps) => ( <div className={`alert alert-${props.type} topline`}> <div className="container">{props.children}</div> </div> ); export de...
/content/code_sandbox/client/src/components/ui/Topline.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
80
```css .page-header { flex-direction: column; align-items: flex-start; } .page-header--logs { flex-direction: row; align-items: flex-end; margin: 0.5rem 0 2.8rem; } .page-header--logs .page-title { display: inline-flex; align-items: center; } @media (max-width: 991px) { .page-header--...
/content/code_sandbox/client/src/components/ui/PageTitle.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
196
```xml import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch, useSelector } from 'react-redux'; import cn from 'classnames'; import { REPOSITORY, PRIVACY_POLICY_LINK, THEMES } from '../../helpers/constants'; import { LANGUAGES } from '../../helpers/twosky'; impor...
/content/code_sandbox/client/src/components/ui/Footer.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,028
```xml import React from 'react'; import { Trans } from 'react-i18next'; import isAfter from 'date-fns/is_after'; import addDays from 'date-fns/add_days'; import { useSelector } from 'react-redux'; import Topline from './Topline'; import { EMPTY_DATE } from '../../helpers/constants'; import { RootState } from '../../i...
/content/code_sandbox/client/src/components/ui/EncryptionTopline.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
506
```css .line__tooltip { padding: 2px 10px 7px; line-height: 1.1; color: var(--white); background-color: var(--gray-3); border-radius: 4px; opacity: 90%; } .line__tooltip-text { font-size: 0.7rem; } .card-chart-bg { color: var(--black); } .card-chart-bg path[d^='M0,32'] { transform...
/content/code_sandbox/client/src/components/ui/Line.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
109
```css .icons { display: inline-block; vertical-align: middle; } .icon--24 { --size: 1.5rem; width: var(--size); height: var(--size); } .icon--20 { --size: 1.25rem; width: var(--size); height: var(--size); } .icon--18 { --size: 1.125rem; width: var(--size); height: var(...
/content/code_sandbox/client/src/components/ui/Icons.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
189
```css .text-edit-container { position: relative; min-height: 240px; overflow: hidden; } .text-input, .text-output { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 16px; background: transparent; white-space: pre-wrap; line-height: 24px; word...
/content/code_sandbox/client/src/components/ui/texareaCommentsHighlight.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
190
```css .card-header { align-items: center; justify-content: space-between; padding: 0.6rem 1.5rem; flex-shrink: 0; } .card-subtitle { margin: 4px 0; line-height: 1.4; } .card-table-overflow { overflow-y: auto; max-height: 100%; } .card-table-overflow--limited { overflow-y: auto; ...
/content/code_sandbox/client/src/components/ui/Card.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,315
```css .ReactTable .rt-th, .ReactTable .rt-td { padding: 10px 15px; overflow: hidden; text-overflow: ellipsis; } .card-table .ReactTable .rt-td { overflow: visible; } .ReactTable .rt-noData { color: var(--rt-nodata-color); background-color: var(--rt-nodata-bgcolor); } .ReactTable .-loading { ...
/content/code_sandbox/client/src/components/ui/ReactTable.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
366
```xml import React from 'react'; import './PageTitle.css'; interface PageTitleProps { title: string; subtitle?: string; children?: React.ReactNode; containerClass?: string; } const PageTitle = ({ title, subtitle, children, containerClass }: PageTitleProps) => ( <div className="page-header"> ...
/content/code_sandbox/client/src/components/ui/PageTitle.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
128
```xml import React from 'react'; import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { getLogsUrlParams } from '../../helpers/helpers'; import { MENU_URLS } from '../../helpers/constants'; interface LogsSearchLinkProps { children: string | number | React.ReactElement;...
/content/code_sandbox/client/src/components/ui/LogsSearchLink.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
218
```css .ReactModal__Overlay { -webkit-perspective: 600; perspective: 600; opacity: 0; overflow-x: hidden; overflow-y: auto; background-color: rgba(0, 0, 0, 0.5); z-index: 104; } .ReactModal__Overlay--after-open { opacity: 1; transition: opacity 150ms ease-out; background-color: ...
/content/code_sandbox/client/src/components/ui/Modal.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
310
```xml import React, { Component } from 'react'; import { withTranslation } from 'react-i18next'; import './Checkbox.css'; interface CheckboxProps { title: string; subtitle: string; enabled: boolean; handleChange: (...args: unknown[]) => unknown; disabled?: boolean; t?: (...args: unknown[]) =>...
/content/code_sandbox/client/src/components/ui/Checkbox.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
275
```xml import React from 'react'; import './Card.css'; interface CardProps { id?: string; title?: string; subtitle?: string; bodyType?: string; type?: string; refresh?: React.ReactNode; children: React.ReactNode; } const Card = ({ type, id, title, subtitle, refresh, bodyType, children }: ...
/content/code_sandbox/client/src/components/ui/Card.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
216
```xml import React from 'react'; import PopperJS from 'popper.js'; import TooltipTrigger, { TriggerTypes } from 'react-popper-tooltip'; import { useTranslation } from 'react-i18next'; import { HIDE_TOOLTIP_DELAY, MEDIUM_SCREEN_SIZE, SHOW_TOOLTIP_DELAY } from '../../helpers/constants'; import 'react-popper-tooltip/dis...
/content/code_sandbox/client/src/components/ui/Tooltip.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
582
```xml import React from 'react'; import './Icons.css'; const Icons = () => ( <svg xmlns="path_to_url" className="d-none"> <symbol id="android" viewBox="0 0 14 16" fill="currentColor"> <path d="M11.2 5.2H2.8c-.2 0-.3.1-.3.3v6.7c0 .2.2.3.3.3h1.5v2.3c0 .5.4.9 1 .9s1-.4 1-.9v-2.3h1.4v2.3c0 .5.4.9...
/content/code_sandbox/client/src/components/ui/Icons.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
12,581
```xml import React from 'react'; import { ResponsiveLine } from '@nivo/line'; import addDays from 'date-fns/add_days'; import subDays from 'date-fns/sub_days'; import subHours from 'date-fns/sub_hours'; import dateFormat from 'date-fns/format'; import round from 'lodash/round'; import { useSelector } from 'react-redux...
/content/code_sandbox/client/src/components/ui/Line.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
534
```css .overlay { display: none; position: fixed; top: 0; left: 0; z-index: 110; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; padding: 20px; font-size: 28px; font-weight: 600; text-align: center; background-c...
/content/code_sandbox/client/src/components/ui/Overlay.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
760
```css .loading { position: relative; z-index: 101; opacity: 0; animation: opacity 0.2s linear 0.2s forwards; } .loading:before { content: ''; position: fixed; top: 0; left: 0; z-index: 100; width: 100%; min-height: 100vh; background-color: var(--loading-bg); } .loading...
/content/code_sandbox/client/src/components/ui/Loading.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
811
```xml import React from 'react'; import { withTranslation, Trans } from 'react-i18next'; import Card from './Card'; interface StatusProps { message: string; buttonMessage?: string; reloadPage?: (...args: unknown[]) => unknown; } const Status = ({ message, buttonMessage, reloadPage }: StatusProps) => ( ...
/content/code_sandbox/client/src/components/ui/Status.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
169
```xml import React from 'react'; import { Trans } from 'react-i18next'; import classnames from 'classnames'; import { useSelector } from 'react-redux'; import './Overlay.css'; import { RootState } from '../../initialState'; const UpdateOverlay = () => { const processingUpdate = useSelector((state: RootState) => s...
/content/code_sandbox/client/src/components/ui/UpdateOverlay.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
138
```xml import React, { Component } from 'react'; import classnames from 'classnames'; import { withTranslation } from 'react-i18next'; import enhanceWithClickOutside from 'react-click-outside'; import './Dropdown.css'; type DropdownProps = { label: string; children: React.ReactNode; controlClassName: str...
/content/code_sandbox/client/src/components/ui/Dropdown.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
410
```xml import React from 'react'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; import './Loading.css'; interface LoadingProps { className?: string; text?: string; } const Loading = ({ className, text }: LoadingProps) => { const { t } = useTranslation(); return ...
/content/code_sandbox/client/src/components/ui/Loading.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
90
```css .footer { padding: 1rem 0; } .footer__row { display: flex; align-items: center; flex-direction: column; } .footer__column { margin-bottom: 15px; } .footer__column--links { display: flex; flex-direction: column; align-items: center; } .footer__column--theme { min-width: 220...
/content/code_sandbox/client/src/components/ui/Footer.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
491
```css .tabs__controls { display: flex; justify-content: space-between; margin-bottom: 15px; padding: 10px 0; border-bottom: 1px solid var(--card-border-color); overflow: auto; } @media screen and (min-width: 768px) { .tabs__controls { padding: 15px 0; overflow: initial; ...
/content/code_sandbox/client/src/components/ui/Tabs.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
439
```xml import React from 'react'; import classnames from 'classnames'; import { useTranslation } from 'react-i18next'; interface TabProps { activeTabLabel: string; label: string; onClick: (...args: unknown[]) => unknown; title?: string; } const Tab = ({ activeTabLabel, label, title, onClick }: TabProp...
/content/code_sandbox/client/src/components/ui/Tab.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
186
```css .dropdown-item { cursor: pointer; } .dropdown-item.active, .dropdown-item:active { background-color: var(--btn-success-bgcolor); } .dropdown-menu { cursor: default; } .dropdown-menu.dropdown-menu--protection { top: calc(100% + 8px); left: 50%; transform: translateX(-50%); } .dropdown-...
/content/code_sandbox/client/src/components/ui/Dropdown.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
337
```xml import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { getVersion } from '../../actions'; import './Version.css'; import { RootState } from '../../initialState'; const Version = () => { const dispatch ...
/content/code_sandbox/client/src/components/ui/Version.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
319
```css .tooltip-container { border: 0; padding: 0.7rem; box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.2); } [data-theme='dark'] .tooltip-container { background-color: var(--ctrl-select-bgcolor); color: var(--mcolor); } .tooltip-custom--narrow { max-width: 14rem; } .tooltip-custom--wide { max-wi...
/content/code_sandbox/client/src/components/ui/Tooltip.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
184
```xml import React from 'react'; import { Trans } from 'react-i18next'; import { useSelector } from 'react-redux'; import { Field, reduxForm } from 'redux-form'; import i18next from 'i18next'; import cn from 'classnames'; import { getPathWithQueryString } from '../../../helpers/helpers'; import { CLIENT_ID_LINK, FOR...
/content/code_sandbox/client/src/components/ui/Guide/MobileConfigForm.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,000
```xml import React, { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import i18next from 'i18next'; import { useSelector } from 'react-redux'; import { MOBILE_CONFIG_LINKS } from '../../../helpers/constants'; import Tabs from '../Tabs'; import MobileConfigForm from './MobileConfigFo...
/content/code_sandbox/client/src/components/ui/Guide/Guide.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,171
```xml export { default } from './Guide'; ```
/content/code_sandbox/client/src/components/ui/Guide/index.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
9
```xml import React, { memo } from 'react'; type Props = { className?: string; }; export const Logo = memo(({ className }: Props) => { return ( <svg xmlns="path_to_url" width="164" height="41" viewBox="0 0 164 41" className={className}> <g fillRule="evenodd"> <path d="M129....
/content/code_sandbox/client/src/components/ui/svg/logo.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,708
```xml import React from 'react'; import { Trans } from 'react-i18next'; import { HashLink as Link } from 'react-router-hash-link'; const AnonymizerNotification = () => ( <div className="alert alert-primary mt-6"> <Trans components={[ <strong key="0">text</strong>, ...
/content/code_sandbox/client/src/components/Logs/AnonymizerNotification.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
117
```xml import React, { Dispatch, SetStateAction, useCallback, useEffect, useRef } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; import throttle from 'lodash/throttle'; import Loading from '../ui/Loading'; import Header from './Cells/Header'; impo...
/content/code_sandbox/client/src/components/Logs/InfiniteTable.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
651
```css :root { --blue: #e5effd; --green-pale: rgba(103, 178, 121, 0.1); --red: rgba(223, 56, 18, 0.05); --white: #fff; --yellow: rgba(247, 181, 0, 0.1); --size-date: 70; --size-domain: 180; --size-response: 150; --size-client: 123; --gray-216: rgba(216, 216, 216, 0.23); --gra...
/content/code_sandbox/client/src/components/Logs/Logs.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,965
```xml import React, { useEffect, useState } from 'react'; import { Trans } from 'react-i18next'; import Modal from 'react-modal'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { useHistory } from 'react-router-dom'; import queryString from 'query-string'; import classNames from 'classn...
/content/code_sandbox/client/src/components/Logs/index.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,511
```xml import React, { Fragment } from 'react'; import { Trans } from 'react-i18next'; import { HashLink as Link } from 'react-router-hash-link'; import Card from '../ui/Card'; const Disabled = () => ( <Fragment> <div className="page-header"> <h1 className="page-title page-title--large"> ...
/content/code_sandbox/client/src/components/Logs/Disabled.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
165
```xml import React from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; import { FiltersForm } from './Form'; import { refreshFilteredLogs } from '../../../actions/queryLogs'; import { addSuccessToast } from '../../../actions/toasts'; interface FiltersProps { f...
/content/code_sandbox/client/src/components/Logs/Filters/index.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
296
```xml import React, { useEffect } from 'react'; import { Field, type InjectedFormProps, reduxForm } from 'redux-form'; import { useTranslation } from 'react-i18next'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { useHistory } from 'react-router-dom'; import classNames from 'classname...
/content/code_sandbox/client/src/components/Logs/Filters/Form.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,281
```xml import React from 'react'; import { Trans } from 'react-i18next'; import classNames from 'classnames'; import PopperJS from 'popper.js'; import { TriggerTypes } from 'react-popper-tooltip'; import { processContent } from '../../../helpers/helpers'; import Tooltip from '../../ui/Tooltip'; import 'react-popper-t...
/content/code_sandbox/client/src/components/Logs/Cells/IconTooltip.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
539
```css .tooltip-custom__container { min-width: 150px; padding: 1rem 1.5rem 1.25rem 1.5rem; font-size: 16px !important; box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2); border-radius: 4px !important; pointer-events: auto !important; background-color: var(--ctrl-bgcolor); color: var(--mcolor); ...
/content/code_sandbox/client/src/components/Logs/Cells/IconTooltip.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
838
```xml import classNames from 'classnames'; import React from 'react'; import { useTranslation } from 'react-i18next'; interface HeaderCellProps { content: string | React.ReactElement; className?: string; } const HeaderCell = ({ content, className }: HeaderCellProps, idx: any) => { const { t } = useTransl...
/content/code_sandbox/client/src/components/Logs/Cells/HeaderCell.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
141
```xml import React, { useState } from 'react'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { nanoid } from 'nanoid'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; import { Link, useHistory } from 'react-router-dom'; import { checkFiltered, getBl...
/content/code_sandbox/client/src/components/Logs/Cells/ClientCell.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,608
```xml import React from 'react'; import { useSelector } from 'react-redux'; import { formatDateTime, formatTime } from '../../../helpers/helpers'; import { DEFAULT_SHORT_DATE_FORMAT_OPTIONS, DEFAULT_TIME_FORMAT } from '../../../helpers/constants'; import { RootState } from '../../../initialState'; interface DateCell...
/content/code_sandbox/client/src/components/Logs/Cells/DateCell.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
240
```xml import { useTranslation } from 'react-i18next'; import { useDispatch, useSelector } from 'react-redux'; import classNames from 'classnames'; import React from 'react'; import { toggleDetailedLogs } from '../../../actions/queryLogs'; import HeaderCell from './HeaderCell'; import { RootState } from '../../../init...
/content/code_sandbox/client/src/components/Logs/Cells/Header.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
426
```xml import { useTranslation } from 'react-i18next'; import { shallowEqual, useSelector } from 'react-redux'; import classNames from 'classnames'; import React from 'react'; import { getRulesToFilterList, formatElapsedMs, getFilterNames, getServiceName } from '../../../helpers/helpers'; import { FILTERED_STATUS, FILT...
/content/code_sandbox/client/src/components/Logs/Cells/ResponseCell.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,034
```xml import React from 'react'; import { useSelector } from 'react-redux'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; import { DEFAULT_SHORT_DATE_FORMAT_OPTIONS, LONG_TIME_FORMAT, SCHEME_TO_PROTOCOL_MAP, } from '../../../helpers/constants'; import { captitalizeWo...
/content/code_sandbox/client/src/components/Logs/Cells/DomainCell.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,222
```xml import React, { Dispatch, memo, SetStateAction } from 'react'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { captitalizeWords, checkFiltered, getRulesToFilterList, formatDateTime...
/content/code_sandbox/client/src/components/Logs/Cells/index.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,001
```xml import i18next from 'i18next'; export const BUTTON_PREFIX = 'btn_'; export const getBlockClientInfo = (ip: any, disallowed: any, disallowed_rule: any, allowedClients: any) => { let confirmMessage; if (disallowed) { confirmMessage = i18next.t('client_confirm_unblock', { ip: disallowed_rule || i...
/content/code_sandbox/client/src/components/Logs/Cells/helpers/index.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
227
```xml import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; import round from 'lodash/round'; import { shallowEqual, useSelector } from 'react-redux'; import Card from '../ui/Card'; import { formatNumber, msToDays, msToHours } from '../../helpers/helpers'; import LogsSearchLink from '../...
/content/code_sandbox/client/src/components/Dashboard/Counters.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
933
```xml import React from 'react'; // @ts-expect-error FIXME: update react-table import ReactTable from 'react-table'; import { withTranslation, Trans } from 'react-i18next'; import { TFunction } from 'i18next'; import Card from '../ui/Card'; import Cell from '../ui/Cell'; import DomainCell from './DomainCell'; imp...
/content/code_sandbox/client/src/components/Dashboard/UpstreamResponses.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
485
```xml import React from 'react'; // @ts-expect-error FIXME: update react-table import ReactTable from 'react-table'; import { withTranslation, Trans } from 'react-i18next'; import Card from '../ui/Card'; import Cell from '../ui/Cell'; import DomainCell from './DomainCell'; import { DASHBOARD_TABLES_DEFAULT_PAGE_SIZ...
/content/code_sandbox/client/src/components/Dashboard/QueriedDomains.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
504
```xml import React, { useState } from 'react'; // @ts-expect-error FIXME: update react-table import ReactTable from 'react-table'; import { Trans, useTranslation } from 'react-i18next'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import classNames from 'classnames'; import Card from '../ui...
/content/code_sandbox/client/src/components/Dashboard/Clients.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,412
```xml import React from 'react'; // @ts-expect-error FIXME: update react-table import ReactTable from 'react-table'; import { withTranslation, Trans } from 'react-i18next'; import { TFunction } from 'i18next'; import Card from '../ui/Card'; import Cell from '../ui/Cell'; import DomainCell from './DomainCell'; imp...
/content/code_sandbox/client/src/components/Dashboard/BlockedDomains.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
505
```xml import React from 'react'; import { Trans } from 'react-i18next'; import { getSourceData, getTrackerData } from '../../helpers/trackers/trackers'; import Tooltip from '../ui/Tooltip'; import { captitalizeWords } from '../../helpers/helpers'; const renderLabel = (value: any) => ( <strong> <Trans>{...
/content/code_sandbox/client/src/components/Dashboard/DomainCell.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
489
```css .dashboard-protection-button.btn-gray { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-color: #a4a4a4; } .stats__table .popover__body { left: -10px; min-width: 270px; transform: none; } .stats__table .popover__body:after { left: 23px; } .stats__table .rt-tr...
/content/code_sandbox/client/src/components/Dashboard/Dashboard.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
486
```xml import React, { useEffect } from 'react'; import { HashLink as Link } from 'react-router-hash-link'; import { Trans, useTranslation } from 'react-i18next'; import classNames from 'classnames'; import Statistics from './Statistics'; import Counters from './Counters'; import Clients from './Clients'; import Quer...
/content/code_sandbox/client/src/components/Dashboard/index.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,854
```xml import React from 'react'; import { STATUS_COLORS } from '../../helpers/constants'; import { formatNumber } from '../../helpers/helpers'; import Card from '../ui/Card'; import Line from '../ui/Line'; interface StatsCardProps { total: number; lineData: unknown[]; title: object; color: string;...
/content/code_sandbox/client/src/components/Dashboard/StatsCard.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
222
```xml import React from 'react'; // @ts-expect-error FIXME: update react-table import ReactTable from 'react-table'; import round from 'lodash/round'; import { withTranslation, Trans } from 'react-i18next'; import { TFunction } from 'i18next'; import Card from '../ui/Card'; import DomainCell from './DomainCell'; im...
/content/code_sandbox/client/src/components/Dashboard/UpstreamAvgTime.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
479
```xml import React from 'react'; import { Link } from 'react-router-dom'; import { withTranslation, Trans } from 'react-i18next'; import StatsCard from './StatsCard'; import { getPercent, normalizeHistory } from '../../helpers/helpers'; import { RESPONSE_FILTER } from '../../helpers/constants'; const getNormalized...
/content/code_sandbox/client/src/components/Dashboard/Statistics.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
695
```css .guide { max-width: 768px; margin: 0 auto; } .guide__title { margin-bottom: 10px; font-size: 17px; font-weight: 700; } .guide__desc { margin-bottom: 20px; font-size: 15px; } .guide__address { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; } ...
/content/code_sandbox/client/src/components/SetupGuide/Guide.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
140
```xml import React from 'react'; import { Trans, withTranslation } from 'react-i18next'; import Guide from '../ui/Guide'; import Card from '../ui/Card'; import PageTitle from '../ui/PageTitle'; import './Guide.css'; import { DashboardData } from '../../initialState'; interface SetupGuideProps { dashboard: Dash...
/content/code_sandbox/client/src/components/SetupGuide/index.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
273
```xml export const R_URL_REQUIRES_PROTOCOL = /^https?:\/\/[^/\s]+(\/.*)?$/; // matches hostname or *.wildcard export const R_HOST = /^(\*\.)?[\w.-]+$/; export const R_IPV4 = /^(?:(?:^|\.)(?:2(?:5[0-5]|[0-4]\d)|1?\d?\d)){4}$/; export const R_IPV6 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){...
/content/code_sandbox/client/src/helpers/constants.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
5,285
```xml /** * Checks if versions are equal. * Please note, that this method strips the "v" prefix. * * @param left {string} - left version * @param right {string} - right version * @return {boolean} true if versions are equal */ export const areEqualVersions = (left: any, right: any) => { if (!left || !right)...
/content/code_sandbox/client/src/helpers/version.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
122
```css @charset "UTF-8"; /** Dashboard UI */ /*! * Bootstrap v4.0.0 (path_to_url */ /* stylelint-disable */ :root { --blue: #467fcf; --indigo: #6574cd; --purple: #a55eea; --pink: #f66d9b; --red: #cd201f; --orange: #fd9644; --yellow: #f1c40f; --green: #5eba00; --green-74: #66b574;...
/content/code_sandbox/client/src/components/ui/Tabler.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
102,432
```xml import React, { Fragment } from 'react'; import { Trans } from 'react-i18next'; import cn from 'classnames'; import { createOnBlurHandler } from './helpers'; import { R_MAC_WITHOUT_COLON, R_UNIX_ABSOLUTE_PATH, R_WIN_ABSOLUTE_PATH } from './constants'; interface renderFieldProps { id: string; input: obj...
/content/code_sandbox/client/src/helpers/form.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,887
```xml import React from 'react'; import { Link } from 'react-router-dom'; import { normalizeWhois } from './helpers'; import { WHOIS_ICONS } from './constants'; const getFormattedWhois = (whois: any) => { const whoisInfo = normalizeWhois(whois); return Object.keys(whoisInfo).map((key) => { const ico...
/content/code_sandbox/client/src/helpers/renderFormattedClientCell.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
554
```xml import i18next from 'i18next'; import { MAX_PORT, R_CIDR, R_CIDR_IPV6, R_HOST, R_IPV4, R_IPV6, R_MAC, R_URL_REQUIRES_PROTOCOL, STANDARD_WEB_PORT, UNSAFE_PORTS, R_CLIENT_ID, R_DOMAIN, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, R_IPV4_SUBNET, R_IPV6_S...
/content/code_sandbox/client/src/helpers/validators.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,378
```xml // eslint-disable-next-line import/no-relative-packages import twosky from '../../../.twosky.json'; export const LANGUAGES = twosky[0].languages; export const BASE_LOCALE = twosky[0].base_locale; ```
/content/code_sandbox/client/src/helpers/twosky.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
52
```xml import React from 'react'; import classnames from 'classnames'; import { COMMENT_LINE_DEFAULT_TOKEN } from './constants'; const renderHighlightedLine = (line: any, idx: any, commentLineTokens = [COMMENT_LINE_DEFAULT_TOKEN]) => { const isComment = commentLineTokens.some((token) => line.trim().startsWith(toke...
/content/code_sandbox/client/src/helpers/highlightTextareaComments.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
257
```xml export const LOCAL_STORAGE_KEYS = { THEME: 'account_theme', BLOCKLIST_PAGE_SIZE: 'blocklist_page_size', ALLOWLIST_PAGE_SIZE: 'allowlist_page_size', CLIENTS_PAGE_SIZE: 'clients_page_size', REWRITES_PAGE_SIZE: 'rewrites_page_size', AUTO_CLIENTS_PAGE_SIZE: 'auto_clients_page_size', }; expor...
/content/code_sandbox/client/src/helpers/localStorageHelper.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
277
```xml import { useState, useEffect } from 'react'; const useDebounce = (value: any, delay: any) => { const [debouncedValue, setDebouncedValue] = useState(value); useEffect(() => { const handler = setTimeout(() => { setDebouncedValue(value); }, delay); return () => { ...
/content/code_sandbox/client/src/helpers/useDebounce.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
107
```xml import whotracksmeWebsites from './whotracksme_web.json'; import trackersDb from './trackers.json'; import { REPOSITORY } from '../constants'; /** @typedef TrackerData @type {object} @property {string} id - tracker ID. @property {string} name - tracker name. @property {string} url - tracker website url. ...
/content/code_sandbox/client/src/helpers/trackers/trackers.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
745
```xml // Code generated by go run ./scripts/vetted-filters/main.go; DO NOT EDIT. /* eslint quote-props: 'off', quotes: 'off', comma-dangle: 'off', semi: 'off' */ export default { "categories": { "general": { "name": "filter_category_general", "description": "filter_category_genera...
/content/code_sandbox/client/src/helpers/filters/filters.ts
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
3,047
```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> <meta name="google" content="notranslate"> <meta http-equiv="x-dns-prefetch-control" content="off"> <meta name="mobi...
/content/code_sandbox/client/public/index.html
html
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
409
```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> <meta name="google" content="notranslate"> <meta name="mobile-web-app-capable" content="yes" /> <meta name="apple-mo...
/content/code_sandbox/client/public/install.html
html
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
243
```xml import 'url-polyfill'; import dateParse from 'date-fns/parse'; import dateFormat from 'date-fns/format'; import round from 'lodash/round'; import axios from 'axios'; import i18n from 'i18next'; import ipaddr, { IPv4, IPv6 } from 'ipaddr.js'; import queryString from 'query-string'; import React from 'react'; impo...
/content/code_sandbox/client/src/helpers/helpers.tsx
xml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
7,340
```html <!DOCTYPE html> <html> <head> <title>AdGuard Home API</title> <!-- needed for adaptive design --> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="path_to_url|Roboto:300,400,700" rel="stylesheet"> <!-- ReDoc doesn't change ou...
/content/code_sandbox/openapi/index.html
html
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
155
```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> <meta name="google" content="notranslate"> <link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon-180x18...
/content/code_sandbox/client/public/login.html
html
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
301
```yaml 'openapi': '3.0.3' 'info': 'title': 'AdGuard Home' 'description': > AdGuard Home REST-ish API. Our admin web interface is built on top of this REST-ish API. 'version': '0.107' 'contact': 'name': 'AdGuard Home' 'url': 'path_to_url 'servers': - 'url': '/control' 'security': - 'basicAuth...
/content/code_sandbox/openapi/openapi.yaml
yaml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
21,665
```unknown Keep this file non-hidden for Go's embedding to work. ```
/content/code_sandbox/build/gitkeep
unknown
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
13
```go package aghhttp_test import ( "encoding/json" "testing" "time" "github.com/AdguardTeam/AdGuardHome/internal/aghhttp" "github.com/AdguardTeam/golibs/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // testJSONTime is the JSON time for tests. var testJSONTime = aghhtt...
/content/code_sandbox/internal/aghhttp/json_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
780
```go package aghhttp import ( "encoding/json" "fmt" "net/http" "strconv" "time" "github.com/AdguardTeam/golibs/httphdr" "github.com/AdguardTeam/golibs/log" ) // JSON Utilities // nsecPerMsec is the number of nanoseconds in a millisecond. const nsecPerMsec = float64(time.Millisecond / time.Nanosecond) // JS...
/content/code_sandbox/internal/aghhttp/json.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,064
```go // Package aghhttp provides some common methods to work with HTTP. package aghhttp import ( "fmt" "io" "net/http" "github.com/AdguardTeam/AdGuardHome/internal/version" "github.com/AdguardTeam/golibs/httphdr" "github.com/AdguardTeam/golibs/log" ) // HTTP scheme constants. const ( SchemeHTTP = "http" Sc...
/content/code_sandbox/internal/aghhttp/aghhttp.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
492
```go package aghhttp // HTTP headers // HTTP header value constants. const ( HdrValApplicationJSON = "application/json" HdrValStrictTransportSecurity = "max-age=31536000; includeSubDomains" HdrValTextPlain = "text/plain" ) ```
/content/code_sandbox/internal/aghhttp/header.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
60
```go package aghtls_test import ( "crypto/tls" "testing" "github.com/AdguardTeam/AdGuardHome/internal/aghtls" "github.com/AdguardTeam/golibs/testutil" "github.com/stretchr/testify/assert" ) func TestMain(m *testing.M) { testutil.DiscardLogOutput(m) } func TestParseCiphers(t *testing.T) { testCases := []stru...
/content/code_sandbox/internal/aghtls/aghtls_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
397
```go //go:build !linux package aghtls import "crypto/x509" func rootCAs() (roots *x509.CertPool) { return nil } ```
/content/code_sandbox/internal/aghtls/root_others.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
38
```go //go:build linux package aghtls import ( "crypto/x509" "os" "path/filepath" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" ) func rootCAs() (roots *x509.CertPool) { // Directories with the system root certificates, which aren't supported by // Go's crypto/x509. dirs := []st...
/content/code_sandbox/internal/aghtls/root_linux.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
352
```go // Package aghtls contains utilities for work with TLS. package aghtls import ( "crypto/tls" "crypto/x509" "fmt" "slices" "github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/netutil" ) // init makes sure that the cipher name map is filled. // // TODO(a.garipov): Propose a similar API to cr...
/content/code_sandbox/internal/aghtls/aghtls.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
667
```go package aghtls import ( "crypto/x509" ) // SystemRootCAs tries to load root certificates from the operating system. It // returns nil in case nothing is found so that Go' crypto/x509 can use its // default algorithm to find system root CA list. // // See path_to_url func SystemRootCAs() (roots *x509.CertPool)...
/content/code_sandbox/internal/aghtls/root.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
90