ws和wss的path参数url解码后发送
http代理connect方法支持host参数自定义 Proxy-Agent修改为nginx
This commit is contained in:
10
client.go
10
client.go
@ -222,6 +222,7 @@ type ConnectOptions struct {
|
||||
UserAgent string
|
||||
NoTLS bool
|
||||
NoDelay bool
|
||||
Host string
|
||||
HeaderConfig map[string]string
|
||||
}
|
||||
|
||||
@ -277,9 +278,16 @@ func NoDelayConnectOption(b bool) ConnectOption {
|
||||
}
|
||||
}
|
||||
|
||||
// HeaderConnectOption specifies the NoDelay option for ss.Connect.
|
||||
// HeaderConnectOption specifies the Header option for ss.Connect.
|
||||
func HeaderConnectOption(HeaderConfig map[string]string) ConnectOption {
|
||||
return func(opts *ConnectOptions) {
|
||||
opts.HeaderConfig = HeaderConfig
|
||||
}
|
||||
}
|
||||
|
||||
// HostConnectOption specifies the host for connect.
|
||||
func HostConnectOption(host string) ConnectOption {
|
||||
return func(opts *ConnectOptions) {
|
||||
opts.Host = host
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user