OpenVPN + Proxy + Random Remote

Scripts to manage certificates or generate config files

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
macchionitiziano
OpenVpn Newbie
Posts: 1
Joined: Mon Nov 11, 2019 5:36 pm

OpenVPN + Proxy + Random Remote

Post by macchionitiziano » Mon Nov 11, 2019 5:55 pm

Hi,
I would like to create an openvpn file that has the choice of server randomly and that connects to the proxy server of the server chosen by the random.
For Exaple this is my file
dev tun
proto tcp
remote x.x.x.128 1194
remote x.x.x.222 1194
remote x.x.x.246 1194
remote-random
resolv-retry 20
With this configuration my file will randomly choose the destination server, and it works perfectly!

But the problem that I need is to use a http proxy on the header and then use this command string:
http-proxy-retry
http-proxy xx.xx.xx.xx 8080
http-proxy-option CUSTOM-HEADER X-Online-Host google.com
http-proxy-option CUSTOM-HEADER Host google.com
But I would like if the file is connected to the final .222 server the proxy that needs to be connected must be the .222 final ...
example:

if connect
remote x.x.x.222 1194
http-proxy-retry
http-proxy xx.xx.xx.222 8080
http-proxy-option CUSTOM-HEADER X-Online-Host google.com
http-proxy-option CUSTOM-HEADER Host google.com

if connect
remote x.x.x.246 1194
http-proxy-retry
http-proxy xx.xx.xx.246 8080
http-proxy-option CUSTOM-HEADER X-Online-Host google.com
http-proxy-option CUSTOM-HEADER Host google.com

i need to resolve this issue,I don't know how to do it, I'm desperate, please help me.
If you give me a great hand, and you're an openvpn client file expert, I can pay too.

Post Reply