Skip to content

1-73-1#272

Open
DanielLavrushin wants to merge 1 commit into
mainfrom
1-73-1-fixes
Open

1-73-1#272
DanielLavrushin wants to merge 1 commit into
mainfrom
1-73-1-fixes

Conversation

@DanielLavrushin

Copy link
Copy Markdown
Owner

No description provided.

@DanielLavrushin DanielLavrushin self-assigned this Jul 7, 2026
Copilot AI review requested due to automatic review settings July 7, 2026 08:17
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 5 complexity

Metric Results
Complexity 5

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the MTProto DC Relay socat helper to generate working forwarding commands by targeting Telegram’s public DC TCP endpoints (rather than the internal middle-proxy backends returned by getProxyConfig), and removes the unnecessary command for media DC 203 (which reuses DC2’s relay port).

Changes:

  • Add a backend-provided direct DC endpoint map and include it in /mtproto/refresh-dcs responses.
  • Update the UI helper dialog to prefer direct endpoints and to omit DC 203 from the generated relay-port mappings.
  • Update EN/RU docs and changelogs to reflect the corrected relay behavior and firewall port count (5 ports).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/mtproto/dc.go Adds DirectAddresses() to expose public DC TCP endpoints for the UI helper.
src/http/handler/mtproto.go Extends refresh response with direct endpoints.
src/http/ui/src/components/settings/MTProto.tsx Extends refresh result typing and plumbing to carry direct.
src/http/ui/src/components/settings/MTProtoRelayHelpDialog.tsx Builds socat mappings from direct endpoints and omits DC 203.
docs/docs/mtproto.md Updates relay helper documentation (no media DC command; 5 firewall ports).
docs/i18n/ru/docusaurus-plugin-content-docs/current/mtproto.md Same as above for RU docs.
changelog.md Adds 1.73.1 entry describing the fix.
changelog_ru.md Adds 1.73.1 RU entry describing the fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 66 to 70
const mappings = useMemo(() => {
if (!relayInfo || !refreshResult?.ok) return [];
return Object.entries(refreshResult.dcs)
const addrs = refreshResult.direct ?? refreshResult.dcs;
return Object.entries(addrs)
.map(([id, addr]) => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants