Игнорирование ошибок TLS
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
|||||||
"axenov/iptv-checker/app/playlist"
|
"axenov/iptv-checker/app/playlist"
|
||||||
"axenov/iptv-checker/app/tagfile"
|
"axenov/iptv-checker/app/tagfile"
|
||||||
"axenov/iptv-checker/app/utils"
|
"axenov/iptv-checker/app/utils"
|
||||||
|
"crypto/tls"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
@@ -160,6 +161,7 @@ func CheckChannels(pls playlist.Playlist) playlist.Playlist {
|
|||||||
|
|
||||||
tvChannel.Tags = getTagsForChannel(tvChannel)
|
tvChannel.Tags = getTagsForChannel(tvChannel)
|
||||||
|
|
||||||
|
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||||
req, err := http.NewRequest("GET", tvChannel.URL, nil)
|
req, err := http.NewRequest("GET", tvChannel.URL, nil)
|
||||||
tvChannel.CheckedAt = time.Now().Unix()
|
tvChannel.CheckedAt = time.Now().Unix()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package utils
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
|
"crypto/tls"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
@@ -55,6 +56,7 @@ func Fetch(url string) ([]byte, error) {
|
|||||||
"Mozilla/5.0 WINK/1.31.1 (AndroidTV/9) HlsWinkPlayer",
|
"Mozilla/5.0 WINK/1.31.1 (AndroidTV/9) HlsWinkPlayer",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||||
httpClient := http.Client{Timeout: 5 * time.Second}
|
httpClient := http.Client{Timeout: 5 * time.Second}
|
||||||
resp, err := httpClient.Do(req)
|
resp, err := httpClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user