From 069c5a74f1c7a6e90fceabfc31ed66c73ed34503 Mon Sep 17 00:00:00 2001 From: Konstantin Astafurov Date: Tue, 6 Feb 2024 00:42:34 -0500 Subject: [PATCH] ssl-proxy: 0.2.7 -> 0.2.7-unstable-2024-02-05 Remove patch as it has been applied in the ssl-proxy repo. --- pkgs/tools/networking/ssl-proxy/default.nix | 14 +++++--------- .../ssl-proxy/go120-compatibility.patch | 18 ------------------ 2 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 pkgs/tools/networking/ssl-proxy/go120-compatibility.patch diff --git a/pkgs/tools/networking/ssl-proxy/default.nix b/pkgs/tools/networking/ssl-proxy/default.nix index 1bfb1418355f7..da710379e5fc0 100644 --- a/pkgs/tools/networking/ssl-proxy/default.nix +++ b/pkgs/tools/networking/ssl-proxy/default.nix @@ -2,20 +2,16 @@ buildGoModule rec { pname = "ssl-proxy"; - version = "0.2.7"; + version = "0.2.7-unstable-2024-02-05"; src = fetchFromGitHub { owner = "suyashkumar"; repo = "ssl-proxy"; - rev = "v${version}"; - hash = "sha256-c9BLdDlkrg1z1QrO+vEAVyPtrV/nQcYlGXFmwfAOSpQ="; + rev = "6b0f364be9bbf0de46520a6b85d30792fcc3cb80"; + hash = "sha256-tYAsz99YCOOEyxPp8Yp+PTn+q2Edir+xy4Vs0yyHWOQ="; }; - vendorHash = "sha256-310K9ZSxy/OQ4HYFCcHQaj4NQwzATrOZ2YkhiSkhY5I="; - - patches = [ - ./go120-compatibility.patch - ]; + vendorHash = "sha256-PQ465+4AcH0wP4z2GsGdf/yABaGezaPq+eM0U2lu13o="; checkTarget = "test"; @@ -30,6 +26,6 @@ buildGoModule rec { license = licenses.mit; mainProgram = "ssl-proxy"; maintainers = [ maintainers.konst-aa ]; - platforms = platforms.linux ++ platforms.darwin ++ platforms.windows ; + platforms = platforms.linux ++ platforms.darwin ++ platforms.windows; }; } diff --git a/pkgs/tools/networking/ssl-proxy/go120-compatibility.patch b/pkgs/tools/networking/ssl-proxy/go120-compatibility.patch deleted file mode 100644 index 868ca39a54145..0000000000000 --- a/pkgs/tools/networking/ssl-proxy/go120-compatibility.patch +++ /dev/null @@ -1,18 +0,0 @@ -Check whether User-Agent is defined before trying to override it - -Since Go 1.20 [1], ReverseProxy no longer adds a User-Agent header to forwarded -requests. - -[1] https://github.com/golang/go/commit/f001df540b3fc66a475985c1b7c810e7df063c8f - ---- a/reverseproxy/reverseproxy.go -+++ b/reverseproxy/reverseproxy.go -@@ -32,7 +32,7 @@ func newDirector(target *url.URL, extraDirector func(*http.Request)) func(*http. - } else { - req.URL.RawQuery = targetQuery + "&" + req.URL.RawQuery - } -- if _, ok := req.Header["User-Agent"]; !ok { -+ if req.Header.Get("User-Agent") != "" { - // explicitly disable User-Agent so it's not set to default value - req.Header.Set("User-Agent", "") - }