Community discussions

MikroTik App
luciferm
刚刚加入了
Topic Author
Posts: 13
加入: Sat May 13, 2017 7:41 am

run flag in container

Fri Dec 23, 2022 10:12 am

i want to runhttps://v2raya.org/en/docs/prologue/ins ... on/docker/this on mikrotik container when i install the image normally it work but transparent proxy of the container wont work.
to run that correctly it should be run with the command bellow
Code:Select all
# run v2raya docker run -d \ --restart=always \ --privileged \ --network=host \ --name v2raya \ -e V2RAYA_ADDRESS=0.0.0.0:2017 \ -v /lib/modules:/lib/modules:ro \ -v /etc/resolv.conf:/etc/resolv.conf \ -v /etc/v2raya:/etc/v2raya \ mzz2017/v2raya
but i don't know how to run this like that can anybody help me with this
Top
ccbb
刚刚加入了
Posts: 5
加入: Thu Dec 22, 2022 2:26 pm

Re: run flag in container

Sat Dec 24, 2022 5:22 pm

If you use Mac OS X or other environments that do not support host mode, you cannot use the global transparent proxy in this case, or you do not want to use the global transparent proxy, the Docker command will be slightly different:
docker run -d \
-p 2017:2017 \
-p 20170-20172:20170-20172 \
--restart=always \
--name v2raya \
-v /etc/v2raya:/etc/v2raya \
mzz2017/v2raya
Top
luciferm
刚刚加入了
Topic Author
Posts: 13
加入: Sat May 13, 2017 7:41 am

Re: run flag in container

Sat Dec 24, 2022 6:49 pm

i know that but a global transparent proxy will be very useful in a router. i just want to know that mikrotik going to add ability to running container with flag or not? a lot off containers need to be run in privilege modes.
Top
用户头像
Amm0
Forum Guru
Forum Guru
Posts: 2246
加入: Sun May 01, 2016 7:12 pm
Location:California

Re: run flag in container

Sat Dec 24, 2022 7:16 pm

If I had to guess, probably not anytime soon. The ability to gain root on the router is something they guard against. So if you could do that by container with one commands like "/container ... privileged=yes", goes against that.

They have said TAP/TUN is on their list, but you're looking for the more than that:
viewtopic.php?p=959219&hilit=TAP%2FTUN#p959219
Top
fakeusername2022
newbie
Posts: 36
加入: Sun Aug 14, 2022 4:36 pm

Re: run flag in container

Thu Feb 16, 2023 12:28 am

i want to runhttps://v2raya.org/en/docs/prologue/ins ... on/docker/this on mikrotik container when i install the image normally it work but transparent proxy of the container wont work.
to run that correctly it should be run with the command bellow
Code:Select all
# run v2raya docker run -d \ --restart=always \ --privileged \ --network=host \ --name v2raya \ -e V2RAYA_ADDRESS=0.0.0.0:2017 \ -v /lib/modules:/lib/modules:ro \ -v /etc/resolv.conf:/etc/resolv.conf \ -v /etc/v2raya:/etc/v2raya \ mzz2017/v2raya
but i don't know how to run this like that can anybody help me with this

YOU CANNOT! And it has nothing to do with the RUN mode of the container!
The bigger problem is that there is no Tproxy Kernel module loaded into the RouterOS kernel and what you are trying to use depends on Tproxy (take a look at the source code here:https://github.com/v2rayA/v2rayA/blob/f ... /tproxy.go)

you can find more details and explanation here in this postviewtopic.php?p=984485

The ultimate solution could come from the Mikrotik Dev team to compile and add other Iptables Modules into the RouterOS Kernel in order to allow containers taking advantage of them...
Top
fakeusername2022
newbie
Posts: 36
加入: Sun Aug 14, 2022 4:36 pm

Re: run flag in container

Fri Feb 17, 2023 9:35 am

i want to runhttps://v2raya.org/en/docs/prologue/ins ... on/docker/this on mikrotik container when i install the image normally it work but transparent proxy of the container wont work.
to run that correctly it should be run with the command bellow
Code:Select all
# run v2raya docker run -d \ --restart=always \ --privileged \ --network=host \ --name v2raya \ -e V2RAYA_ADDRESS=0.0.0.0:2017 \ -v /lib/modules:/lib/modules:ro \ -v /etc/resolv.conf:/etc/resolv.conf \ -v /etc/v2raya:/etc/v2raya \ mzz2017/v2raya
but i don't know how to run this like that can anybody help me with this
So you will not be able to use the V2Raya since it relies on some Iptables Kernel Modules which are not loaded into the RouterOS kernel (e.g. TProxy). What else can be done?! Try the Tun2Socks approach. That's already what is being done on the client sides of Android phones to run the app in full system VPN mode.
There are several implementations of TUN2Socks. The oldest one is BadVPN which is 15 years old and not maintained anymore. A recent one with better performance written in C ishttps://github.com/heiher/hev-socks5-tunnel/
You will need to do Source Based Routing and manipulate routing table of the Container and also use some nat/masq with the Container's Iptable to deploy it as a transparent proxy or VPN tunnel on your Mikrotik, however that is not the hard part.
Wish Mikrotik offered built-in support of the xRay [https://github.com/XTLS/] in the future...
Top

Who is online

Users browsing this forum: No registered users and 1 guest