0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-12 11:29:36 +03:00

Update proto file for websocket and httpupgrade (breaking)

This commit is contained in:
yuhan6665
2024-03-29 01:39:59 -04:00
committed by RPRX
parent 53e5814d19
commit e2302b421c
12 changed files with 121 additions and 194 deletions

View File

@ -154,12 +154,9 @@ type WebSocketConfig struct {
// Build implements Buildable.
func (c *WebSocketConfig) Build() (proto.Message, error) {
path := c.Path
header := make([]*websocket.Header, 0, 32)
header := make(map[string]string);
for key, value := range c.Headers {
header = append(header, &websocket.Header{
Key: key,
Value: value,
})
header[key] = value;
}
var ed uint32
if u, err := url.Parse(path); err == nil {