text
stringlengths
9
39.2M
dir
stringlengths
26
295
lang
stringclasses
185 values
created_date
timestamp[us]
updated_date
timestamp[us]
repo_name
stringlengths
1
97
repo_full_name
stringlengths
7
106
star
int64
1k
183k
len_tokens
int64
1
13.8M
```shell #!/bin/bash function install_with_brew() { # Will get the latest version in brew. # As of writing, 3.6 and later won't work with PyInstaller so this method is avoided for now. brew update; brew install python3; } function install_with_pkg() { wget -O python3.pkg path_to_url sudo insta...
/content/code_sandbox/scripts/ci/setup_venv_osx.sh
shell
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
132
```powershell $msipath = "$PSScriptRoot\node-installer.msi" function RunCommand ($command, $command_args) { Write-Host $command $command_args Start-Process -FilePath $command -ArgumentList $command_args -Wait -Passthru } function InstallNode () { DownloadNodeMSI InstallNodeMSI } function DownloadNode...
/content/code_sandbox/scripts/ci/install_node.ps1
powershell
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
295
```shell #!/bin/bash # # We should create a release checklist to ensure releases are consistent. # # Create an annotated tag #git tag -a $ ```
/content/code_sandbox/scripts/chores/make-release.sh
shell
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
32
```powershell # Sample script to install Python and pip under Windows # Authors: Olivier Grisel, Jonathan Helmus, Kyle Kastner, and Alex Willmer # # Find the latest version of this script at: # path_to_url $MINICONDA_URL = "path_to_url" $BASE_URL = "path_to_url" $GET_PIP_URL = "path_to_url" $GET_PIP_PATH = "C:\get-pi...
/content/code_sandbox/scripts/ci/install_python.ps1
powershell
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
1,949
```shell #!/bin/bash set -e echoerr() { echo "$@" 1>&2; } function get_platform() { # Will return "linux" for GNU/Linux # I'd just like to interject for a moment... # path_to_url # Will return "macos" for macOS/OS X # Will return "windows" for Windows/MinGW/msys _platform=$(uname | tr '[...
/content/code_sandbox/scripts/package/package-all.sh
shell
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
607
```shell #!/bin/bash # TODO: Merge with scripts/package/getversion.sh # set -e if [[ $TRAVIS_TAG ]]; then _version=$TRAVIS_TAG; elif [[ $APPVEYOR_REPO_TAG_NAME ]]; then _version=$APPVEYOR_REPO_TAG_NAME; else # Exact _version=$(git describe --tags --abbrev=0 --exact-match 2>/dev/null) if [[ -z $_ve...
/content/code_sandbox/scripts/package/getversion.sh
shell
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
140
```shell #!/bin/bash # pick the latest zip # NOTE: this assumes that the latest built zip is the only zip in the directory ZIP_FILE=`ls ./dist/ -1 | grep zip | sort -r | head -1` unzip ./dist/$ZIP_FILE # fetch deps wget path_to_url chmod +x linuxdeploy-x86_64.AppImage wget path_to_url chmod +x appimagetool-x86_64.App...
/content/code_sandbox/scripts/package/package-appimage.sh
shell
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
244
```shell #!/usr/bin/bash # Setting the shell is required, as `sh` doesn't support slicing. # Fail fast set -e # Verbose commands for CI verification set -x VERSION=$(scripts/package/getversion.sh) # Slice off the "v" from the tag, which is probably guaranteed VERSION_NUM=${VERSION:1} echo $VERSION_NUM PKGDIR="activit...
/content/code_sandbox/scripts/package/package-deb.sh
shell
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
489
```inno setup ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "ActivityWatch" #define MyAppVersion GetEnv('AW_VERSION') #define MyAppPublisher "ActivityWatch Contributors" #define MyAppURL "path_to_url" #define MyAppExeName ...
/content/code_sandbox/scripts/package/activitywatch-setup.iss
inno setup
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
721
```python # -*- coding: utf-8 -*- from __future__ import unicode_literals import plistlib import os.path # Use like this: dmgbuild -s settings.py "Test Volume" test.dmg # You can actually use this file for your own application (not just TextEdit) # by doing e.g. # # dmgbuild -s settings.py -D app=/path/to/My.app "...
/content/code_sandbox/scripts/package/dmgbuild-settings.py
python
2016-04-27T15:26:09
2024-08-16T18:38:46
activitywatch
ActivityWatch/activitywatch
11,595
927
```javascript export const BUILD_ENVS = { dev: 'development', prod: 'production', }; export const BASE_URL = 'control'; ```
/content/code_sandbox/client/constants.js
javascript
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
29
```go //go:build !next package main import ( "embed" // Embed tzdata in binary. // // See path_to_url _ "time/tzdata" "github.com/AdguardTeam/AdGuardHome/internal/home" ) // Embed the prebuilt client here since we strive to keep .go files inside the // internal directory and the embed package is unable to emb...
/content/code_sandbox/main.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
124
```javascript import { merge } from 'webpack-merge'; import common from './webpack.common.js'; export default merge(common, { stats: 'minimal', performance: { hints: false, }, }); ```
/content/code_sandbox/client/webpack.prod.js
javascript
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
43
```javascript import { merge } from 'webpack-merge'; import yaml from 'js-yaml'; import fs from 'fs'; import { BASE_URL } from './constants.js'; import common from './webpack.common.js'; const ZERO_HOST = '0.0.0.0'; const LOCALHOST = '127.0.0.1'; const DEFAULT_PORT = 80; /** * Get document, or throw exception on err...
/content/code_sandbox/client/webpack.dev.js
javascript
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
358
```javascript module.exports = { rules: { "selector-type-no-unknown": true, "block-closing-brace-empty-line-before": "never", "block-no-empty": true, "block-opening-brace-newline-after": "always", "block-opening-brace-space-before": "always", "color-hex-case": "lower", "color...
/content/code_sandbox/client/.stylelintrc.js
javascript
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
340
```go //go:build next package main import ( "embed" "github.com/AdguardTeam/AdGuardHome/internal/next/cmd" ) // Embed the prebuilt client here since we strive to keep .go files inside the // internal directory and the embed package is unable to embed files located // outside of the same or underlying directory. ...
/content/code_sandbox/main_next.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
96
```javascript module.exports = { "disableEmoji": true, "list": [ "+ ", "* ", "- ", ], "maxMessageLength": 64, "minMessageLength": 3, "questions": [ "type", "scope", "subject", "body", "issues", ], "scopes": [ "", ...
/content/code_sandbox/changelog.config.js
javascript
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
213
```javascript import path from 'path'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { CleanWebpackPlugin } from 'clean-webpack-plugin'; import CopyPlugin from 'copy-webpack-plugin'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import * as url from 'url'; import { BUILD_ENVS } from './const...
/content/code_sandbox/client/webpack.common.js
javascript
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
727
```yaml 'coverage': 'status': 'project': 'default': 'target': '40%' 'threshold': null 'patch': false 'changes': false ```
/content/code_sandbox/.codecov.yml
yaml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
41
```css /* Disable Auto Zoom in Input - Safari on iPhone path_to_url */ @media screen and (max-width: 767px) { input, select, textarea { font-size: 1rem; } } .login { display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; min-height: 100v...
/content/code_sandbox/client/src/login/Login/Login.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
271
```css /* Disable Auto Zoom in Input - Safari on iPhone path_to_url */ @media screen and (max-width: 767px) { input, select, textarea { font-size: 1rem; } } .setup { min-height: calc(100vh - 345px); line-height: 1.48; } @media screen and (min-width: 768px) { .setup { paddin...
/content/code_sandbox/client/src/install/Setup/Setup.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
802
```css .schedule__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; } .schedule__row:last-child { margin-bottom: 0; } .schedule__rows { margin-bottom: 24px; } .schedule__day { display: none; min-width: 110px; } .schedule__day--mobile { ...
/content/code_sandbox/client/src/components/Filters/Services/ScheduleForm/styles.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
581
```css .toasts { position: fixed; right: 24px; bottom: 24px; z-index: 105; width: 345px; } @media (max-width: 425px) { .toasts { right: 0; width: 100%; } } .toast { display: flex; align-items: flex-start; margin-bottom: 12px; padding: 16px; font-weight: ...
/content/code_sandbox/client/src/components/Toasts/Toast.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
368
```css :root { --black: #131313; --bgcolor: #f5f7fb; --mcolor: #495057; --scolor: rgba(74, 74, 74, 0.7); --border-color: rgba(0, 40, 100, 0.12); --header-bgcolor: #fff; --card-bgcolor: #fff; --card-border-color: rgba(0, 40, 100, 0.12); --ctrl-bgcolor: #fff; --ctrl-select-bgcolor:...
/content/code_sandbox/client/src/components/App/index.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,315
```css .form__button { margin-left: 1.5rem; } @media (max-width: 500px) { .form__button { margin-left: 0; margin-top: 1rem; display: block; } } ```
/content/code_sandbox/client/src/components/Settings/FormButton.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
55
```css .form__group { position: relative; margin-bottom: 15px; } .form__group:last-child { margin-bottom: 0; } .form__group--settings:last-child { margin-bottom: 20px; } .form__group--inner { max-width: 300px; margin-top: -10px; margin-left: 40px; font-size: 14px; } .form__group--inp...
/content/code_sandbox/client/src/components/Settings/Settings.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
714
```css .service { display: flex; flex-direction: row-reverse; align-items: center; margin-bottom: 15px; padding: 10px 15px; border: 1px solid var(--card-border-color); border-radius: 4px; cursor: pointer; } .service__text { text-overflow: ellipsis; white-space: nowrap; overf...
/content/code_sandbox/client/src/components/Settings/Clients/Service.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
564
```css .dhcp-form__button { margin: 0 1rem; } .page-title--dhcp { display: flex; align-items: center; } .col__dhcp { flex: 0 0 50%; max-width: 50%; padding-right: 0; } .dhcp__interfaces { padding-bottom: 1rem; } .dhcp__interfaces-info { padding: 0.5rem 0.75rem 0; line-break: anyw...
/content/code_sandbox/client/src/components/Settings/Dhcp/index.css
css
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
235
```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
```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
```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
```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
```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
```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
```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
```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
```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
```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
```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
```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
```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
```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
```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
```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
```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
```go package client import ( "encoding" "fmt" "net" "net/netip" "slices" "strings" "time" "github.com/AdguardTeam/AdGuardHome/internal/filtering" "github.com/AdguardTeam/AdGuardHome/internal/filtering/safesearch" "github.com/AdguardTeam/dnsproxy/proxy" "github.com/AdguardTeam/dnsproxy/upstream" "github.c...
/content/code_sandbox/internal/client/persistent.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,443
```go package client import ( "context" "net/netip" "sync" "time" "github.com/AdguardTeam/AdGuardHome/internal/aghnet" "github.com/AdguardTeam/AdGuardHome/internal/rdns" "github.com/AdguardTeam/AdGuardHome/internal/whois" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" "github.com...
/content/code_sandbox/internal/client/addrproc.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,265
```yaml 'openapi': '3.0.3' 'info': 'contact': 'email': 'devteam@adguard.com' 'name': 'AdGuard Home' 'url': 'path_to_url 'description': | **!! WARNING! API IS AT THE DRAFT STAGE! THINGS WILL BREAK! !!** AdGuard Home REST API, V1 **DRAFT**. Our administration web interface is built on top o...
/content/code_sandbox/openapi/v1.yaml
yaml
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
36,712
```go package client_test import ( "net/netip" "testing" "github.com/AdguardTeam/AdGuardHome/internal/client" "github.com/stretchr/testify/assert" ) func TestRuntimeIndex(t *testing.T) { const cliSrc = client.SourceARP var ( ip1 = netip.MustParseAddr("1.1.1.1") ip2 = netip.MustParseAddr("2.2.2.2") ip3 =...
/content/code_sandbox/internal/client/runtimeindex_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
494
```go package client import "net/netip" // RuntimeIndex stores information about runtime clients. type RuntimeIndex struct { // index maps IP address to runtime client. index map[netip.Addr]*Runtime } // NewRuntimeIndex returns initialized runtime index. func NewRuntimeIndex() (ri *RuntimeIndex) { return &Runtime...
/content/code_sandbox/internal/client/runtimeindex.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
395
```go package client import ( "net" "net/netip" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // newIDIndex is a helper function that returns a client index filled with // persistent clients from the m. It also generates a UID for each client. func newIDIndex(m []*Persi...
/content/code_sandbox/internal/client/index_internal_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,635
```go // Package client contains types and logic dealing with AdGuard Home's DNS // clients. // // TODO(a.garipov): Expand. package client import ( "encoding" "fmt" "net/netip" "slices" "github.com/AdguardTeam/AdGuardHome/internal/whois" ) // Source represents the source from which the information about the cli...
/content/code_sandbox/internal/client/client.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,269
```go package client_test import ( "net" "net/netip" "testing" "github.com/AdguardTeam/AdGuardHome/internal/client" "github.com/AdguardTeam/AdGuardHome/internal/whois" "github.com/AdguardTeam/golibs/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // newStorage is a help...
/content/code_sandbox/internal/client/storage_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
5,533
```go package client_test import ( "net/netip" "testing" "time" "github.com/AdguardTeam/golibs/testutil" ) func TestMain(m *testing.M) { testutil.DiscardLogOutput(m) } // testHost is the common hostname for tests. const testHost = "client.example" // testTimeout is the common timeout for tests. const testTime...
/content/code_sandbox/internal/client/client_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
139
```go package client_test import ( "context" "fmt" "io" "net" "net/netip" "testing" "time" "github.com/AdguardTeam/AdGuardHome/internal/aghtest" "github.com/AdguardTeam/AdGuardHome/internal/client" "github.com/AdguardTeam/AdGuardHome/internal/whois" "github.com/AdguardTeam/golibs/errors" "github.com/Adgua...
/content/code_sandbox/internal/client/addrproc_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,897
```go package client import ( "net/netip" "testing" "github.com/AdguardTeam/golibs/container" "github.com/AdguardTeam/golibs/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestPersistent_EqualIDs(t *testing.T) { const ( ip = "0.0.0.0" ip1 = "1.1.1.1" ip2 = "...
/content/code_sandbox/internal/client/persistent_internal_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,586
```go package client import ( "fmt" "net" "net/netip" "slices" "strings" "github.com/AdguardTeam/AdGuardHome/internal/aghalg" "github.com/AdguardTeam/golibs/errors" "golang.org/x/exp/maps" ) // macKey contains MAC as byte array of 6, 8, or 20 bytes. type macKey any // macToKey converts mac into key of type ...
/content/code_sandbox/internal/client/index.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,418
```go package client import ( "fmt" "net" "net/netip" "slices" "sync" "github.com/AdguardTeam/golibs/container" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" ) // Config is the client storage configuration structure. // // TODO(s.chzhen): Expand. type Config struct { // Allowed...
/content/code_sandbox/internal/client/storage.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,013
```go package rdns_test import ( "net/netip" "testing" "time" "github.com/AdguardTeam/AdGuardHome/internal/aghtest" "github.com/AdguardTeam/AdGuardHome/internal/rdns" "github.com/AdguardTeam/golibs/netutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestDefault_Process(...
/content/code_sandbox/internal/rdns/rdns_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
893
```go // Package rdns processes reverse DNS lookup queries. package rdns import ( "net/netip" "time" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" "github.com/bluele/gcache" ) // Interface processes rDNS queries. type Interface interface { // Process makes rDNS request and returns ...
/content/code_sandbox/internal/rdns/rdns.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
941
```go //go:build freebsd || openbsd package dhcpd import ( "net" ) // broadcast sends resp to the broadcast address specific for network interface. func (c *dhcpConn) broadcast(respData []byte, peer *net.UDPAddr) (n int, err error) { // Despite the fact that server4.NewIPv4UDPConn explicitly sets socket // option...
/content/code_sandbox/internal/dhcpd/broadcast_bsd.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
165
```go //go:build freebsd || openbsd package dhcpd import ( "bytes" "net" "testing" "github.com/insomniacslk/dhcp/dhcpv4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestDHCPConn_Broadcast(t *testing.T) { b := &bytes.Buffer{} var peer *net.UDPAddr udpConn := &fakePacke...
/content/code_sandbox/internal/dhcpd/broadcast_bsd_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
331
```go package dhcpd const bitsPerWord = 64 // bitSet is a sparse bitSet. A nil *bitSet is an empty bitSet. type bitSet struct { words map[uint64]uint64 } // newBitSet returns a new bitset. func newBitSet() (s *bitSet) { return &bitSet{ words: map[uint64]uint64{}, } } // isSet returns true if the bit n is set....
/content/code_sandbox/internal/dhcpd/bitset.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
278
```go package dhcpd import ( "net" "testing" "github.com/AdguardTeam/golibs/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestNewIPRange(t *testing.T) { start4 := net.IP{0, 0, 0, 1} end4 := net.IP{0, 0, 0, 3} start6 := net.IP{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x...
/content/code_sandbox/internal/dhcpd/iprange_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,269
```go package dhcpd import ( "encoding/json" "fmt" "net" "net/netip" "os" "path/filepath" "time" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" ) const ( // leaseExpireStatic is used to define the Expiry field for static // leases. // // Deprecated: Remove it when migration ...
/content/code_sandbox/internal/dhcpd/migrate.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
808
```go package dhcpd import ( "net" "testing" "github.com/stretchr/testify/assert" ) func TestCreateICMPv6RAPacket(t *testing.T) { wantData := []byte{ 0x86, 0x00, 0x00, 0x00, 0x40, 0x40, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x40, 0xc0, 0x00, 0x00, 0x0e, 0x10, 0x00, 0x00,...
/content/code_sandbox/internal/dhcpd/routeradv_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
656
```go //go:build darwin || linux package dhcpd import ( "bytes" "net" "testing" "github.com/insomniacslk/dhcp/dhcpv4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestDHCPConn_Broadcast(t *testing.T) { b := &bytes.Buffer{} var peers []*net.UDPAddr udpConn := &fakePacke...
/content/code_sandbox/internal/dhcpd/broadcast_others_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
378
```go // On-disk database for lease table package dhcpd import ( "encoding/json" "fmt" "net" "net/netip" "os" "slices" "strings" "time" "github.com/AdguardTeam/AdGuardHome/internal/dhcpsvc" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" "github.com/google/renameio/v2/maybe" ) ...
/content/code_sandbox/internal/dhcpd/db.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,348
```go //go:build darwin || freebsd || linux || openbsd package dhcpd import ( "fmt" "github.com/AdguardTeam/golibs/errors" ) // wrapErrs is a helper to wrap the errors from two independent underlying // connections. func wrapErrs(action string, udpConnErr, rawConnErr error) (err error) { switch { case udpConnEr...
/content/code_sandbox/internal/dhcpd/conn_unix.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
177
```go //go:build darwin || linux package dhcpd import ( "net" ) // broadcast sends resp to the broadcast address specific for network interface. func (c *dhcpConn) broadcast(respData []byte, peer *net.UDPAddr) (n int, err error) { // This write to 0xffffffff reverts some behavior changes made in // path_to_url T...
/content/code_sandbox/internal/dhcpd/broadcast_others.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
219
```go //go:build darwin || freebsd || openbsd package dhcpd import ( "net" "testing" "github.com/AdguardTeam/golibs/testutil" "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.com/insomniacslk/dhcp/dhcpv4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" //l...
/content/code_sandbox/internal/dhcpd/conn_bsd_internal_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,753
```go package dhcpd import ( "fmt" "math" "math/big" "net" "github.com/AdguardTeam/golibs/errors" ) // ipRange is an inclusive range of IP addresses. A nil range is a range that // doesn't contain any IP addresses. // // It is safe for concurrent use. // // TODO(a.garipov): Perhaps create an optimized version ...
/content/code_sandbox/internal/dhcpd/iprange.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
892
```go //go:build windows package dhcpd import ( "fmt" "net/http" "net/http/httptest" "testing" "github.com/AdguardTeam/AdGuardHome/internal/aghos" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestServer_notImplemented(t *testing.T) { s := &server{} w := httptest.NewRec...
/content/code_sandbox/internal/dhcpd/http_windows_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
159
```go //go:build darwin || freebsd || linux || openbsd package dhcpd import ( "bytes" "fmt" "net" "net/netip" "sync" "time" "github.com/AdguardTeam/AdGuardHome/internal/aghnet" "github.com/AdguardTeam/AdGuardHome/internal/dhcpsvc" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" ...
/content/code_sandbox/internal/dhcpd/v6_unix.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
5,599
```go //go:build darwin || freebsd || linux || openbsd package dhcpd import ( "fmt" "net" "testing" "time" "github.com/AdguardTeam/golibs/netutil" "github.com/AdguardTeam/golibs/testutil" "github.com/insomniacslk/dhcp/dhcpv4" "github.com/stretchr/testify/assert" ) func TestParseOpt(t *testing.T) { testCase...
/content/code_sandbox/internal/dhcpd/options_unix_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,413
```go // Package dhcpd provides a DHCP server. package dhcpd import ( "fmt" "net" "net/netip" "path/filepath" "time" "github.com/AdguardTeam/AdGuardHome/internal/dhcpsvc" "github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/timeutil" ) const ( // DefaultDHCPLeaseTTL is the default time-to-live...
/content/code_sandbox/internal/dhcpd/dhcpd.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,190
```go package dhcpd import ( "encoding/json" "net/netip" "os" "path/filepath" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) const testData = `[ {"mac":"ESIzRFVm","ip":"AQIDBA==","host":"test1","exp":1}, {"mac":"ZlVEMyIR","ip":"BAMCAQ==","host":"test2","exp":123...
/content/code_sandbox/internal/dhcpd/migrate_internal_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
544
```go //go:build linux package dhcpd import ( "net" "testing" "github.com/AdguardTeam/golibs/testutil" "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.com/insomniacslk/dhcp/dhcpv4" "github.com/mdlayher/packet" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require...
/content/code_sandbox/internal/dhcpd/conn_linux_internal_test.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
1,732
```go package dhcpd import ( "encoding/binary" "fmt" "net" "sync/atomic" "time" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/netutil" "golang.org/x/net/icmp" "golang.org/x/net/ipv6" ) type raCtx struct { raAllowSLAAC bool // send RA packet...
/content/code_sandbox/internal/dhcpd/routeradv.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,180
```go //go:build darwin || freebsd || openbsd package dhcpd import ( "fmt" "net" "os" "time" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/netutil" "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.com/insomniacslk/dhcp/dhcp...
/content/code_sandbox/internal/dhcpd/conn_bsd.go
go
2016-07-06T10:31:47
2024-08-16T18:17:06
AdGuardHome
AdguardTeam/AdGuardHome
24,082
2,389