mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Raise link error when SNI supplied on unsupported link type
Closes #1196
This commit is contained in:
parent
ff0ef7ff56
commit
eef613993f
6 changed files with 16 additions and 0 deletions
|
@ -23,6 +23,9 @@ func (l *links) newLinkSOCKS() *linkSOCKS {
|
|||
}
|
||||
|
||||
func (l *linkSOCKS) dial(_ context.Context, url *url.URL, info linkInfo, options linkOptions) (net.Conn, error) {
|
||||
if url.Scheme != "sockstls" && options.tlsSNI != "" {
|
||||
return nil, ErrLinkSNINotSupported
|
||||
}
|
||||
var proxyAuth *proxy.Auth
|
||||
if url.User != nil && url.User.Username() != "" {
|
||||
proxyAuth = &proxy.Auth{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue