this is currently super broken but i'm getting there.
This commit is contained in:
parent
8a5d484883
commit
676aa8d5b6
4
utils/he_ipv6/TODO
Normal file
4
utils/he_ipv6/TODO
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
* fix creds
|
||||||
|
** needs user/password, and the updateKey is unique per-tunnel so move it into an element in there.
|
||||||
|
** need to get user/password into HEConf somehow. if i can get ?tid= working for the URL, that'd be perfect.
|
||||||
|
^ need to use updateKey for tunnel-specific xml
|
@ -373,6 +373,8 @@ class HEConfig(BaseConfig):
|
|||||||
schema_loc = 'https://tunnelbroker.net/tunnelInfo.php {0}'.format(default_xsd)
|
schema_loc = 'https://tunnelbroker.net/tunnelInfo.php {0}'.format(default_xsd)
|
||||||
|
|
||||||
def __init__(self, creds, xml_url = 'https://tunnelbroker.net/tunnelInfo.php', *args, **kwargs):
|
def __init__(self, creds, xml_url = 'https://tunnelbroker.net/tunnelInfo.php', *args, **kwargs):
|
||||||
|
# Creds are unique per tunnel... but we don't know the ID yet so we don't know which creds to use.
|
||||||
|
# TODO.
|
||||||
self.creds = creds
|
self.creds = creds
|
||||||
self.url = xml_url
|
self.url = xml_url
|
||||||
req = requests.get(self.url,
|
req = requests.get(self.url,
|
||||||
@ -406,7 +408,14 @@ class HEConfig(BaseConfig):
|
|||||||
with_comments = True))
|
with_comments = True))
|
||||||
|
|
||||||
|
|
||||||
class HETunnel(object):
|
class HETunnelConfig(BaseConfig):
|
||||||
|
# TODO: RESTRUCTURE THIS and create an HETunnel() object
|
||||||
|
default_xsd = 'http://schema.xml.r00t2.io/projects/tunnelbroker.tun.xsd'
|
||||||
|
nsmap = {None: 'https://tunelbroker.net/tunnelInfo.php?tid',
|
||||||
|
'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
|
||||||
|
attr_qname = etree.QName('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation')
|
||||||
|
schema_loc = 'https://tunnelbroker.net/tunnelInfo.php?tid {0}'.format(default_xsd)
|
||||||
|
|
||||||
def __init__(self, tun_xml):
|
def __init__(self, tun_xml):
|
||||||
self.xml = tun_xml
|
self.xml = tun_xml
|
||||||
self.id = None
|
self.id = None
|
||||||
|
Loading…
Reference in New Issue
Block a user