{"modulePath":"github.com/appleboy/CodeGPT","version":"v1.8.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package proxy\n\n## Functions\n\n```go\nfunc New(opts ...Option) (*http.Client, error)\n```\nNew creates a new HTTP client with the provided options. It configures the client with optional TLS settings, proxy settings, and custom headers.\n\nParameters:\n\n\topts - A variadic list of Option functions to configure the client.\n\nReturns:\n\n\t*http.Client - A pointer to the configured HTTP client.\n\terror - An error if the proxy URL is invalid or if there is an issue connecting to the SOCKS5 proxy.\n\n## Types\n\n```go\ntype Option interface {\n\t// contains filtered or unexported methods\n}\n```\nOption is an interface that specifies instrumentation configuration options.\n\n```go\nfunc WithHeaders(headers []string) Option\n```\nWithHeaders returns a new Option that sets the headers for the http client configuration.\n\n```go\nfunc WithProxyURL(val string) Option\n```\nWithProxyURL is a function that returns an Option, which sets the proxyURL field of the config struct.\n\n```go\nfunc WithSkipVerify(insecure bool) Option\n```\nWithSkipVerify returns a new Option that sets the insecure flag for the http client configuration.\n\n```go\nfunc WithSocksURL(val string) Option\n```\nWithSocksURL is a function that returns an Option, which sets the socksURL field of the config struct.\n\n```go\nfunc WithTimeout(val time.Duration) Option\n```\nWithTimeout returns a new Option that sets the timeout for the client configuration. It takes a time.Duration value representing the timeout duration. It returns an optionFunc that sets the timeout field of the configuration to the provided value.\n\n","path":"github.com/appleboy/CodeGPT/proxy","name":"proxy","synopsis":"","isRedistributable":true}
