okay. let's give this a shot.

This commit is contained in:
2020-05-18 04:59:00 -04:00
parent 4df9287abd
commit 80765e58ed
10 changed files with 203 additions and 81 deletions

View File

@@ -233,6 +233,12 @@ class Config(BaseConfig):
tun_creds_id = tun_xml.attrib['creds']
creds = self.creds[tun_creds_id]
update_key = tun_xml.find('updateKey').text.strip()
# TODO: do I instead want to use HEConfig() and fetch the single unified config?
# Pros:
# * I wouldn't completely die on a misconfigured tunnel in the user config.
# Cons:
# * We'd have to skip missing tunnels (bad auth at HE, etc.)
# * We would use more memory and take more time during init.
he_conf = HETunnelConfig(tun_id, creds, update_key)
tun = tunnel.Tunnel(tun_xml, he_conf, self.creds[tun_creds_id])
self.tunnels[tun_id] = tun