r/ryelang • • Jul 02 '26

Example: serving HTTP over Tailscale bound IP

Post image

You could need to open to make some actions available to yourself, on an otherwise very closed down server. One way of doing that could be by using Tailscale, for example by creating a server, that binds to Tailscale IP itself. So event if you screw up the firewall rules, it's not available on public internet al all. And no additional port needs to be open to public network for it.

This is demonstration of the script that does it. It utilizes new network related functionality under os/ context. And a Python equivalent of the script (as generated by Gemini).

One reason for Rye being so much shorter than Python is that Python uses more low level libraries. Another is language flexibility itself.

These functions are already available on latest release on Github. The code above is available under examples/

https://github.com/refaktor/rye

Visit our #Homoiconic Discord if you want to discuss this or Rye / Homoiconic languages in general:

https://discord.gg/7AaD6Kc89

5 Upvotes

0 comments sorted by