Skip to content

Update http_proxy_connect_module_generic to allow HTTP CONNECT in NGINX v1.26 & v1.27#351880

Draft
FrostKiwi wants to merge 2 commits into
NixOS:masterfrom
FrostKiwi:patch-1
Draft

Update http_proxy_connect_module_generic to allow HTTP CONNECT in NGINX v1.26 & v1.27#351880
FrostKiwi wants to merge 2 commits into
NixOS:masterfrom
FrostKiwi:patch-1

Conversation

@FrostKiwi

Copy link
Copy Markdown

Nginx has

additionalModules = mkOption {

to allow additional modules. Among those is https://github.com/chobits/ngx_http_proxy_connect_module , which allows HTTP_CONNECT, a highly important yet basic HTTP command for many proxy setups. But NixOS's nginx only defined that module to be used up to nginx v1.25. With the nginx in the main nixos channel being v1.26, this broke installation where this module was used.

With commit chobits/ngx_http_proxy_connect_module@4f0b6c2 support for up to nginx v1.27.1 was added. This small PR allows this to be setup with NixOS's official option for that by merely bumping the allowed versions + commit and hash.

As for now, I use a custom patch in my NixOS config to allow support for that module:

  http_proxy_connect_module = pkgs.stdenv.mkDerivation {
    pname = "http_proxy_connect_module";
    version = "4f0b6c2297862148c59a0d585d6c46ccb7e58a39";
    src = pkgs.fetchFromGitHub {
      owner = "chobits";
      repo = "ngx_http_proxy_connect_module";
      rev = "4f0b6c2297862148c59a0d585d6c46ccb7e58a39";
      sha256 = "sha256-Yob2Z+a3ex3Ji6Zz8J0peOYnKpYn5PlC9KsQNcHCL9o=";
    };
    patches = [ "${pkgs.fetchFromGitHub { 
      owner = "chobits"; 
      repo = "ngx_http_proxy_connect_module"; 
      rev = "4f0b6c2297862148c59a0d585d6c46ccb7e58a39"; 
      sha256 = "sha256-Yob2Z+a3ex3Ji6Zz8J0peOYnKpYn5PlC9KsQNcHCL9o=";
    }}/patch/proxy_connect_rewrite_102101.patch" ];

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@nix-owners nix-owners Bot requested a review from RaitoBezarius October 28, 2024 13:17
@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label Oct 28, 2024
@ofborg ofborg Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Oct 28, 2024

@FliegendeWurst FliegendeWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure your commit messages follow CONTRIBUTING.md

Did you test the new version with Nginx 1.24 up to 1.27?

@FrostKiwi

Copy link
Copy Markdown
Author

CONTRIBUTING.md

I'll align with those instructions 👍

Did you test the new version with Nginx 1.24 up to 1.27?

Some, not all of them. The patch didn't change a single letter since 1.21.4 so I didn't due the due diligence of checking all of them.

@FliegendeWurst FliegendeWurst marked this pull request as draft March 23, 2025 11:36
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 2, 2025
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants