Xray-core icon indicating copy to clipboard operation
Xray-core copied to clipboard

Xray outbound traffic to a different network interface

Open arashammm opened this issue 2 years ago • 4 comments

Here is a setup I would like to accomplish : Client connects to the xray (on linux) using interface ens1 device ip :192.168.23.21 xray than sends the outbound traffic to another interface (ens2) which is connected to internet / gateway ip : 10.1.1.1

is that accomplishable by xray itself? Does anyone have suggesstions?

arashammm avatar Mar 24 '23 09:03 arashammm

https://xtls.github.io/config/outbound.html#outboundobject Use sendthrough. You can get ip of interface from ifconfig command .

firefoxOnFire avatar Mar 24 '23 15:03 firefoxOnFire

https://xtls.github.io/config/outbound.html#outboundobject Use sendthrough. You can get ip of interface from ifconfig command .

I should put the ip of gateway of that interface in the sendthrough or the ip of my device itself?

arashammm avatar Mar 24 '23 22:03 arashammm

https://xtls.github.io/config/outbound.html#outboundobject Use sendthrough. You can get ip of interface from ifconfig command .

I should put the ip of gateway of that interface in the sendthrough or the ip of my device itself?

Ip of gateway.

firefoxOnFire avatar Mar 26 '23 06:03 firefoxOnFire

@firefoxOnFire you're wrong, sendthrough = local ip address

its0ka avatar Jan 16 '24 14:01 its0ka