go-mega icon indicating copy to clipboard operation
go-mega copied to clipboard

SetProxy

Open qb-0 opened this issue 3 months ago • 0 comments

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
}

qb-0 avatar Nov 28 '24 22:11 qb-0