mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Add DestIpAddress() in Dialer interface
Android client prepares an IP before proxy connection is established. It is useful when connecting to wireguard (or quic) outbound with domain address. E.g. engage.cloudflareclient.com:2408
This commit is contained in:
parent
5a5e615b46
commit
d60281d0a5
4 changed files with 91 additions and 3 deletions
|
@ -22,6 +22,9 @@ type Dialer interface {
|
|||
|
||||
// Address returns the address used by this Dialer. Maybe nil if not known.
|
||||
Address() net.Address
|
||||
|
||||
// DestIpAddress returns the ip of proxy server. It is useful in case of Android client, which prepare an IP before proxy connection is established
|
||||
DestIpAddress() net.IP
|
||||
}
|
||||
|
||||
// dialFunc is an interface to dial network connection to a specific destination.
|
||||
|
@ -68,6 +71,11 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *MemoryStrea
|
|||
return nil, newError("unknown network ", dest.Network)
|
||||
}
|
||||
|
||||
// DestIpAddress returns the ip of proxy server. It is useful in case of Android client, which prepare an IP before proxy connection is established
|
||||
func DestIpAddress() net.IP {
|
||||
return effectiveSystemDialer.DestIpAddress()
|
||||
}
|
||||
|
||||
var (
|
||||
dnsClient dns.Client
|
||||
obm outbound.Manager
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue