DefaultTransport for SOCK5 support #103

This commit is contained in:
Yami Odymel 2025-05-04 15:24:39 +08:00
parent e9a2a02494
commit 131870c0e5
No known key found for this signature in database
GPG Key ID: 68E469836934DB36
2 changed files with 9 additions and 3 deletions

View File

@ -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.

View File

@ -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{