mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-12-06 15:11:29 +09:00
AGH-232 Rm-deprecated-vol-1 (75)
* all: rm part of deprecated apis and behaviors * client_v2: rm more * client_v2: rm unused files * doc: rm img
This commit is contained in:
1 parent
f44bb22813
commit
8636119e45
38 files changed
+114
-2889
No files matched your search
-2044
File diff suppressed because it is too large.
Load diff
+44
-12
@@ -68,18 +68,48 @@ NOTE: Add new changes BELOW THIS COMMENT.
|
||||
|
||||
- Client sub-pages of the new web interface showing the default values instead of the client's settings when opened directly or reloaded.
|
||||
|
||||
[#8670]: https://github.com/AdguardTeam/AdGuardHome/issues/8670
|
||||
[#8565]: https://github.com/AdguardTeam/AdGuardHome/issues/8565
|
||||
[#8572]: https://github.com/AdguardTeam/AdGuardHome/issues/8572
|
||||
[#8608]: https://github.com/AdguardTeam/AdGuardHome/issues/8608
|
||||
[#8609]: https://github.com/AdguardTeam/AdGuardHome/issues/8609
|
||||
[#8610]: https://github.com/AdguardTeam/AdGuardHome/issues/8610
|
||||
[#8613]: https://github.com/AdguardTeam/AdGuardHome/issues/8613
|
||||
[#8636]: https://github.com/AdguardTeam/AdGuardHome/issues/8636
|
||||
[#8637]: https://github.com/AdguardTeam/AdGuardHome/issues/8637
|
||||
[#8638]: https://github.com/AdguardTeam/AdGuardHome/issues/8638
|
||||
[#8644]: https://github.com/AdguardTeam/AdGuardHome/issues/8644
|
||||
[#8661]: https://github.com/AdguardTeam/AdGuardHome/issues/8661
|
||||
### Removed
|
||||
|
||||
- The following deprecated HTTP APIs:
|
||||
- `GET /control/blocked_services/list`
|
||||
- `GET /control/blocked_services/services`
|
||||
- `GET /control/clients/find`
|
||||
- `GET /control/i18n/current_language`
|
||||
- `GET /control/querylog_info`
|
||||
- `GET /control/stats_info`
|
||||
- `POST /control/blocked_services/set`
|
||||
- `POST /control/i18n/change_language`
|
||||
- `POST /control/querylog_config`
|
||||
- `POST /control/safesearch/disable`
|
||||
- `POST /control/safesearch/enable`
|
||||
- `POST /control/stats_config`
|
||||
|
||||
- The following deprecated properties and query parameters in HTTP APIs:
|
||||
- Properties `"filterId"` and `"rule"` in the response of the `GET /control/querylog` HTTP API.
|
||||
- Properties `"filter_id"` and `"rule"` in the response of the `GET /control/filtering/check_host` HTTP API.
|
||||
- Property `"safesearch_enabled"` in the client APIs.
|
||||
- Query parameter `response_status` in the `GET /control/querylog` HTTP API.
|
||||
|
||||
- The deprecated usage of an empty value for the `"upstream_mode"` property in the `GET /control/dns_info` and `POST /control/dns_config` HTTP APIs.
|
||||
|
||||
- The following deprecated command-line flags:
|
||||
- `--host`/`-h` for the bind host; now it is only used to show the help message along with `--help`.
|
||||
- `--no-mem-optimization`.
|
||||
- `--no-etc-hosts`.
|
||||
- `--port`/`-p`.
|
||||
|
||||
[#8565]: https://github.com/AdguardTeam/AdGuardHome/issues/8565
|
||||
[#8572]: https://github.com/AdguardTeam/AdGuardHome/issues/8572
|
||||
[#8608]: https://github.com/AdguardTeam/AdGuardHome/issues/8608
|
||||
[#8609]: https://github.com/AdguardTeam/AdGuardHome/issues/8609
|
||||
[#8610]: https://github.com/AdguardTeam/AdGuardHome/issues/8610
|
||||
[#8613]: https://github.com/AdguardTeam/AdGuardHome/issues/8613
|
||||
[#8636]: https://github.com/AdguardTeam/AdGuardHome/issues/8636
|
||||
[#8637]: https://github.com/AdguardTeam/AdGuardHome/issues/8637
|
||||
[#8638]: https://github.com/AdguardTeam/AdGuardHome/issues/8638
|
||||
[#8644]: https://github.com/AdguardTeam/AdGuardHome/issues/8644
|
||||
[#8661]: https://github.com/AdguardTeam/AdGuardHome/issues/8661
|
||||
[#8670]: https://github.com/AdguardTeam/AdGuardHome/issues/8670
|
||||
|
||||
<!--
|
||||
NOTE: Add new changes ABOVE THIS COMMENT.
|
||||
@@ -95,6 +125,8 @@ See also the [v0.107.80 GitHub milestone][ms-v0.107.80].
|
||||
|
||||
- Support for Multipath TCP has been disabled to mitigate the possibility of exploiting the vulnerability described in [CVE-2026-98432][cve-2026-98432].
|
||||
|
||||
**NOTE:** This is merely a mitigation. Users are encouraged to update their Linux systems as soon as possible.
|
||||
|
||||
### Removed
|
||||
|
||||
- The support for macOS 13 Ventura, see [Go 1.27 release notes][go-1.27-notes].
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<!-- TODO(a.garipov): Update the image and add alt text. -->
|
||||
|
||||
<!-- markdownlint-disable first-line-h1 no-alt-text no-inline-html -->
|
||||
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
@@ -39,6 +43,8 @@
|
||||
</p>
|
||||
<hr/>
|
||||
|
||||
<!-- markdownlint-enable first-line-h1 no-alt-text no-inline-html -->
|
||||
|
||||
AdGuard Home is a network-wide software for blocking ads and tracking. After you set it up, it'll cover ALL your home devices, and you don't need any client-side software for that.
|
||||
|
||||
It operates as a DNS server that re-routes tracking domains to a “black hole”, thus preventing your devices from connecting to those servers. It's based on software we use for our public [AdGuard DNS] servers, and both share a lot of code.
|
||||
@@ -295,13 +301,19 @@ When you need to debug the frontend without recompiling the production version e
|
||||
AdGuard Home uses [Playwright](https://playwright.dev) for E2E testing. Tests are located in `tests/e2e`.
|
||||
|
||||
**Running Tests:**
|
||||
- `npm run test:e2e` – run all tests (headless).
|
||||
- `npm run test:e2e:interactive` – run tests interactively.
|
||||
- `npm run test:e2e:debug` – run tests in debug mode.
|
||||
- `npm run test:e2e:codegen` – generate new test code.
|
||||
|
||||
- `npm run test:e2e`: run all tests (headless).
|
||||
|
||||
- `npm run test:e2e:interactive`: run tests interactively.
|
||||
|
||||
- `npm run test:e2e:debug`: run tests in debug mode.
|
||||
|
||||
- `npm run test:e2e:codegen`: generate new test code.
|
||||
|
||||
**Setup:**
|
||||
|
||||
1. Run `npm install` to install dependencies.
|
||||
|
||||
2. Run `npx playwright install` to set up required browsers.
|
||||
|
||||
> **Warning:** Playwright will download and install its own browser binaries for testing, which may differ from the browsers installed on your system.
|
||||
|
||||
@@ -3,7 +3,6 @@ import type {
|
||||
AddUrlRequest,
|
||||
AddressesInfo,
|
||||
BlockedServicesAll,
|
||||
BlockedServicesArray,
|
||||
BlockedServicesSchedule,
|
||||
CheckConfigRequest,
|
||||
CheckConfigResponse,
|
||||
@@ -11,7 +10,6 @@ import type {
|
||||
ClientDelete,
|
||||
ClientUpdate,
|
||||
Clients,
|
||||
ClientsFindParams,
|
||||
ClientsFindResponse,
|
||||
ClientsSearchRequest,
|
||||
DHCPNetInterfaces,
|
||||
@@ -33,14 +31,12 @@ import type {
|
||||
GetStatsConfigResponse,
|
||||
GetVersionRequest,
|
||||
InitialConfiguration,
|
||||
LanguageSettings,
|
||||
Login,
|
||||
MobileConfigDoHParams,
|
||||
MobileConfigDoTParams,
|
||||
ParentalStatus200,
|
||||
ProfileInfo,
|
||||
QueryLog,
|
||||
QueryLogConfig,
|
||||
QueryLogParams,
|
||||
RemoveUrlRequest,
|
||||
RewriteEntryBody,
|
||||
@@ -54,7 +50,6 @@ import type {
|
||||
SetProtectionRequest,
|
||||
SetRulesRequest,
|
||||
Stats,
|
||||
StatsConfig,
|
||||
StatsParams,
|
||||
TlsConfig,
|
||||
TlsConfigBody,
|
||||
@@ -232,48 +227,6 @@ export const queryLog = async (
|
||||
});
|
||||
};
|
||||
|
||||
export const getQueryLogInfoUrl = () => {
|
||||
return `control/querylog_info`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `GET /querylog/config` instead.
|
||||
*
|
||||
* NOTE: If `interval` was configured by editing configuration file or new
|
||||
* HTTP API call `PUT /querylog/config/update` and it's not equal to
|
||||
* previous allowed enum values then it will be equal to `90` days for
|
||||
* compatibility reasons.
|
||||
* @deprecated
|
||||
* @summary Get query log parameters
|
||||
*/
|
||||
export const queryLogInfo = async (options?: RequestInit): Promise<QueryLogConfig> => {
|
||||
return customFetch<QueryLogConfig>(getQueryLogInfoUrl(), {
|
||||
...options,
|
||||
method: 'GET',
|
||||
});
|
||||
};
|
||||
|
||||
export const getQueryLogConfigUrl = () => {
|
||||
return `control/querylog_config`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `PUT /querylog/config/update` instead.
|
||||
* @deprecated
|
||||
* @summary Set query log parameters
|
||||
*/
|
||||
export const queryLogConfig = async (
|
||||
queryLogConfig?: QueryLogConfig,
|
||||
options?: RequestInit,
|
||||
): Promise<void> => {
|
||||
return customFetch<void>(getQueryLogConfigUrl(), {
|
||||
...options,
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
||||
body: JSON.stringify(queryLogConfig),
|
||||
});
|
||||
};
|
||||
|
||||
export const getQuerylogClearUrl = () => {
|
||||
return `control/querylog_clear`;
|
||||
};
|
||||
@@ -361,48 +314,6 @@ export const statsReset = async (options?: RequestInit): Promise<void> => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getStatsInfoUrl = () => {
|
||||
return `control/stats_info`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `GET /stats/config` instead.
|
||||
*
|
||||
* NOTE: If `interval` was configured by editing configuration file or new
|
||||
* HTTP API call `PUT /stats/config/update` and it's not equal to
|
||||
* previous allowed enum values then it will be equal to `90` days for
|
||||
* compatibility reasons.
|
||||
* @deprecated
|
||||
* @summary Get statistics parameters
|
||||
*/
|
||||
export const statsInfo = async (options?: RequestInit): Promise<StatsConfig> => {
|
||||
return customFetch<StatsConfig>(getStatsInfoUrl(), {
|
||||
...options,
|
||||
method: 'GET',
|
||||
});
|
||||
};
|
||||
|
||||
export const getStatsConfigUrl = () => {
|
||||
return `control/stats_config`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `PUT /stats/config/update` instead.
|
||||
* @deprecated
|
||||
* @summary Set statistics parameters
|
||||
*/
|
||||
export const statsConfig = async (
|
||||
statsConfig?: StatsConfig,
|
||||
options?: RequestInit,
|
||||
): Promise<void> => {
|
||||
return customFetch<void>(getStatsConfigUrl(), {
|
||||
...options,
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
||||
body: JSON.stringify(statsConfig),
|
||||
});
|
||||
};
|
||||
|
||||
export const getGetStatsConfigUrl = () => {
|
||||
return `control/stats/config`;
|
||||
};
|
||||
@@ -882,36 +793,6 @@ export const parentalStatus = async (options?: RequestInit): Promise<ParentalSta
|
||||
});
|
||||
};
|
||||
|
||||
export const getSafesearchEnableUrl = () => {
|
||||
return `control/safesearch/enable`;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary Enable safesearch
|
||||
*/
|
||||
export const safesearchEnable = async (options?: RequestInit): Promise<void> => {
|
||||
return customFetch<void>(getSafesearchEnableUrl(), {
|
||||
...options,
|
||||
method: 'POST',
|
||||
});
|
||||
};
|
||||
|
||||
export const getSafesearchDisableUrl = () => {
|
||||
return `control/safesearch/disable`;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary Disable safesearch
|
||||
*/
|
||||
export const safesearchDisable = async (options?: RequestInit): Promise<void> => {
|
||||
return customFetch<void>(getSafesearchDisableUrl(), {
|
||||
...options,
|
||||
method: 'POST',
|
||||
});
|
||||
};
|
||||
|
||||
export const getSafesearchSettingsUrl = () => {
|
||||
return `control/safesearch/settings`;
|
||||
};
|
||||
@@ -1013,38 +894,6 @@ export const clientsUpdate = async (
|
||||
});
|
||||
};
|
||||
|
||||
export const getClientsFindUrl = (params?: ClientsFindParams) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? 'null' : String(value));
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0
|
||||
? `control/clients/find?${stringifiedParams}`
|
||||
: `control/clients/find`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `POST /clients/search` instead.
|
||||
* @deprecated
|
||||
* @summary Get information about clients by their IP addresses or ClientIDs.
|
||||
|
||||
*/
|
||||
export const clientsFind = async (
|
||||
params?: ClientsFindParams,
|
||||
options?: RequestInit,
|
||||
): Promise<ClientsFindResponse> => {
|
||||
return customFetch<ClientsFindResponse>(getClientsFindUrl(params), {
|
||||
...options,
|
||||
method: 'GET',
|
||||
});
|
||||
};
|
||||
|
||||
export const getClientsSearchUrl = () => {
|
||||
return `control/clients/search`;
|
||||
};
|
||||
@@ -1095,24 +944,6 @@ export const accessSet = async (accessList: AccessList, options?: RequestInit):
|
||||
});
|
||||
};
|
||||
|
||||
export const getBlockedServicesAvailableServicesUrl = () => {
|
||||
return `control/blocked_services/services`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `GET /blocked_services/all` instead.
|
||||
* @deprecated
|
||||
* @summary Get available services to use for blocking
|
||||
*/
|
||||
export const blockedServicesAvailableServices = async (
|
||||
options?: RequestInit,
|
||||
): Promise<BlockedServicesArray> => {
|
||||
return customFetch<BlockedServicesArray>(getBlockedServicesAvailableServicesUrl(), {
|
||||
...options,
|
||||
method: 'GET',
|
||||
});
|
||||
};
|
||||
|
||||
export const getBlockedServicesAllUrl = () => {
|
||||
return `control/blocked_services/all`;
|
||||
};
|
||||
@@ -1127,43 +958,6 @@ export const blockedServicesAll = async (options?: RequestInit): Promise<Blocked
|
||||
});
|
||||
};
|
||||
|
||||
export const getBlockedServicesListUrl = () => {
|
||||
return `control/blocked_services/list`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `GET /blocked_services/get` instead.
|
||||
* @deprecated
|
||||
* @summary Get blocked services list
|
||||
*/
|
||||
export const blockedServicesList = async (options?: RequestInit): Promise<BlockedServicesArray> => {
|
||||
return customFetch<BlockedServicesArray>(getBlockedServicesListUrl(), {
|
||||
...options,
|
||||
method: 'GET',
|
||||
});
|
||||
};
|
||||
|
||||
export const getBlockedServicesSetUrl = () => {
|
||||
return `control/blocked_services/set`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `PUT /blocked_services/update` instead.
|
||||
* @deprecated
|
||||
* @summary Set blocked services list
|
||||
*/
|
||||
export const blockedServicesSet = async (
|
||||
blockedServicesArray?: BlockedServicesArray,
|
||||
options?: RequestInit,
|
||||
): Promise<void> => {
|
||||
return customFetch<void>(getBlockedServicesSetUrl(), {
|
||||
...options,
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
||||
body: JSON.stringify(blockedServicesArray),
|
||||
});
|
||||
};
|
||||
|
||||
export const getBlockedServicesScheduleUrl = () => {
|
||||
return `control/blocked_services/get`;
|
||||
};
|
||||
@@ -1303,45 +1097,6 @@ export const rewriteUpdate = async (
|
||||
});
|
||||
};
|
||||
|
||||
export const getChangeLanguageUrl = () => {
|
||||
return `control/i18n/change_language`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `PUT /control/profile` instead.
|
||||
* @deprecated
|
||||
* @summary Change current language. Argument must be an ISO 639-1 two-letter code.
|
||||
|
||||
*/
|
||||
export const changeLanguage = async (
|
||||
languageSettings?: LanguageSettings,
|
||||
options?: RequestInit,
|
||||
): Promise<void> => {
|
||||
return customFetch<void>(getChangeLanguageUrl(), {
|
||||
...options,
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
||||
body: JSON.stringify(languageSettings),
|
||||
});
|
||||
};
|
||||
|
||||
export const getCurrentLanguageUrl = () => {
|
||||
return `control/i18n/current_language`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Deprecated: Use `GET /control/profile` instead.
|
||||
* @deprecated
|
||||
* @summary Get currently set language. Result is ISO 639-1 two-letter code. Empty result means default language.
|
||||
|
||||
*/
|
||||
export const currentLanguage = async (options?: RequestInit): Promise<LanguageSettings> => {
|
||||
return customFetch<LanguageSettings>(getCurrentLanguageUrl(), {
|
||||
...options,
|
||||
method: 'GET',
|
||||
});
|
||||
};
|
||||
|
||||
export const getInstallGetAddressesUrl = () => {
|
||||
return `control/install/get_addresses`;
|
||||
};
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export type BlockedServicesArray = string[];
|
||||
@@ -13,8 +13,6 @@ export interface Client {
|
||||
filtering_enabled?: boolean;
|
||||
parental_enabled?: boolean;
|
||||
safebrowsing_enabled?: boolean;
|
||||
/** @deprecated */
|
||||
safesearch_enabled?: boolean;
|
||||
safe_search?: SafeSearchConfig;
|
||||
use_global_blocked_services?: boolean;
|
||||
blocked_services_schedule?: Schedule;
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
export type ClientsFindParams = {
|
||||
/**
|
||||
* Filter by IP address or ClientIDs. Parameters with names `ip1`, `ip2`, and so on are also accepted and interpreted as "ip0 OR ip1 OR ip2".
|
||||
* TODO(a.garipov): Replace with a better query API.
|
||||
*/
|
||||
ip0?: string;
|
||||
};
|
||||
@@ -55,7 +55,7 @@ export interface DNSConfig {
|
||||
*/
|
||||
cache_enabled?: boolean;
|
||||
cache_optimistic?: boolean;
|
||||
/** Upstream modes enumeration. The empty string value is deprecated; use `load_balance` instead. */
|
||||
/** Upstream modes enumeration. */
|
||||
upstream_mode?: DNSConfigUpstreamMode;
|
||||
use_private_ptr_resolvers?: boolean;
|
||||
resolve_clients?: boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* Upstream modes enumeration. The empty string value is deprecated; use `load_balance` instead.
|
||||
* Upstream modes enumeration.
|
||||
*/
|
||||
export type DNSConfigUpstreamMode = '' | 'fastest_addr' | 'load_balance' | 'parallel';
|
||||
export type DNSConfigUpstreamMode = 'fastest_addr' | 'load_balance' | 'parallel';
|
||||
@@ -7,10 +7,10 @@ import type { DhcpStaticLease } from './dhcpStaticLease';
|
||||
* Built-in DHCP server configuration and status
|
||||
*/
|
||||
export interface DhcpStatus {
|
||||
enabled?: boolean;
|
||||
interface_name?: string;
|
||||
v4?: DhcpConfigV4;
|
||||
v6?: DhcpConfigV6;
|
||||
enabled: boolean;
|
||||
interface_name: string;
|
||||
v4: DhcpConfigV4;
|
||||
v6: DhcpConfigV6;
|
||||
leases: DhcpLease[];
|
||||
static_leases?: DhcpStaticLease[];
|
||||
static_leases: DhcpStaticLease[];
|
||||
}
|
||||
@@ -6,18 +6,6 @@ import type { ResultRule } from './resultRule';
|
||||
*/
|
||||
export interface FilterCheckHostResponse {
|
||||
reason?: FilteringReason;
|
||||
/**
|
||||
* In case if there's a rule applied to this DNS request, this is ID of the filter list that the rule belongs to.
|
||||
* Deprecated: use `rules[*].filter_list_id` instead.
|
||||
* @deprecated
|
||||
*/
|
||||
filter_id?: number;
|
||||
/**
|
||||
* Filtering rule applied to the request (if any).
|
||||
* Deprecated: use `rules[*].text` instead.
|
||||
* @deprecated
|
||||
*/
|
||||
rule?: string;
|
||||
/** Applied rules. */
|
||||
rules?: ResultRule[];
|
||||
/** Set if reason=FilteredBlockedService */
|
||||
|
||||
@@ -6,7 +6,6 @@ export * from './addressInfo';
|
||||
export * from './addUrlRequest';
|
||||
export * from './blockedService';
|
||||
export * from './blockedServicesAll';
|
||||
export * from './blockedServicesArray';
|
||||
export * from './blockedServicesSchedule';
|
||||
export * from './checkConfigRequest';
|
||||
export * from './checkConfigRequestInfo';
|
||||
@@ -22,7 +21,6 @@ export * from './clients';
|
||||
export * from './clientsArray';
|
||||
export * from './clientsAutoArray';
|
||||
export * from './clientsFindEntry';
|
||||
export * from './clientsFindParams';
|
||||
export * from './clientsFindResponse';
|
||||
export * from './clientsSearchRequest';
|
||||
export * from './clientsSearchRequestItem';
|
||||
@@ -67,7 +65,6 @@ export * from './getStatsConfigResponse';
|
||||
export * from './getVersionRequest';
|
||||
export * from './initialConfiguration';
|
||||
export * from './lang';
|
||||
export * from './languageSettings';
|
||||
export * from './login';
|
||||
export * from './mobileConfigDoHParams';
|
||||
export * from './mobileConfigDoTParams';
|
||||
@@ -79,14 +76,11 @@ export * from './profileInfoTheme';
|
||||
export * from './putQueryLogConfigUpdateRequest';
|
||||
export * from './putStatsConfigUpdateRequest';
|
||||
export * from './queryLog';
|
||||
export * from './queryLogConfig';
|
||||
export * from './queryLogConfigInterval';
|
||||
export * from './queryLogItem';
|
||||
export * from './queryLogItemClient';
|
||||
export * from './queryLogItemClientProto';
|
||||
export * from './queryLogItemClientWhois';
|
||||
export * from './queryLogParams';
|
||||
export * from './queryLogResponseStatus';
|
||||
export * from './removeUrlRequest';
|
||||
export * from './resultRule';
|
||||
export * from './rewriteEntry';
|
||||
@@ -104,8 +98,6 @@ export * from './serviceGroup';
|
||||
export * from './setProtectionRequest';
|
||||
export * from './setRulesRequest';
|
||||
export * from './stats';
|
||||
export * from './statsConfig';
|
||||
export * from './statsConfigInterval';
|
||||
export * from './statsParams';
|
||||
export * from './statsTimeUnits';
|
||||
export * from './tlsConfig';
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import type { Lang } from './lang';
|
||||
|
||||
/**
|
||||
* Language settings object.
|
||||
*/
|
||||
export interface LanguageSettings {
|
||||
language: Lang;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import type { QueryLogConfigInterval } from './queryLogConfigInterval';
|
||||
|
||||
/**
|
||||
* Query log configuration
|
||||
*/
|
||||
export interface QueryLogConfig {
|
||||
/** Is query log enabled */
|
||||
enabled?: boolean;
|
||||
/** Time period for query log rotation. */
|
||||
interval?: QueryLogConfigInterval;
|
||||
/** Anonymize clients' IP addresses */
|
||||
anonymize_client_ip?: boolean;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Time period for query log rotation.
|
||||
*/
|
||||
export type QueryLogConfigInterval = 0.25 | 1 | 7 | 30 | 90;
|
||||
@@ -28,18 +28,6 @@ export interface QueryLogItem {
|
||||
ecs?: string;
|
||||
elapsedMs?: string;
|
||||
question?: DnsQuestion;
|
||||
/**
|
||||
* In case if there's a rule applied to this DNS request, this is ID of the filter list that the rule belongs to.
|
||||
* Deprecated: use `rules[*].filter_list_id` instead.
|
||||
* @deprecated
|
||||
*/
|
||||
filterId?: number;
|
||||
/**
|
||||
* Filtering rule applied to the request (if any).
|
||||
* Deprecated: use `rules[*].text` instead.
|
||||
* @deprecated
|
||||
*/
|
||||
rule?: string;
|
||||
/** Applied rules. */
|
||||
rules?: ResultRule[];
|
||||
reason?: FilteringReason;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { FilteringReason } from './filteringReason';
|
||||
import type { QueryLogResponseStatus } from './queryLogResponseStatus';
|
||||
|
||||
export type QueryLogParams = {
|
||||
/**
|
||||
@@ -18,14 +17,8 @@ export type QueryLogParams = {
|
||||
* Filter by domain name or client IP
|
||||
*/
|
||||
search?: string;
|
||||
/**
|
||||
* Deprecated: Use 'reason' parameter instead Filter by response status
|
||||
* NOTE: This parameter cannot be used with 'reason' parameter.
|
||||
*/
|
||||
response_status?: QueryLogResponseStatus;
|
||||
/**
|
||||
* Filter by response filtering reason. Multiple reasons can be provided.
|
||||
* NOTE: This parameter cannot be used with 'response_status' parameter.
|
||||
*/
|
||||
reason?: FilteringReason[];
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
export type QueryLogResponseStatus =
|
||||
| 'all'
|
||||
| 'filtered'
|
||||
| 'blocked'
|
||||
| 'blocked_safebrowsing'
|
||||
| 'blocked_parental'
|
||||
| 'whitelisted'
|
||||
| 'rewritten'
|
||||
| 'safe_search'
|
||||
| 'processed';
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { StatsConfigInterval } from './statsConfigInterval';
|
||||
|
||||
/**
|
||||
* Statistics configuration
|
||||
*/
|
||||
export interface StatsConfig {
|
||||
/** Time period to keep the data. `0` means that the statistics is disabled. */
|
||||
interval?: StatsConfigInterval;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Time period to keep the data. `0` means that the statistics is disabled.
|
||||
*/
|
||||
export type StatsConfigInterval = 0 | 1 | 7 | 30 | 90;
|
||||
@@ -40,10 +40,9 @@ export const findPersistentClient = (clients: Client[], identifier?: string) =>
|
||||
|
||||
const getSafeSearchConfig = (
|
||||
config?: Partial<SafeSearchConfig>,
|
||||
fallbackEnabled = false,
|
||||
): SafeSearchConfig => ({
|
||||
...(config || {}),
|
||||
enabled: config?.enabled ?? fallbackEnabled,
|
||||
enabled: config?.enabled ?? false,
|
||||
});
|
||||
|
||||
export const getEffectiveClientProtectionSettings = ({
|
||||
@@ -61,11 +60,7 @@ export const getEffectiveClientProtectionSettings = ({
|
||||
|
||||
const effectiveSafeSearch = client.use_global_settings
|
||||
? getSafeSearchConfig(settingsList?.safesearch as Partial<SafeSearchConfig> | undefined)
|
||||
: getSafeSearchConfig(
|
||||
client.safe_search as Partial<SafeSearchConfig> | undefined,
|
||||
client.safesearch_enabled,
|
||||
);
|
||||
|
||||
: getSafeSearchConfig(client.safe_search as Partial<SafeSearchConfig> | undefined);
|
||||
return {
|
||||
filtering_enabled: client.use_global_settings
|
||||
? globalFilteringEnabled
|
||||
@@ -77,7 +72,6 @@ export const getEffectiveClientProtectionSettings = ({
|
||||
? Boolean(settingsList?.safebrowsing.enabled)
|
||||
: client.safebrowsing_enabled,
|
||||
safe_search: effectiveSafeSearch,
|
||||
safesearch_enabled: effectiveSafeSearch.enabled,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -295,7 +295,6 @@ export const useUserRulesActions = (
|
||||
...effectiveSettings,
|
||||
use_global_settings: false,
|
||||
safe_search: safeSearch,
|
||||
safesearch_enabled: safeSearch.enabled,
|
||||
};
|
||||
})
|
||||
: toggleSetting('safesearch', { ...currentSafeSearch, enabled: false }),
|
||||
@@ -305,7 +304,6 @@ export const useUserRulesActions = (
|
||||
? updateClient(clientSnapshot.name, {
|
||||
...clientSnapshot,
|
||||
safe_search: { ...clientSnapshot.safe_search, enabled: true },
|
||||
safesearch_enabled: true,
|
||||
})
|
||||
: toggleSetting('safesearch', { ...currentSafeSearch, enabled: true }),
|
||||
refresh: refreshSettingsAndClients,
|
||||
|
||||
@@ -116,8 +116,6 @@ export const normalizeLogs = (logs: QueryLogItem[]): NormalizedQueryLogItem[] =>
|
||||
reason,
|
||||
status,
|
||||
time,
|
||||
filterId,
|
||||
rule,
|
||||
rules,
|
||||
service_name,
|
||||
original_answer,
|
||||
@@ -141,17 +139,6 @@ export const normalizeLogs = (logs: QueryLogItem[]): NormalizedQueryLogItem[] =>
|
||||
})
|
||||
: [];
|
||||
|
||||
let newRules = Array.isArray(rules) ? rules : [];
|
||||
/* TODO 'filterId' and 'rule' are deprecated, will be removed in 0.106 */
|
||||
if (rule !== undefined && filterId !== undefined && newRules.length === 0) {
|
||||
newRules = [
|
||||
{
|
||||
filter_list_id: filterId,
|
||||
text: rule,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
return {
|
||||
time,
|
||||
domain,
|
||||
@@ -168,10 +155,7 @@ export const normalizeLogs = (logs: QueryLogItem[]): NormalizedQueryLogItem[] =>
|
||||
whois: client_info.whois || {},
|
||||
}
|
||||
: null,
|
||||
/* TODO 'filterId' and 'rule' are deprecated, will be removed in 0.106 */
|
||||
filterId,
|
||||
rule,
|
||||
rules: newRules,
|
||||
rules: Array.isArray(rules) ? rules : [],
|
||||
status,
|
||||
service_name,
|
||||
serviceName: service_name,
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
DAY,
|
||||
DEFAULT_DNS_CACHE_SIZE,
|
||||
DEFAULT_LOGS_FILTER,
|
||||
DNS_REQUEST_OPTIONS,
|
||||
ModalType,
|
||||
STANDARD_DNS_PORT,
|
||||
STANDARD_WEB_PORT,
|
||||
@@ -512,7 +513,7 @@ export const initialState: RootState = {
|
||||
bootstrap_dns: '',
|
||||
local_ptr_upstreams: '',
|
||||
ratelimit_whitelist: '',
|
||||
upstream_mode: '',
|
||||
upstream_mode: DNS_REQUEST_OPTIONS.LOAD_BALANCING,
|
||||
resolve_clients: false,
|
||||
use_private_ptr_resolvers: false,
|
||||
default_local_ptr_upstreams: [],
|
||||
|
||||
@@ -63,7 +63,7 @@ const initialState: DnsConfigState = {
|
||||
bootstrap_dns: '',
|
||||
local_ptr_upstreams: '',
|
||||
ratelimit_whitelist: '',
|
||||
upstream_mode: '',
|
||||
upstream_mode: DNS_REQUEST_OPTIONS.LOAD_BALANCING,
|
||||
resolve_clients: false,
|
||||
use_private_ptr_resolvers: false,
|
||||
default_local_ptr_upstreams: [],
|
||||
@@ -79,8 +79,7 @@ export const getDnsConfig = async () => {
|
||||
...data,
|
||||
blocking_ipv4: data.blocking_ipv4 || DEFAULT_BLOCKING_IPV4,
|
||||
blocking_ipv6: data.blocking_ipv6 || DEFAULT_BLOCKING_IPV6,
|
||||
upstream_mode:
|
||||
data.upstream_mode === '' ? DNS_REQUEST_OPTIONS.LOAD_BALANCING : data.upstream_mode,
|
||||
upstream_mode: data.upstream_mode || DNS_REQUEST_OPTIONS.LOAD_BALANCING,
|
||||
bootstrap_dns: data.bootstrap_dns?.join('\n') || '',
|
||||
fallback_dns: data.fallback_dns?.join('\n') || '',
|
||||
local_ptr_upstreams: data.local_ptr_upstreams?.join('\n') || '',
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 187 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 67 KiB |
+1
-72
@@ -12,7 +12,6 @@ import (
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghalg"
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghnet"
|
||||
"github.com/AdguardTeam/golibs/timeutil"
|
||||
"github.com/AdguardTeam/golibs/validate"
|
||||
)
|
||||
|
||||
@@ -121,12 +120,7 @@ func parseRecent(recent string, limit time.Duration) (parsedLimit time.Duration,
|
||||
return time.Duration(recentMs) * time.Millisecond, nil
|
||||
}
|
||||
|
||||
// configResp is the response to the GET /control/stats_info.
|
||||
type configResp struct {
|
||||
IntervalDays uint32 `json:"interval"`
|
||||
}
|
||||
|
||||
// getConfigResp is the response to the GET /control/stats_info.
|
||||
// getConfigResp is the response for the GET /control/stats/config HTTP API.
|
||||
type getConfigResp struct {
|
||||
// Ignored is the list of host names, which should not be counted.
|
||||
Ignored []string `json:"ignored"`
|
||||
@@ -142,37 +136,6 @@ type getConfigResp struct {
|
||||
IgnoredEnabled aghalg.NullBool `json:"ignored_enabled"`
|
||||
}
|
||||
|
||||
// handleStatsInfo is the handler for the GET /control/stats_info HTTP API.
|
||||
//
|
||||
// Deprecated: Remove it when migration to the new API is over.
|
||||
func (s *StatsCtx) handleStatsInfo(w http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
enabled bool
|
||||
limit time.Duration
|
||||
)
|
||||
func() {
|
||||
s.confMu.RLock()
|
||||
defer s.confMu.RUnlock()
|
||||
|
||||
enabled, limit = s.enabled, s.limit
|
||||
}()
|
||||
|
||||
days := uint32(limit / timeutil.Day)
|
||||
ok := checkInterval(days)
|
||||
if !ok || (enabled && days == 0) {
|
||||
// NOTE: If interval is custom we set it to 90 days for compatibility
|
||||
// with old API.
|
||||
days = 90
|
||||
}
|
||||
|
||||
resp := configResp{IntervalDays: days}
|
||||
if !enabled {
|
||||
resp.IntervalDays = 0
|
||||
}
|
||||
|
||||
aghhttp.WriteJSONResponseOK(r.Context(), s.logger, w, r, resp)
|
||||
}
|
||||
|
||||
// handleGetStatsConfig is the handler for the GET /control/stats/config HTTP
|
||||
// API.
|
||||
func (s *StatsCtx) handleGetStatsConfig(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -192,36 +155,6 @@ func (s *StatsCtx) handleGetStatsConfig(w http.ResponseWriter, r *http.Request)
|
||||
aghhttp.WriteJSONResponseOK(r.Context(), s.logger, w, r, resp)
|
||||
}
|
||||
|
||||
// handleStatsConfig is the handler for the POST /control/stats_config HTTP API.
|
||||
//
|
||||
// Deprecated: Remove it when migration to the new API is over.
|
||||
func (s *StatsCtx) handleStatsConfig(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
reqData := configResp{}
|
||||
err := json.NewDecoder(r.Body).Decode(&reqData)
|
||||
if err != nil {
|
||||
aghhttp.ErrorAndLog(ctx, s.logger, r, w, http.StatusBadRequest, "json decode: %s", err)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if !checkInterval(reqData.IntervalDays) {
|
||||
aghhttp.ErrorAndLog(ctx, s.logger, r, w, http.StatusBadRequest, "Unsupported interval")
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
limit := time.Duration(reqData.IntervalDays) * timeutil.Day
|
||||
|
||||
defer s.configModifier.Apply(ctx)
|
||||
|
||||
s.confMu.Lock()
|
||||
defer s.confMu.Unlock()
|
||||
|
||||
s.setLimit(limit)
|
||||
}
|
||||
|
||||
// handlePutStatsConfig is the handler for the PUT /control/stats/config/update
|
||||
// HTTP API.
|
||||
func (s *StatsCtx) handlePutStatsConfig(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -303,8 +236,4 @@ func (s *StatsCtx) initWeb() {
|
||||
s.httpReg.Register(http.MethodPost, "/control/stats_reset", s.handleStatsReset)
|
||||
s.httpReg.Register(http.MethodGet, "/control/stats/config", s.handleGetStatsConfig)
|
||||
s.httpReg.Register(http.MethodPut, "/control/stats/config/update", s.handlePutStatsConfig)
|
||||
|
||||
// Deprecated handlers.
|
||||
s.httpReg.Register(http.MethodGet, "/control/stats_info", s.handleStatsInfo)
|
||||
s.httpReg.Register(http.MethodPost, "/control/stats_config", s.handleStatsConfig)
|
||||
}
|
||||
@@ -25,12 +25,6 @@ import (
|
||||
bbolterrors "go.etcd.io/bbolt/errors"
|
||||
)
|
||||
|
||||
// checkInterval returns true if days is valid to be used as statistics
|
||||
// retention interval. The valid values are 0, 1, 7, 30 and 90.
|
||||
func checkInterval(days uint32) (ok bool) {
|
||||
return days == 0 || days == 1 || days == 7 || days == 30 || days == 90
|
||||
}
|
||||
|
||||
// validateIvl returns an error if ivl is less than an hour or more than a
|
||||
// year.
|
||||
func validateIvl(ivl time.Duration) (err error) {
|
||||
@@ -504,26 +498,6 @@ func (s *StatsCtx) periodicFlush() {
|
||||
s.logger.Debug("periodic flushing finished")
|
||||
}
|
||||
|
||||
// setLimit sets the limit. s.lock is expected to be locked.
|
||||
//
|
||||
// TODO(s.chzhen): Remove it when migration to the new API is over.
|
||||
func (s *StatsCtx) setLimit(limit time.Duration) {
|
||||
if limit != 0 {
|
||||
s.enabled = true
|
||||
s.limit = limit
|
||||
s.logger.Debug("setting limit in days", "num", limit/timeutil.Day)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
s.enabled = false
|
||||
s.logger.Debug("disabled")
|
||||
|
||||
if err := s.clear(); err != nil {
|
||||
s.logger.Error("clearing", slogutil.KeyError, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Reset counters and clear database
|
||||
func (s *StatsCtx) clear() (err error) {
|
||||
defer func() { err = errors.Annotate(err, "clearing: %w") }()
|
||||
|
||||
@@ -20,7 +20,6 @@ func TestUpdater_VersionInfo(t *testing.T) {
|
||||
"version": "v0.103.0-beta.2",
|
||||
"announcement": "AdGuard Home v0.103.0-beta.2 is now available!",
|
||||
"announcement_url": "https://github.com/AdguardTeam/AdGuardHome/internal/releases",
|
||||
"selfupdate_min_version": "v0.0",
|
||||
"download_windows_amd64": "https://static.adtidy.org/adguardhome/beta/AdGuardHome_windows_amd64.zip",
|
||||
"download_windows_386": "https://static.adtidy.org/adguardhome/beta/AdGuardHome_windows_386.zip",
|
||||
"download_darwin_amd64": "https://static.adtidy.org/adguardhome/beta/AdGuardHome_darwin_amd64.zip",
|
||||
@@ -106,7 +105,6 @@ func TestUpdater_VersionInfo_others(t *testing.T) {
|
||||
"version": "v0.103.0-beta.2",
|
||||
"announcement": "AdGuard Home v0.103.0-beta.2 is now available!",
|
||||
"announcement_url": "https://github.com/AdguardTeam/AdGuardHome/internal/releases",
|
||||
"selfupdate_min_version": "v0.0",
|
||||
"download_linux_armv7": "https://static.adtidy.org/adguardhome/beta/AdGuardHome_linux_armv7.tar.gz",
|
||||
"download_linux_mips_softfloat": "https://static.adtidy.org/adguardhome/beta/AdGuardHome_linux_mips_softfloat.tar.gz"
|
||||
}`
|
||||
|
||||
@@ -35,7 +35,6 @@ func TestUpdater_Update(t *testing.T) {
|
||||
"version": "v0.103.0-beta.2",
|
||||
"announcement": "AdGuard Home v0.103.0-beta.2 is now available!",
|
||||
"announcement_url": "https://github.com/AdguardTeam/AdGuardHome/internal/releases",
|
||||
"selfupdate_min_version": "v0.0",
|
||||
"download_linux_amd64": "%s"
|
||||
}`
|
||||
|
||||
|
||||
@@ -2,6 +2,35 @@
|
||||
|
||||
<!-- TODO(a.garipov): Reformat in accordance with the KeepAChangelog spec. -->
|
||||
|
||||
## v1.0.0: API changes (NOTE: Not released yet)
|
||||
|
||||
- The following deprecated HTTP APIs:
|
||||
|
||||
- `GET /control/blocked_services/list`
|
||||
- `GET /control/blocked_services/services`
|
||||
- `GET /control/clients/find`
|
||||
- `GET /control/i18n/current_language`
|
||||
- `GET /control/querylog_info`
|
||||
- `GET /control/stats_info`
|
||||
- `POST /control/blocked_services/set`
|
||||
- `POST /control/i18n/change_language`
|
||||
- `POST /control/querylog_config`
|
||||
- `POST /control/safesearch/disable`
|
||||
- `POST /control/safesearch/enable`
|
||||
- `POST /control/stats_config`
|
||||
|
||||
- The following deprecated properties and query parameters in HTTP APIs have been removed:
|
||||
|
||||
- Properties `"filterId"` and `"rule"` in the response of the `GET /control/querylog` HTTP API.
|
||||
|
||||
- Properties `"filter_id"` and `"rule"` in the response of the `GET /control/filtering/check_host` HTTP API.
|
||||
|
||||
- Property `"safesearch_enabled"` in the client APIs.
|
||||
|
||||
- Query parameter `response_status` in the `GET /control/querylog` HTTP API.
|
||||
|
||||
- The deprecated usage of an empty value for the `"upstream_mode"` property in the `GET /control/dns_info` and `POST /control/dns_config` HTTP APIs has been removed. Use `"load_balance"` instead.
|
||||
|
||||
## v0.107.79: API changes
|
||||
|
||||
- Field `bootstrap_dns` in `POST /control/dns_config` now accepts comments. A comment must start with the `#` symbol.
|
||||
|
||||
+2
-330
@@ -4,7 +4,7 @@
|
||||
'description': >
|
||||
AdGuard Home REST-ish API. Our admin web interface is built on top of this
|
||||
REST-ish API.
|
||||
'version': '0.107'
|
||||
'version': '1.0.0'
|
||||
'contact':
|
||||
'name': 'AdGuard Home'
|
||||
'url': 'https://github.com/AdguardTeam/AdGuardHome'
|
||||
@@ -26,8 +26,6 @@
|
||||
'description': 'Rule-based filtering'
|
||||
- 'name': 'global'
|
||||
'description': 'AdGuard Home server general settings and controls'
|
||||
- 'name': 'i18n'
|
||||
'description': 'Application localization'
|
||||
- 'name': 'install'
|
||||
'description': 'First-time install configuration handlers'
|
||||
- 'name': 'log'
|
||||
@@ -220,33 +218,11 @@
|
||||
'description': 'Filter by domain name or client IP'
|
||||
'schema':
|
||||
'type': 'string'
|
||||
- 'name': 'response_status'
|
||||
'deprecated': true
|
||||
'in': 'query'
|
||||
'description': >
|
||||
Deprecated: Use 'reason' parameter instead
|
||||
Filter by response status
|
||||
|
||||
NOTE: This parameter cannot be used with 'reason' parameter.
|
||||
'schema':
|
||||
'type': 'string'
|
||||
'enum':
|
||||
- 'all'
|
||||
- 'filtered'
|
||||
- 'blocked'
|
||||
- 'blocked_safebrowsing'
|
||||
- 'blocked_parental'
|
||||
- 'whitelisted'
|
||||
- 'rewritten'
|
||||
- 'safe_search'
|
||||
- 'processed'
|
||||
- 'name': 'reason'
|
||||
'in': 'query'
|
||||
'description': >
|
||||
Filter by response filtering reason. Multiple reasons can be
|
||||
provided.
|
||||
|
||||
NOTE: This parameter cannot be used with 'response_status' parameter.
|
||||
'schema':
|
||||
'type': 'array'
|
||||
'items':
|
||||
@@ -258,44 +234,6 @@
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/QueryLog'
|
||||
'/querylog_info':
|
||||
'get':
|
||||
'deprecated': true
|
||||
'description': |
|
||||
Deprecated: Use `GET /querylog/config` instead.
|
||||
|
||||
NOTE: If `interval` was configured by editing configuration file or new
|
||||
HTTP API call `PUT /querylog/config/update` and it's not equal to
|
||||
previous allowed enum values then it will be equal to `90` days for
|
||||
compatibility reasons.
|
||||
'tags':
|
||||
- 'log'
|
||||
'operationId': 'queryLogInfo'
|
||||
'summary': 'Get query log parameters'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/QueryLogConfig'
|
||||
'/querylog_config':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `PUT /querylog/config/update` instead.
|
||||
'tags':
|
||||
- 'log'
|
||||
'operationId': 'queryLogConfig'
|
||||
'summary': 'Set query log parameters'
|
||||
'requestBody':
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/QueryLogConfig'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/querylog_clear':
|
||||
'post':
|
||||
'tags':
|
||||
@@ -368,44 +306,6 @@
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/stats_info':
|
||||
'get':
|
||||
'deprecated': true
|
||||
'description': |
|
||||
Deprecated: Use `GET /stats/config` instead.
|
||||
|
||||
NOTE: If `interval` was configured by editing configuration file or new
|
||||
HTTP API call `PUT /stats/config/update` and it's not equal to
|
||||
previous allowed enum values then it will be equal to `90` days for
|
||||
compatibility reasons.
|
||||
'tags':
|
||||
- 'stats'
|
||||
'operationId': 'statsInfo'
|
||||
'summary': 'Get statistics parameters'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/StatsConfig'
|
||||
'/stats_config':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `PUT /stats/config/update` instead.
|
||||
'tags':
|
||||
- 'stats'
|
||||
'operationId': 'statsConfig'
|
||||
'summary': 'Set statistics parameters'
|
||||
'requestBody':
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/StatsConfig'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/stats/config':
|
||||
'get':
|
||||
'tags':
|
||||
@@ -874,26 +774,6 @@
|
||||
'value':
|
||||
'enabled': true
|
||||
'sensitivity': 13
|
||||
'/safesearch/enable':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'tags':
|
||||
- 'safesearch'
|
||||
'operationId': 'safesearchEnable'
|
||||
'summary': 'Enable safesearch'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/safesearch/disable':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'tags':
|
||||
- 'safesearch'
|
||||
'operationId': 'safesearchDisable'
|
||||
'summary': 'Disable safesearch'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/safesearch/settings':
|
||||
'put':
|
||||
'tags':
|
||||
@@ -979,34 +859,6 @@
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/clients/find':
|
||||
'get':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `POST /clients/search` instead.
|
||||
'tags':
|
||||
- 'clients'
|
||||
'operationId': 'clientsFind'
|
||||
'summary': >
|
||||
Get information about clients by their IP addresses or ClientIDs.
|
||||
'parameters':
|
||||
- 'name': 'ip0'
|
||||
'in': 'query'
|
||||
'description': >
|
||||
Filter by IP address or ClientIDs. Parameters with names `ip1`,
|
||||
`ip2`, and so on are also accepted and interpreted as "ip0 OR ip1 OR
|
||||
ip2".
|
||||
|
||||
TODO(a.garipov): Replace with a better query API.
|
||||
'schema':
|
||||
'type': 'string'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/ClientsFindResponse'
|
||||
'/clients/search':
|
||||
'post':
|
||||
'tags':
|
||||
@@ -1061,22 +913,6 @@
|
||||
'summary': 'Set (dis)allowed clients, blocked hosts, etc.'
|
||||
'tags':
|
||||
- 'clients'
|
||||
'/blocked_services/services':
|
||||
'get':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `GET /blocked_services/all` instead.
|
||||
'tags':
|
||||
- 'blocked_services'
|
||||
'operationId': 'blockedServicesAvailableServices'
|
||||
'summary': 'Get available services to use for blocking'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/BlockedServicesArray'
|
||||
'/blocked_services/all':
|
||||
'get':
|
||||
'tags':
|
||||
@@ -1090,39 +926,6 @@
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/BlockedServicesAll'
|
||||
'/blocked_services/list':
|
||||
'get':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `GET /blocked_services/get` instead.
|
||||
'tags':
|
||||
- 'blocked_services'
|
||||
'operationId': 'blockedServicesList'
|
||||
'summary': 'Get blocked services list'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/BlockedServicesArray'
|
||||
'/blocked_services/set':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `PUT /blocked_services/update` instead.
|
||||
'tags':
|
||||
- 'blocked_services'
|
||||
'operationId': 'blockedServicesSet'
|
||||
'summary': 'Set blocked services list'
|
||||
'requestBody':
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/BlockedServicesArray'
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/blocked_services/get':
|
||||
'get':
|
||||
'tags':
|
||||
@@ -1221,45 +1024,6 @@
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/i18n/change_language':
|
||||
'post':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `PUT /control/profile` instead.
|
||||
'tags':
|
||||
- 'i18n'
|
||||
'operationId': 'changeLanguage'
|
||||
'summary': >
|
||||
Change current language. Argument must be an ISO 639-1 two-letter code.
|
||||
'requestBody':
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/LanguageSettings'
|
||||
'description': >
|
||||
New language. It must be known to the server and must be an ISO 639-1
|
||||
two-letter code.
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'/i18n/current_language':
|
||||
'get':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
Deprecated: Use `GET /control/profile` instead.
|
||||
'tags':
|
||||
- 'i18n'
|
||||
'operationId': 'currentLanguage'
|
||||
'summary': >
|
||||
Get currently set language. Result is ISO 639-1 two-letter code. Empty
|
||||
result means default language.
|
||||
'responses':
|
||||
'200':
|
||||
'description': 'OK.'
|
||||
'content':
|
||||
'application/json':
|
||||
'schema':
|
||||
'$ref': '#/components/schemas/LanguageSettings'
|
||||
'/install/get_addresses':
|
||||
'get':
|
||||
'tags':
|
||||
@@ -1658,14 +1422,10 @@
|
||||
'upstream_mode':
|
||||
'type': 'string'
|
||||
'enum':
|
||||
- ''
|
||||
- 'fastest_addr'
|
||||
- 'load_balance'
|
||||
- 'parallel'
|
||||
'description': >-
|
||||
Upstream modes enumeration.
|
||||
The empty string value is deprecated; use `load_balance`
|
||||
instead.
|
||||
'description': Upstream modes enumeration.
|
||||
'use_private_ptr_resolvers':
|
||||
'type': 'boolean'
|
||||
'resolve_clients':
|
||||
@@ -1831,22 +1591,6 @@
|
||||
'properties':
|
||||
'reason':
|
||||
'$ref': '#/components/schemas/FilteringReason'
|
||||
'filter_id':
|
||||
'deprecated': true
|
||||
'description': >
|
||||
In case if there's a rule applied to this DNS request, this is ID of
|
||||
the filter list that the rule belongs to.
|
||||
|
||||
Deprecated: use `rules[*].filter_list_id` instead.
|
||||
'type': 'integer'
|
||||
'rule':
|
||||
'deprecated': true
|
||||
'type': 'string'
|
||||
'example': '||example.org^'
|
||||
'description': >
|
||||
Filtering rule applied to the request (if any).
|
||||
|
||||
Deprecated: use `rules[*].text` instead.
|
||||
'rules':
|
||||
'description': 'Applied rules.'
|
||||
'type': 'array'
|
||||
@@ -2001,21 +1745,6 @@
|
||||
'type': 'number'
|
||||
'additionalProperties':
|
||||
'type': 'number'
|
||||
'StatsConfig':
|
||||
'type': 'object'
|
||||
'description': 'Statistics configuration'
|
||||
'properties':
|
||||
'interval':
|
||||
'description': >
|
||||
Time period to keep the data. `0` means that the statistics is
|
||||
disabled.
|
||||
'enum':
|
||||
- 0
|
||||
- 1
|
||||
- 7
|
||||
- 30
|
||||
- 90
|
||||
'type': 'integer'
|
||||
'GetStatsConfigResponse':
|
||||
'type': 'object'
|
||||
'description': 'Statistics configuration'
|
||||
@@ -2340,23 +2069,6 @@
|
||||
'example': '54.023928'
|
||||
'question':
|
||||
'$ref': '#/components/schemas/DnsQuestion'
|
||||
'filterId':
|
||||
'deprecated': true
|
||||
'type': 'integer'
|
||||
'example': 123123
|
||||
'description': >
|
||||
In case if there's a rule applied to this DNS request, this is ID of
|
||||
the filter list that the rule belongs to.
|
||||
|
||||
Deprecated: use `rules[*].filter_list_id` instead.
|
||||
'rule':
|
||||
'deprecated': true
|
||||
'type': 'string'
|
||||
'example': '||example.org^'
|
||||
'description': >
|
||||
Filtering rule applied to the request (if any).
|
||||
|
||||
Deprecated: use `rules[*].text` instead.
|
||||
'rules':
|
||||
'description': 'Applied rules.'
|
||||
'type': 'array'
|
||||
@@ -2428,26 +2140,6 @@
|
||||
'type': 'array'
|
||||
'items':
|
||||
'$ref': '#/components/schemas/QueryLogItem'
|
||||
'QueryLogConfig':
|
||||
'type': 'object'
|
||||
'description': 'Query log configuration'
|
||||
'properties':
|
||||
'enabled':
|
||||
'type': 'boolean'
|
||||
'description': 'Is query log enabled'
|
||||
'interval':
|
||||
'description': >
|
||||
Time period for query log rotation.
|
||||
'type': 'number'
|
||||
'enum':
|
||||
- 0.25
|
||||
- 1
|
||||
- 7
|
||||
- 30
|
||||
- 90
|
||||
'anonymize_client_ip':
|
||||
'type': 'boolean'
|
||||
'description': "Anonymize clients' IP addresses"
|
||||
'GetQueryLogConfigResponse':
|
||||
'type': 'object'
|
||||
'description': 'Query log configuration'
|
||||
@@ -2849,9 +2541,6 @@
|
||||
'type': 'boolean'
|
||||
'safebrowsing_enabled':
|
||||
'type': 'boolean'
|
||||
'safesearch_enabled':
|
||||
'deprecated': true
|
||||
'type': 'boolean'
|
||||
'safe_search':
|
||||
'$ref': '#/components/schemas/SafeSearchConfig'
|
||||
'use_global_blocked_services':
|
||||
@@ -2967,7 +2656,6 @@
|
||||
'filtering_enabled': true
|
||||
'parental_enabled': true
|
||||
'safebrowsing_enabled': true
|
||||
'safesearch_enabled': true
|
||||
'safe_search': {}
|
||||
'use_global_blocked_services': true
|
||||
'blocked_services': []
|
||||
@@ -2984,7 +2672,6 @@
|
||||
'filtering_enabled': true
|
||||
'parental_enabled': true
|
||||
'safebrowsing_enabled': true
|
||||
'safesearch_enabled': true
|
||||
'safe_search': {}
|
||||
'use_global_blocked_services': true
|
||||
'blocked_services': []
|
||||
@@ -3048,9 +2735,6 @@
|
||||
'type': 'boolean'
|
||||
'safebrowsing_enabled':
|
||||
'type': 'boolean'
|
||||
'safesearch_enabled':
|
||||
'deprecated': true
|
||||
'type': 'boolean'
|
||||
'safe_search':
|
||||
'$ref': '#/components/schemas/SafeSearchConfig'
|
||||
'use_global_blocked_services':
|
||||
@@ -3148,10 +2832,6 @@
|
||||
'type': 'boolean'
|
||||
'description': 'indicates whether rewrites are applied'
|
||||
'example': true
|
||||
'BlockedServicesArray':
|
||||
'type': 'array'
|
||||
'items':
|
||||
'type': 'string'
|
||||
'BlockedServicesAll':
|
||||
'properties':
|
||||
'blocked_services':
|
||||
@@ -3333,14 +3013,6 @@
|
||||
'description': 'The error message, an opaque string.'
|
||||
'type': 'string'
|
||||
'type': 'object'
|
||||
'LanguageSettings':
|
||||
'description': 'Language settings object.'
|
||||
'properties':
|
||||
'language':
|
||||
'$ref': '#/components/schemas/Lang'
|
||||
'required':
|
||||
- 'language'
|
||||
'type': 'object'
|
||||
'Lang':
|
||||
'description': >
|
||||
Language code.
|
||||
|
||||
@@ -72,6 +72,10 @@ lint_staged_changes() {
|
||||
verbose="${VERBOSE:-0}"
|
||||
readonly verbose
|
||||
|
||||
if [ "$(git diff --cached --name-only -- '*.ts' '*.tsx' || :)" != '' ]; then
|
||||
make VERBOSE="$verbose" js-lint js-typecheck js-test
|
||||
fi
|
||||
|
||||
if [ "$(git diff --cached --name-only -- '*.md' || :)" != '' ]; then
|
||||
make VERBOSE="$verbose" md-lint
|
||||
fi
|
||||
|
||||
@@ -282,8 +282,6 @@ set_cpu() {
|
||||
|
||||
# Function fix_darwin performs some configuration changes for macOS if needed.
|
||||
#
|
||||
# TODO(a.garipov): Remove after the final v0.107.0 release.
|
||||
#
|
||||
# See https://github.com/AdguardTeam/AdGuardHome/issues/2443.
|
||||
fix_darwin() {
|
||||
if [ "$os" != 'darwin' ]; then
|
||||
|
||||
@@ -33,7 +33,7 @@ readonly sign
|
||||
# TODO(d.kolyshev): Use set -o 'pipefail' when GitHub supports it.
|
||||
set -e -f -u
|
||||
|
||||
# Function log is an echo wrapper that writes to stderr if the caller requested
|
||||
# Function log is a printf wrapper that writes to stderr if the caller requested
|
||||
# verbosity level greater than 0. Otherwise, it does nothing.
|
||||
log() {
|
||||
if [ "$verbose" -gt '0' ]; then
|
||||
@@ -204,7 +204,7 @@ log 'starting builds'
|
||||
|
||||
# Go over all platforms defined in the space-separated table above, tweak the
|
||||
# values where necessary, and feed to build.
|
||||
echo "$platforms" | while read -r os arch arm mips; do
|
||||
printf '%s\n' "$platforms" | while read -r os arch arm mips; do
|
||||
# See if the architecture or the OS is in the allowlist. To do so, try
|
||||
# removing everything that matches the pattern (well, a prefix, but that
|
||||
# doesn't matter here) containing the arch or the OS.
|
||||
|
||||
@@ -15,11 +15,11 @@ if [ "$verbose" -gt '0' ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# TODO(e.burkov): Add README.md and possibly AGHTechDoc.md.
|
||||
markdownlint \
|
||||
./CHANGELOG.md \
|
||||
./CONTRIBUTING.md \
|
||||
./HACKING.md \
|
||||
./README.md \
|
||||
./SECURITY.md \
|
||||
./internal/next/changelog.md \
|
||||
./internal/dhcpd/*.md \
|
||||
|
||||
@@ -241,23 +241,11 @@ else
|
||||
fi
|
||||
readonly announcement_url
|
||||
|
||||
# TODO(a.garipov): Remove "selfupdate_min_version" in future versions.
|
||||
rm -f "$version_json"
|
||||
echo "{
|
||||
\"version\": \"${version}\",
|
||||
\"announcement\": \"AdGuard Home ${version} is now available!\",
|
||||
\"announcement_url\": \"${announcement_url}\",
|
||||
\"selfupdate_min_version\": \"0.0\",
|
||||
" >>"$version_json"
|
||||
|
||||
# Add the MIPS* object keys without the "softfloat" part to mitigate the
|
||||
# consequences of #5373.
|
||||
#
|
||||
# TODO(a.garipov): Remove this around fall 2023.
|
||||
echo "
|
||||
\"download_linux_mips64\": \"${version_download_url}/AdGuardHome_linux_mips64_softfloat.tar.gz\",
|
||||
\"download_linux_mips64le\": \"${version_download_url}/AdGuardHome_linux_mips64le_softfloat.tar.gz\",
|
||||
\"download_linux_mipsle\": \"${version_download_url}/AdGuardHome_linux_mipsle_softfloat.tar.gz\",
|
||||
" >>"$version_json"
|
||||
|
||||
# Same as with checksums above, don't use ls, because files matching one of the
|
||||
|
||||
Reference in new issue
Block a user