Skip to content

Commit 577bbc5

Browse files
committed
tinc-vpn:T766:Initial support for tinc VPN
1 parent 8baca28 commit 577bbc5

File tree

11 files changed

+991
-1
lines changed

11 files changed

+991
-1
lines changed

data/configd-include.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"interfaces-pppoe.py",
3030
"interfaces-pseudo-ethernet.py",
3131
"interfaces-sstpc.py",
32+
"interfaces-tinc.py",
3233
"interfaces-tunnel.py",
3334
"interfaces-vti.py",
3435
"interfaces-vxlan.py",

data/templates/tinc/hosts_config.tmpl

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% for prefix in subnets %}
2+
Subnet = {{ prefix }}
3+
{% endfor %}
4+
{% for addr in local_address %}
5+
Address = {{ addr }}
6+
{% endfor %}
7+
Port = {{ port }}

data/templates/tinc/tinc.conf.tmpl

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
Name = {{ node_name }}
2+
Interface = {{ ifname }}
3+
{% if bridge %}
4+
Mode = {{ bridge }}
5+
{% else %}
6+
Mode = router
7+
{% endif %}
8+
Compression = {{ compression_level }}
9+
Cipher = {{ encryption.cipher }}
10+
Digest = {{ encryption.digset }}
11+
{% if resolve_hostname %}
12+
Hostnames = yes
13+
{% else %}
14+
Hostnames = no
15+
{% endif %}
16+
PrivateKeyFile = {{ private_keyfile }}
17+
Broadcast = {{ broadcast_type }}
18+
{% if disable_resolve_hostname %}
19+
DecrementTTL = no
20+
{% else %}
21+
DecrementTTL = yes
22+
{% endif %}
23+
{% if direct_only %}
24+
DirectOnly = yes
25+
{% else %}
26+
DirectOnly = no
27+
{% endif %}
28+
Forwarding = {{ forwarding_option }}
29+
{% if iff_One_Queue %}
30+
IffOneQueue = yes
31+
{% else %}
32+
IffOneQueue = no
33+
{% endif %}
34+
KeyExpire = {{ key_expire }}
35+
{% if local_discovery %}
36+
LocalDiscovery = yes
37+
{% else %}
38+
LocalDiscovery = no
39+
{% endif %}
40+
MACExpire = {{ mac_expire}}
41+
MaxTimeout = {{ max_timeout }}
42+
PingInterval = {{ ping_interval }}
43+
PingTimeout = {{ ping_timeout }}
44+
{% if priority_inheritance %}
45+
PriorityInheritance = yes
46+
{% else %}
47+
PriorityInheritance = no
48+
{% endif %}
49+
ProcessPriority = {{ priority }}
50+
ReplayWindow = {{ replay_window }}
51+
{% if strict_subnets %}
52+
StrictSubnets = yes
53+
{% else %}
54+
StrictSubnets = no
55+
{% endif %}
56+
{% if tunnel_server %}
57+
TunnelServer = yes
58+
{% else %}
59+
TunnelServer = no
60+
{% endif %}
61+
{% if clamp_mss %}
62+
ClampMSS = yes
63+
{% else %}
64+
ClampMSS = no
65+
{% endif %}
66+
{% if indirect_data %}
67+
IndirectData = yes
68+
{% else %}
69+
IndirectData = no
70+
{% endif %}
71+
MACLength = {{ mac_length }}
72+
PMTU = {{ mtu }}
73+
{% if disable_PMTU_Discovery %}
74+
PMTUDiscovery = no
75+
{% else %}
76+
PMTUDiscovery = yes
77+
{% endif %}
78+
{% if TCP_Only %}
79+
TCPonly = yes
80+
{% else %}
81+
TCPonly = no
82+
{% endif %}
83+
{% if udp_rcv_buf %}
84+
UDPRcvBuf = {{ udp_rcv_buf }}
85+
{% endif %}
86+
{% if udp_snd_buf %}
87+
UDPSndBuf = {{ udp_snd_buf }}
88+
{% endif %}
89+
{% if proxy and proxy.type %}
90+
{% if proxy.type == 'socks5' %}
91+
Proxy = {{ proxy.type }} {{ proxy.address }} {{ proxy.port }} {{ proxy.username }} { proxy.password }}
92+
{% elif proxy.type == 'socks4' %}
93+
Proxy = {{ proxy.type }} {{ proxy.address }} {{ proxy.port }}{{ proxy.username }}
94+
{% elif proxy.type == 'http' %}
95+
Proxy = {{ proxy.type }} {{ proxy.address }} {{ proxy.port }}
96+
{% elif proxy.type == 'exec' %}
97+
Proxy = {{ proxy.type }} {{ proxy.exec }}
98+
{% endif %}
99+
{% endif %}
100+
{% for conn in connect %}
101+
ConnectTo = {{ conn }}
102+
{% endfor %}
103+
{% if bind_address %}
104+
BindToAddress = {{ bind_address }}
105+
{% endif %}
106+
{% if bind_interface %}
107+
BindToInterface = {{ bind_interface }}
108+
{% endif %}
109+
{% if graph_dump_file %}
110+
GraphDumpFile = {{ graph_dump_file }}
111+
{% endif %}

debian/control

+3-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ Depends:
182182
wireless-regdb,
183183
wpasupplicant (>= 0.6.7),
184184
ndppd,
185-
miniupnpd-nftables
185+
miniupnpd-nftables,
186+
wpasupplicant (>= 0.6.7),
187+
tinc
186188
Description: VyOS configuration scripts and data
187189
VyOS configuration scripts, interface definitions, and everything
188190

0 commit comments

Comments
 (0)