((install)) - V2ray Mikrotik
Complete Guide to Routing V2Ray Traffic Through MikroTik RouterOS
We will use a popular containerized V2Ray client (like ccrsxx/v2ray-client or similar) to connect to your remote V2Ray server.
/ip firewall address-list add address=192.168.88.50 list=Proxy_Devices add address=192.168.88.60 list=Proxy_Devices /ip firewall mangle add chain=prerouting src-address-list=Proxy_Devices dst-address-type=!local \ action=mark-routing new-routing-mark=to_v2ray passthrough=yes Use code with caution. v2ray mikrotik
/ip firewall mangle add chain=prerouting connection-mark=v2ray-conn action=mark-routing new-routing-mark=to-v2ray
Create a mount point in RouterOS:%%MAGIT_PARSER_PROTECT%% disk container mounts add name=v2ray_config src=v2ray/config.json dst=/etc/v2ray/config.json Step 3: Pull and Start the Container Complete Guide to Routing V2Ray Traffic Through MikroTik
Setting up a V2Ray client on MikroTik typically involves two containers to handle the proxying and the routing.
The 3x-ui image is a popular choice as it provides a web-based panel for managing users, traffic, and settings. The 3x-ui image is a popular choice as
interface and a bridge to allow the container to communicate with the router's internal network. Policy Based Routing (PBR) Mangle rules
# Create a virtual ethernet interface for the container /interface/veth/add name=veth-v2ray address=172.16.10.2/24 gateway=172.16.10.1 # Create a bridge to link the virtual interface /interface/bridge/add name=bridge-v2ray /interface/bridge/port/add bridge=bridge-v2ray interface=veth-v2ray # Assign the gateway IP to the router's bridge side /ip/address/add address=172.16.10.1/24 interface=bridge-v2ray Use code with caution. Step 3: Set Up the V2Ray Container Environment
Ensure your router is updated to support containerization.