mirror of https://github.com/XTLS/Xray-core
Update inbound.go
parent
6417c77181
commit
8c4e998ca0
|
@ -197,7 +197,9 @@ func (h *Handler) GetReverse(a *vless.MemoryAccount) (*Reverse, error) {
|
||||||
if r == nil {
|
if r == nil {
|
||||||
picker, _ := reverse.NewStaticMuxPicker()
|
picker, _ := reverse.NewStaticMuxPicker()
|
||||||
r = &Reverse{tag: a.Reverse.Tag, picker: picker, client: &mux.ClientManager{Picker: picker}}
|
r = &Reverse{tag: a.Reverse.Tag, picker: picker, client: &mux.ClientManager{Picker: picker}}
|
||||||
|
for len(h.outboundHandlerManager.ListHandlers(h.ctx)) == 0 {
|
||||||
runtime.Gosched() // prevents this outbound from becoming the default outbound
|
runtime.Gosched() // prevents this outbound from becoming the default outbound
|
||||||
|
}
|
||||||
if err := h.outboundHandlerManager.AddHandler(h.ctx, r); err != nil {
|
if err := h.outboundHandlerManager.AddHandler(h.ctx, r); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -547,9 +549,8 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection s
|
||||||
switch request.Command {
|
switch request.Command {
|
||||||
case protocol.RequestCommandUDP:
|
case protocol.RequestCommandUDP:
|
||||||
return errors.New(requestAddons.Flow + " doesn't support UDP").AtWarning()
|
return errors.New(requestAddons.Flow + " doesn't support UDP").AtWarning()
|
||||||
case protocol.RequestCommandRvs:
|
case protocol.RequestCommandMux, protocol.RequestCommandRvs:
|
||||||
inbound.CanSpliceCopy = 3
|
inbound.CanSpliceCopy = 3
|
||||||
case protocol.RequestCommandMux:
|
|
||||||
fallthrough // we will break Mux connections that contain TCP requests
|
fallthrough // we will break Mux connections that contain TCP requests
|
||||||
case protocol.RequestCommandTCP:
|
case protocol.RequestCommandTCP:
|
||||||
var t reflect.Type
|
var t reflect.Type
|
||||||
|
|
Loading…
Reference in New Issue