V2Ray Client on RouterOS

Hi, I’ve discovered that we can run a V2Ray server from a mikrotik router using docker containers. But, can we connect to an existing V2Ray server as a client from routeros then route all network traffic through that connection as of a normal VPN connection? I didn’t find any useful guides on the web and I hope that someone can show me the way if it’s possible. It would be very helpful. Thanks

I have setup with Shadowsocks server in ROS container with v2ray plugin over TLS and with port tunnel setup, using ss-tunnel client on computer to open local port tunneled to ss-server I’m able to connect local Wireguard to ROS Wireguard. Trough that Wireguard connection I have internet connection over my home router connection (DNS resolving is also over Pi-hole in ROS container) and access to local LAN devices (all over Shadowsocks tunnel).
I’m aware that this is not your case but to point out that you can create something similar since you cannot create routing in ROS over socks/http proxy server in container (afaik), but you can create port tunnel with v2ray client in container to v2ray server and use it for establishing VPN (eg. Wireguard) connection, LAN connections in ROS then can be routed over that VPN.

Can you explain how? a lot of Iranians waiting for you answer :slight_smile:)

1 Like

I be interested to see how it’s done/works as well :slight_smile:

I don’t have Shadowsocks configuration any more since I switched to Xray using different protocol (vless-xtls-reality). But Xray also supports Shadowsocks protocol, it can be configured for it, but it is limited regarding tunneling, it can only tunnel connection to port over same IP protocol (TCP or UDP), for eg. you cannot tunnel Wireguard over TCP 443 using it.
Here is example how did it using Xray, this is Wireguard tunnel from remote computer over Xray client to Xray in ROS container and ROS Wireguard making available to access local LAN and routing internet connection over that tunnel.
It would be also possible to accomplish site-to-site tunnel on similar way, but I don’t have such configuration since I do not need it.

Thanks for sharing your experience! It’s interesting to see how you’ve transitioned to Xray with the vless-xtls-reality protocol. I appreciate the insight on the limitations with Shadowsocks tunneling, especially regarding port restrictions. Your example with Wireguard over Xray sounds like a great setup for remote access and routing internet traffic. If you ever explore a site-to-site tunnel configuration, it would be awesome to hear how it goes. Thanks again for the detailed explanation! Direct2HR

I recommend this repo to you and there is also a video about it.

v2ray on mikrotik