Skip to content

Commit

Permalink
fix websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
wyx2685 committed Dec 18, 2024
1 parent fd4b420 commit 8b9c675
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions core/sing/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
switch v.Network {
case "tcp":
t.Type = ""
case "ws":
case "ws", "websocket":
var (
path string
ed int
Expand Down Expand Up @@ -187,7 +187,7 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
switch v.Network {
case "tcp":
t.Type = ""
case "ws":
case "ws", "websocket":
var (
path string
ed int
Expand Down Expand Up @@ -277,7 +277,7 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
switch v.Network {
case "tcp":
t.Type = ""
case "ws":
case "ws", "websocket":
var (
path string
ed int
Expand Down
8 changes: 4 additions & 4 deletions core/xray/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func buildInbound(option *conf.Options, nodeInfo *panel.NodeInfo, tag string) (*
} //Enable proxy protocol
in.StreamSetting.TCPSettings = tcpSetting
}
case "ws":
case "ws", "websocket":
if in.StreamSetting.WSSettings != nil {
in.StreamSetting.WSSettings.AcceptProxyProtocol = option.XrayOptions.EnableProxyProtocol
} else {
Expand Down Expand Up @@ -202,7 +202,7 @@ func buildVless(config *conf.Options, nodeInfo *panel.NodeInfo, inbound *coreCon
switch v.Network {
case "tcp":
inbound.StreamSetting.TCPSettings = &coreConf.TCPConfig{}
case "ws":
case "ws", "websocket":
inbound.StreamSetting.WSSettings = &coreConf.WebSocketConfig{
Host: v.TransportConfig.Host,
Path: v.TransportConfig.Path,
Expand Down Expand Up @@ -238,7 +238,7 @@ func buildVmess(_ *conf.Options, nodeInfo *panel.NodeInfo, inbound *coreConf.Inb
switch v.Network {
case "tcp":
inbound.StreamSetting.TCPSettings = &coreConf.TCPConfig{}
case "ws":
case "ws", "websocket":
inbound.StreamSetting.WSSettings = &coreConf.WebSocketConfig{
Host: v.TransportConfig.Host,
Path: v.TransportConfig.Path,
Expand Down Expand Up @@ -287,7 +287,7 @@ func buildTrojan(config *conf.Options, nodeInfo *panel.NodeInfo, inbound *coreCo
switch network {
case "tcp":
inbound.StreamSetting.TCPSettings = &coreConf.TCPConfig{}
case "ws":
case "ws", "websocket":
inbound.StreamSetting.WSSettings = &coreConf.WebSocketConfig{
Host: v.TransportConfig.Host,
Path: v.TransportConfig.Path,
Expand Down

0 comments on commit 8b9c675

Please sign in to comment.