mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
18 lines
299 B
Go
18 lines
299 B
Go
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
|
|
}
|
|
}
|