| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# |
|
2
|
|
|
|
|
|
|
# This file is part of Config-Model-OpenSsh |
|
3
|
|
|
|
|
|
|
# |
|
4
|
|
|
|
|
|
|
# This software is Copyright (c) 2008-2022 by Dominique Dumont. |
|
5
|
|
|
|
|
|
|
# |
|
6
|
|
|
|
|
|
|
# This is free software, licensed under: |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# The GNU Lesser General Public License, Version 2.1, February 1999 |
|
9
|
|
|
|
|
|
|
# |
|
10
|
2
|
|
|
2
|
|
2602
|
use strict; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
69
|
|
|
11
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
234
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
return [ |
|
14
|
|
|
|
|
|
|
{ |
|
15
|
|
|
|
|
|
|
'author' => [ |
|
16
|
|
|
|
|
|
|
'Dominique Dumont' |
|
17
|
|
|
|
|
|
|
], |
|
18
|
|
|
|
|
|
|
'class_description' => 'Configuration class that represents the parameters required |
|
19
|
|
|
|
|
|
|
to specify port forwarding in a ssh configuration.', |
|
20
|
|
|
|
|
|
|
'copyright' => [ |
|
21
|
|
|
|
|
|
|
'2009-2018 Dominique Dumont' |
|
22
|
|
|
|
|
|
|
], |
|
23
|
|
|
|
|
|
|
'element' => [ |
|
24
|
|
|
|
|
|
|
'ipv6', |
|
25
|
|
|
|
|
|
|
{ |
|
26
|
|
|
|
|
|
|
'description' => 'Specify if the forward is specified iwth IPv6 or IPv4', |
|
27
|
|
|
|
|
|
|
'type' => 'leaf', |
|
28
|
|
|
|
|
|
|
'value_type' => 'boolean', |
|
29
|
|
|
|
|
|
|
'write_as' => [ |
|
30
|
|
|
|
|
|
|
'no', |
|
31
|
|
|
|
|
|
|
'yes' |
|
32
|
|
|
|
|
|
|
] |
|
33
|
|
|
|
|
|
|
}, |
|
34
|
|
|
|
|
|
|
'bind_address', |
|
35
|
|
|
|
|
|
|
{ |
|
36
|
|
|
|
|
|
|
'description' => 'Specify the address that the port will listen to. By |
|
37
|
|
|
|
|
|
|
default, only connections coming from localhost (127.0.0.1) |
|
38
|
|
|
|
|
|
|
will be forwarded. |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
By default, the local port is bound in accordance with the |
|
41
|
|
|
|
|
|
|
GatewayPorts setting. However, an explicit bind_address may |
|
42
|
|
|
|
|
|
|
be used to bind the connection to a specific address. |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
The bind_address of \'localhost\' indicates that the listening |
|
45
|
|
|
|
|
|
|
port be bound for local use only, while an empty address or |
|
46
|
|
|
|
|
|
|
\'*\' indicates that the port should be available from all |
|
47
|
|
|
|
|
|
|
interfaces.', |
|
48
|
|
|
|
|
|
|
'summary' => 'bind address to listen to', |
|
49
|
|
|
|
|
|
|
'type' => 'leaf', |
|
50
|
|
|
|
|
|
|
'value_type' => 'uniline' |
|
51
|
|
|
|
|
|
|
}, |
|
52
|
|
|
|
|
|
|
'port', |
|
53
|
|
|
|
|
|
|
{ |
|
54
|
|
|
|
|
|
|
'description' => 'Listening port. Connection made to this port will be forwarded to the other side of the tunnel.', |
|
55
|
|
|
|
|
|
|
'mandatory' => '1', |
|
56
|
|
|
|
|
|
|
'match' => '^\\w+$', |
|
57
|
|
|
|
|
|
|
'type' => 'leaf', |
|
58
|
|
|
|
|
|
|
'value_type' => 'uniline' |
|
59
|
|
|
|
|
|
|
}, |
|
60
|
|
|
|
|
|
|
'host', |
|
61
|
|
|
|
|
|
|
{ |
|
62
|
|
|
|
|
|
|
'mandatory' => '1', |
|
63
|
|
|
|
|
|
|
'summary' => 'host name or address', |
|
64
|
|
|
|
|
|
|
'type' => 'leaf', |
|
65
|
|
|
|
|
|
|
'value_type' => 'uniline' |
|
66
|
|
|
|
|
|
|
}, |
|
67
|
|
|
|
|
|
|
'hostport', |
|
68
|
|
|
|
|
|
|
{ |
|
69
|
|
|
|
|
|
|
'description' => 'Port number to connect the tunnel to.', |
|
70
|
|
|
|
|
|
|
'mandatory' => '1', |
|
71
|
|
|
|
|
|
|
'match' => '^\\w+$', |
|
72
|
|
|
|
|
|
|
'summary' => 'destination port', |
|
73
|
|
|
|
|
|
|
'type' => 'leaf', |
|
74
|
|
|
|
|
|
|
'value_type' => 'uniline' |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
], |
|
77
|
|
|
|
|
|
|
'license' => 'LGPL2', |
|
78
|
|
|
|
|
|
|
'name' => 'Ssh::PortForward' |
|
79
|
|
|
|
|
|
|
} |
|
80
|
|
|
|
|
|
|
] |
|
81
|
|
|
|
|
|
|
; |
|
82
|
|
|
|
|
|
|
|