mirror of
				https://github.com/optim-enterprises-bv/Xray-core.git
				synced 2025-11-04 04:28:00 +00:00 
			
		
		
		
	Reformat code
This commit is contained in:
		@@ -3,11 +3,10 @@ package protocol
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"runtime"
 | 
						"runtime"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"golang.org/x/sys/cpu"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"github.com/xtls/xray-core/common/bitmask"
 | 
						"github.com/xtls/xray-core/common/bitmask"
 | 
				
			||||||
	"github.com/xtls/xray-core/common/net"
 | 
						"github.com/xtls/xray-core/common/net"
 | 
				
			||||||
	"github.com/xtls/xray-core/common/uuid"
 | 
						"github.com/xtls/xray-core/common/uuid"
 | 
				
			||||||
 | 
						"golang.org/x/sys/cpu"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// RequestCommand is a custom command in a proxy request.
 | 
					// RequestCommand is a custom command in a proxy request.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -485,7 +485,7 @@ func XtlsPadding(b *buf.Buffer, command byte, userUUID *[]byte, longPadding bool
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		paddingLen = int32(l.Int64())
 | 
							paddingLen = int32(l.Int64())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if paddingLen > buf.Size - 21 - contentLen {
 | 
						if paddingLen > buf.Size-21-contentLen {
 | 
				
			||||||
		paddingLen = buf.Size - 21 - contentLen
 | 
							paddingLen = buf.Size - 21 - contentLen
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	newbuffer := buf.New()
 | 
						newbuffer := buf.New()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,7 +37,6 @@ func NewDNS(ctx context.Context, config interface{}) (interface{}, error) {
 | 
				
			|||||||
	buf := make([]byte, 0x100)
 | 
						buf := make([]byte, 0x100)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	off1, err := dns.PackDomainName(dns.Fqdn(config.(*Config).Domain), buf, 0, nil, false)
 | 
						off1, err := dns.PackDomainName(dns.Fqdn(config.(*Config).Domain), buf, 0, nil, false)
 | 
				
			||||||
 | 
					 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -240,8 +240,10 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
 | 
				
			|||||||
	return uConn, nil
 | 
						return uConn, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var href = regexp.MustCompile(`href="([/h].*?)"`)
 | 
					var (
 | 
				
			||||||
var dot = []byte(".")
 | 
						href = regexp.MustCompile(`href="([/h].*?)"`)
 | 
				
			||||||
 | 
						dot  = []byte(".")
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var maps struct {
 | 
					var maps struct {
 | 
				
			||||||
	sync.Mutex
 | 
						sync.Mutex
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user