mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2025-12-11 14:19:38 +05:00
greeting message and some improvements
This commit is contained in:
@@ -44,3 +44,40 @@ func Log(what ...any) {
|
||||
fmt.Println(what...)
|
||||
}
|
||||
}
|
||||
|
||||
var ImageClient *fasthttp.HostClient
|
||||
var HlsClient *fasthttp.HostClient
|
||||
var HlsAacClient *fasthttp.HostClient
|
||||
|
||||
func init() {
|
||||
if cfg.Restream || cfg.ProxyImages {
|
||||
ImageClient = &fasthttp.HostClient{
|
||||
Addr: cfg.ImageCDN + ":443",
|
||||
IsTLS: true,
|
||||
DialDualStack: true,
|
||||
Dial: (&fasthttp.TCPDialer{DNSCacheDuration: cfg.DNSCacheTTL}).Dial,
|
||||
MaxIdleConnDuration: 1<<63 - 1,
|
||||
StreamResponseBody: true,
|
||||
}
|
||||
}
|
||||
|
||||
if cfg.Restream || cfg.ProxyStreams {
|
||||
HlsClient = &fasthttp.HostClient{
|
||||
Addr: cfg.HLSCDN + ":443",
|
||||
IsTLS: true,
|
||||
DialDualStack: true,
|
||||
Dial: (&fasthttp.TCPDialer{DNSCacheDuration: cfg.DNSCacheTTL}).Dial,
|
||||
MaxIdleConnDuration: 1<<63 - 1,
|
||||
StreamResponseBody: true,
|
||||
}
|
||||
|
||||
HlsAacClient = &fasthttp.HostClient{
|
||||
Addr: cfg.HLSAACCDN + ":443",
|
||||
IsTLS: true,
|
||||
DialDualStack: true,
|
||||
Dial: (&fasthttp.TCPDialer{DNSCacheDuration: cfg.DNSCacheTTL}).Dial,
|
||||
MaxIdleConnDuration: 1<<63 - 1,
|
||||
StreamResponseBody: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user