mirror of
https://github.com/TrustTunnel/TrustTunnel.git
synced 2026-04-26 12:35:30 +00:00
Pull request 136: fix vpn-libs-endpoint: use localhost for metrics instead of 0.0.0.0
Squashed commit of the following: commit 98bb9229606723667f893d4983be70e3d14416b0 Author: Radmir Sadikov <r.sadikov@adguard.com> Date: Fri Jan 23 09:46:56 2026 +0400 fix vpn-libs-endpoint: use localhost for metrics instead of 0.0.0.0
This commit is contained in:
committed by
Sergey Fionov
parent
a4606899d6
commit
f23b5d2c07
@@ -158,7 +158,7 @@ direct = {}
|
||||
|
||||
# Metrics settings (optional)
|
||||
# [metrics]
|
||||
# address = "0.0.0.0:1987"
|
||||
# address = "127.0.0.1:1987"
|
||||
# request_timeout_secs = 3
|
||||
```
|
||||
|
||||
@@ -356,13 +356,13 @@ Optional. Enables Prometheus-compatible metrics endpoint.
|
||||
|
||||
```toml
|
||||
[metrics]
|
||||
address = "0.0.0.0:1987"
|
||||
address = "127.0.0.1:1987"
|
||||
request_timeout_secs = 3
|
||||
```
|
||||
|
||||
| Setting | Type | Default | Description |
|
||||
| ------- | ---- | ------- | ----------- |
|
||||
| `address` | String | `0.0.0.0:1987` | Metrics endpoint address |
|
||||
| `address` | String | `127.0.0.1:1987` | Metrics endpoint address |
|
||||
| `request_timeout_secs` | Integer | `3` | Request timeout in seconds |
|
||||
|
||||
---
|
||||
|
||||
@@ -15,13 +15,13 @@ use vpn_libs_endpoint::Settings;
|
||||
|
||||
let settings = Settings::builder()
|
||||
.metrics(MetricsSettings {
|
||||
address: "0.0.0.0:1987".parse().unwrap(),
|
||||
address: "127.0.0.1:1987".parse().unwrap(),
|
||||
request_timeout: Duration::from_secs(3),
|
||||
})
|
||||
.build();
|
||||
```
|
||||
|
||||
Default metrics endpoint: `http://0.0.0.0:1987/metrics`
|
||||
Default metrics endpoint: `http://127.0.0.1:1987/metrics`
|
||||
|
||||
## Endpoints
|
||||
|
||||
|
||||
@@ -755,7 +755,7 @@ impl MetricsSettings {
|
||||
}
|
||||
|
||||
pub fn default_listen_address() -> SocketAddr {
|
||||
(Ipv4Addr::UNSPECIFIED, 1987).into()
|
||||
(Ipv4Addr::LOCALHOST, 1987).into()
|
||||
}
|
||||
|
||||
pub fn default_request_timeout() -> Duration {
|
||||
|
||||
Reference in New Issue
Block a user