From 1790ee2c12a997160e95515ab61be835676a8b5b Mon Sep 17 00:00:00 2001 From: Ken Chen Date: Tue, 14 May 2024 16:52:41 -0700 Subject: [PATCH 1/4] listen ipv6 address --- programs/server/config.yaml | 4 ++-- programs/server/embedded.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/server/config.yaml b/programs/server/config.yaml index 583ae7d084..b60474ea71 100644 --- a/programs/server/config.yaml +++ b/programs/server/config.yaml @@ -123,10 +123,10 @@ interserver_http_port: 9009 # - all users have strong passwords, only secure (TLS) interfaces are accessible, or connections are only made via TLS interfaces. # - users without password have readonly access. # See also: https://www.shodan.io/search?query=proton -# listen_host: '::' +listen_host: '::' # Same for hosts without support for IPv6: -listen_host: 0.0.0.0 +# listen_host: 0.0.0.0 # Default values - try listen localhost on IPv4 and IPv6. # listen_host: '::1' diff --git a/programs/server/embedded.xml b/programs/server/embedded.xml index 8469f274bf..b621da6b2d 100644 --- a/programs/server/embedded.xml +++ b/programs/server/embedded.xml @@ -13,7 +13,7 @@ 5432 9004 9009 - 0.0.0.0 + :: true ./proton-data/ From f8c89a49234dabf326833ae6fe36e517ed53aff0 Mon Sep 17 00:00:00 2001 From: yoko Date: Tue, 14 May 2024 19:55:19 -0700 Subject: [PATCH 2/4] listen both on ipv6 and ipv4 --- programs/server/config.yaml | 2 +- programs/server/embedded.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/server/config.yaml b/programs/server/config.yaml index b60474ea71..8cdb55b703 100644 --- a/programs/server/config.yaml +++ b/programs/server/config.yaml @@ -126,7 +126,7 @@ interserver_http_port: 9009 listen_host: '::' # Same for hosts without support for IPv6: -# listen_host: 0.0.0.0 +listen_host: 0.0.0.0 # Default values - try listen localhost on IPv4 and IPv6. # listen_host: '::1' diff --git a/programs/server/embedded.xml b/programs/server/embedded.xml index b621da6b2d..d2d5742599 100644 --- a/programs/server/embedded.xml +++ b/programs/server/embedded.xml @@ -14,6 +14,7 @@ 9004 9009 :: + 0.0.0.0 true ./proton-data/ From 58da5b5d3a92f4f5f8f7b59274f0cc56d4a177d4 Mon Sep 17 00:00:00 2001 From: yoko Date: Wed, 15 May 2024 06:15:55 -0700 Subject: [PATCH 3/4] use default ipv4 and ipv6 in config ``` # Default values - try listen localhost on IPv4 and IPv6. # listen_host: '::1' # listen_host: 127.0.0.1 ``` --- programs/server/config.yaml | 4 ++-- programs/server/embedded.xml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/programs/server/config.yaml b/programs/server/config.yaml index 8cdb55b703..d2638436e9 100644 --- a/programs/server/config.yaml +++ b/programs/server/config.yaml @@ -123,10 +123,10 @@ interserver_http_port: 9009 # - all users have strong passwords, only secure (TLS) interfaces are accessible, or connections are only made via TLS interfaces. # - users without password have readonly access. # See also: https://www.shodan.io/search?query=proton -listen_host: '::' +# listen_host: '::' # Same for hosts without support for IPv6: -listen_host: 0.0.0.0 +# listen_host: 0.0.0.0 # Default values - try listen localhost on IPv4 and IPv6. # listen_host: '::1' diff --git a/programs/server/embedded.xml b/programs/server/embedded.xml index d2d5742599..0b132d45b9 100644 --- a/programs/server/embedded.xml +++ b/programs/server/embedded.xml @@ -13,8 +13,6 @@ 5432 9004 9009 - :: - 0.0.0.0 true ./proton-data/ From 851c9f12c7bd2fb661a41ab64cc756f039e4603a Mon Sep 17 00:00:00 2001 From: yokofly Date: Sun, 26 May 2024 16:51:22 +0800 Subject: [PATCH 4/4] for docker build: let's listen for 0.0.0.0 instead default localhost/127.0.0.1 1. to keep same behaviour when use docker (either mapping ports or not) 2. to make CI passed before this pr: we only listen for 0.0.0.0 (ipv4) after commit 58da5b5d3a9: we listen for 127.1 and [::] actually we need: listen for 0.0.0.0 and [::] --- docker/server/Dockerfile | 1 + docker/server/docker_related_config.xml | 4 ++-- docker/server/docker_related_config.yaml | 6 ------ 3 files changed, 3 insertions(+), 8 deletions(-) delete mode 100644 docker/server/docker_related_config.yaml diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 02403f480d..87396377c5 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -111,6 +111,7 @@ ENV TZ UTC RUN mkdir /docker-entrypoint-initdb.d +COPY docker_related_config.xml /etc/proton-server/config.d/ COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh diff --git a/docker/server/docker_related_config.xml b/docker/server/docker_related_config.xml index 3025dc2697..c251ef62fb 100644 --- a/docker/server/docker_related_config.xml +++ b/docker/server/docker_related_config.xml @@ -1,4 +1,4 @@ - + :: 0.0.0.0 @@ -9,4 +9,4 @@ 1 --> - + diff --git a/docker/server/docker_related_config.yaml b/docker/server/docker_related_config.yaml deleted file mode 100644 index 3458406b24..0000000000 --- a/docker/server/docker_related_config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# Listen wildcard address to allow accepting connections from other containers and host network. -listen_host: 0.0.0.0 -listen_try: 1 - -logger: - console: 1 \ No newline at end of file