mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
Enable splice for freedom outbound (downlink only)
- Add outbound name - Add outbound conn in ctx - Refactor splice: it can be turn on from all inbounds and outbounds - Refactor splice: Add splice copy to vless inbound - Fix http error test - Add freedom splice toggle via env var - Populate outbound obj in context - Use CanSpliceCopy to mark a connection - Turn off splice by default
This commit is contained in:
parent
ae2fa30e01
commit
efd32b0fb2
32 changed files with 282 additions and 168 deletions
|
@ -63,11 +63,11 @@ func (s *Server) Network() []net.Network {
|
|||
|
||||
// Process implements proxy.Inbound.
|
||||
func (s *Server) Process(ctx context.Context, network net.Network, conn stat.Connection, dispatcher routing.Dispatcher) error {
|
||||
if inbound := session.InboundFromContext(ctx); inbound != nil {
|
||||
inbound.Name = "socks"
|
||||
inbound.User = &protocol.MemoryUser{
|
||||
Level: s.config.UserLevel,
|
||||
}
|
||||
inbound := session.InboundFromContext(ctx)
|
||||
inbound.Name = "socks"
|
||||
inbound.SetCanSpliceCopy(2)
|
||||
inbound.User = &protocol.MemoryUser{
|
||||
Level: s.config.UserLevel,
|
||||
}
|
||||
|
||||
switch network {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue