mirror of
				https://github.com/optim-enterprises-bv/Xray-core.git
				synced 2025-10-31 02:27:53 +00:00 
			
		
		
		
	 7086d286be
			
		
	
	7086d286be
	
	
	
		
			
			* Add feature migration notice * Remove legacy code of transport processing * Clear legacy proto field * Fix missing * Unify protocolname * Test remove * Supressor * Weird code * Remove errorgen related comments
		
			
				
	
	
		
			18 lines
		
	
	
		
			476 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			476 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package encoding
 | |
| 
 | |
| import (
 | |
| 	"github.com/xtls/xray-core/common/net"
 | |
| 	"github.com/xtls/xray-core/common/protocol"
 | |
| )
 | |
| 
 | |
| const (
 | |
| 	Version = byte(1)
 | |
| )
 | |
| 
 | |
| var addrParser = protocol.NewAddressParser(
 | |
| 	protocol.AddressFamilyByte(byte(protocol.AddressTypeIPv4), net.AddressFamilyIPv4),
 | |
| 	protocol.AddressFamilyByte(byte(protocol.AddressTypeDomain), net.AddressFamilyDomain),
 | |
| 	protocol.AddressFamilyByte(byte(protocol.AddressTypeIPv6), net.AddressFamilyIPv6),
 | |
| 	protocol.PortThenAddress(),
 | |
| )
 |