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

question #91

Closed
Octolus opened this issue Apr 24, 2017 · 2 comments
Closed

question #91

Octolus opened this issue Apr 24, 2017 · 2 comments

Comments

@Octolus
Copy link

Octolus commented Apr 24, 2017

I want to forward https://domain.com full request to a http proxy server ( http://127.0.0.1:80)

how would i do that? any examples on this? :)

it would basically forward the full request, then get the return from the server.. the return as in response only, not headers.

@Octolus
Copy link
Author

Octolus commented Apr 24, 2017

I guess this is what I'm supposed to use. domain.tld is what i want to "hijack" the traffic of into my own proxy server.

var hoxy = require('hoxy');
var proxy = hoxy.createServer({
  upstreamProxy: '127.0.0.1:80',
  reverse: 'https://domain.tld',
  certAuthority: { key, cert },
  tls: { key, cert },
  slow: { rate, latency, up, down }
});

@greim
Copy link
Owner

greim commented Apr 24, 2017

So basically a conditional flow like this?

browser => hoxy => yourProxy => domain.tld  # if domain.tld
browser => hoxy => otherDomain.tld          # otherwise

Unfortunately Hoxy doesn't have a built-in way to do this. The example above would forward to the upstream proxy no matter which domain.

The reverse option just tells Hoxy where to forward traffic if you visit the proxy directly (rather than configuring your client to use it as a proxy).

@greim greim closed this as completed Apr 24, 2017
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

No branches or pull requests

2 participants