mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-08-09 19:01:47 +00:00
Split host & port in the protocol, and make each domain resolves only once even when ACL is enabled, improving performance and ensuring consistency of connection destinations
This commit is contained in:
@@ -32,9 +32,10 @@ type serverHello struct {
|
||||
}
|
||||
|
||||
type clientRequest struct {
|
||||
UDP bool
|
||||
AddressLen uint16 `struc:"sizeof=Address"`
|
||||
Address string
|
||||
UDP bool
|
||||
HostLen uint16 `struc:"sizeof=Host"`
|
||||
Host string
|
||||
Port uint16
|
||||
}
|
||||
|
||||
type serverResponse struct {
|
||||
@@ -45,9 +46,10 @@ type serverResponse struct {
|
||||
}
|
||||
|
||||
type udpMessage struct {
|
||||
SessionID uint32
|
||||
AddressLen uint16 `struc:"sizeof=Address"`
|
||||
Address string
|
||||
DataLen uint16 `struc:"sizeof=Data"`
|
||||
Data []byte
|
||||
SessionID uint32
|
||||
HostLen uint16 `struc:"sizeof=Host"`
|
||||
Host string
|
||||
Port uint16
|
||||
DataLen uint16 `struc:"sizeof=Data"`
|
||||
Data []byte
|
||||
}
|
||||
|
Reference in New Issue
Block a user