How to creat a global proxy on openwrt

I try to use v2ray on my router. It need to open global proxy when it run on desktop(ubuntu).
I think if it runs on router. it also need proxy
so I modify the profile on openwrt /etc/profile add
export http_proxy=http://127.0.0.1:1080
export https_proxy=$http_proxy

But it steel not work.
So how to set a global proxy on openwrt? how can I use v2ray on openwrt