How to define multiple proxies on client's configuration?

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
rdaraujo
OpenVpn Newbie
Posts: 2
Joined: Mon Aug 03, 2015 6:07 pm

How to define multiple proxies on client's configuration?

Post by rdaraujo » Mon Aug 03, 2015 6:19 pm

Hello,

How can I define multiple http-proxy directives inline?

Code: Select all

client
dev tun
proto tcp

<http-proxy-user-pass>
user
pass
</http-proxy-user-pass>

<connection>
remote host.com 443
http-proxy squid01 8080 auto
http-proxy-retry
</connection>

<connection>
remote host.com 443
http-proxy squid02 8080 auto
http-proxy-retry
</connection>

(...)
The configuration above gives me "[http-proxy] directive is not allowed inside [connection]".
That is weird since man page(1) explicitly shows an example.

Should I assume that OpenVPN Connect(2) doesn't support this kind of configuration?

(1) https://community.openvpn.net/openvpn/w ... n23ManPage
(2) OpenVPN 1.0.5 build 177 (iOS 64-bit)

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: How to define multiple proxies on client's configuration

Post by Traffic » Tue Aug 04, 2015 9:04 am

Good question ...

Unfortunately, the manual you have quoted is for OpenVPN-CE not OpenVPN-Connect

If Connect states that:
rdaraujo wrote:http-proxy] directive is not allowed inside [connection]
then I guess that is it.

Have you tried a config like so:

Code: Select all

remote host.com 443
http-proxy squid01 8080 auto
http-proxy squid02 8080 auto
http-proxy-retry
perhaps Connect will be ok with that.

Or create another config file for the second proxy ..

rdaraujo
OpenVpn Newbie
Posts: 2
Joined: Mon Aug 03, 2015 6:07 pm

Re: How to define multiple proxies on client's configuration

Post by rdaraujo » Tue Aug 04, 2015 10:22 am

Thanks Traffic. I didn't realized that :roll:

Well, it accepts my configuration as you suggested.

Code: Select all

remote host_vpn 443
http-proxy squid01 8080 auto
http-proxy squid02 8080 auto
http-proxy squid03 8080 auto
http-proxy-retry
But, I'm not sure OpenVPN is considering all proxy entries. Problably, it uses only the last one defined.

Code: Select all

2015-08-04 07:08:08 ----- OpenVPN Start -----
OpenVPN core 3.0 ios arm64 64-bit
2015-08-04 07:08:08 UNUSED OPTIONS
5 [http-proxy] [squid01] [8080] [auto] 
6 [http-proxy] [squid02] [8080] [auto] 
8 [http-proxy-retry] 
9 [resolv-retry] [infinite] 
10 [nobind] 
11 [persist-key] 
12 [persist-tun] 
17 [verb] [5] 

2015-08-04 07:08:08 LZO-ASYM init swap=0 asym=0
2015-08-04 07:08:08 EVENT: RESOLVE
2015-08-04 07:08:08 Contacting host_proxy:8080 via HTTP Proxy
2015-08-04 07:08:08 EVENT: WAIT_PROXY
2015-08-04 07:08:08 SetTunnelSocket returned 1
2015-08-04 07:08:08 EVENT: WAIT
2015-08-04 07:08:08 TO PROXY: CONNECT host_vpn:443 HTTP/1.0
Host: host_vpn
Anyway, for now I'll create another config file following your suggestion.

Thanks.

Post Reply