mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 23:13:01 +00:00
JSON unmarshal is case insensitive in Golang Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
This commit is contained in:
parent
3c7189a3e7
commit
3bf3d96472
@ -141,7 +141,6 @@ func (c *TCPConfig) Build() (proto.Message, error) {
|
||||
|
||||
type WebSocketConfig struct {
|
||||
Path string `json:"path"`
|
||||
Path2 string `json:"Path"` // The key was misspelled. For backward compatibility, we have to keep track the old key.
|
||||
Headers map[string]string `json:"headers"`
|
||||
AcceptProxyProtocol bool `json:"acceptProxyProtocol"`
|
||||
}
|
||||
@ -149,9 +148,6 @@ type WebSocketConfig struct {
|
||||
// Build implements Buildable.
|
||||
func (c *WebSocketConfig) Build() (proto.Message, error) {
|
||||
path := c.Path
|
||||
if path == "" && c.Path2 != "" {
|
||||
path = c.Path2
|
||||
}
|
||||
header := make([]*websocket.Header, 0, 32)
|
||||
for key, value := range c.Headers {
|
||||
header = append(header, &websocket.Header{
|
||||
@ -509,7 +505,6 @@ type SocketConfig struct {
|
||||
AcceptProxyProtocol bool `json:"acceptProxyProtocol"`
|
||||
DomainStrategy string `json:"domainStrategy"`
|
||||
DialerProxy string `json:"dialerProxy"`
|
||||
|
||||
TCPKeepAliveInterval int32 `json:"tcpKeepAliveInterval"`
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user