1
This commit is contained in:
parent
278bb81dd8
commit
ba1f3f83f0
@ -7,6 +7,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
"math/rand"
|
||||||
)
|
)
|
||||||
|
|
||||||
type downStreamHost struct {
|
type downStreamHost struct {
|
||||||
@ -189,6 +190,6 @@ func (this *sApiForward) GetDownStreamHost() (string, string) {
|
|||||||
newUrl := mt.Table.Config.GetById(0).GetRedirectUrl()
|
newUrl := mt.Table.Config.GetById(0).GetRedirectUrl()
|
||||||
return newUrl, ""
|
return newUrl, ""
|
||||||
}
|
}
|
||||||
downStream := downStreams[0]
|
downStream := downStreams[rand.Intn(len(downStreams))]
|
||||||
return downStream.url, downStream.host
|
return downStream.url, downStream.host
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user