Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Add proxy support to native fetcher #590

Closed
wants to merge 4 commits into from
Closed

Conversation

wanlill
Copy link

@wanlill wanlill commented Jan 2, 2014

Example:
pagespeed FetchProxy 127.0.0.1:8081;
pagespeed FetchProxy www.proxy.com:8081:

By replace the ip address which nginx connect to with the ip address of the proxy server and replace the dns name nginx take to resolve with the dns name of the proxy server, we manage to pass all the fetch traffic to the proxy server. BTW, i am not very familiar with http proxy and github, so careful review is needed ^_^

@jeffkaufman
Copy link
Contributor

@jeffkaufman
Copy link
Contributor

@dinic could you have a look at this change?

@@ -106,6 +106,36 @@
}
}

// TODO(tcpper): maybe we should reform NgxFetch and NgxUrlAsyncFetcher to use the same ParseUrl
Copy link
Member

Choose a reason for hiding this comment

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

I agree - ParseUrl() should be refactored for re-use.

@oschaaf
Copy link
Member

oschaaf commented Jan 3, 2014

FWIW: code duplication and naming of url_ aside, this LGTM

…l and rename NgxUrlAsyncFetcher's url_ to proxy_
@wanlill
Copy link
Author

wanlill commented Jan 3, 2014

hi @oschaaf , i've made some change according to your comments ~

@oschaaf
Copy link
Member

oschaaf commented Jan 3, 2014

@tcpper great, LGTM!

jeffkaufman added a commit that referenced this pull request Jan 8, 2014
The native fetcher previously ignored FetchProxy settings; now it doesn't.

Squash-merge of tcpper's #590.
@jeffkaufman
Copy link
Contributor

squash-merged as df57366

Thanks @tcpper!

This should be in release 1.8 when we make it, and people can use it with 1.7 by building from master.

@wanlill
Copy link
Author

wanlill commented Jan 9, 2014

@jeffkaufman great!

@wanlill wanlill closed this Jan 9, 2014
@jmaessen jmaessen changed the title add proxy support to native fetcher Add proxy support to native fetcher Apr 23, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants