Skip to content

Instantly share code, notes, and snippets.

@Mr-Precise
Created February 28, 2024 06:08
Show Gist options
  • Select an option

  • Save Mr-Precise/0b02d3dbac0ec5eb003e19b0d9cb571d to your computer and use it in GitHub Desktop.

Select an option

Save Mr-Precise/0b02d3dbac0ec5eb003e19b0d9cb571d to your computer and use it in GitHub Desktop.
Import .ovpn profile to iphone/ipad via URL

Import .ovpn OpenVPN profile to iphone via URL

  1. Method using php
<?php $file = 'config.ovpn'; header("Content-Disposition: attachment; filename=\"config.ovpn\""); header('Content-type: application/ovpn'); readfile($file); ?>
  1. Method in apache2 using .htaccess file
<Files "config.ovpn"> ForceType application/ovpn Header set Content-Disposition "attachment" </Files> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment