Hi everybody,
please help me. I want to import an ovpn file to the iphone via url from my local webserver.
I know that it is possible because I found a page where it works: http://www.vpngate.net/en/do_openvpn.as ... 3&hid=6186
After open the offered ovpn file with safare the iphone offers to open the file with openvpn app.
If I try to do this with nginx webserver my iphone always opens the file and shows me the content.
After analysing the code of vpngate.net I recognised that they use a kind of downloading script. That means they don't open the ovpn file directly but the use:
a href="...openvpn_download.aspx?...&vpngate_118.108.96.82_udp_1194.ovpn"
I tried already to create a php file and to manipulate the header() entries but without success.
Please help me!
Thanks and best regards
Christoph
Import .ovpn to Iphone via URL
-
- OpenVpn Newbie
- Posts: 9
- Joined: Fri Oct 17, 2014 10:21 am
-
- OpenVpn Newbie
- Posts: 2
- Joined: Tue Nov 11, 2014 6:47 am
Re: Import .ovpn to Iphone via URL
example php code
sorry my english.
Code: Select all
$file = 'full path/file.ovpn'; //os directory path not web path
header('Content-type: application/ovpn');
header("Content-Disposition: attachment; filename=\"config.ovpn\"");
readfile($file);
-
- OpenVpn Newbie
- Posts: 9
- Joined: Fri Oct 17, 2014 10:21 am
Re: Import .ovpn to Iphone via URL
hi chayakornc,
thanks for your reply. It tried this already but it didn't worked. For a Android Phone I tried it worked but my iPhone always asked me how to open it.
Currently I solved it differently. I added the following line to the /etc/nginx/mime.types:
If somebody has questions to my solution, please contact me via the phone number of my homepage: http://www.ionas.com.
Best regards
Christoph
thanks for your reply. It tried this already but it didn't worked. For a Android Phone I tried it worked but my iPhone always asked me how to open it.
Currently I solved it differently. I added the following line to the /etc/nginx/mime.types:
Code: Select all
application/x-openvpn-profile ovpn;
Best regards
Christoph
-
- OpenVpn Newbie
- Posts: 2
- Joined: Tue Nov 11, 2014 6:47 am
Re: Import .ovpn to Iphone via URL
hi ionasOHG,
I didn't test Android phone.
Thanks for your answer to resolved.
I didn't test Android phone.
Thanks for your answer to resolved.
-
- OpenVpn Newbie
- Posts: 10
- Joined: Wed Jun 05, 2013 5:36 pm
Re: Import .ovpn to Iphone via URL
Probably because your nginx is taking care of the HTTP session headers and not paying attention to what comes from PHP.ionasOHG wrote:hi chayakornc,
thanks for your reply. It tried this already but it didn't worked. For a Android Phone I tried it worked but my iPhone always asked me how to open it.
Currently I solved it differently. I added the following line to the /etc/nginx/mime.types:If somebody has questions to my solution, please contact me via the phone number of my homepage: http://www.ionas.com.Code: Select all
application/x-openvpn-profile ovpn;
Best regards
Christoph
Sent from my iPad using Tapatalk