mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-31 22:45:40 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f5a23584f | ||
|
|
17e5848178 |
@@ -4,6 +4,10 @@ This Changelog records major changes between versions.
|
|||||||
|
|
||||||
Not all changes are recorded. Please check git log for details.
|
Not all changes are recorded. Please check git log for details.
|
||||||
|
|
||||||
|
## Version 2.0.1
|
||||||
|
|
||||||
|
- Fix a crash with the random load balancing algorithm.
|
||||||
|
|
||||||
## Version 2.0.0
|
## Version 2.0.0
|
||||||
|
|
||||||
**This is a breaking change!** Please update the configuration file after upgrading.
|
**This is a breaking change!** Please update the configuration file after upgrading.
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ func NewClient(conf *config.Config) (c *Client, err error) {
|
|||||||
switch c.conf.Upstream.UpstreamSelector {
|
switch c.conf.Upstream.UpstreamSelector {
|
||||||
case config.NginxWRR:
|
case config.NginxWRR:
|
||||||
if c.conf.Other.Verbose {
|
if c.conf.Other.Verbose {
|
||||||
log.Println(config.NginxWRR, " mode start")
|
log.Println(config.NginxWRR, "mode start")
|
||||||
}
|
}
|
||||||
|
|
||||||
s := selector.NewNginxWRRSelector(time.Duration(c.conf.Other.Timeout) * time.Second)
|
s := selector.NewNginxWRRSelector(time.Duration(c.conf.Other.Timeout) * time.Second)
|
||||||
@@ -175,7 +175,7 @@ func NewClient(conf *config.Config) (c *Client, err error) {
|
|||||||
|
|
||||||
case config.LVSWRR:
|
case config.LVSWRR:
|
||||||
if c.conf.Other.Verbose {
|
if c.conf.Other.Verbose {
|
||||||
log.Println(config.LVSWRR, " mode start")
|
log.Println(config.LVSWRR, "mode start")
|
||||||
}
|
}
|
||||||
|
|
||||||
s := selector.NewLVSWRRSelector(time.Duration(c.conf.Other.Timeout) * time.Second)
|
s := selector.NewLVSWRRSelector(time.Duration(c.conf.Other.Timeout) * time.Second)
|
||||||
@@ -195,7 +195,7 @@ func NewClient(conf *config.Config) (c *Client, err error) {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if c.conf.Other.Verbose {
|
if c.conf.Other.Verbose {
|
||||||
log.Println(config.Random, " mode start")
|
log.Println(config.Random, "mode start")
|
||||||
}
|
}
|
||||||
|
|
||||||
// if selector is invalid or random, use random selector, or should we stop program and let user knows he is wrong?
|
// if selector is invalid or random, use random selector, or should we stop program and let user knows he is wrong?
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func (rs *RandomSelector) Add(url string, upstreamType UpstreamType) (err error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (rs *RandomSelector) Get() *Upstream {
|
func (rs *RandomSelector) Get() *Upstream {
|
||||||
return rs.upstreams[rand.Intn(len(rs.upstreams)-1)]
|
return rs.upstreams[rand.Intn(len(rs.upstreams))]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rs *RandomSelector) StartEvaluate() {}
|
func (rs *RandomSelector) StartEvaluate() {}
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
const (
|
const (
|
||||||
VERSION = "2.0.0"
|
VERSION = "2.0.1"
|
||||||
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
const (
|
const (
|
||||||
VERSION = "2.0.0"
|
VERSION = "2.0.1"
|
||||||
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user