From bdf48d57032c5038cedd18baf4874d04b9140bd1 Mon Sep 17 00:00:00 2001 From: thc202 Date: Wed, 27 Sep 2023 11:56:49 +0100 Subject: [PATCH] network: ensure custom port main proxy is stopped Stop the main proxy with custom port before attempting to start it. Follow up #4939. Signed-off-by: thc202 --- addOns/network/CHANGELOG.md | 3 ++- addOns/network/gradle.properties | 2 +- .../main/java/org/zaproxy/addon/network/ExtensionNetwork.java | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addOns/network/CHANGELOG.md b/addOns/network/CHANGELOG.md index b611a907166..e3959775872 100644 --- a/addOns/network/CHANGELOG.md +++ b/addOns/network/CHANGELOG.md @@ -5,7 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased - +### Fixed +- Ensure the main proxy with custom port (`-port`) is stopped when initialising after installation in `cmd` and `daemon` modes. ## [0.11.1] - 2023-09-27 ### Fixed diff --git a/addOns/network/gradle.properties b/addOns/network/gradle.properties index b210ba5b0ca..517d34f89aa 100644 --- a/addOns/network/gradle.properties +++ b/addOns/network/gradle.properties @@ -1,4 +1,4 @@ -version=0.12.0 +version=0.11.2 release=false zap.maven.publish=true zap.maven.pom.inceptionyear=2021 diff --git a/addOns/network/src/main/java/org/zaproxy/addon/network/ExtensionNetwork.java b/addOns/network/src/main/java/org/zaproxy/addon/network/ExtensionNetwork.java index e0ee68b9a5b..993e416bdfd 100644 --- a/addOns/network/src/main/java/org/zaproxy/addon/network/ExtensionNetwork.java +++ b/addOns/network/src/main/java/org/zaproxy/addon/network/ExtensionNetwork.java @@ -884,6 +884,7 @@ private void startLocalServers(String overrideAddress, int overridePort, boolean if (overrides) { localServersOptions.setMainProxy(serverConfig); + stopLocalServer(mainProxyServer); } updateCoreProxy(serverConfig);