diff --git a/internal/internal_req.go b/internal/internal_req.go index 5061296..982d9c1 100644 --- a/internal/internal_req.go +++ b/internal/internal_req.go @@ -28,9 +28,15 @@ func NewReq() *Req { // CreateTransport initializes a custom HTTP transport. func CreateTransport() *http.Transport { - return &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + // The DefaultTransport allows user changes the proxy settings via environment variables + // such as HTTP_PROXY, HTTPS_PROXY. + defaultTransport := http.DefaultTransport.(*http.Transport) + + newTransport := defaultTransport.Clone() + newTransport.TLSClientConfig = &tls.Config{ + InsecureSkipVerify: true, } + return newTransport } // Get sends an HTTP GET request and returns the response as a string. diff --git a/main.go b/main.go index e9f3cbf..aee524c 100644 --- a/main.go +++ b/main.go @@ -30,7 +30,7 @@ const logo = ` func main() { app := &cli.App{ Name: "chaturbate-dvr", - Version: "2.0.0", + Version: "2.0.1", Usage: "Record your favorite Chaturbate streams automatically. 😎🫵", Flags: []cli.Flag{ &cli.StringFlag{