Skip to content

tsdproxy fails to detect container port when using ipvlan network mode #359

@flower-knight

Description

@flower-knight
Image

Before file a bug
I’ve verified that this issue is not listed in https://almeidapaulopt.github.io/tsdproxy/docs/troubleshooting/

Describe the bug
When running a container using an ipvlan network mode, tsdproxy fails to correctly detect or use the mapped container port.
Even with both annotations:

tsdproxy.container_port: "1880/http"
tsdproxy.port.1: "1880/http:1880/http,no_autodetect"

the proxy cannot get or apply the port mapping properly.
As a result, the container service is not exposed or reachable through the configured proxy.

Expected behavior

docker run --rm --name sample-nginx --network br0 --ip 10.10.1.50 -p 1880:1880 --label "tsdproxy.name=sample-nginx1" --label "tsdproxy.enable=true"  --label "tsdproxy.autodetect=false" --label "tsdproxy.port.1=1880/http:1880/http,no_autodetect"  nginx:latest

tsdproxy should correctly detect and bind the container port when using ipvlan networking, the same way it works with bridge or host networks.
The service should be reachable through the configured tsdproxy port definitions.

Send config
docker-compose.yaml

services:
  tsdproxy:
    image: almeidapaulopt/tsdproxy:dev
    container_name: tsdproxy
    restart: unless-stopped
    networks:
      br0:
        ipv4_address: 10.10.2.32
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /mnt/nfs/data/tsdproxy/data:/data
      - /mnt/nfs/docker/tsdproxy/config:/config
    #ports:
    #  - 8080:8080
    #extra_hosts:
    #  - host.docker.internal:host-gateway
networks:
  br0:
    external: true

tsdproxy.yaml

defaultProxyProvider: default
docker:
    local:
        host: unix:///var/run/docker.sock
        defaultProxyProvider: default
lists: {}
tailscale:
    providers:
        default:
            authKey: xxxx
            controlUrl: xxxx
    dataDir: /data/
http:
    hostname: 0.0.0.0
    port: 8080
log:
    level: info
    json: false
proxyAccessLog: true

Logs

tsdproxy  | 6:30PM INF Container 9e325844f236c8e97aef6e9d649b8c327dcaf7d339c51ab238226d0a7293725d started docker=local module=proxymanager
tsdproxy  | 6:30PM INF setting up proxy hostname=sample-nginx1 module=proxymanager proxyname=sample-nginx1
tsdproxy  | 6:30PM INF starting proxy module=proxymanager proxyname=sample-nginx1
tsdproxy  | 6:30PM WRN No ports configured module=proxymanager proxyname=sample-nginx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions