use v2ray proxy settings in cmd for python command

963 Views Asked by At

I have a django project and I should run it like this python manage.py runserver in process of running the program it needs to connect to an IP which is blocked in my location and I want to use my v2ray config to access that IP but v2rayN app doesn't affect cmd

I found this solution to set proxy for git git config --global http.proxy http://proxyUsername:[email protected]:port can I use it on python as well? and I don't know what should I fill proxyUserName, ProxyPassword, proxy.server.com and port. I only have my vmess connection code can you help me extract these information from my vmess code?

2

There are 2 best solutions below

0
mir naim hoseyni On

run v2rayN as administrator, then a toggle button will appear, labeled "Enable Tun". I think that will solve your problem.

0
Sohbati On

In the "v2ray UI" click on "Copy HTTP proxy Shell Export Line"

The MacOS export is something like this:

export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;export ALL_PROXY=socks5://127.0.0.1:1080

Run this line in the terminal(command line) Then run your commands