Skip to content

exioReed/tinc-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

tinc-info

Toolchain to send commands and requests to tincd's control socket and parse information retrieved from it in python.

Please note: I started this project to learn python in the first place.

Install

$ git clone https://github.com/exioReed/tinc-info.git
$ cd tinc-info
$ pip install .

or

$ python setup.py

Example

Lets assume that netname is the netname of your tinc VPN.

from tinctools import connection, parse

# fetch
tincctl = connection.Control('netname')
tincctl.connect()
tincctl.authenticate()
meta_conn_data = tincctl.communicate(connection.Request.DUMP_CONNECTIONS)

# parse
tincinfo = parse.TincInfo()
tincinfo.parse_connections(data=meta_conn_data)

for mc in tincinfo.connections:
    print('meta connection with {}'.format(mc['node']))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages