apernet/hysteria

docker: hysteria2 without network_mode: host?

Closed this issue · 2 comments

Describe the bug
I don't think this is a bug, more of a question. How can I get this working without giving the container "host" networking mode? I've tried added "NET_ADMIN" and/or "NET_BIND_SERVICE" to my docker-compose, as well as the appropriate ports but the container is unreachable.

  hysteria:
    image: tobyxdd/hysteria
    container_name: hysteria
    restart: always
    env_file:
      - docker.env
    cap_add:
      - NET_ADMIN
      - NET_BIND_SERVICE
    ports:
      - 993:993
    volumes:
      - ./hysteria/certs/:/certs/
      - ./hysteria/hysteria.yaml:/etc/hysteria.yaml
    command: ["server", "-c", "/etc/hysteria.yaml"]

Oh duh!