Compare commits
14 Commits
v0.108.0-b
...
4926-scrol
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cc4923bc3 | ||
|
|
ab6da05b51 | ||
|
|
23a352d214 | ||
|
|
44c64893bb | ||
|
|
8e89cc129c | ||
|
|
3f8f8c7253 | ||
|
|
9ffe078703 | ||
|
|
27b0251b5b | ||
|
|
ed209daf8a | ||
|
|
95771c7aba | ||
|
|
42bd0615c2 | ||
|
|
3a88ef3be2 | ||
|
|
572fed9f35 | ||
|
|
663f0643f2 |
@@ -20,7 +20,13 @@ and this project adheres to
|
|||||||
- Weaker cipher suites that use the CBC (cipher block chaining) mode of
|
- Weaker cipher suites that use the CBC (cipher block chaining) mode of
|
||||||
operation have been disabled ([#2993]).
|
operation have been disabled ([#2993]).
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Support for plain (unencrypted) HTTP/2 ([#4930]). This is useful for AdGuard
|
||||||
|
Home installations behind a reverse proxy.
|
||||||
|
|
||||||
[#2993]: https://github.com/AdguardTeam/AdGuardHome/issues/2993
|
[#2993]: https://github.com/AdguardTeam/AdGuardHome/issues/2993
|
||||||
|
[#4930]: https://github.com/AdguardTeam/AdGuardHome/issues/4930
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -635,5 +635,6 @@
|
|||||||
"parental_control": "Parental Control",
|
"parental_control": "Parental Control",
|
||||||
"safe_browsing": "Safe Browsing",
|
"safe_browsing": "Safe Browsing",
|
||||||
"served_from_cache": "{{value}} <i>(served from cache)</i>",
|
"served_from_cache": "{{value}} <i>(served from cache)</i>",
|
||||||
"form_error_password_length": "Password must be at least {{value}} characters long"
|
"form_error_password_length": "Password must be at least {{value}} characters long",
|
||||||
|
"anonymizer_notification": "<0>Note:</0> IP anonymization is enabled. You can disable it in <1>General settings</1>."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,13 +41,13 @@ class Table extends Component {
|
|||||||
{
|
{
|
||||||
Header: <Trans>name_table_header</Trans>,
|
Header: <Trans>name_table_header</Trans>,
|
||||||
accessor: 'name',
|
accessor: 'name',
|
||||||
minWidth: 200,
|
minWidth: 180,
|
||||||
Cell: CellWrap,
|
Cell: CellWrap,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: <Trans>list_url_table_header</Trans>,
|
Header: <Trans>list_url_table_header</Trans>,
|
||||||
accessor: 'url',
|
accessor: 'url',
|
||||||
minWidth: 200,
|
minWidth: 180,
|
||||||
Cell: ({ value }) => (
|
Cell: ({ value }) => (
|
||||||
<div className="logs__row">
|
<div className="logs__row">
|
||||||
{isValidAbsolutePath(value) ? value
|
{isValidAbsolutePath(value) ? value
|
||||||
@@ -73,7 +73,7 @@ class Table extends Component {
|
|||||||
Header: <Trans>last_time_updated_table_header</Trans>,
|
Header: <Trans>last_time_updated_table_header</Trans>,
|
||||||
accessor: 'lastUpdated',
|
accessor: 'lastUpdated',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
minWidth: 150,
|
minWidth: 180,
|
||||||
Cell: this.getDateCell,
|
Cell: this.getDateCell,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
16
client/src/components/Logs/AnonymizerNotification.js
Normal file
16
client/src/components/Logs/AnonymizerNotification.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Trans } from 'react-i18next';
|
||||||
|
import { HashLink as Link } from 'react-router-hash-link';
|
||||||
|
|
||||||
|
const AnonymizerNotification = () => (
|
||||||
|
<div className="alert alert-primary mt-6">
|
||||||
|
<Trans components={[
|
||||||
|
<strong key="0">text</strong>,
|
||||||
|
<Link to="/settings#logs-config" key="1">link</Link>,
|
||||||
|
]}>
|
||||||
|
anonymizer_notification
|
||||||
|
</Trans>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default AnonymizerNotification;
|
||||||
@@ -25,6 +25,7 @@ import {
|
|||||||
import InfiniteTable from './InfiniteTable';
|
import InfiniteTable from './InfiniteTable';
|
||||||
import './Logs.css';
|
import './Logs.css';
|
||||||
import { BUTTON_PREFIX } from './Cells/helpers';
|
import { BUTTON_PREFIX } from './Cells/helpers';
|
||||||
|
import AnonymizerNotification from './AnonymizerNotification';
|
||||||
|
|
||||||
const processContent = (data) => Object.entries(data)
|
const processContent = (data) => Object.entries(data)
|
||||||
.map(([key, value]) => {
|
.map(([key, value]) => {
|
||||||
@@ -73,6 +74,7 @@ const Logs = () => {
|
|||||||
processingGetConfig,
|
processingGetConfig,
|
||||||
processingAdditionalLogs,
|
processingAdditionalLogs,
|
||||||
processingGetLogs,
|
processingGetLogs,
|
||||||
|
anonymize_client_ip: anonymizeClientIp,
|
||||||
} = useSelector((state) => state.queryLogs, shallowEqual);
|
} = useSelector((state) => state.queryLogs, shallowEqual);
|
||||||
const filter = useSelector((state) => state.queryLogs.filter, shallowEqual);
|
const filter = useSelector((state) => state.queryLogs.filter, shallowEqual);
|
||||||
const logs = useSelector((state) => state.queryLogs.logs, shallowEqual);
|
const logs = useSelector((state) => state.queryLogs.logs, shallowEqual);
|
||||||
@@ -104,6 +106,8 @@ const Logs = () => {
|
|||||||
setIsSmallScreen(e.matches);
|
setIsSmallScreen(e.matches);
|
||||||
if (e.matches) {
|
if (e.matches) {
|
||||||
dispatch(toggleDetailedLogs(false));
|
dispatch(toggleDetailedLogs(false));
|
||||||
|
} else {
|
||||||
|
dispatch(toggleDetailedLogs(true));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -204,11 +208,18 @@ const Logs = () => {
|
|||||||
</Modal>
|
</Modal>
|
||||||
</>;
|
</>;
|
||||||
|
|
||||||
return <>
|
return (
|
||||||
{enabled && processingGetConfig && <Loading />}
|
<>
|
||||||
{enabled && !processingGetConfig && renderPage()}
|
{enabled && (
|
||||||
{!enabled && !processingGetConfig && <Disabled />}
|
<>
|
||||||
</>;
|
{processingGetConfig && <Loading />}
|
||||||
|
{anonymizeClientIp && <AnonymizerNotification />}
|
||||||
|
{!processingGetConfig && renderPage()}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{!enabled && !processingGetConfig && <Disabled />}
|
||||||
|
</>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Logs;
|
export default Logs;
|
||||||
|
|||||||
@@ -2820,6 +2820,11 @@ fieldset:disabled a.btn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline-primary:focus,
|
.btn-outline-primary:focus,
|
||||||
|
.btn-outline-primary.focus {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline-primary:focus-visible,
|
||||||
.btn-outline-primary.focus {
|
.btn-outline-primary.focus {
|
||||||
box-shadow: 0 0 0 2px rgba(70, 127, 207, 0.5);
|
box-shadow: 0 0 0 2px rgba(70, 127, 207, 0.5);
|
||||||
}
|
}
|
||||||
@@ -2858,6 +2863,11 @@ fieldset:disabled a.btn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline-secondary:focus,
|
.btn-outline-secondary:focus,
|
||||||
|
.btn-outline-secondary.focus {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline-secondary:focus-visible,
|
||||||
.btn-outline-secondary.focus {
|
.btn-outline-secondary.focus {
|
||||||
box-shadow: 0 0 0 2px rgba(134, 142, 150, 0.5);
|
box-shadow: 0 0 0 2px rgba(134, 142, 150, 0.5);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
height: 24px;
|
height: 24px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
fill: #4a4a4a;
|
fill: #4a4a4a;
|
||||||
|
touch-action: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab__text {
|
.tab__text {
|
||||||
|
|||||||
@@ -526,8 +526,8 @@ export const DEFAULT_DATE_FORMAT_OPTIONS = {
|
|||||||
month: 'numeric',
|
month: 'numeric',
|
||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
hour: 'numeric',
|
hour: 'numeric',
|
||||||
|
hourCycle: 'h23',
|
||||||
minute: 'numeric',
|
minute: 'numeric',
|
||||||
hour12: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DETAILED_DATE_FORMAT_OPTIONS = {
|
export const DETAILED_DATE_FORMAT_OPTIONS = {
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import (
|
|||||||
"github.com/AdguardTeam/golibs/log"
|
"github.com/AdguardTeam/golibs/log"
|
||||||
"github.com/AdguardTeam/golibs/netutil"
|
"github.com/AdguardTeam/golibs/netutil"
|
||||||
"github.com/NYTimes/gziphandler"
|
"github.com/NYTimes/gziphandler"
|
||||||
|
"golang.org/x/net/http2"
|
||||||
|
"golang.org/x/net/http2/h2c"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HTTP scheme constants.
|
// HTTP scheme constants.
|
||||||
@@ -167,12 +169,15 @@ func (web *Web) Start() {
|
|||||||
printHTTPAddresses(schemeHTTP)
|
printHTTPAddresses(schemeHTTP)
|
||||||
errs := make(chan error, 2)
|
errs := make(chan error, 2)
|
||||||
|
|
||||||
|
// Use an h2c handler to support unencrypted HTTP/2, e.g. for proxies.
|
||||||
|
hdlr := h2c.NewHandler(withMiddlewares(Context.mux, limitRequestBody), &http2.Server{})
|
||||||
|
|
||||||
|
// Create a new instance, because the Web is not usable after Shutdown.
|
||||||
hostStr := web.conf.BindHost.String()
|
hostStr := web.conf.BindHost.String()
|
||||||
// we need to have new instance, because after Shutdown() the Server is not usable
|
|
||||||
web.httpServer = &http.Server{
|
web.httpServer = &http.Server{
|
||||||
ErrorLog: log.StdLog("web: plain", log.DEBUG),
|
ErrorLog: log.StdLog("web: plain", log.DEBUG),
|
||||||
Addr: netutil.JoinHostPort(hostStr, web.conf.BindPort),
|
Addr: netutil.JoinHostPort(hostStr, web.conf.BindPort),
|
||||||
Handler: withMiddlewares(Context.mux, limitRequestBody),
|
Handler: hdlr,
|
||||||
ReadTimeout: web.conf.ReadTimeout,
|
ReadTimeout: web.conf.ReadTimeout,
|
||||||
ReadHeaderTimeout: web.conf.ReadHeaderTimeout,
|
ReadHeaderTimeout: web.conf.ReadHeaderTimeout,
|
||||||
WriteTimeout: web.conf.WriteTimeout,
|
WriteTimeout: web.conf.WriteTimeout,
|
||||||
@@ -202,10 +207,16 @@ func (web *Web) startBetaServer(hostStr string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use an h2c handler to support unencrypted HTTP/2, e.g. for proxies.
|
||||||
|
hdlr := h2c.NewHandler(
|
||||||
|
withMiddlewares(Context.mux, limitRequestBody, web.wrapIndexBeta),
|
||||||
|
&http2.Server{},
|
||||||
|
)
|
||||||
|
|
||||||
web.httpServerBeta = &http.Server{
|
web.httpServerBeta = &http.Server{
|
||||||
ErrorLog: log.StdLog("web: plain: beta", log.DEBUG),
|
ErrorLog: log.StdLog("web: plain: beta", log.DEBUG),
|
||||||
Addr: netutil.JoinHostPort(hostStr, web.conf.BetaBindPort),
|
Addr: netutil.JoinHostPort(hostStr, web.conf.BetaBindPort),
|
||||||
Handler: withMiddlewares(Context.mux, limitRequestBody, web.wrapIndexBeta),
|
Handler: hdlr,
|
||||||
ReadTimeout: web.conf.ReadTimeout,
|
ReadTimeout: web.conf.ReadTimeout,
|
||||||
ReadHeaderTimeout: web.conf.ReadHeaderTimeout,
|
ReadHeaderTimeout: web.conf.ReadHeaderTimeout,
|
||||||
WriteTimeout: web.conf.WriteTimeout,
|
WriteTimeout: web.conf.WriteTimeout,
|
||||||
|
|||||||
Reference in New Issue
Block a user