Skip to content

Commit

Permalink
Merge branch 'XTLS:main' into main
Browse files Browse the repository at this point in the history
omengye authored Aug 4, 2024
2 parents b03baff + 4c9e4b9 commit e46e748
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@

[README](https://github.com/XTLS/Xray-core#readme) is open, so feel free to submit your project [here](https://github.com/XTLS/Xray-core/pulls).

## NFTs

[Announcement of NFTs by Project X](https://github.com/XTLS/Xray-core/discussions/3633)

## License

[Mozilla Public License Version 2.0](https://github.com/XTLS/Xray-core/blob/main/LICENSE)
5 changes: 5 additions & 0 deletions common/net/address.go
Original file line number Diff line number Diff line change
@@ -121,6 +121,11 @@ func IPAddress(ip []byte) Address {
}

// DomainAddress creates an Address with given domain.
// This is an internal function that forcibly converts a string to domain.
// It's mainly used in test files and mux.
// Unless you have a specific reason, use net.ParseAddress instead,
// as this function does not check whether the input is an IP address.
// Otherwise, you will get strange results like domain: 1.1.1.1
func DomainAddress(domain string) Address {
return domainAddress(domain)
}
2 changes: 1 addition & 1 deletion proxy/socks/protocol.go
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ func (s *ServerSession) handshake4(cmd byte, reader io.Reader, writer io.Writer)
if err != nil {
return nil, errors.New("failed to read domain for socks 4a").Base(err)
}
address = net.DomainAddress(domain)
address = net.ParseAddress(domain)
}

switch cmd {

0 comments on commit e46e748

Please sign in to comment.