Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for forward proxy #335

Closed
wants to merge 3 commits into from
Closed

Conversation

jinglong
Copy link
Member

@jinglong jinglong commented Nov 4, 2013

Edit:
The proxy_connect module has been integrated into Tengine 2.3.0. And this pull request is closed now.



static ngx_http_module_t ngx_http_proxy_connect_module_ctx = {
NULL, /* preconfiguration */

This comment was marked as resolved.

@yaoweibin
Copy link
Member

test cases, please.

@lark
Copy link

lark commented Nov 1, 2014

Any progress or plan on this feature?

@lark
Copy link

lark commented Nov 2, 2014

I have rebased jinglong's work onto current master (d7fe6a4), and fixed various compilation errors, mostly for internal api changes. No test done yet.

See https://github.com/lark/tengine/tree/proxy-connect

@lark
Copy link

lark commented Nov 5, 2014

Add proxy_connect_bind directive. See https://github.com/lark/tengine/tree/proxy-connect
@jinglong @yaoweibin @chobits please have a look. I can make a new pull request.

@giasek
Copy link

giasek commented Sep 2, 2015

Can You please provide some example how to use this module ?

@chobits
Copy link
Member

chobits commented Sep 6, 2015

@giasek
Configuration from our internal test case is as following:

...
$t->write_file_expand('nginx.conf', <<'EOF');

%%TEST_GLOBALS%%

daemon         off;

events {
}

http {
    %%TEST_GLOBALS_HTTP%%

    resolver 8.8.8.8;

    server {
        listen  8081;
        server_name server_8081;
        location / {
            echo hello;
        }
    }

    server {
        listen       127.0.0.1:8080;
        server_name  localhost;
        proxy_connect;
        proxy_connect_allow 443 80 8081;
        proxy_connect_connect_timeout 10s;
        proxy_connect_read_timeout 10s;
        proxy_connect_send_timeout 10s;
        proxy_connect_send_lowat 0;
        location / {
            proxy_pass http:https://127.0.0.1:8081;
        }
    }
}
EOF
...

@giasek
Copy link

giasek commented Sep 8, 2015

@chobits cool, this really works for me. There is one thing because of I can not sleep ;). I'm using this module for a forward proxy

    location / {
    auth_basic "Restricted";
    auth_basic_user_file htpasswd;
    proxy_pass http:https://$http_host$uri$is_args$args;
    }
}

and when I enable basic http authentication tengine asks me for a credentials every domain is resolved and pushed by tengine. I would like to authenticate one time.
Can some help, please ?

@chobits
Copy link
Member

chobits commented Mar 11, 2016

After talking with @jinglong , we would reopen a new pull request for this module. In new pull request, we will fix some compatible problems, add test case, merge @lark 's proxy_connect_bind patch and put this module source to tengine/modules directory.

A standalone module for nginx is here.

@eagleusb
Copy link

eagleusb commented Dec 5, 2016

Hello,

do you plan to merge it soon ? It would be awesome to have the CONNECT method :)

@chobits
Copy link
Member

chobits commented Dec 6, 2016

hi @gooodmorningopenstack
Yes. This work is ongoing but we expect to clean code before merging.

@jfbus
Copy link

jfbus commented Jun 5, 2018

Hi. Any news on this PR ?

@chobits
Copy link
Member

chobits commented Jun 14, 2018

hi @jfbus , this module will be included in the later release of Tengine.
If you want to use, you can install this module into Tengine. I have maintain this module for some time, and it's production ready now. See https://github.com/chobits/ngx_http_proxy_connect_module#install.

@mbicca
Copy link

mbicca commented Jun 27, 2018

Hi @chobits ,

Just to clarify, this is not yet added to the latest Tengine release correct?

I installed it through ppa on Ubuntu and I don't see this module as available.

Thank you!
-Marco

@chobits
Copy link
Member

chobits commented Jun 27, 2018

hi @mbicca

Just to clarify, this is not yet added to the latest Tengine release correct?

Yes. If you want to use proxy_connect module with Tengine, you can install proxy_connect module from source.

@ghost
Copy link

ghost commented Feb 25, 2019

When to add this module to tengine?
Hope it soon getting added

@chobits
Copy link
Member

chobits commented Feb 27, 2019

hi @netroby ,

Will add it to tengine this version (tengine 2.3.x).
Currently we are merging nginx-1.15.x, this work is is nearing completion.


For nginx users, use this one.

@chobits
Copy link
Member

chobits commented Mar 20, 2019

Hi @netroby @mbicca @gooodmorningopenstack @jfbus @giasek @lark

The proxy_connect module has been merged into master, we'll release 2.3.x soon!
See this #1210.

I'm closing this pull request.

@chobits chobits closed this Mar 20, 2019
@chobits chobits self-requested a review June 25, 2019 02:28
@chobits chobits assigned chobits and unassigned aholic Jun 25, 2019
@chobits chobits removed their request for review June 25, 2019 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants