Below you will find pages that utilize the taxonomy term “Tailscale”
Posts
XML-RPC in Rust and Python
A lazy Sunday afternoon and my interest was piqued by XML-RPC
Client A very basic XML-RPC client wrapped in a Cloud Functions function:
main.py:
import functions_framework import os import xmlrpc.client endpoint = os.get_env("ENDPOINT") proxy = xmlrpc.client.ServerProxy(endpoint) @functions_framework.http def add(request): print(request) rqst = request.get_json(silent=True) resp = proxy.add( {"x":{ "real":rqst["x"]["real"], "imag":rqst["x"]["imag"] }, "y":{ "real":rqst["y"]["real"], "imag":rqst["y"]["imag"] } }) return resp requirements.txt:
functions-framework==3.* Run it:
python3 -m venv venv source venv/bin/activate python3 -m pip install --requirement requirements.
read more
Posts
Securing gRPC services using Tailscale
This is so useful that it’s worth its own post.
I write many gRPC services. As these generally run securely, it’s best to test them that way too but, even with e.g. Let’s Encrypt, it can be challenging to generate appropriate TLS certs.
Tailscale makes this trivial.
Assuming there’s a gRPC service running on localhost:50051, we want to avoid -plaintext:
PORT="50051" grpcurl \ -plaintext 0.0.0.0:${PORT} \ list NOTE I’m using list and assuming your service has reflection enabled but you can, of course, use relevant methods.
read more
Posts
`curl`'ing a Tailscale Webhook
[Tailscale] is really good. I’ve been using it as a virtual private network to span 2 home networks and to securely (!) access my hosts when I’m remote.
Recently Tailscale added Webhook functionality to permit processing subscribed-to (Tailscale) events. I’m always a sucker for a webhook ;-)
Here’s a curl command to send a test event to a Tailscale Webhook:
URL="" # From Tailscale's docs # https://tailscale.com/kb/1213/webhooks/#events-payload BODY=' [ { "timestamp": "2022-09-21T13:37:51.
read more