Compare commits

...

14 Commits

Author SHA1 Message Date
Ildar Kamalov
0cc4923bc3 Merge branch 'master' into 4926-scroll 2022-09-20 13:20:03 +03:00
Ildar Kamalov
ab6da05b51 Pull request: 4926 fix tabs scroll on mobile
Updates #4926

Squashed commit of the following:

commit 23a352d214
Merge: 44c64893 8e89cc12
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Sep 19 19:35:48 2022 +0300

    Merge branch 'master' into 4926-scroll

commit 44c64893bb
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Sep 19 19:34:54 2022 +0300

    fix

commit 3f8f8c7253
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Sep 19 19:30:59 2022 +0300

    client: fix tabs scroll on mobile
2022-09-19 20:22:26 +03:00
Ildar Kamalov
23a352d214 Merge branch 'master' into 4926-scroll 2022-09-19 19:35:48 +03:00
Ildar Kamalov
44c64893bb fix 2022-09-19 19:34:54 +03:00
Ildar Kamalov
8e89cc129c Pull request: 4913 IP anonymizer notification
Updates #4913

Squashed commit of the following:

commit baa63c647bdecf10a2c5e91568231864c423c4c3
Merge: 70de6540 9ffe0787
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Sep 19 18:53:24 2022 +0300

    Merge branch 'master' into 4913-anonymizer-notification

commit 70de65405fa34ba764408ce1331f90ec0ef7aec2
Author: Ildar Kamalov <ik@adguard.com>
Date:   Mon Sep 19 18:03:52 2022 +0300

    client: fix text

commit e6d8db0086903fe61b0aa511807e97dd12bd571c
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Sep 16 20:37:42 2022 +0300

    client: IP anonymizer notification
2022-09-19 19:34:14 +03:00
Ildar Kamalov
3f8f8c7253 client: fix tabs scroll on mobile 2022-09-19 19:30:59 +03:00
Ainar Garipov
9ffe078703 Pull request: 4931-http-2-unencrypted
Closes #4930.
Updates #4931.

* commit '27b0251b5b8c1097d53b20a67569bb9bb6ff8bff':
  home: imp docs
  all: doc changes
  add support for plain h2c
2022-09-19 17:26:01 +03:00
Ainar Garipov
27b0251b5b home: imp docs 2022-09-19 17:17:12 +03:00
Ainar Garipov
ed209daf8a all: doc changes 2022-09-19 17:06:29 +03:00
Dmitry Rubtsov
95771c7aba add support for plain h2c 2022-09-19 17:06:32 +06:00
Ildar Kamalov
42bd0615c2 Pull request: 4896 remove button outline on modal close
Updates #4896

Squashed commit of the following:

commit 87de3176a8e50146b0a1028695d8181265b6b9b9
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Sep 16 16:32:09 2022 +0300

    client: remove outline on modal close
2022-09-16 19:40:42 +03:00
Ildar Kamalov
3a88ef3be2 Pull request: 4854 return to detailed view on screen resize
Updates #4854

Squashed commit of the following:

commit b580b5e26d83db3291dee5714d9580a1e07253b5
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Sep 16 15:33:04 2022 +0300

    client: return to detailed view on screen resize
2022-09-16 16:19:09 +03:00
Ildar Kamalov
572fed9f35 Pull request: 4679 fix wrong time format after midnight
Updates #4679

Squashed commit of the following:

commit 1864f33120fc35e6d88fb5d448e1391f97c267ef
Merge: b48add05 663f0643
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Sep 16 12:43:58 2022 +0300

    Merge branch 'master' into 4679-time-format

commit b48add059ff330f1a709b6fd723cbf92ce89c60e
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Sep 16 12:39:52 2022 +0300

    client: fix wrong time format after midnight
2022-09-16 12:59:30 +03:00
Ildar Kamalov
663f0643f2 Pull request: 4899 show filter update time
Updates #4899

Squashed commit of the following:

commit 32ea8f3854619be4a3bb125d5c3ef02ba8ef5439
Author: Ildar Kamalov <ik@adguard.com>
Date:   Thu Sep 15 19:22:22 2022 +0300

    client: show hidden filter update time
2022-09-16 12:43:27 +03:00
9 changed files with 69 additions and 13 deletions

View File

@@ -20,7 +20,13 @@ and this project adheres to
- Weaker cipher suites that use the CBC (cipher block chaining) mode of
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
[#4930]: https://github.com/AdguardTeam/AdGuardHome/issues/4930

View File

@@ -635,5 +635,6 @@
"parental_control": "Parental Control",
"safe_browsing": "Safe Browsing",
"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>."
}

View File

