Skip to content

Add public-ipv4/public-ipv6 config options#418

Merged
9seconds merged 2 commits into9seconds:masterfrom
dolonet:public-ip-config
Mar 29, 2026
Merged

Add public-ipv4/public-ipv6 config options#418
9seconds merged 2 commits into9seconds:masterfrom
dolonet:public-ip-config

Conversation

@dolonet
Copy link
Copy Markdown
Contributor

@dolonet dolonet commented Mar 28, 2026

On some servers ifconfig.co is unreachable (e.g. Hetzner, AdGuard DNS blocklists), causing mtg doctor SNI-DNS check and mtg access link generation to fail.

This adds two new optional config options:

public-ipv4 = "1.2.3.4"
public-ipv6 = "2001:db8::1"

If set, these are used instead of querying ifconfig.co. If not set, the current automatic detection behavior is preserved.

Priority chain for mtg access: CLI flag (--ipv4/--ipv6) → config (public-ipv4/public-ipv6) → auto-detection (ifconfig.co).

Priority chain for mtg doctor: config (public-ipv4/public-ipv6) → auto-detection (ifconfig.co).

Fixes #405

On some servers ifconfig.co is unreachable (e.g. Hetzner, AdGuard DNS
blocklists), causing 'mtg doctor' SNI-DNS check and 'mtg access' link
generation to fail. New config options allow specifying public IPs
manually, with automatic detection as fallback.

Fixes 9seconds#405
@9seconds 9seconds merged commit 822560b into 9seconds:master Mar 29, 2026
5 checks passed
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.

Cannot detect public IP address: ifconfig.co is unreachable for both IPv4 and IPv6

2 participants