mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-25 20:03:12 +03:00
Deprecate Socksaddr.IsFqdn: do not reject potentially valid domain names
This commit is contained in:
@@ -287,7 +287,7 @@ type DNSDialer struct {
|
||||
}
|
||||
|
||||
func (d *DNSDialer) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) {
|
||||
if destination.IsFqdn() {
|
||||
if destination.IsDomain() {
|
||||
panic("invalid request here")
|
||||
}
|
||||
for _, prefix := range d.transport.routePrefixes {
|
||||
@@ -299,7 +299,7 @@ func (d *DNSDialer) DialContext(ctx context.Context, network string, destination
|
||||
}
|
||||
|
||||
func (d *DNSDialer) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) {
|
||||
if destination.IsFqdn() {
|
||||
if destination.IsDomain() {
|
||||
panic("invalid request here")
|
||||
}
|
||||
for _, prefix := range d.transport.routePrefixes {
|
||||
|
||||
Reference in New Issue
Block a user