You can reach anything in your tailnet from within a Tailscale-activated Runway application, but you have to go through proxies.
Applications differ in how you need to specify these proxies, but what works for many is the following:
runway app config set \
ALL_PROXY=socks5://localhost:1055/ \
HTTP_PROXY=http://localhost:1055/ \
http_proxy=http://localhost:1055/
For details, check the Tailscale proxy docs. Runway enables both the SOCKS5 and the HTTP proxy running on their default ports (1055
).
If you plan to use Tailscale only for certain features in your application, then making your application aware of the proxy might be the next step. To talk to another HTTP app on your Tailnet, a very simplified example looks like the following:
proxyUrl, err := url.Parse("http://localhost:1055")
if err != nil {
panic(err)
}
httpClient := &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyURL(proxyUrl)
},
}
resp, err := httpClient.Get("http://some-other-app.your-tail-net.ts.net")
HTTP.via("localhost", 1055)
.get("http://some-other-app.your-tail-net.ts.net")
$client = new GuzzleHttp\Client(
'base_uri' => 'http://some-other-app.your-tail-net.ts.net',
);
$client->request('GET', '/', ['proxy' => 'http://localhost:8125']);