Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Investigate TCP proxy from non-tailnet to tailnet #6

Open
markpash opened this issue Mar 27, 2022 · 2 comments
Open

Investigate TCP proxy from non-tailnet to tailnet #6

markpash opened this issue Mar 27, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@markpash
Copy link
Owner

A little while ago, the tsnet package incorporated the ability to Dial into the tailnet. This unlocks a whole new set of features to be implemented.

One of these features is the ability to listen on non-tailnet interfaces/addresses and proxy all accepted connections to an address:port on the tailnet.

I'm not sure how I would implement this in our bindings structure, so I'm thinking I'll have to redo the structure of the configuration file.

@markpash markpash self-assigned this Mar 27, 2022
@markpash markpash added enhancement New feature or request help wanted Extra attention is needed labels Mar 27, 2022
@4310V343k
Copy link

4310V343k commented Feb 22, 2023

This would be very useful for me!
I don't see a need to change the binding structure, because nothing really changes. Sidecar still binds ONE port to ONE port
We simply need to check if the destination is on the tailscale network. Or use a prefix like ts://db:3306

If it is (or there is a prefix), it's a connection from anything outside to a machine on the network, else the behavior stays as it is now

@4310V343k
Copy link

4310V343k commented Apr 7, 2023

I forgot to tell you that in the end I came up with this: 4310V343k@4945b1a
This is my first time using go so i just made a working poc version. The functions are nearly the same so there is a clear way to shorten up the code, but it works!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants