mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 19:39:35 +03:00
Outbound: Add outbound sendThrough origin behavior (#4349)
* added support of sending through origin for outbounds * added strings package import * usage of net.SplitHostPort instead of manual splitting --------- Co-authored-by: poly <poly@>
This commit is contained in:
@ -292,7 +292,9 @@ func (c *OutboundDetourConfig) Build() (*core.OutboundHandlerConfig, error) {
|
||||
senderSettings.ViaCidr = strings.Split(*c.SendThrough, "/")[1]
|
||||
} else {
|
||||
if address.Family().IsDomain() {
|
||||
return nil, errors.New("unable to send through: " + address.String())
|
||||
if address.Address.Domain() != "origin" {
|
||||
return nil, errors.New("unable to send through: " + address.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
senderSettings.Via = address.Build()
|
||||
|
Reference in New Issue
Block a user