tsujamin / hass-addons

108 stars 35 forks source link

Add options for --socks5-server and --outbound-http-proxy-listen #81

Closed Mincka closed 8 months ago

Mincka commented 1 year ago

Is your feature request related to a problem? Please describe. SOCKS5 and HTTP proxies can be used when --tun=userspace-networking is used. It can be useful when you want other containers to route their traffic through the tailscale add-on.

In my case, I have a Firefox container that cannot reach other tailscale nodes. I set the tailscale's SOCKS5 proxy in Firefox and then I can reach the other nodes of the network.

Describe the solution you'd like Add support for flags --socks5-server and --outbound-http-proxy-listen

Command example: tailscaled --tun=userspace-networking --socks5-server=localhost:1055 --outbound-http-proxy-listen=localhost:1055

Describe alternatives you've considered Unknown

Additional context Documation: https://tailscale.com/kb/1112/userspace-networking/#socks5-vs-http

tsujamin commented 1 year ago

Hey mate - happy to merge in such a change but my life is a bit too busy to implement them myself at the moment.

If you want to have a crack it and make a pull request it should be pretty easy to get it implemented. Roughly:

add new configuration keys to the addon settings: https://github.com/tsujamin/hass-addons/blob/9f8bcb8ac3ec480179d9536d30fef2f7c2b390c3/tailscale/config.json#L30-L46

Read the new configuration keys and, if present, append to the tailscaled arguments similar to https://github.com/tsujamin/hass-addons/blob/9f8bcb8ac3ec480179d9536d30fef2f7c2b390c3/tailscale/run.sh#L66-L68

Mincka commented 1 year ago

Hi @tsujamin, I would be happy to do so. I've already done a similar PR for this project in the past. ;) This issue is just a reminder for myself, or anybody else that will have time to test it. :) Thank you!

tsujamin commented 1 year ago

Awesome 👏 raise the PR when it suits you and I'll merge and push a new release

Thanks!

bslatyer commented 9 months ago

Hey @Mincka,

Is this still being worked on?

Thanks,

Braeden