@@ -41,13 +41,13 @@ class Table extends Component {
{
Header: <Trans>name_table_header</Trans>,
accessor: 'name',
minWidth: 200,
minWidth: 180,
Cell: CellWrap,
},
{
Header: <Trans>list_url_table_header</Trans>,
accessor: 'url',
minWidth: 200,
minWidth: 180,
Cell: ({ value }) => (
<div className="logs__row">
{isValidAbsolutePath(value) ? value
@@ -73,7 +73,7 @@ class Table extends Component {
Header: <Trans>last_time_updated_table_header</Trans>,
accessor: 'lastUpdated',
className: 'text-center',
minWidth: 150,
minWidth: 180,
Cell: this.getDateCell,
},
{

View 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;

View File

@@ -25,6 +25,7 @@ import {
import InfiniteTable from './InfiniteTable';
import './Logs.css';
import { BUTTON_PREFIX } from './Cells/helpers';
import AnonymizerNotification from './AnonymizerNotification';
const processContent = (data) => Object.entries(data)
.map(([key, value]) => {
@@ -73,6 +74,7 @@ const Logs = () => {
processingGetConfig,
processingAdditionalLogs,
processingGetLogs,
anonymize_client_ip: anonymizeClientIp,
} = useSelector((state) => state.queryLogs, shallowEqual);
const filter = useSelector((state) => state.queryLogs.filter, shallowEqual);
const logs = useSelector((state) => state.queryLogs.logs, shallowEqual);
@@ -104,6 +106,8 @@ const Logs = () => {
setIsSmallScreen(e.matches);
if (e.matches) {
dispatch(toggleDetailedLogs(false));
} else {
dispatch(toggleDetailedLogs(true));
}
};
@@ -204,11 +208,18 @@ const Logs = () => {
</Modal>
</>;
return <>
{enabled && processingGetConfig && <Loading />}
{enabled && !processingGetConfig && renderPage()}
{!enabled && !processingGetConfig && <Disabled />}
</>;
return (
<>
{enabled && (
<>
{processingGetConfig && <Loading />}
{anonymizeClientIp && <AnonymizerNotification />}
{!processingGetConfig && renderPage()}
</>
)}
{!enabled && !processingGetConfig && <Disabled />}
</>
);
};
export default Logs;

View File

@@ -2820,6 +2820,11 @@ fieldset:disabled a.btn {
}
.btn-outline-primary:focus,
.btn-outline-primary.focus {
box-shadow: none;
}
.btn-outline-primary:focus-visible,
.btn-outline-primary.focus {
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 {
box-shadow: none;
}
.btn-outline-secondary:focus-visible,
.btn-outline-secondary.focus {
box-shadow: 0 0 0 2px rgba(134, 142, 150, 0.5);
}

View File

@@ -67,6 +67,7 @@
height: 24px;
margin-bottom: 6px;
fill: #4a4a4a;
touch-action: initial;
}
.tab__text {

View File

@@ -526,8 +526,8 @@ export const DEFAULT_DATE_FORMAT_OPTIONS = {
month: 'numeric',
day: 'numeric',
hour: 'numeric',
hourCycle: 'h23',
minute: 'numeric',
hour12: false,
};
export const DETAILED_DATE_FORMAT_OPTIONS = {

View File

@@ -15,6 +15,8 @@ import (
"github.com/AdguardTeam/golibs/log"
"github.com/AdguardTeam/golibs/netutil"
"github.com/NYTimes/gziphandler"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"
)
// HTTP scheme constants.
@@ -167,12 +169,15 @@ func (web *Web) Start() {
printHTTPAddresses(schemeHTTP)
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()
// we need to have new instance, because after Shutdown() the Server is not usable
web.httpServer = &http.Server{
ErrorLog: log.StdLog("web: plain", log.DEBUG),
Addr: netutil.JoinHostPort(hostStr, web.conf.BindPort),
Handler: withMiddlewares(Context.mux, limitRequestBody),
Handler: hdlr,
ReadTimeout: web.conf.ReadTimeout,
ReadHeaderTimeout: web.conf.ReadHeaderTimeout,
WriteTimeout: web.conf.WriteTimeout,
@@ -202,10 +207,16 @@ func (web *Web) startBetaServer(hostStr string) {
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{
ErrorLog: log.StdLog("web: plain: beta", log.DEBUG),
Addr: netutil.JoinHostPort(hostStr, web.conf.BetaBindPort),
Handler: withMiddlewares(Context.mux, limitRequestBody, web.wrapIndexBeta),
Handler: hdlr,
ReadTimeout: web.conf.ReadTimeout,
ReadHeaderTimeout: web.conf.ReadHeaderTimeout,
WriteTimeout: web.conf.WriteTimeout,