libtailscale
libtailscale copied to clipboard
Update Python bindings and example to match C library functionality
The Python bindings got badly out-of-sync with the functionality of the C library / Go code.
This PR:
- removes the pinned backlevel version of pybind from the
Makefile, and bumps CMake minimum version to 3.5 - binds all the Python functions against the C code generated from the Go source, and adds definitions for anything that was previously missing (
src/main.cpp) - rewrites
tailscale/tsnet.pyto be a more Pythonic representation of the API, and adds docstrings - cleans up and improves the
examples/echo.pycode to use the upgraded bindings (while keeping it aligned with the C sample)