Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
fix(opml): proxy error
Browse files Browse the repository at this point in the history
  • Loading branch information
indes committed Jul 9, 2019
1 parent 1a85a4a commit e220cd2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bot/opml.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,17 @@ func NewOPML(b []byte) (*OPML, error) {
}

func GetOPMLByURL(file_url string) (*OPML, error) {
var proxy *url.URL

if socks5Proxy != "" {
proxy, _ = url.Parse("socks5://" + socks5Proxy)
}

proxy, _ := url.Parse("socks5://" + socks5Proxy)
tr := &http.Transport{
Proxy: http.ProxyURL(proxy),
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}

client := &http.Client{
Transport: tr,
Timeout: time.Second * 5,
Expand Down

0 comments on commit e220cd2

Please sign in to comment.