mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 05:39:05 +08:00
services.xray: fix
This commit is contained in:
parent
843abfbef9
commit
2be529f590
@ -1,16 +1,14 @@
|
||||
diff --git a/disable-splice.patch b/disable-splice.patch
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
diff --git a/proxy/proxy.go b/proxy/proxy.go
|
||||
index 6a5a179..ca71241 100644
|
||||
index db92051..3c902ae 100644
|
||||
--- a/proxy/proxy.go
|
||||
+++ b/proxy/proxy.go
|
||||
@@ -474,7 +474,7 @@ func CopyRawConnIfExist(ctx context.Context, readerConn net.Conn, writerConn net
|
||||
readerConn, readCounter, _ := UnwrapRawConn(readerConn)
|
||||
writerConn, _, writeCounter := UnwrapRawConn(writerConn)
|
||||
reader := buf.NewReader(readerConn)
|
||||
- if inbound := session.InboundFromContext(ctx); inbound != nil {
|
||||
+ if inbound := session.InboundFromContext(ctx); false {
|
||||
if tc, ok := writerConn.(*net.TCPConn); ok && readerConn != nil && writerConn != nil && (runtime.GOOS == "linux" || runtime.GOOS == "android") {
|
||||
for inbound.CanSpliceCopy != 3 {
|
||||
if inbound.CanSpliceCopy == 1 {
|
||||
@@ -504,7 +504,8 @@ func CopyRawConnIfExist(ctx context.Context, readerConn net.Conn, writerConn net
|
||||
splice = false
|
||||
}
|
||||
}
|
||||
- if splice {
|
||||
+ _ := splice
|
||||
+ if false {
|
||||
newError("CopyRawConn splice").WriteToLog(session.ExportIDToError(ctx))
|
||||
statWriter, _ := writer.(*dispatcher.SizeStatWriter)
|
||||
//runtime.Gosched() // necessary
|
||||
|
Loading…
Reference in New Issue
Block a user