FILE / ScuroNeko/mtg

mtglib/internal/dc/view.go

Исходный файл и его история в репозитории.
FILE 2544c521ed2ed6d5d3c07876948e709855f2c583
Files
mtg/mtglib/internal/dc/view.go
T
9seconds 1fcec38aea Change IP address set priority
For a couple of releases we use collected IPs as a prioritized source
for connecting to Telegram. But apparently, they work way worse than it
should, and having connectivity to core ip ALWAYS gives better results.
Thus, this PR flips priorities, so users could have auto-update enabled
as a source of secondary addresses, not primary ones
2026-03-31 11:05:49 +02:00

24 lines
426 B
Go

package dc
type dcView struct {
publicConfigs dcAddrSet
}
func (d dcView) getV4(dc int) []Addr {
var addrs []Addr
addrs = append(addrs, defaultDCAddrSet.getV4(dc)...)
addrs = append(addrs, d.publicConfigs.getV4(dc)...)
return addrs
}
func (d dcView) getV6(dc int) []Addr {
var addrs []Addr
addrs = append(addrs, defaultDCAddrSet.getV6(dc)...)
addrs = append(addrs, d.publicConfigs.getV6(dc)...)
return addrs
}