go-mega
go-mega copied to clipboard
SetProxy
I thought SetProxy
could be useful. Maybe this can be added in the future.
// SetProxy sets a Proxy for the HTTP client
func (m *Mega) SetProxy(proxy string) {
proxyURL, _ := url.Parse(proxy)
transport := &http.Transport{
Proxy: http.ProxyURL(proxyURL),
}
m.client.Transport = transport
}