All Downloads are FREE. Search and download functionalities are using the official Maven repository.

common.proxy.check.go Maven / Gradle / Ivy

The newest version!
package proxy

import (
	"errors"
	"net/url"
	"strings"
)

var errUnsupportedProxyType = errors.New("unsupported proxy type")

func CheckProxyProtocolSupport(proxy *url.URL) error {
	switch strings.ToLower(proxy.Scheme) {
	case "socks5":
		return nil
	default:
		return errUnsupportedProxyType
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy