fix: allow binding to localhost and all RFC 1918 addresses#33
Merged
dvershinin merged 2 commits intomasterfrom Mar 17, 2026
Merged
fix: allow binding to localhost and all RFC 1918 addresses#33dvershinin merged 2 commits intomasterfrom
dvershinin merged 2 commits intomasterfrom
Conversation
Expand PID validation to accept 127.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 in addition to 10.0.0.0/8. Skip binding outgoing connections to loopback so Telegram DC traffic uses the default interface. Closes #32
This was referenced Mar 9, 2026
) The /stats HTTP endpoint was hardcoded to only respond to 127.0.0.1. When running in Docker, host requests arrive via the bridge network (172.17.0.1), causing the stats endpoint to reject them. Replace the localhost-only check with an is_private_ip() helper that accepts all RFC 1918 ranges (10/8, 172.16/12, 192.168/16) plus loopback (127/8).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
engine/engine.cto accept all private/loopback ranges (127.0.0.0/8,172.16.0.0/12,192.168.0.0/16) in addition to10.0.0.0/8net/net-events.cso Telegram DC traffic uses the default interfaceTest plan
--address 127.0.0.1no longer prints "Bad binded IP address" warning--address 10.x.x.xbehavior unchangedCloses #32