ovpnmcgen.rb 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +212 -3
- data/lib/ovpnmcgen/version.rb +2 -2
- data/ovpnmcgen.rb.gemspec +2 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7eecb8a62bc004485044c5ffcc87d38684dc999
|
4
|
+
data.tar.gz: 1c1dec6d4e95b295104435550d443c5aecf6bfef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d165dffd3e79a28e59292811e3dca883ffff50de6e44b615ee4c6e6e05fd0a789c073441d81759b3359afa1d71e0b5a03c3eb0903127f35a55dd2b25aa10688c
|
7
|
+
data.tar.gz: 80e881f3de0dba88a691d6391e049a3b6f944fefb4789746e0dce8467fd9b0e52d6396878fd0b9a14be7fafa88730441ccb71a4bdc5e1260d3ed1bca7269ebc2
|
data/README.md
CHANGED
@@ -13,13 +13,222 @@ Install it yourself as:
|
|
13
13
|
## Usage
|
14
14
|
|
15
15
|
### Typical Usage
|
16
|
-
$ ovpnmcgen.rb gen --trusted-ssids home --host vpn.example.com
|
16
|
+
$ ovpnmcgen.rb gen --trusted-ssids home --host vpn.example.com \
|
17
|
+
--cafile path/to/ca.pem --tafile path/to/ta.key \
|
18
|
+
--p12file path/to/john-ipad.p12 --p12pass p12passphrase john ipad
|
19
|
+
|
20
|
+
Output:
|
21
|
+
|
22
|
+
```
|
23
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
24
|
+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
25
|
+
<plist version="1.0">
|
26
|
+
<dict>
|
27
|
+
<key>PayloadContent</key>
|
28
|
+
<array>
|
29
|
+
<dict>
|
30
|
+
<key>PayloadDescription</key>
|
31
|
+
<string>Configures VPN settings, including authentication.</string>
|
32
|
+
<key>PayloadDisplayName</key>
|
33
|
+
<string>VPN (vpn.example.com/VoD)</string>
|
34
|
+
<key>PayloadIdentifier</key>
|
35
|
+
<string>com.example.vpn.john-ipad.vpnconfig</string>
|
36
|
+
<key>PayloadOrganization</key>
|
37
|
+
<string>vpn.example.com</string>
|
38
|
+
<key>PayloadType</key>
|
39
|
+
<string>com.apple.vpn.managed</string>
|
40
|
+
<key>PayloadUUID</key>
|
41
|
+
<string>...</string>
|
42
|
+
<key>PayloadVersion</key>
|
43
|
+
<integer>1</integer>
|
44
|
+
<key>UserDefinedName</key>
|
45
|
+
<string>vpn.example.com/VoD</string>
|
46
|
+
<key>VPN</key>
|
47
|
+
<dict>
|
48
|
+
<key>AuthenticationMethod</key>
|
49
|
+
<string>Certificate</string>
|
50
|
+
<key>OnDemandEnabled</key>
|
51
|
+
<integer>1</integer>
|
52
|
+
<key>OnDemandRules</key>
|
53
|
+
<array>
|
54
|
+
<dict>
|
55
|
+
<key>Action</key>
|
56
|
+
<string>Disconnect</string>
|
57
|
+
<key>SSIDMatch</key>
|
58
|
+
<array>
|
59
|
+
<string>home</string>
|
60
|
+
</array>
|
61
|
+
</dict>
|
62
|
+
<dict>
|
63
|
+
<key>Action</key>
|
64
|
+
<string>Connect</string>
|
65
|
+
<key>InterfaceTypeMatch</key>
|
66
|
+
<string>WiFi</string>
|
67
|
+
</dict>
|
68
|
+
<dict>
|
69
|
+
<key>Action</key>
|
70
|
+
<string>Ignore</string>
|
71
|
+
<key>InterfaceTypeMatch</key>
|
72
|
+
<string>Cellular</string>
|
73
|
+
</dict>
|
74
|
+
<dict>
|
75
|
+
<key>Action</key>
|
76
|
+
<string>Connect</string>
|
77
|
+
</dict>
|
78
|
+
</array>
|
79
|
+
<key>PayloadCertificateUUID</key>
|
80
|
+
<string>...</string>
|
81
|
+
<key>RemoteAddress</key>
|
82
|
+
<string>DEFAULT</string>
|
83
|
+
</dict>
|
84
|
+
<key>VPNSubType</key>
|
85
|
+
<string>net.openvpn.OpenVPN-Connect.vpnplugin</string>
|
86
|
+
<key>VPNType</key>
|
87
|
+
<string>VPN</string>
|
88
|
+
<key>VendorConfig</key>
|
89
|
+
<dict>
|
90
|
+
<key>ca</key>
|
91
|
+
<string>-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----</string>
|
92
|
+
<key>client</key>
|
93
|
+
<string>NOARGS</string>
|
94
|
+
<key>comp-lzo</key>
|
95
|
+
<string>NOARGS</string>
|
96
|
+
<key>dev</key>
|
97
|
+
<string>tun</string>
|
98
|
+
<key>key-direction</key>
|
99
|
+
<string>1</string>
|
100
|
+
<key>persist-key</key>
|
101
|
+
<string>NOARGS</string>
|
102
|
+
<key>persist-tun</key>
|
103
|
+
<string>NOARGS</string>
|
104
|
+
<key>proto</key>
|
105
|
+
<string>udp</string>
|
106
|
+
<key>remote</key>
|
107
|
+
<string>vpn.example.com 1194 udp</string>
|
108
|
+
<key>remote-cert-tls</key>
|
109
|
+
<string>server</string>
|
110
|
+
<key>resolv-retry</key>
|
111
|
+
<string>infinite</string>
|
112
|
+
<key>tls-auth</key>
|
113
|
+
<string>#\n# 2048 bit OpenVPN static key\n#\n-----BEGIN OpenVPN Static key V1-----\n...\n-----END OpenVPN Static key V1-----</string>
|
114
|
+
<key>verb</key>
|
115
|
+
<string>3</string>
|
116
|
+
</dict>
|
117
|
+
</dict>
|
118
|
+
<dict>
|
119
|
+
<key>Password</key>
|
120
|
+
<string>p12passphrase</string>
|
121
|
+
<key>PayloadCertificateFileName</key>
|
122
|
+
<string>john-ipad.p12</string>
|
123
|
+
<key>PayloadContent</key>
|
124
|
+
<data>
|
125
|
+
base64data
|
126
|
+
</data>
|
127
|
+
<key>PayloadDescription</key>
|
128
|
+
<string>Provides device authentication (certificate or identity).</string>
|
129
|
+
<key>PayloadDisplayName</key>
|
130
|
+
<string>john-ipad.p12</string>
|
131
|
+
<key>PayloadIdentifier</key>
|
132
|
+
<string>com.example.vpn.john-ipad.credential</string>
|
133
|
+
<key>PayloadOrganization</key>
|
134
|
+
<string>vpn.example.com</string>
|
135
|
+
<key>PayloadType</key>
|
136
|
+
<string>com.apple.security.pkcs12</string>
|
137
|
+
<key>PayloadUUID</key>
|
138
|
+
<string>...</string>
|
139
|
+
<key>PayloadVersion</key>
|
140
|
+
<integer>1</integer>
|
141
|
+
</dict>
|
142
|
+
</array>
|
143
|
+
<key>PayloadDescription</key>
|
144
|
+
<string>OpenVPN Configuration Payload for john-ipad@vpn.example.com</string>
|
145
|
+
<key>PayloadDisplayName</key>
|
146
|
+
<string>vpn.example.com OpenVPN iphoting@ipad</string>
|
147
|
+
<key>PayloadIdentifier</key>
|
148
|
+
<string>com.example.vpn.john-ipad</string>
|
149
|
+
<key>PayloadOrganization</key>
|
150
|
+
<string>vpn.example.com</string>
|
151
|
+
<key>PayloadRemovalDisallowed</key>
|
152
|
+
<false/>
|
153
|
+
<key>PayloadType</key>
|
154
|
+
<string>Configuration</string>
|
155
|
+
<key>PayloadUUID</key>
|
156
|
+
<string>...</string>
|
157
|
+
<key>PayloadVersion</key>
|
158
|
+
<integer>1</integer>
|
159
|
+
</dict>
|
160
|
+
</plist>
|
161
|
+
```
|
17
162
|
|
18
163
|
### Extended Usage
|
19
|
-
$ ovpnmcgen.rb gen --trusted-ssids home,school --untrusted-ssids virusnet
|
164
|
+
$ ovpnmcgen.rb gen --trusted-ssids home,school --untrusted-ssids virusnet \
|
165
|
+
--host vpn.example.com --cafile path/to/ca.pem --tafile path/to/ta.key \
|
166
|
+
--p12file path/to/john-ipad.p12 --p12pass p12passphrase john ipad
|
167
|
+
|
168
|
+
Output similar to above:
|
169
|
+
```
|
170
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
171
|
+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
172
|
+
<plist version="1.0">
|
173
|
+
<dict>
|
174
|
+
<key>PayloadContent</key>
|
175
|
+
<array>
|
176
|
+
<dict>
|
177
|
+
...
|
178
|
+
<key>VPN</key>
|
179
|
+
<dict>
|
180
|
+
...
|
181
|
+
<key>OnDemandRules</key>
|
182
|
+
<array>
|
183
|
+
<dict>
|
184
|
+
<key>Action</key>
|
185
|
+
<string>Disconnect</string>
|
186
|
+
<key>SSIDMatch</key>
|
187
|
+
<array>
|
188
|
+
<string>home</string>
|
189
|
+
<string>school</string>
|
190
|
+
</array>
|
191
|
+
</dict>
|
192
|
+
<dict>
|
193
|
+
<key>Action</key>
|
194
|
+
<string>Connect</string>
|
195
|
+
<key>SSIDMatch</key>
|
196
|
+
<array>
|
197
|
+
<string>virusnet</string>
|
198
|
+
</array>
|
199
|
+
</dict>
|
200
|
+
<dict>
|
201
|
+
<key>Action</key>
|
202
|
+
<string>Connect</string>
|
203
|
+
<key>InterfaceTypeMatch</key>
|
204
|
+
<string>WiFi</string>
|
205
|
+
</dict>
|
206
|
+
<dict>
|
207
|
+
<key>Action</key>
|
208
|
+
<string>Ignore</string>
|
209
|
+
<key>InterfaceTypeMatch</key>
|
210
|
+
<string>Cellular</string>
|
211
|
+
</dict>
|
212
|
+
<dict>
|
213
|
+
<key>Action</key>
|
214
|
+
<string>Connect</string>
|
215
|
+
</dict>
|
216
|
+
</array>
|
217
|
+
...
|
218
|
+
</dict>
|
219
|
+
...
|
220
|
+
</dict>
|
221
|
+
...
|
222
|
+
</array>
|
223
|
+
...
|
224
|
+
</dict>
|
225
|
+
</plist>
|
226
|
+
```
|
20
227
|
|
21
228
|
### Using OpenSSL to generate a PKCS#12 file
|
22
|
-
openssl pkcs12 -export -out path/to/john-ipad.p12
|
229
|
+
openssl pkcs12 -export -out path/to/john-ipad.p12 \
|
230
|
+
-inkey path/to/john-ipad.key -in path/to/john-ipad.crt \
|
231
|
+
-passout pass:p12passphrase
|
23
232
|
|
24
233
|
## Contributing
|
25
234
|
|
data/lib/ovpnmcgen/version.rb
CHANGED
data/ovpnmcgen.rb.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Ronald Ip"]
|
10
10
|
spec.email = ["myself@iphoting.com"]
|
11
11
|
spec.summary = Ovpnmcgen::SUMMARY
|
12
|
-
spec.description = "This utility generates configuration profiles that enables VPN-on-Demand
|
12
|
+
spec.description = "This utility generates configuration profiles that enables VPN-on-Demand."
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
spec.bindir = 'bin'
|
21
|
+
spec.required_ruby_version = '>= 1.9.3'
|
21
22
|
|
22
23
|
spec.add_development_dependency "bundler", "~> 1.5"
|
23
24
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ovpnmcgen.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ronald Ip
|
@@ -66,8 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '4.1'
|
69
|
-
description: This utility generates configuration profiles that enables VPN-on-Demand
|
70
|
-
as documented by Apple in https://developer.apple.com/library/ios/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010206-CH1-SW27
|
69
|
+
description: This utility generates configuration profiles that enables VPN-on-Demand.
|
71
70
|
email:
|
72
71
|
- myself@iphoting.com
|
73
72
|
executables:
|
@@ -98,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
98
97
|
requirements:
|
99
98
|
- - ">="
|
100
99
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
100
|
+
version: 1.9.3
|
102
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
102
|
requirements:
|
104
103
|
- - ">="
|
@@ -109,5 +108,5 @@ rubyforge_project:
|
|
109
108
|
rubygems_version: 2.2.2
|
110
109
|
signing_key:
|
111
110
|
specification_version: 4
|
112
|
-
summary: OpenVPN iOS Configuration Profile Utility
|
111
|
+
summary: An OpenVPN iOS Configuration Profile Utility
|
113
112
|
test_files: []
|