Compare commits

...

5 Commits

Author SHA1 Message Date
graysky 5fa9fe5c02 update readme 2019-11-25 10:36:27 -05:00
graysky 5cbf1c8f3b fixes #4 2018-01-13 08:56:50 -05:00
graysky 6348d0b2bd verified on new version on OVC 2018-01-11 17:26:39 -05:00
graysky a5e33545e9 add license 2017-12-30 09:52:26 -05:00
graysky 53a738c728 fixes #3 2017-12-30 09:49:20 -05:00
3 changed files with 22 additions and 9 deletions

7
MIT Normal file
View File

@ -0,0 +1,7 @@
Copyright (c) 2016-2018 graysky
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,7 +1,8 @@
## Overview
A simple shell script that creates OpenVPN compatible tunnel profiles in the unified file format. Tested on:
* Linux OpenVPN version 2.4.3
* iOS version 1.1.1 build 212 of OpenVPN Connect
* Linux OpenVPN version 2.4.6
* iOS version 3.0.0.(712) of OpenVPN Connect
* Android version 0.6.73 of OpenVPN for Android
## Usage
Invoke the script with 5 tokens and the profile is outputted to stdout.
@ -13,7 +14,7 @@ Invoke the script with 5 tokens and the profile is outputted to stdout.
6. Optionally define a port number (defaults to 1194 if left blank).
7. Optionally define a protocol (defaults to udp if left blank).
### Example (run as root) using all 7 augments to setup a profile working port 443 using TCP
### Example (run as root) using all 7 arguments to setup a profile working port 443 using TCP
```
CLIENT=foo
@ -26,7 +27,7 @@ CLIENT=foo
tcp > $CLIENT.ovpn
```
The resulting foo.ovpn can be edited if desired.
The resulting foo.ovpn may need to be edited. Pay attention to the commented lines!
### Credit
Majority of the credit goes to the script's original author, [trovao](https://github.com/trovao). His version can be found [here](https://gist.github.com/trovao/18e428b5a758df24455b).

15
ovpngen
View File

@ -1,6 +1,6 @@
#!/bin/bash
## Tested and works with OpenVPN Connect 1.0.7 build 199 (iOS 64-bit) on iOS 10.2
## Tested and works with OpenVPN Connect 1.2.9 build 0 (iOS 64-bit) on iOS 11.4.1
##
## Majority of the credit goes to the script's original author, trovao
## Link to original script: https://gist.github.com/trovao/18e428b5a758df24455b
@ -22,7 +22,7 @@ EOF
echo 'For example:'
echo
echo 'CLIENT=jason'
echo "$0 nipple.titty.org \\"
echo "$0 my.openvpn-server.com \\"
echo ' /etc/openvpn/server/ca.crt \'
echo ' /etc/easy-rsa/pki/signed/$CLIENT.crt \'
echo ' /etc/easy-rsa/pki/private/$CLIENT.key \'
@ -63,11 +63,16 @@ nobind
persist-key
persist-tun
verb 3
# optionally uncomment and change to exactly match the values specified
# in /etc/openvpn/server/server.conf
###
### optionally uncomment and change both the cipher and auth lines to EXACTLY
### match the values specified in ${server}
#cipher AES-256-CBC
#auth SHA512
comp-lzo
###
### scroll down and optionally change the <tls-auth> tag set to <tls-crypt>
### to match how the server is configured since these options are mutually
### exclusive!
###
remote-cert-tls server
key-direction 1
<ca>