forwardproxy Forward port with tailscale domain by query. hostname.xxx.ts.net?port=9000
DockerHub: janjangao/forwardproxy
docker run --network=host --restart unless-stopped -d --name forwardproxy janjangao/forwardproxy
docker compose
services:
forwardproxy:
image: janjangao/forwardproxy
container_name: forwardproxy
network_mode: host
restart: unless-stopped
tailscale funnel --bg 8080
For example, you have a portainer deployed on localhost:9000, try access http://localhost:8080?port=9000, you can access portainer as well, the query shall be saved on cookie after first access, next time you only need vist http://localhost:8080 with same browser, if need change forward port, put the query port=5244 in url again.
https://{yourdomain}?port=9000
By right, container can not access host localhost network, so we need run with --network=host, but container has a bidge IP 172.17.0.1 can access host, so can assign it as default host by env variable.
But with this way, you only can access with current host services by port, host parameter shall not be supported. if you are looking for a way to use other service on intranet, for example: https://{yourdomain}?host=192.168.1.7:5244, it still need run with network=host mode.
# 8888 is server port
docker run -p 8080:8080 -e PORT_FORWARD_DEFAULT_HOST=172.17.0.1 --restart unless-stopped -d --name forwardproxy janjangao/forwardproxy
It has same host network accessbility problem(container can't access host localhost), tailscale needs run with --network=host as well.
Port forward shall be enough for tailscale funnel, if you want to forward host you can try this
Clear the forward cookie
debug info
Server port, value: 8080
Default forward port if don't have any query, value: 80
Default forward host if don't any query, value: localhost