vpnmaker 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/client.haml +1 -0
- data/lib/example_vpnmaker_site.config.yaml +1 -1
- data/lib/server.haml +15 -12
- data/lib/vpnmaker/config_generator.rb +4 -3
- data/vpnmaker.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.8
|
data/lib/client.haml
CHANGED
data/lib/server.haml
CHANGED
@@ -9,20 +9,22 @@ server #{base_ip[:net]} #{base_ip[:mask]}
|
|
9
9
|
tls-server
|
10
10
|
comp-lzo
|
11
11
|
cipher AES-256-CBC
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- bridgednets.
|
21
|
-
|
12
|
+
crl-verify #{crl_path}/crl.pem
|
13
|
+
|
14
|
+
- unless subnets.empty?
|
15
|
+
\# subnets.each do
|
16
|
+
- subnets.each do |net|
|
17
|
+
route #{net[:net]} #{net[:mask]}
|
18
|
+
push route #{net[:net]} #{net[:mask]}
|
19
|
+
|
20
|
+
- unless bridgednets.empty?
|
21
|
+
\# bridgednets.each do
|
22
|
+
- bridgednets.each do |net|
|
23
|
+
push route #{net[:net]} #{net[:mask]}
|
22
24
|
\
|
23
25
|
push "redirect-gateway"
|
24
26
|
client-to-client
|
25
|
-
|
27
|
+
|
26
28
|
user #{user}
|
27
29
|
group #{group}
|
28
30
|
- if type == :default
|
@@ -55,7 +57,8 @@ group #{group}
|
|
55
57
|
crl-verify #{root}/keys/crl.pem
|
56
58
|
|
57
59
|
keepalive 10 120
|
58
|
-
log #{log}
|
60
|
+
\#log #{log}
|
59
61
|
persist-tun
|
60
62
|
persist-key
|
63
|
+
|
61
64
|
:plain
|
@@ -32,7 +32,8 @@ module VPNMaker
|
|
32
32
|
separator = '-----BEGIN CERTIFICATE-----'
|
33
33
|
cert = File.read(@dirname + "/server.crt").split(separator).last.insert(0, separator)
|
34
34
|
{
|
35
|
-
:gen_host => Socket.gethostname
|
35
|
+
:gen_host => Socket.gethostname,
|
36
|
+
:crl_path => @mgr.tracker.path
|
36
37
|
}.merge(@mgr.config[:server]).merge(@runtime_cfg).merge(:key => File.read(@dirname + "/server.key"),
|
37
38
|
:cert => cert,
|
38
39
|
:crl => File.read(@dirname + "/crl.pem"))
|
@@ -41,8 +42,8 @@ module VPNMaker
|
|
41
42
|
def server
|
42
43
|
haml_vars = server_conf.dup
|
43
44
|
haml_vars[:base_ip] = ((a = IPAddr.new haml_vars[:base_ip]); {:net => a.to_s, :mask => a.subnet_mask.to_s})
|
44
|
-
haml_vars[:bridgednets] = haml_vars[:bridgednets].map {|net| a = (IPAddr.new net); {:net => a.to_s, :mask => a.subnet_mask.to_s}}
|
45
|
-
haml_vars[:subnets] = haml_vars[:subnets].map {|net| a = (IPAddr.new net); {:net => a.to_s, :mask => a.subnet_mask.to_s}}
|
45
|
+
haml_vars[:bridgednets] ? (haml_vars[:bridgednets] = haml_vars[:bridgednets].map {|net| a = (IPAddr.new net); {:net => a.to_s, :mask => a.subnet_mask.to_s}}) : (haml_vars[:bridgednets] = Hash.new)
|
46
|
+
haml_vars[:subnets] ? (haml_vars[:subnets] = haml_vars[:subnets].map {|net| a = (IPAddr.new net); {:net => a.to_s, :mask => a.subnet_mask.to_s}}) : (haml_vars[:subnets] = Hash.new)
|
46
47
|
template = File.read(@mgr.tracker.path + \
|
47
48
|
"/" + @mgr.config[:site][:template_dir] + \
|
48
49
|
"/" + 'server.haml')
|
data/vpnmaker.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vpnmaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -503,7 +503,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
503
503
|
version: '0'
|
504
504
|
segments:
|
505
505
|
- 0
|
506
|
-
hash:
|
506
|
+
hash: 795314368865926665
|
507
507
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
508
508
|
none: false
|
509
509
|
requirements:
|