ovpnmcgen.rb 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +15 -0
- data/ChangeLog +5 -0
- data/README.md +16 -0
- data/Rakefile +9 -0
- data/features/gen_basic.feature +198 -0
- data/features/gen_ovpnconfigfile_input.feature +169 -0
- data/features/support/setup.rb +6 -0
- data/lib/ovpnmcgen.rb +5 -8
- data/lib/ovpnmcgen/ovpnconfig.rb +1 -1
- data/lib/ovpnmcgen/stringdata.rb +8 -0
- data/lib/ovpnmcgen/version.rb +1 -1
- data/ovpnmcgen.rb.gemspec +5 -4
- metadata +48 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fa9ddfe28aee021b09d926a49dfd609833591e0
|
4
|
+
data.tar.gz: f7174a981ed646aa74c9da396cc0fb9ec9b41dda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c8d34469745b11850ba9eedb63dc85675294f05071afdc2393c4c9e52248cb182c3747d73cd4c74b630088ddcb602c458a97dd53ba79d45fccea4f5fe072187
|
7
|
+
data.tar.gz: 59525bbf6cf3ae0cc9fb468bafc10e11e3cd119fe9c0adfe45d06954badad08799cbdc80d7edea13e4c8feb486b3480fca605578254bbd90fb7bf2fbde95d3e2
|
data/.travis.yml
ADDED
data/ChangeLog
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
= 0.2.1 / Unreleased
|
2
|
+
* Implement unit testing.
|
3
|
+
* Switch to a portable and native uuidgen implementation.
|
4
|
+
* Minor documentation improvements.
|
5
|
+
|
1
6
|
= 0.2.0 / 2014-04-18
|
2
7
|
* Support custom UUID value overrides.
|
3
8
|
* Support for security level, i.e. paranoid, high (default), medium.
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
OpenVPN iOS Configuration Profile Utility
|
4
4
|
|
5
|
+
[](http://badge.fury.io/gh/iphoting%2Fovpnmcgen.rb) [](http://badge.fury.io/rb/ovpnmcgen.rb) [](https://travis-ci.org/iphoting/ovpnmcgen.rb)
|
6
|
+
|
5
7
|
Generates iOS configuration profiles (.mobileconfig) that configures OpenVPN for use with VPN-on-Demand that are not accessible through the Apple Configurator or the iPhone Configuration Utility.
|
6
8
|
|
7
9
|
Although there are many possible VPN-on-Demand (VoD) triggers, this utility currently only implements `SSIDMatch` and `InterfaceTypeMatch`. For 'high' (default) security level, the following algorithm is executed upon network changes, in order:
|
@@ -297,6 +299,20 @@ Output similar to above:
|
|
297
299
|
-inkey path/to/john-ipad.key -in path/to/john-ipad.crt \
|
298
300
|
-passout pass:p12passphrase -name john-ipad@vpn.example.com
|
299
301
|
|
302
|
+
## Known Issues
|
303
|
+
|
304
|
+
- "Not connected to Internet" error/behaviour when VPN should be established.
|
305
|
+
|
306
|
+
There is a bug in the iOS/OS X network routing code that hangs the routing system, preventing the gateway or IP address from being set. This happens more frequently when the tunnel is brought up/down more frequently.
|
307
|
+
|
308
|
+
Workaround: Hard-restart iOS. Press and hold down both the home and sleep/wake buttons until iOS turns off and back on with the Apple boot up screen. Release when the Apple boot up screen appears.
|
309
|
+
|
310
|
+
- Weird Rapid Connecting…/Disconnected behaviour.
|
311
|
+
|
312
|
+
Usually happens when the VoD component is stuck in an infinite loop. Not sure what triggers it.
|
313
|
+
|
314
|
+
Workaround: Hard-restart iOS. Press and hold down both the home and sleep/wake buttons until iOS turns off and back on with the Apple boot up screen. Release when the Apple boot up screen appears.
|
315
|
+
|
300
316
|
## TODO
|
301
317
|
|
302
318
|
- Config file to specify global options, such as `--cafile`, `--tafile`, `--host`, `--[un]trusted-ssids`.
|
data/Rakefile
CHANGED
@@ -0,0 +1,198 @@
|
|
1
|
+
Feature: Basic Generate Functionality
|
2
|
+
In order to generate a properly formatted plist mobileconfig
|
3
|
+
As a CLI
|
4
|
+
Some basic inputs are required
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given a file named "ca.crt" with:
|
8
|
+
"""
|
9
|
+
Contents of CA file
|
10
|
+
With newlines
|
11
|
+
And more newlines
|
12
|
+
That should appear as one line
|
13
|
+
"""
|
14
|
+
And a file named "p12file.p12" with:
|
15
|
+
"""
|
16
|
+
p12file that should appear
|
17
|
+
In base64 encoding as <data/>
|
18
|
+
"""
|
19
|
+
|
20
|
+
Scenario: I need help
|
21
|
+
When I run `ovpnmcgen.rb help g`
|
22
|
+
Then the output should contain "Usage:"
|
23
|
+
|
24
|
+
Scenario: Missing 2 arguments
|
25
|
+
When I run `ovpnmcgen.rb g`
|
26
|
+
Then the output should contain "error: "
|
27
|
+
And the output should contain "arguments"
|
28
|
+
|
29
|
+
Scenario: Missing 1 argument
|
30
|
+
When I run `ovpnmcgen.rb g cucumber`
|
31
|
+
Then the output should contain "error: "
|
32
|
+
And the output should contain "arguments"
|
33
|
+
|
34
|
+
Scenario: Correct number of arguments but missing required flags
|
35
|
+
When I run `ovpnmcgen.rb g cucumber aruba`
|
36
|
+
Then the output should contain "error: "
|
37
|
+
|
38
|
+
Scenario: Correct arguments but missing required flags, except the host flag.
|
39
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org cucumber aruba`
|
40
|
+
And the output should not contain "error: Host"
|
41
|
+
Then the output should contain "error: "
|
42
|
+
|
43
|
+
Scenario: Correct arguments but missing required flags, except the host, cafile flag.
|
44
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt cucumber aruba`
|
45
|
+
And the output should not contain "error: Host"
|
46
|
+
And the output should not contain "error: cafile"
|
47
|
+
Then the output should contain "error: "
|
48
|
+
|
49
|
+
Scenario: Correct arguments will all required flags, host, cafile, p12file.
|
50
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 cucumber aruba`
|
51
|
+
And the output should not contain "error: Host"
|
52
|
+
And the output should not contain "error: cafile"
|
53
|
+
And the output should not contain "error: PKCS#12"
|
54
|
+
Then the output should contain:
|
55
|
+
"""
|
56
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
57
|
+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
58
|
+
<plist version="1.0">
|
59
|
+
"""
|
60
|
+
And the output should match:
|
61
|
+
"""
|
62
|
+
<key>remote</key>
|
63
|
+
\s*<string>aruba.cucumber.org 1194 udp</string>
|
64
|
+
"""
|
65
|
+
And the output should match:
|
66
|
+
"""
|
67
|
+
<key>ca</key>
|
68
|
+
\s*<string>Contents of CA file\\nWith newlines\\nAnd more newlines\\nThat should appear as one line</string>
|
69
|
+
"""
|
70
|
+
And the output should match:
|
71
|
+
"""
|
72
|
+
<key>PayloadCertificateFileName</key>\s*
|
73
|
+
\s*<string>cucumber-aruba.p12</string>
|
74
|
+
\s*<key>PayloadContent</key>
|
75
|
+
\s*<data>
|
76
|
+
\s*cDEyZmlsZSB0aGF0IHNob3VsZCBhcHBlYXIKSW4gYmFzZTY0IGVuY29kaW5n
|
77
|
+
\s*IGFzIDxkYXRhLz4=
|
78
|
+
\s*</data>
|
79
|
+
"""
|
80
|
+
And the output should match:
|
81
|
+
"""
|
82
|
+
<key>OnDemandEnabled</key>
|
83
|
+
\s*<integer>1</integer>
|
84
|
+
"""
|
85
|
+
|
86
|
+
Scenario: The p12pass flag is set.
|
87
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --p12pass p12passphrase cucumber aruba`
|
88
|
+
Then the output should match:
|
89
|
+
"""
|
90
|
+
<key>Password</key>
|
91
|
+
\s*<string>p12passphrase</string>
|
92
|
+
"""
|
93
|
+
|
94
|
+
Scenario: The tafile flag is set.
|
95
|
+
Given a file named "ta.key" with:
|
96
|
+
"""
|
97
|
+
Contents of TLS-Auth Key file
|
98
|
+
With newlines
|
99
|
+
And more newlines
|
100
|
+
That should appear as one line
|
101
|
+
"""
|
102
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --tafile ta.key cucumber aruba`
|
103
|
+
Then the output should match:
|
104
|
+
"""
|
105
|
+
<key>tls-auth</key>
|
106
|
+
\s*<string>Contents of TLS-Auth Key file\\nWith newlines\\nAnd more newlines\\nThat should appear as one line</string>
|
107
|
+
"""
|
108
|
+
|
109
|
+
Scenario: The proto and port flags are set.
|
110
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --proto tcp --port 1234 cucumber aruba`
|
111
|
+
Then the output should match:
|
112
|
+
"""
|
113
|
+
<key>remote</key>
|
114
|
+
\s*<string>aruba.cucumber.org 1234 tcp</string>
|
115
|
+
"""
|
116
|
+
|
117
|
+
Scenario: The no-vod flag is set.
|
118
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --no-vod cucumber aruba`
|
119
|
+
Then the output should match:
|
120
|
+
"""
|
121
|
+
<key>OnDemandEnabled</key>
|
122
|
+
\s*<integer>0</integer>
|
123
|
+
"""
|
124
|
+
|
125
|
+
Scenario: The [un]trusted-ssids flags are set.
|
126
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --trusted-ssids trusted1,trusted2 --untrusted-ssids evil3,evil4 cucumber aruba`
|
127
|
+
Then the output should match:
|
128
|
+
"""
|
129
|
+
<string>Disconnect</string>
|
130
|
+
\s*<key>SSIDMatch</key>
|
131
|
+
\s*<array>
|
132
|
+
\s*<string>trusted1</string>
|
133
|
+
\s*<string>trusted2</string>
|
134
|
+
\s*</array>
|
135
|
+
"""
|
136
|
+
And the output should match:
|
137
|
+
"""
|
138
|
+
<string>Connect</string>
|
139
|
+
\s*<key>SSIDMatch</key>
|
140
|
+
\s*<array>
|
141
|
+
\s*<string>evil3</string>
|
142
|
+
\s*<string>evil4</string>
|
143
|
+
\s*</array>
|
144
|
+
"""
|
145
|
+
|
146
|
+
Scenario: The security-level flag is set to paranoid.
|
147
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --security-level paranoid cucumber aruba`
|
148
|
+
Then the output should match:
|
149
|
+
"""
|
150
|
+
<key>Action</key>
|
151
|
+
\s*<string>Connect</string>
|
152
|
+
\s*<key>InterfaceTypeMatch</key>
|
153
|
+
\s*<string>Cellular</string>
|
154
|
+
"""
|
155
|
+
|
156
|
+
Scenario: The security-level flag is set to high.
|
157
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --security-level high cucumber aruba`
|
158
|
+
Then the output should match:
|
159
|
+
"""
|
160
|
+
<key>Action</key>
|
161
|
+
\s*<string>Connect</string>
|
162
|
+
\s*<key>InterfaceTypeMatch</key>
|
163
|
+
\s*<string>WiFi</string>
|
164
|
+
"""
|
165
|
+
And the output should match:
|
166
|
+
"""
|
167
|
+
<key>Action</key>
|
168
|
+
\s*<string>Ignore</string>
|
169
|
+
\s*<key>InterfaceTypeMatch</key>
|
170
|
+
\s*<string>Cellular</string>
|
171
|
+
"""
|
172
|
+
|
173
|
+
Scenario: The security-level flag is set to medium.
|
174
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --security-level medium cucumber aruba`
|
175
|
+
Then the output should match:
|
176
|
+
"""
|
177
|
+
<key>Action</key>
|
178
|
+
\s*<string>Ignore</string>
|
179
|
+
\s*<key>InterfaceTypeMatch</key>
|
180
|
+
\s*<string>WiFi</string>
|
181
|
+
"""
|
182
|
+
And the output should match:
|
183
|
+
"""
|
184
|
+
<key>Action</key>
|
185
|
+
\s*<string>Disconnect</string>
|
186
|
+
\s*<key>InterfaceTypeMatch</key>
|
187
|
+
\s*<string>Cellular</string>
|
188
|
+
"""
|
189
|
+
|
190
|
+
Scenario: The output file flag is set.
|
191
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --output fileout.mobileconfig cucumber aruba`
|
192
|
+
Then the stdout should not contain anything
|
193
|
+
And the file "fileout.mobileconfig" should contain:
|
194
|
+
"""
|
195
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
196
|
+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
197
|
+
<plist version="1.0">
|
198
|
+
"""
|
@@ -0,0 +1,169 @@
|
|
1
|
+
Feature: Generate Functionality From Supplied OpenVPN Config File
|
2
|
+
In order to generate a properly formatted plist mobileconfig from supplied openvpn configfile
|
3
|
+
As a CLI
|
4
|
+
The specified openvpn file needs to be parsed properly
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given a file named "ca.crt" with:
|
8
|
+
"""
|
9
|
+
Contents of CA file
|
10
|
+
With newlines
|
11
|
+
And more newlines
|
12
|
+
That should appear as one line
|
13
|
+
"""
|
14
|
+
And a file named "p12file.p12" with:
|
15
|
+
"""
|
16
|
+
p12file that should appear
|
17
|
+
In base64 encoding as <data/>
|
18
|
+
"""
|
19
|
+
And a file named "clean.ovpn" with:
|
20
|
+
"""
|
21
|
+
##############################################
|
22
|
+
# Sample client-side OpenVPN 2.0 config file #
|
23
|
+
# for connecting to multi-client server. #
|
24
|
+
# #
|
25
|
+
# This configuration can be used by multiple #
|
26
|
+
# clients, however each client should have #
|
27
|
+
# its own cert and key files. #
|
28
|
+
# #
|
29
|
+
# On Windows, you might want to rename this #
|
30
|
+
# file so it has a .ovpn extension #
|
31
|
+
##############################################
|
32
|
+
|
33
|
+
# Specify that we are a client and that we
|
34
|
+
# will be pulling certain config file directives
|
35
|
+
# from the server.
|
36
|
+
client
|
37
|
+
|
38
|
+
# Use the same setting as you are using on
|
39
|
+
# the server.
|
40
|
+
# On most systems, the VPN will not function
|
41
|
+
# unless you partially or fully disable
|
42
|
+
# the firewall for the TUN/TAP interface.
|
43
|
+
;dev tap
|
44
|
+
dev tun
|
45
|
+
|
46
|
+
# Windows needs the TAP-Win32 adapter name
|
47
|
+
# from the Network Connections panel
|
48
|
+
# if you have more than one. On XP SP2,
|
49
|
+
# you may need to disable the firewall
|
50
|
+
# for the TAP adapter.
|
51
|
+
;dev-node MyTap
|
52
|
+
|
53
|
+
# Are we connecting to a TCP or
|
54
|
+
# UDP server? Use the same setting as
|
55
|
+
# on the server.
|
56
|
+
;proto tcp
|
57
|
+
proto udp
|
58
|
+
|
59
|
+
# The hostname/IP and port of the server.
|
60
|
+
# You can have multiple remote entries
|
61
|
+
# to load balance between the servers.
|
62
|
+
remote should.not.appear 1194
|
63
|
+
;remote my-server-2 1194
|
64
|
+
|
65
|
+
# Choose a random host from the remote
|
66
|
+
# list for load-balancing. Otherwise
|
67
|
+
# try hosts in the order specified.
|
68
|
+
;remote-random
|
69
|
+
|
70
|
+
# Keep trying indefinitely to resolve the
|
71
|
+
# host name of the OpenVPN server. Very useful
|
72
|
+
# on machines which are not permanently connected
|
73
|
+
# to the internet such as laptops.
|
74
|
+
resolv-retry infinite
|
75
|
+
|
76
|
+
# Most clients don't need to bind to
|
77
|
+
# a specific local port number.
|
78
|
+
nobind
|
79
|
+
|
80
|
+
# Downgrade privileges after initialization (non-Windows only)
|
81
|
+
user nobody
|
82
|
+
group nobody
|
83
|
+
|
84
|
+
# Try to preserve some state across restarts.
|
85
|
+
persist-key
|
86
|
+
persist-tun
|
87
|
+
|
88
|
+
# If you are connecting through an
|
89
|
+
# HTTP proxy to reach the actual OpenVPN
|
90
|
+
# server, put the proxy server/IP and
|
91
|
+
# port number here. See the man page
|
92
|
+
# if your proxy server requires
|
93
|
+
# authentication.
|
94
|
+
;http-proxy-retry # retry on connection failures
|
95
|
+
;http-proxy [proxy server] [proxy port #]
|
96
|
+
|
97
|
+
# Wireless networks often produce a lot
|
98
|
+
# of duplicate packets. Set this flag
|
99
|
+
# to silence duplicate packet warnings.
|
100
|
+
;mute-replay-warnings
|
101
|
+
|
102
|
+
# SSL/TLS parms.
|
103
|
+
# See the server config file for more
|
104
|
+
# description. It's best to use
|
105
|
+
# a separate .crt/.key file pair
|
106
|
+
# for each client. A single ca
|
107
|
+
# file can be used for all clients.
|
108
|
+
;ca ca.crt
|
109
|
+
;cert client.crt
|
110
|
+
;key client.key
|
111
|
+
pkcs12 client.p12
|
112
|
+
|
113
|
+
# Verify server certificate by checking
|
114
|
+
# that the certicate has the nsCertType
|
115
|
+
# field set to "server". This is an
|
116
|
+
# important precaution to protect against
|
117
|
+
# a potential attack discussed here:
|
118
|
+
# http://openvpn.net/howto.html#mitm
|
119
|
+
#
|
120
|
+
# To use this feature, you will need to generate
|
121
|
+
# your server certificates with the nsCertType
|
122
|
+
# field set to "server". The build-key-server
|
123
|
+
# script in the easy-rsa folder will do this.
|
124
|
+
#ns-cert-type server
|
125
|
+
|
126
|
+
remote-cert-tls server
|
127
|
+
|
128
|
+
# If a tls-auth key is used on the server
|
129
|
+
# then every client must also have the key.
|
130
|
+
tls-auth ta.key 1
|
131
|
+
|
132
|
+
# Select a cryptographic cipher.
|
133
|
+
# If the cipher option is used on the server
|
134
|
+
# then you must also specify it here.
|
135
|
+
;cipher x
|
136
|
+
|
137
|
+
# Enable compression on the VPN link.
|
138
|
+
# Don't enable this unless it is also
|
139
|
+
# enabled in the server config file.
|
140
|
+
comp-lzo
|
141
|
+
|
142
|
+
# Set log file verbosity.
|
143
|
+
verb 3
|
144
|
+
|
145
|
+
# Silence repeating messages
|
146
|
+
;mute 20
|
147
|
+
"""
|
148
|
+
|
149
|
+
Scenario: A decent openvpn config file is specified.
|
150
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --ovpnconfigfile clean.ovpn cucumber aruba`
|
151
|
+
Then the output should contain:
|
152
|
+
"""
|
153
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
154
|
+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
155
|
+
<plist version="1.0">
|
156
|
+
"""
|
157
|
+
And the output should contain "aruba.cucumber.org 1194 udp"
|
158
|
+
And the output should not contain "should.not.appear 1194"
|
159
|
+
And the output should not contain "persist-key"
|
160
|
+
And the output should not contain "persist-tun"
|
161
|
+
And the output should not contain "<key>pkcs12</key>"
|
162
|
+
And the output should not contain "<key>cert</key>"
|
163
|
+
And the output should not contain "<key>key</key>"
|
164
|
+
And the output should not contain "<key>resolv-retry</key>"
|
165
|
+
And the output should match:
|
166
|
+
"""
|
167
|
+
<key>comp-lzo</key>
|
168
|
+
\s*<string>NOARGS</string>
|
169
|
+
"""
|
data/lib/ovpnmcgen.rb
CHANGED
@@ -1,21 +1,18 @@
|
|
1
1
|
require "ovpnmcgen/version"
|
2
2
|
require "ovpnmcgen/ovpnconfig"
|
3
|
+
require "ovpnmcgen/stringdata"
|
3
4
|
require 'plist'
|
4
5
|
require 'base64'
|
6
|
+
require 'securerandom'
|
5
7
|
|
6
8
|
module Ovpnmcgen
|
7
|
-
class StringData < String
|
8
|
-
def to_plist_node
|
9
|
-
return "<data>\n#{self}\n</data>"
|
10
|
-
end
|
11
|
-
end
|
12
9
|
|
13
10
|
def generate(inputs = {})
|
14
11
|
identifier = inputs[:identifier] || inputs[:host].split('.').reverse!.join('.')
|
15
12
|
port = inputs[:port] || 1194
|
16
|
-
certUUID = inputs[:cert_uuid] ||
|
17
|
-
vpnUUID = inputs[:vpn_uuid] ||
|
18
|
-
plistUUID = inputs[:profile_uuid] ||
|
13
|
+
certUUID = inputs[:cert_uuid] || SecureRandom.uuid.chomp.upcase
|
14
|
+
vpnUUID = inputs[:vpn_uuid] || SecureRandom.uuid.chomp.upcase
|
15
|
+
plistUUID = inputs[:profile_uuid] || SecureRandom.uuid.chomp.upcase
|
19
16
|
user, device, domain, host, proto, enableVOD = inputs[:user], inputs[:device], inputs[:host], inputs[:host], inputs[:proto], inputs[:enableVOD]
|
20
17
|
p12pass = inputs[:p12pass] || ''
|
21
18
|
trusted_ssids = inputs[:trusted_ssids] || false
|
data/lib/ovpnmcgen/ovpnconfig.rb
CHANGED
@@ -14,7 +14,7 @@ module Ovpnmcgen
|
|
14
14
|
end
|
15
15
|
|
16
16
|
# TODO: Handle multiple remote lines.
|
17
|
-
# Currently,
|
17
|
+
# Currently, all remote lines are ignored.
|
18
18
|
|
19
19
|
# map to key => value pairs for plist purposes. Singular verbs will be: 'verb' => 'NOARGS'.
|
20
20
|
ovpnhash = Hash[ovpnfile.map do |l|
|
data/lib/ovpnmcgen/version.rb
CHANGED
data/ovpnmcgen.rb.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["myself@iphoting.com"]
|
11
11
|
spec.summary = Ovpnmcgen::SUMMARY
|
12
12
|
spec.description = "Generates iOS configuration profiles (.mobileconfig) that configures OpenVPN for use with VPN-on-Demand that are not accessible through the Apple Configurator or the iPhone Configuration Utility."
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/iphoting/ovpnmcgen.rb"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -21,7 +21,8 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.required_ruby_version = '>= 1.9.3'
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.5"
|
24
|
-
spec.add_development_dependency "rake"
|
25
|
-
spec.
|
26
|
-
spec.add_runtime_dependency "
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "aruba", "~> 0.5", ">= 0.5.4"
|
26
|
+
spec.add_runtime_dependency "plist", "~> 3.1", ">= 3.1.0"
|
27
|
+
spec.add_runtime_dependency "commander", "~> 4.1", ">= 4.1.6"
|
27
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ovpnmcgen.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ronald Ip
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,30 +28,56 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: aruba
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.5'
|
31
48
|
- - ">="
|
32
49
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
50
|
+
version: 0.5.4
|
34
51
|
type: :development
|
35
52
|
prerelease: false
|
36
53
|
version_requirements: !ruby/object:Gem::Requirement
|
37
54
|
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0.5'
|
38
58
|
- - ">="
|
39
59
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
60
|
+
version: 0.5.4
|
41
61
|
- !ruby/object:Gem::Dependency
|
42
62
|
name: plist
|
43
63
|
requirement: !ruby/object:Gem::Requirement
|
44
64
|
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '3.1'
|
45
68
|
- - ">="
|
46
69
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
70
|
+
version: 3.1.0
|
48
71
|
type: :runtime
|
49
72
|
prerelease: false
|
50
73
|
version_requirements: !ruby/object:Gem::Requirement
|
51
74
|
requirements:
|
75
|
+
- - "~>"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '3.1'
|
52
78
|
- - ">="
|
53
79
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
80
|
+
version: 3.1.0
|
55
81
|
- !ruby/object:Gem::Dependency
|
56
82
|
name: commander
|
57
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,6 +85,9 @@ dependencies:
|
|
59
85
|
- - "~>"
|
60
86
|
- !ruby/object:Gem::Version
|
61
87
|
version: '4.1'
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 4.1.6
|
62
91
|
type: :runtime
|
63
92
|
prerelease: false
|
64
93
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -66,6 +95,9 @@ dependencies:
|
|
66
95
|
- - "~>"
|
67
96
|
- !ruby/object:Gem::Version
|
68
97
|
version: '4.1'
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 4.1.6
|
69
101
|
description: Generates iOS configuration profiles (.mobileconfig) that configures
|
70
102
|
OpenVPN for use with VPN-on-Demand that are not accessible through the Apple Configurator
|
71
103
|
or the iPhone Configuration Utility.
|
@@ -77,17 +109,22 @@ extensions: []
|
|
77
109
|
extra_rdoc_files: []
|
78
110
|
files:
|
79
111
|
- ".gitignore"
|
112
|
+
- ".travis.yml"
|
80
113
|
- ChangeLog
|
81
114
|
- Gemfile
|
82
115
|
- LICENSE.txt
|
83
116
|
- README.md
|
84
117
|
- Rakefile
|
85
118
|
- bin/ovpnmcgen.rb
|
119
|
+
- features/gen_basic.feature
|
120
|
+
- features/gen_ovpnconfigfile_input.feature
|
121
|
+
- features/support/setup.rb
|
86
122
|
- lib/ovpnmcgen.rb
|
87
123
|
- lib/ovpnmcgen/ovpnconfig.rb
|
124
|
+
- lib/ovpnmcgen/stringdata.rb
|
88
125
|
- lib/ovpnmcgen/version.rb
|
89
126
|
- ovpnmcgen.rb.gemspec
|
90
|
-
homepage:
|
127
|
+
homepage: https://github.com/iphoting/ovpnmcgen.rb
|
91
128
|
licenses:
|
92
129
|
- MIT
|
93
130
|
metadata: {}
|
@@ -111,4 +148,7 @@ rubygems_version: 2.2.2
|
|
111
148
|
signing_key:
|
112
149
|
specification_version: 4
|
113
150
|
summary: An OpenVPN iOS Configuration Profile (.mobileconfig) Utility
|
114
|
-
test_files:
|
151
|
+
test_files:
|
152
|
+
- features/gen_basic.feature
|
153
|
+
- features/gen_ovpnconfigfile_input.feature
|
154
|
+
- features/support/setup.rb
|