Skip to content

Commit e06c7cd

Browse files
committed
1 parent 0b809f0 commit e06c7cd

15 files changed

Lines changed: 501 additions & 89 deletions

File tree

changelog/index.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,6 +1371,17 @@
13711371
</label>
13721372
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
13731373

1374+
<li class="md-nav__item">
1375+
<a href="#480" class="md-nav__link">
1376+
<span class="md-ellipsis">
1377+
1378+
4.8.0
1379+
1380+
</span>
1381+
</a>
1382+
1383+
</li>
1384+
13741385
<li class="md-nav__item">
13751386
<a href="#470" class="md-nav__link">
13761387
<span class="md-ellipsis">
@@ -1531,6 +1542,17 @@
15311542
</label>
15321543
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
15331544

1545+
<li class="md-nav__item">
1546+
<a href="#480" class="md-nav__link">
1547+
<span class="md-ellipsis">
1548+
1549+
4.8.0
1550+
1551+
</span>
1552+
</a>
1553+
1554+
</li>
1555+
15341556
<li class="md-nav__item">
15351557
<a href="#470" class="md-nav__link">
15361558
<span class="md-ellipsis">
@@ -1651,6 +1673,14 @@
16511673

16521674

16531675
<h1 id="changelog">Changelog<a class="headerlink" href="#changelog" title="Permanent link">&para;</a></h1>
1676+
<h2 id="480">4.8.0<a class="headerlink" href="#480" title="Permanent link">&para;</a></h2>
1677+
<p>DC health probes (<a href="https://github.com/teleproxy/teleproxy/issues/47">#47</a>).</p>
1678+
<ul>
1679+
<li><strong>DC latency probes</strong> - periodic TCP handshake measurement to all 5 Telegram DCs, exposed as Prometheus histograms (<code>teleproxy_dc_latency_seconds</code>), failure counters, and last-latency gauges. Helps operators diagnose slow downloads and pick optimal DC routing.</li>
1680+
<li>Disabled by default. Enable with <code>--dc-probe-interval 30</code> (CLI), <code>dc_probe_interval = 30</code> (TOML), or <code>DC_PROBE_INTERVAL=30</code> (Docker env).</li>
1681+
<li>Probes run in the master process only. Completion is tracked via non-blocking poll to preserve sub-millisecond accuracy.</li>
1682+
<li>Text stats endpoint includes per-DC latency, average, count, and failure fields.</li>
1683+
</ul>
16541684
<h2 id="470">4.7.0<a class="headerlink" href="#470" title="Permanent link">&para;</a></h2>
16551685
<p>Per-secret quotas, unique-IP limits, and expiration (<a href="https://github.com/teleproxy/teleproxy/issues/26">#26</a>).</p>
16561686
<ul>

docker/configuration/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,11 @@ <h2 id="environment-variables">Environment Variables<a class="headerlink" href="
16851685
<td></td>
16861686
<td>Comma-separated DC address overrides for direct mode (e.g. <code>2:1.2.3.4:443,2:5.6.7.8:443</code>)</td>
16871687
</tr>
1688+
<tr>
1689+
<td><code>DC_PROBE_INTERVAL</code></td>
1690+
<td></td>
1691+
<td>Seconds between DC health probes (e.g. <code>30</code>). Disabled when absent or <code>0</code></td>
1692+
</tr>
16881693
</tbody>
16891694
</table>
16901695
<p>Maximum 16 secrets (binary limit).</p>

fa/changelog/index.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,6 +1371,17 @@
13711371
</label>
13721372
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
13731373

1374+
<li class="md-nav__item">
1375+
<a href="#480" class="md-nav__link">
1376+
<span class="md-ellipsis">
1377+
1378+
4.8.0
1379+
1380+
</span>
1381+
</a>
1382+
1383+
</li>
1384+
13741385
<li class="md-nav__item">
13751386
<a href="#470" class="md-nav__link">
13761387
<span class="md-ellipsis">
@@ -1531,6 +1542,17 @@
15311542
</label>
15321543
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
15331544

1545+
<li class="md-nav__item">
1546+
<a href="#480" class="md-nav__link">
1547+
<span class="md-ellipsis">
1548+
1549+
4.8.0
1550+
1551+
</span>
1552+
</a>
1553+
1554+
</li>
1555+
15341556
<li class="md-nav__item">
15351557
<a href="#470" class="md-nav__link">
15361558
<span class="md-ellipsis">
@@ -1651,6 +1673,14 @@
16511673

16521674

16531675
<h1 id="changelog">Changelog<a class="headerlink" href="#changelog" title="Permanent link">&para;</a></h1>
1676+
<h2 id="480">4.8.0<a class="headerlink" href="#480" title="Permanent link">&para;</a></h2>
1677+
<p>DC health probes (<a href="https://github.com/teleproxy/teleproxy/issues/47">#47</a>).</p>
1678+
<ul>
1679+
<li><strong>DC latency probes</strong> - periodic TCP handshake measurement to all 5 Telegram DCs, exposed as Prometheus histograms (<code>teleproxy_dc_latency_seconds</code>), failure counters, and last-latency gauges. Helps operators diagnose slow downloads and pick optimal DC routing.</li>
1680+
<li>Disabled by default. Enable with <code>--dc-probe-interval 30</code> (CLI), <code>dc_probe_interval = 30</code> (TOML), or <code>DC_PROBE_INTERVAL=30</code> (Docker env).</li>
1681+
<li>Probes run in the master process only. Completion is tracked via non-blocking poll to preserve sub-millisecond accuracy.</li>
1682+
<li>Text stats endpoint includes per-DC latency, average, count, and failure fields.</li>
1683+
</ul>
16541684
<h2 id="470">4.7.0<a class="headerlink" href="#470" title="Permanent link">&para;</a></h2>
16551685
<p>Per-secret quotas, unique-IP limits, and expiration (<a href="https://github.com/teleproxy/teleproxy/issues/26">#26</a>).</p>
16561686
<ul>

fa/docker/configuration/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,11 @@ <h2 id="environment-variables">Environment Variables<a class="headerlink" href="
16851685
<td></td>
16861686
<td>Comma-separated DC address overrides for direct mode (e.g. <code>2:1.2.3.4:443,2:5.6.7.8:443</code>)</td>
16871687
</tr>
1688+
<tr>
1689+
<td><code>DC_PROBE_INTERVAL</code></td>
1690+
<td></td>
1691+
<td>Seconds between DC health probes (e.g. <code>30</code>). Disabled when absent or <code>0</code></td>
1692+
</tr>
16881693
</tbody>
16891694
</table>
16901695
<p>Maximum 16 secrets (binary limit).</p>

fa/features/monitoring/index.html

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,23 @@
10981098
</span>
10991099
</a>
11001100

1101+
<nav class="md-nav" aria-label="Prometheus Metrics">
1102+
<ul class="md-nav__list">
1103+
1104+
<li class="md-nav__item">
1105+
<a href="#dc-latency-probes" class="md-nav__link">
1106+
<span class="md-ellipsis">
1107+
1108+
DC Latency Probes
1109+
1110+
</span>
1111+
</a>
1112+
1113+
</li>
1114+
1115+
</ul>
1116+
</nav>
1117+
11011118
</li>
11021119

11031120
<li class="md-nav__item">
@@ -1537,6 +1554,23 @@
15371554
</span>
15381555
</a>
15391556

1557+
<nav class="md-nav" aria-label="Prometheus Metrics">
1558+
<ul class="md-nav__list">
1559+
1560+
<li class="md-nav__item">
1561+
<a href="#dc-latency-probes" class="md-nav__link">
1562+
<span class="md-ellipsis">
1563+
1564+
DC Latency Probes
1565+
1566+
</span>
1567+
</a>
1568+
1569+
</li>
1570+
1571+
</ul>
1572+
</nav>
1573+
15401574
</li>
15411575

15421576
<li class="md-nav__item">
@@ -1596,6 +1630,40 @@ <h2 id="prometheus-metrics">Prometheus Metrics<a class="headerlink" href="#prome
15961630
</code></pre></div>
15971631
<p>Returns Prometheus exposition format on the same stats port. Includes per-secret metrics when labels are configured.</p>
15981632
<p>Available metrics include connection counts, per-secret connections, rejection counts, and IP ACL rejections.</p>
1633+
<h3 id="dc-latency-probes">DC Latency Probes<a class="headerlink" href="#dc-latency-probes" title="Permanent link">&para;</a></h3>
1634+
<p>When enabled, teleproxy periodically probes all 5 Telegram DCs with a TCP handshake and exposes the results as a Prometheus histogram:</p>
1635+
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="c1"># Enable with 30-second probe interval</span>
1636+
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a>./teleproxy<span class="w"> </span>...<span class="w"> </span>--dc-probe-interval<span class="w"> </span><span class="m">30</span>
1637+
</code></pre></div>
1638+
<p>Metrics exposed:</p>
1639+
<table>
1640+
<thead>
1641+
<tr>
1642+
<th>Metric</th>
1643+
<th>Type</th>
1644+
<th>Description</th>
1645+
</tr>
1646+
</thead>
1647+
<tbody>
1648+
<tr>
1649+
<td><code>teleproxy_dc_latency_seconds</code></td>
1650+
<td>histogram</td>
1651+
<td>TCP handshake RTT per DC (labels: <code>dc="1"</code>..<code>dc="5"</code>)</td>
1652+
</tr>
1653+
<tr>
1654+
<td><code>teleproxy_dc_probe_failures_total</code></td>
1655+
<td>counter</td>
1656+
<td>Failed probe attempts per DC</td>
1657+
</tr>
1658+
<tr>
1659+
<td><code>teleproxy_dc_latency_last_seconds</code></td>
1660+
<td>gauge</td>
1661+
<td>Most recent probe latency per DC</td>
1662+
</tr>
1663+
</tbody>
1664+
</table>
1665+
<p>The text <code>/stats</code> endpoint includes matching fields: <code>dc_probe_interval</code>, <code>dcN_probe_latency_last</code>, <code>dcN_probe_latency_avg</code>, <code>dcN_probe_count</code>, <code>dcN_probe_failures</code>.</p>
1666+
<p>Disabled by default. Set <code>dc_probe_interval</code> in the TOML config or use the <code>DC_PROBE_INTERVAL</code> environment variable in Docker.</p>
15991667
<h2 id="grafana-dashboard">Grafana Dashboard<a class="headerlink" href="#grafana-dashboard" title="Permanent link">&para;</a></h2>
16001668
<p>Import the <a href="https://github.com/teleproxy/teleproxy/blob/main/dashboards/teleproxy.json">bundled dashboard</a> into Grafana:</p>
16011669
<ol>
@@ -1606,7 +1674,7 @@ <h2 id="grafana-dashboard">Grafana Dashboard<a class="headerlink" href="#grafana
16061674
<p>The dashboard covers connections, per-secret usage, rejection rates, DC connectivity, and resource utilization.</p>
16071675
<h2 id="health-checks">Health Checks<a class="headerlink" href="#health-checks" title="Permanent link">&para;</a></h2>
16081676
<p>Docker containers include built-in health monitoring via the stats endpoint. Check with:</p>
1609-
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>docker<span class="w"> </span>ps<span class="w"> </span><span class="c1"># STATUS column shows health</span>
1677+
<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>docker<span class="w"> </span>ps<span class="w"> </span><span class="c1"># STATUS column shows health</span>
16101678
</code></pre></div>
16111679

16121680

features/monitoring/index.html

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,23 @@
10981098
</span>
10991099
</a>
11001100

1101+
<nav class="md-nav" aria-label="Prometheus Metrics">
1102+
<ul class="md-nav__list">
1103+
1104+
<li class="md-nav__item">
1105+
<a href="#dc-latency-probes" class="md-nav__link">
1106+
<span class="md-ellipsis">
1107+
1108+
DC Latency Probes
1109+
1110+
</span>
1111+
</a>
1112+
1113+
</li>
1114+
1115+
</ul>
1116+
</nav>
1117+
11011118
</li>
11021119

11031120
<li class="md-nav__item">
@@ -1537,6 +1554,23 @@
15371554
</span>
15381555
</a>
15391556

1557+
<nav class="md-nav" aria-label="Prometheus Metrics">
1558+
<ul class="md-nav__list">
1559+
1560+
<li class="md-nav__item">
1561+
<a href="#dc-latency-probes" class="md-nav__link">
1562+
<span class="md-ellipsis">
1563+
1564+
DC Latency Probes
1565+
1566+
</span>
1567+
</a>
1568+
1569+
</li>
1570+
1571+
</ul>
1572+
</nav>
1573+
15401574
</li>
15411575

15421576
<li class="md-nav__item">
@@ -1596,6 +1630,40 @@ <h2 id="prometheus-metrics">Prometheus Metrics<a class="headerlink" href="#prome
15961630
</code></pre></div>
15971631
<p>Returns Prometheus exposition format on the same stats port. Includes per-secret metrics when labels are configured.</p>
15981632
<p>Available metrics include connection counts, per-secret connections, rejection counts, and IP ACL rejections.</p>
1633+
<h3 id="dc-latency-probes">DC Latency Probes<a class="headerlink" href="#dc-latency-probes" title="Permanent link">&para;</a></h3>
1634+
<p>When enabled, teleproxy periodically probes all 5 Telegram DCs with a TCP handshake and exposes the results as a Prometheus histogram:</p>
1635+
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="c1"># Enable with 30-second probe interval</span>
1636+
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a>./teleproxy<span class="w"> </span>...<span class="w"> </span>--dc-probe-interval<span class="w"> </span><span class="m">30</span>
1637+
</code></pre></div>
1638+
<p>Metrics exposed:</p>
1639+
<table>
1640+
<thead>
1641+
<tr>
1642+
<th>Metric</th>
1643+
<th>Type</th>
1644+
<th>Description</th>
1645+
</tr>
1646+
</thead>
1647+
<tbody>
1648+
<tr>
1649+
<td><code>teleproxy_dc_latency_seconds</code></td>
1650+
<td>histogram</td>
1651+
<td>TCP handshake RTT per DC (labels: <code>dc="1"</code>..<code>dc="5"</code>)</td>
1652+
</tr>
1653+
<tr>
1654+
<td><code>teleproxy_dc_probe_failures_total</code></td>
1655+
<td>counter</td>
1656+
<td>Failed probe attempts per DC</td>
1657+
</tr>
1658+
<tr>
1659+
<td><code>teleproxy_dc_latency_last_seconds</code></td>
1660+
<td>gauge</td>
1661+
<td>Most recent probe latency per DC</td>
1662+
</tr>
1663+
</tbody>
1664+
</table>
1665+
<p>The text <code>/stats</code> endpoint includes matching fields: <code>dc_probe_interval</code>, <code>dcN_probe_latency_last</code>, <code>dcN_probe_latency_avg</code>, <code>dcN_probe_count</code>, <code>dcN_probe_failures</code>.</p>
1666+
<p>Disabled by default. Set <code>dc_probe_interval</code> in the TOML config or use the <code>DC_PROBE_INTERVAL</code> environment variable in Docker.</p>
15991667
<h2 id="grafana-dashboard">Grafana Dashboard<a class="headerlink" href="#grafana-dashboard" title="Permanent link">&para;</a></h2>
16001668
<p>Import the <a href="https://github.com/teleproxy/teleproxy/blob/main/dashboards/teleproxy.json">bundled dashboard</a> into Grafana:</p>
16011669
<ol>
@@ -1606,7 +1674,7 @@ <h2 id="grafana-dashboard">Grafana Dashboard<a class="headerlink" href="#grafana
16061674
<p>The dashboard covers connections, per-secret usage, rejection rates, DC connectivity, and resource utilization.</p>
16071675
<h2 id="health-checks">Health Checks<a class="headerlink" href="#health-checks" title="Permanent link">&para;</a></h2>
16081676
<p>Docker containers include built-in health monitoring via the stats endpoint. Check with:</p>
1609-
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>docker<span class="w"> </span>ps<span class="w"> </span><span class="c1"># STATUS column shows health</span>
1677+
<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>docker<span class="w"> </span>ps<span class="w"> </span><span class="c1"># STATUS column shows health</span>
16101678
</code></pre></div>
16111679

16121680

ru/changelog/index.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,6 +1371,17 @@
13711371
</label>
13721372
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
13731373

1374+
<li class="md-nav__item">
1375+
<a href="#480" class="md-nav__link">
1376+
<span class="md-ellipsis">
1377+
1378+
4.8.0
1379+
1380+
</span>
1381+
</a>
1382+
1383+
</li>
1384+
13741385
<li class="md-nav__item">
13751386
<a href="#470" class="md-nav__link">
13761387
<span class="md-ellipsis">
@@ -1531,6 +1542,17 @@
15311542
</label>
15321543
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
15331544

1545+
<li class="md-nav__item">
1546+
<a href="#480" class="md-nav__link">
1547+
<span class="md-ellipsis">
1548+
1549+
4.8.0
1550+
1551+
</span>
1552+
</a>
1553+
1554+
</li>
1555+
15341556
<li class="md-nav__item">
15351557
<a href="#470" class="md-nav__link">
15361558
<span class="md-ellipsis">
@@ -1651,6 +1673,14 @@
16511673

16521674

16531675
<h1 id="changelog">Changelog<a class="headerlink" href="#changelog" title="Permanent link">&para;</a></h1>
1676+
<h2 id="480">4.8.0<a class="headerlink" href="#480" title="Permanent link">&para;</a></h2>
1677+
<p>DC health probes (<a href="https://github.com/teleproxy/teleproxy/issues/47">#47</a>).</p>
1678+
<ul>
1679+
<li><strong>DC latency probes</strong> - periodic TCP handshake measurement to all 5 Telegram DCs, exposed as Prometheus histograms (<code>teleproxy_dc_latency_seconds</code>), failure counters, and last-latency gauges. Helps operators diagnose slow downloads and pick optimal DC routing.</li>
1680+
<li>Disabled by default. Enable with <code>--dc-probe-interval 30</code> (CLI), <code>dc_probe_interval = 30</code> (TOML), or <code>DC_PROBE_INTERVAL=30</code> (Docker env).</li>
1681+
<li>Probes run in the master process only. Completion is tracked via non-blocking poll to preserve sub-millisecond accuracy.</li>
1682+
<li>Text stats endpoint includes per-DC latency, average, count, and failure fields.</li>
1683+
</ul>
16541684
<h2 id="470">4.7.0<a class="headerlink" href="#470" title="Permanent link">&para;</a></h2>
16551685
<p>Per-secret quotas, unique-IP limits, and expiration (<a href="https://github.com/teleproxy/teleproxy/issues/26">#26</a>).</p>
16561686
<ul>

ru/docker/configuration/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,6 +1680,11 @@ <h2 id="_1">Переменные окружения<a class="headerlink" href="#
16801680
<td></td>
16811681
<td>Переопределение адресов DC через запятую для прямого режима (напр. <code>2:1.2.3.4:443,2:5.6.7.8:443</code>)</td>
16821682
</tr>
1683+
<tr>
1684+
<td><code>DC_PROBE_INTERVAL</code></td>
1685+
<td></td>
1686+
<td>Интервал проверки DC в секундах (напр. <code>30</code>). Отключено, если не задано или <code>0</code></td>
1687+
</tr>
16831688
</tbody>
16841689
</table>
16851690
<p>Максимум 16 секретов (ограничение бинарника).</p>

0 commit comments

Comments
 (0)