openmptcprouter icon indicating copy to clipboard operation
openmptcprouter copied to clipboard

Add Xray gRPC transport support to bypass ISP connection limits

Open Naltozstiscnap opened this issue 1 month ago • 11 comments

Hello Ysurac,

First of all, thank you for this amazing project! I am using OpenMPTCProuter to aggregate a wired connection and a mobile (LTE/4G) connection.

The Problem: My mobile ISP seems to throttle or restrict bandwidth when it detects a high number of concurrent TCP connections (which happens naturally with OMR/Shadowsocks/VLESS without Mux). I tried enabling the standard Xray Mux feature over TCP to reduce the connection count, but I found it to be very unstable in my environment, causing frequent freezes and connection drops.

The Solution (gRPC): After some research, I found that Xray's gRPC transport mode is the perfect solution for this. It natively handles multiplexing (via HTTP/2) much better than the old TCP Mux, and it effectively hides the high connection count from the ISP, keeping the connection stable.

The Issue: I tried to configure Xray to use gRPC via UCI commands, but the OMR validation logic prevents it. It seems the validator script is outdated and does not recognize "grpc" as a valid transport option.

I received the following validation error in the logs: xray.omrout.ss_network=grpc validates as or("tcp", "kcp", "ws", "http", "domainsocket", "quic") with false

Request: Could you please add grpc to the allowed transport protocols list for Xray in the next release? It would be a huge help for users dealing with strict mobile ISPs.

My System Info:

OMR Version: 0.63-6.12

Proxy: Xray (VLESS)

Thank you for your help!

Naltozstiscnap avatar Nov 21 '25 09:11 Naltozstiscnap

I added gRPC and XHTTP transport support in XRay init script. I will add transport choice in wizard.

Ysurac avatar Nov 21 '25 13:11 Ysurac

Thank you very much for the incredibly fast response and the fix!

To test this right now, I assume I need to switch my system update channel to the Snapshot branch, is that correct?

Naltozstiscnap avatar Nov 21 '25 13:11 Naltozstiscnap

You need to download latest snaspshot on https://snapshots.openmptcprouter.com/6.12/ (not yet available, Github CI is still compiling it) and update your router with it.

Ysurac avatar Nov 21 '25 14:11 Ysurac

I installed the new snapshot image, but I can't find the gRPC function in the wizard.

Naltozstiscnap avatar Nov 24 '25 05:11 Naltozstiscnap

Also, there is an issue with the kernel configuration in the test-server VPS script. It failed to set the XanMod kernel as the default boot kernel.

The script first upgraded the system from Debian 12 to 13, then ran the OpenMPTCProuter install script, but the kernel switch didn't happen. The VPS booted with the default kernel. The XanMod kernel was successfully installed, but the system simply didn't boot with it.

I tried to manually switch to XanMod in the GRUB configuration but couldn't make it work, so I restored the VPS from a backup.

Naltozstiscnap avatar Nov 24 '25 05:11 Naltozstiscnap

gRPC is not in wizard for now (soon), but can be configured manually now via uci.

What is your kernel with Debian 13 ? Even without XanMod kernel, all should work, xanmod give some optimization.

Ysurac avatar Nov 24 '25 08:11 Ysurac

It was 6.12.57, if I remember correctly. But I didn't take a screenshot, so I can't say for sure.

Naltozstiscnap avatar Nov 24 '25 08:11 Naltozstiscnap

uci set openmptcprouter.settings.proxy='xray' uci set openmptcprouter.settings.v2ray_protocol='vless' uci set openmptcprouter.settings.v2ray_transport='grpc' uci set openmptcprouter.settings.v2ray_grpc_servicename='grpc-omr' uci set openmptcprouter.settings.v2ray_security='none' uci set openmptcprouter.settings.v2ray_usetls='0' uci set openmptcprouter.settings.v2ray_mux='0' uci commit openmptcprouter /etc/init.d/openmptcprouter restart

Are these the correct UCI commands?

Also, will the VPS automatically adapt to the new settings now that I've reverted it to the stable branch? Or do I absolutely need to update the VPS to the snapshot branch as well?

Naltozstiscnap avatar Nov 24 '25 08:11 Naltozstiscnap

No, you need to set "xray.omrout.ss_network" to the correct value. The is no "uci set openmptcprouter.settings.v2ray_*" entries, and support is only for Xray, not V2Ray. Xray configuration must also be changed on the VPS

Ysurac avatar Nov 24 '25 08:11 Ysurac

Understood. I'll give it a try this way. Thanks.

Do you plan to expose the xray multimode option in the Wizard under the 'Other settings' section? I have a high number of TCP connections, and I think it would be beneficial for me to use this feature. :)

Is it worth enabling it for thousands of TCP connections? I've never used it before, just read about it, and I'm curious.

Naltozstiscnap avatar Nov 24 '25 10:11 Naltozstiscnap

I think I will wait for the automated wizard configuration. I tried setting it up manually via UCI, but I couldn't get it to work properly. I reverted to using Glorytun TCP VPN only, which is stable for now.

Naltozstiscnap avatar Nov 25 '25 11:11 Naltozstiscnap

Hi, not sure if this will help. but enabling MPTCP over VPN will create single tunnel which won't be seen as multiple TCP connection therefore could be using to bypass your mobile ISP

Have you tried that before?

ccmks avatar Dec 16 '25 16:12 ccmks