mirror of
https://github.com/teacat/chaturbate-dvr.git
synced 2025-10-29 16:59:59 +00:00
DefaultTransport for SOCK5 support #103
This commit is contained in:
parent
e9a2a02494
commit
131870c0e5
@ -28,9 +28,15 @@ func NewReq() *Req {
|
|||||||
|
|
||||||
// CreateTransport initializes a custom HTTP transport.
|
// CreateTransport initializes a custom HTTP transport.
|
||||||
func CreateTransport() *http.Transport {
|
func CreateTransport() *http.Transport {
|
||||||
return &http.Transport{
|
// The DefaultTransport allows user changes the proxy settings via environment variables
|
||||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
// 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.
|
// Get sends an HTTP GET request and returns the response as a string.
|
||||||
|
|||||||
2
main.go
2
main.go
@ -30,7 +30,7 @@ const logo = `
|
|||||||
func main() {
|
func main() {
|
||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "chaturbate-dvr",
|
Name: "chaturbate-dvr",
|
||||||
Version: "2.0.0",
|
Version: "2.0.1",
|
||||||
Usage: "Record your favorite Chaturbate streams automatically. 😎🫵",
|
Usage: "Record your favorite Chaturbate streams automatically. 😎🫵",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user